diff --git a/AUTHORS.md b/AUTHORS.md index 986237fd..bc0c38a3 100644 --- a/AUTHORS.md +++ b/AUTHORS.md @@ -75,6 +75,7 @@ date of first contribution): * [Clemens Niemeyer](https://github.com/clemniem) * ["I-am-me"](https://github.com/I-am-me) * [Noah Martin](https://github.com/noahsmartin) + * [Eyal Soha](https://github.com/eyal0) OctoPrint started off as a fork of [Cura](https://github.com/daid/Cura) by [Daid Braam](https://github.com/daid). Parts of its communication layer and diff --git a/src/octoprint/plugins/pluginmanager/__init__.py b/src/octoprint/plugins/pluginmanager/__init__.py index 0b3e4fe1..90605517 100644 --- a/src/octoprint/plugins/pluginmanager/__init__.py +++ b/src/octoprint/plugins/pluginmanager/__init__.py @@ -667,9 +667,13 @@ class PluginManagerPlugin(octoprint.plugin.SimpleApiPlugin, octoprint_version_string = octoprint_version_string[:octoprint_version_string.find("-")] octoprint_version = pkg_resources.parse_version(octoprint_version_string) - # A leading v is common in github release tags and old setuptools doesn't remove it. + + # A leading v is common in github release tags and old setuptools doesn't remove it. While OctoPrint's + # versions should never contains such a prefix, we'll make sure to have stuff behave the same + # regardless of setuptools version anyhow. if octoprint_version and isinstance(octoprint_version, tuple) and octoprint_version[0].lower() == "*v": octoprint_version = octoprint_version[1:] + if base: if isinstance(octoprint_version, tuple): # old setuptools diff --git a/src/octoprint/plugins/softwareupdate/version_checks/github_release.py b/src/octoprint/plugins/softwareupdate/version_checks/github_release.py index 494bf025..5065e3b0 100644 --- a/src/octoprint/plugins/softwareupdate/version_checks/github_release.py +++ b/src/octoprint/plugins/softwareupdate/version_checks/github_release.py @@ -153,6 +153,7 @@ def _get_comparable_version_pkg_resources(version_string, force_base=True): # A leading v is common in github release tags and old setuptools doesn't remove it. if version and isinstance(version, tuple) and version[0].lower() == "*v": version = version[1:] + if force_base: if isinstance(version, tuple): # old setuptools