diff --git a/spyder/workers/updates.py b/spyder/workers/updates.py index c7c69a76948..1eeb469196f 100644 --- a/spyder/workers/updates.py +++ b/spyder/workers/updates.py @@ -95,27 +95,16 @@ def get_releases(self): if self.update_from_github: # Get releases from GitHub url = 'https://api.github.com/repos/spyder-ide/spyder/releases' - logger.debug(f"Getting releases from {url}.") - data = urlopen(url, **context).read() else: - # Get releases from conda - logger.debug("Getting releases from conda-forge.") - if os.name == "nt": - platform = "win-64" - elif sys.platform == "darwin": - platform = "osx-64" - else: - platform = "linux-64" - cmd = f"{find_conda()} search " - cmd += f"'spyder[channel=conda-forge, subdir={platform}]'" - cmd += " --json" - proc = run_shell_command(cmd) - data, err = proc.communicate(timeout=20) + # Get releases from conda-forge + url = 'https://conda.anaconda.org/conda-forge/channeldata.json' + logger.debug(f"Getting releases from {url}.") + data = urlopen(url, **context).read() except URLError as exc: logger.debug(exc) self.error = _('Unable to connect to the internet.

Make ' 'sure the connection is working properly.') - except (HTTPError, TimeoutError, Exception) as exc: + except (HTTPError, Exception) as exc: logger.debug(exc) self.error = _('Unable to retrieve Spyder version information.') @@ -132,7 +121,7 @@ def get_releases(self): releases = set(item['tag_name'].replace('v', '') for item in data) else: - releases = set(v['version'] for v in data['spyder']) + releases = [data['packages']['spyder']['version']] # Always reset self.releases self.releases = sorted(releases)