diff --git a/.versioneer-lookup b/.versioneer-lookup index 5d19dfac7..66a0f28c6 100644 --- a/.versioneer-lookup +++ b/.versioneer-lookup @@ -24,10 +24,10 @@ maintenance 1.10.0 cd955e9a46782119b36cc22b8dea5652ebbf9774 pep440-dev fix/.* 1.10.0 cd955e9a46782119b36cc22b8dea5652ebbf9774 pep440-dev improve/.* 1.10.0 cd955e9a46782119b36cc22b8dea5652ebbf9774 pep440-dev -# staging/bugfix is the branch for preparation of the 1.8.8 bugfix release +# staging/bugfix is the branch for preparation of the 1.9.x bugfix releases # so are any bug/... branches -staging/bugfix 1.8.8 8e4c1f5246c4245b839ccdcdabf2beee671b08d7 pep440-dev -bug/.* 1.8.8 8e4c1f5246c4245b839ccdcdabf2beee671b08d7 pep440-dev +staging/bugfix 1.9.1 93e495f921ea445d69ef51a1415f304b85ad3577 pep440-dev +bug/.* 1.9.1 93e495f921ea445d69ef51a1415f304b85ad3577 pep440-dev # staging/maintenance is currently the branch for preparation of 1.9.0rc7 # so is regressionfix/... diff --git a/src/octoprint/plugin/core.py b/src/octoprint/plugin/core.py index ad66d87a2..297386e4a 100644 --- a/src/octoprint/plugin/core.py +++ b/src/octoprint/plugin/core.py @@ -577,7 +577,9 @@ class PluginInfo: self._version if self._version is not None else self._get_instance_attribute( - ControlProperties.attr_version, default=self._version, incl_metadata=True + ControlProperties.attr_version, + default=self._version, + incl_metadata=True, ) ) @@ -959,7 +961,9 @@ class PluginManager: if self.plugin_folders: try: added, found = self._find_plugins_from_folders( - self.plugin_folders, existing, ignored_uninstalled=ignore_uninstalled + self.plugin_folders, + existing, + ignored_uninstalled=ignore_uninstalled, ) result_added.update(added) result_found += found @@ -1791,7 +1795,10 @@ class PluginManager: plugin_hooks = plugin.hooks.keys() return any( - map(lambda hook: PluginManager.hook_matches_hooks(hook, *hooks), plugin_hooks) + map( + lambda hook: PluginManager.hook_matches_hooks(hook, *hooks), + plugin_hooks, + ) ) @staticmethod @@ -2168,7 +2175,7 @@ class PluginManager: plugin_info = self.get_plugin_info(impl[0], require_enabled=False) return ( - sv(sorting_value), + sv(sorting_value, default_value=self.default_order), not plugin_info.bundled if plugin_info else True, sv(impl[0]), ) diff --git a/src/octoprint/plugins/softwareupdate/__init__.py b/src/octoprint/plugins/softwareupdate/__init__.py index f1df12387..a287e84b1 100644 --- a/src/octoprint/plugins/softwareupdate/__init__.py +++ b/src/octoprint/plugins/softwareupdate/__init__.py @@ -8,6 +8,7 @@ import hashlib import logging import logging.handlers import os +import sys import threading import time from concurrent import futures @@ -1912,6 +1913,14 @@ class SoftwareUpdatePlugin( except Exception: self._logger.exception(f"Error while checking if {target} can be updated") update_possible = False + error = "update" + + if target == "octoprint" and sys.platform == "win32": + self._logger.info( + "OctoPrint is running on Windows, it cannot be updated through itself due to Windows' file locking behavior. Please update manually." + ) + update_possible = False + error = "windows" self._version_cache[target] = { "timestamp": time.time(), diff --git a/src/octoprint/plugins/softwareupdate/static/js/softwareupdate.js b/src/octoprint/plugins/softwareupdate/static/js/softwareupdate.js index aba2cf5b7..a9098d576 100644 --- a/src/octoprint/plugins/softwareupdate/static/js/softwareupdate.js +++ b/src/octoprint/plugins/softwareupdate/static/js/softwareupdate.js @@ -720,6 +720,19 @@ $(function () { "Unknown error while checking for update, please check the logs" ); } + case "update": { + return gettext( + "Unknown error while checking if update is possible, please check the logs" + ); + } + case "windows": { + return _.sprintf( + gettext( + 'Update not possible under Windows due to its strict file locking behaviour, please see the FAQ' + ), + {url: "https://faq.octoprint.org/update-not-possible-windows"} + ); + } default: { return ""; } diff --git a/src/octoprint/plugins/softwareupdate/templates/softwareupdate_settings.jinja2 b/src/octoprint/plugins/softwareupdate/templates/softwareupdate_settings.jinja2 index 4080362ea..b6b2e3342 100644 --- a/src/octoprint/plugins/softwareupdate/templates/softwareupdate_settings.jinja2 +++ b/src/octoprint/plugins/softwareupdate/templates/softwareupdate_settings.jinja2 @@ -46,7 +46,7 @@ {% trans %}
- Please take a look at this FAQ entry on how to proceed. + Please take a look at this FAQ entry on how to proceed.
{% endtrans %}