From 0753c1ef6fd81026a5026c00dc2c1071525e7b1d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Gina=20H=C3=A4u=C3=9Fge?= Date: Tue, 23 May 2023 10:28:35 +0200 Subject: [PATCH 1/4] =?UTF-8?q?=F0=9F=94=96=20staging/bugfix=20is=20now=20?= =?UTF-8?q?1.9.1.dev?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .versioneer-lookup | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.versioneer-lookup b/.versioneer-lookup index fc69115ad..0a747c543 100644 --- a/.versioneer-lookup +++ b/.versioneer-lookup @@ -24,10 +24,10 @@ maintenance 1.9.0 fa2c4680cca0d1d6b46e6c1ed68ceea4d9b79afb pep440-dev fix/.* 1.9.0 fa2c4680cca0d1d6b46e6c1ed68ceea4d9b79afb pep440-dev improve/.* 1.9.0 fa2c4680cca0d1d6b46e6c1ed68ceea4d9b79afb pep440-dev -# staging/bugfix is the branch for preparation of the 1.8.7 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.0rc6 # so is regressionfix/... From 2397867d28071ea12734588e993c3a7f94c04914 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Gina=20H=C3=A4u=C3=9Fge?= Date: Thu, 1 Jun 2023 17:13:35 +0200 Subject: [PATCH 2/4] =?UTF-8?q?=F0=9F=90=9B=20Fix=20treating=20of=20`None`?= =?UTF-8?q?=20sorting=20value?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit `None` values were converted to an empty string by sv, leading to comparison issues with (correct) integers. Using the default order value for sv fixes that. Closes #4818 --- src/octoprint/plugin/core.py | 15 +++++++++++---- 1 file changed, 11 insertions(+), 4 deletions(-) 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]), ) From cb8aa9b07c271df34170ee4f26a0364f8fe33dd1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Gina=20H=C3=A4u=C3=9Fge?= Date: Mon, 5 Jun 2023 11:57:58 +0200 Subject: [PATCH 3/4] =?UTF-8?q?=F0=9F=90=9B=20swu:=20refuse=20OctoPrint=20?= =?UTF-8?q?update=20under=20Windows?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Also improve error messaging in that regard (and fix some typo issues in an existing FAQ URL). Closes #4819 --- src/octoprint/plugins/softwareupdate/__init__.py | 9 +++++++++ .../softwareupdate/static/js/softwareupdate.js | 13 +++++++++++++ .../templates/softwareupdate_settings.jinja2 | 4 ++-- 3 files changed, 24 insertions(+), 2 deletions(-) diff --git a/src/octoprint/plugins/softwareupdate/__init__.py b/src/octoprint/plugins/softwareupdate/__init__.py index d271c1041..945199e60 100644 --- a/src/octoprint/plugins/softwareupdate/__init__.py +++ b/src/octoprint/plugins/softwareupdate/__init__.py @@ -9,6 +9,7 @@ import hashlib import logging import logging.handlers import os +import sys import threading import time from concurrent import futures @@ -1913,6 +1914,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 %}
{% trans %} @@ -115,7 +115,7 @@ {{ _('Installed:') }} {{ _('Available:') }} {{ _('Release Notes:') }} - + {{ _('Newer versions of this plugin are not compatible to this setup.') }} From b0a1884982c79785e2530e0c5f82317f5c044acb Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Gina=20H=C3=A4u=C3=9Fge?= Date: Mon, 5 Jun 2023 15:30:15 +0200 Subject: [PATCH 4/4] =?UTF-8?q?=F0=9F=9A=B8=20Enable=20deferring=20M20=20b?= =?UTF-8?q?y=20default?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Closes #4821 --- src/octoprint/schema/config/serial.py | 2 +- .../templates/dialogs/settings/serialconnection.jinja2 | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/octoprint/schema/config/serial.py b/src/octoprint/schema/config/serial.py index 5d3130921..fea5b3bf9 100644 --- a/src/octoprint/schema/config/serial.py +++ b/src/octoprint/schema/config/serial.py @@ -182,7 +182,7 @@ class SerialConfig(BaseModel): waitForStartOnConnect: bool = False """Whether OctoPrint should wait for the `start` response from the printer before trying to send commands during connect.""" - waitToLoadSdFileList: bool = False + waitToLoadSdFileList: bool = True """Specifies whether OctoPrint should wait to load the SD card file list until the first firmware capability report is processed.""" alwaysSendChecksum: bool = False diff --git a/src/octoprint/templates/dialogs/settings/serialconnection.jinja2 b/src/octoprint/templates/dialogs/settings/serialconnection.jinja2 index cb3cfbcd3..a5fca250f 100644 --- a/src/octoprint/templates/dialogs/settings/serialconnection.jinja2 +++ b/src/octoprint/templates/dialogs/settings/serialconnection.jinja2 @@ -463,7 +463,7 @@