From 594b660bb6eacc61a1b8f0f01f3b167de12ba3d2 Mon Sep 17 00:00:00 2001 From: Charlie Powell <31997505+cp2004@users.noreply.github.com> Date: Wed, 16 Mar 2022 21:44:03 +0000 Subject: [PATCH 01/14] :pencil2 --- docs/configuration/config_yaml.rst | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/docs/configuration/config_yaml.rst b/docs/configuration/config_yaml.rst index 1153169c3..c4dd73a5d 100644 --- a/docs/configuration/config_yaml.rst +++ b/docs/configuration/config_yaml.rst @@ -451,6 +451,11 @@ Use the following settings to enable or disable OctoPrint features: # whether G90/G91 also influence absolute/relative mode of extruders g90InfluencesExtruder: false + + # Replace all special characters and spaces with text equivalent to make them univerally compatible. + # Most OS filesystems work fine with unicode characters, but just in case you can revert to the + # older behaviour by setting this to true. + enforceReallyUniversalFilenames: false .. _sec-configuration-config_yaml-folder: From 8c9536f323b13bfc3f8db29eba1f395af32b049c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Gina=20H=C3=A4u=C3=9Fge?= Date: Thu, 17 Mar 2022 14:28:16 +0100 Subject: [PATCH 02/14] =?UTF-8?q?=F0=9F=90=9B=20GCV:=20Send=20the=20final?= =?UTF-8?q?=20layer=20to=20the=20UI=20as=20well?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Closes #4463 --- .../plugins/gcodeviewer/static/js/viewer/worker.js | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/src/octoprint/plugins/gcodeviewer/static/js/viewer/worker.js b/src/octoprint/plugins/gcodeviewer/static/js/viewer/worker.js index e0d4a6567..02492cfa1 100644 --- a/src/octoprint/plugins/gcodeviewer/static/js/viewer/worker.js +++ b/src/octoprint/plugins/gcodeviewer/static/js/viewer/worker.js @@ -709,12 +709,17 @@ var doParse = function () { } if (sendMultiLayer.indexOf(sendLayer) === -1) { - sendMultiLayer[sendMultiLayer.length] = sendLayer; + sendMultiLayer.push(sendLayer); } sendLayer = undefined; } } + + // we are done, send the final layer + if (sendMultiLayer.indexOf(activeLayer) === -1) { + sendMultiLayer.push(activeLayer); + } sendLayersToParent(sendMultiLayer, 100); }; From 7bc2a79642db98aa7a3f4477fe1cedeaec22a74e Mon Sep 17 00:00:00 2001 From: Zack Lewis <1774764+lima3w@users.noreply.github.com> Date: Thu, 17 Mar 2022 17:32:24 -0500 Subject: [PATCH 03/14] :pencil2: Spelling correction in software update docs (#4466) * Spelling Correction supplyting -> supplying * Update AUTHORS.md --- AUTHORS.md | 1 + docs/bundledplugins/softwareupdate.rst | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/AUTHORS.md b/AUTHORS.md index 5cf6f796c..e325c6982 100644 --- a/AUTHORS.md +++ b/AUTHORS.md @@ -150,6 +150,7 @@ date of first contribution): * [Ben Sycha](https://github.com/Sycha) * [Bryan Kenote](https://github.com/bryankenote) * [Quinn Damerell](https://github.com/QuinnDamerell) + * [Zack Lewis](https://github.com/lima3w) 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/docs/bundledplugins/softwareupdate.rst b/docs/bundledplugins/softwareupdate.rst index 574770f2b..c0a089eb8 100644 --- a/docs/bundledplugins/softwareupdate.rst +++ b/docs/bundledplugins/softwareupdate.rst @@ -551,7 +551,7 @@ Global credentials .. versionadded:: 1.5.0 -Starting with OctoPrint 1.5.0, the Software Update Plugin supports supplyting a GitHub +Starting with OctoPrint 1.5.0, the Software Update Plugin supports supplying a GitHub API token to use for the ``github_release`` and ``github_commit`` version check types, to work around possible rate limit problems if a lot of checks are to be made from a single external IP. You may create a `personal access token `_ From 6728a174486eb29d2f393414f312324775be107d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Gina=20H=C3=A4u=C3=9Fge?= Date: Tue, 22 Mar 2022 12:07:59 +0100 Subject: [PATCH 04/14] =?UTF-8?q?=F0=9F=9A=B8=20Re-enable=20connect=20dial?= =?UTF-8?q?og=20w/=20no=20serial=20ports?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Apparently disabling it if no serial ports are currently known to the client breaks certain workflows for people. So this is a short-term solution to fix things for them, while technically non-sensical (why offer to connect if we don't see anything to connect to?) So in 1.9.0 this should rather be solved by adding some form of platform agnostic (!) auto-refresh, either regular polling while no port is detected, or even watchdog enabled event based refresh. See #4473. --- src/octoprint/static/js/app/viewmodels/connection.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/octoprint/static/js/app/viewmodels/connection.js b/src/octoprint/static/js/app/viewmodels/connection.js index 1bd6b0d98..664c30918 100644 --- a/src/octoprint/static/js/app/viewmodels/connection.js +++ b/src/octoprint/static/js/app/viewmodels/connection.js @@ -40,7 +40,8 @@ $(function () { self.isLoading = ko.observable(undefined); self.enableConnect = ko.pureComputed(function () { - return self.enablePort() || !self.isErrorOrClosed(); + //return self.enablePort() || !self.isErrorOrClosed(); + return true; // enable always for now, until we have an auto refresh in 1.9.0 }); self.buttonText = ko.pureComputed(function () { From 34e935bd0b94b9c46007192e52bcfe715eefb87d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Gina=20H=C3=A4u=C3=9Fge?= Date: Tue, 22 Mar 2022 17:09:21 +0100 Subject: [PATCH 05/14] =?UTF-8?q?=F0=9F=90=9B=20GCV:=20Moves=20may=20be=20?= =?UTF-8?q?arcs=20too?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Closes #4471 --- .../plugins/gcodeviewer/static/js/viewer/renderer.js | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/src/octoprint/plugins/gcodeviewer/static/js/viewer/renderer.js b/src/octoprint/plugins/gcodeviewer/static/js/viewer/renderer.js index f09c5d360..317e33da1 100644 --- a/src/octoprint/plugins/gcodeviewer/static/js/viewer/renderer.js +++ b/src/octoprint/plugins/gcodeviewer/static/js/viewer/renderer.js @@ -1042,7 +1042,14 @@ GCODE.renderer = (function () { if (renderOptions["showMoves"] && !isNotCurrentLayer) { // move => draw line from (prevX, prevY) to (x, y) in move color ctx.lineWidth = lineWidthFactor; - ctx.lineTo(x, y); + + if (cmd.direction !== undefined && cmd.direction !== 0) { + var arc = getArcParams(cmd); + var ccw = cmd.direction < 0; // Y-axis is inverted so direction is also inverted + ctx.arc(arc.x, arc.y, arc.r, arc.startAngle, arc.endAngle, ccw); + } else { + ctx.lineTo(x, y); + } } } else if (cmd.extrude) { if (cmd.retract == 0) { From 772f9f95da25839dadcc8e3036abd986fc5788af Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Gina=20H=C3=A4u=C3=9Fge?= Date: Wed, 23 Mar 2022 10:23:18 +0100 Subject: [PATCH 06/14] =?UTF-8?q?=F0=9F=93=8C=20pre-commit:=20Pin=20flake8?= =?UTF-8?q?=20bugbear?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The new version will cause pre-commit to fail, we need to fix the newly detected issues but not on frozen code (like master or to a degree the RCs). --- .pre-commit-config.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 26e4d5b16..0f25d2818 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -34,7 +34,7 @@ repos: hooks: - id: flake8 additional_dependencies: - - flake8-bugbear + - flake8-bugbear==22.1.11 - repo: https://github.com/pre-commit/mirrors-prettier rev: v2.1.2 hooks: From 37bc8741315847d8d417f59aaa107927bb01dbe7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Gina=20H=C3=A4u=C3=9Fge?= Date: Wed, 23 Mar 2022 10:55:12 +0100 Subject: [PATCH 07/14] =?UTF-8?q?=E2=AC=86=EF=B8=8F=20pre-commit:=20upgrad?= =?UTF-8?q?e=20flake8-bugbear=20&=20fix=20issues?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .pre-commit-config.yaml | 2 +- src/octoprint/plugin/types.py | 2 +- src/octoprint/server/util/watchdog.py | 3 +-- src/octoprint/server/views.py | 4 ++-- src/octoprint/util/comm.py | 2 +- 5 files changed, 6 insertions(+), 7 deletions(-) diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 169d23636..7675171e7 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -52,7 +52,7 @@ repos: hooks: - id: flake8 additional_dependencies: - - flake8-bugbear==22.1.11 + - flake8-bugbear==22.3.20 - repo: https://github.com/pre-commit/mirrors-prettier rev: v2.5.1 hooks: diff --git a/src/octoprint/plugin/types.py b/src/octoprint/plugin/types.py index b43982670..b5e7979c1 100644 --- a/src/octoprint/plugin/types.py +++ b/src/octoprint/plugin/types.py @@ -1428,7 +1428,7 @@ class BlueprintPlugin(OctoPrintPlugin, RestartNeedingPlugin): # we now iterate over all members of ourselves and look if we find an attribute # that has data originating from one of our decorators - we ignore anything # starting with a _ to only handle public stuff - for member in [member for member in dir(self) if not member.startswith("_")]: + for member in [x for x in dir(self) if not x.startswith("_")]: f = getattr(self, member) if hasattr(f, "_blueprint_rules") and member in f._blueprint_rules: diff --git a/src/octoprint/server/util/watchdog.py b/src/octoprint/server/util/watchdog.py index aa36d8fe6..4424c19d5 100644 --- a/src/octoprint/server/util/watchdog.py +++ b/src/octoprint/server/util/watchdog.py @@ -41,8 +41,7 @@ class GcodeWatchdogHandler(watchdog.events.PatternMatchingEventHandler): """Recursively yield DirEntry objects for given directory.""" for entry in os.scandir(path): if entry.is_dir(follow_symlinks=False): - for entry in _recursive_scandir(entry.path): - yield entry + yield from _recursive_scandir(entry.path) else: yield entry diff --git a/src/octoprint/server/views.py b/src/octoprint/server/views.py index 235e15f01..26e31ae17 100644 --- a/src/octoprint/server/views.py +++ b/src/octoprint/server/views.py @@ -150,9 +150,9 @@ def _valid_status_for_cache(status_code): return 200 <= status_code < 400 -def _add_additional_assets(hook): +def _add_additional_assets(hook_name): result = [] - for name, hook in pluginManager.get_hooks(hook).items(): + for name, hook in pluginManager.get_hooks(hook_name).items(): try: assets = hook() if isinstance(assets, (tuple, list)): diff --git a/src/octoprint/util/comm.py b/src/octoprint/util/comm.py index 9677002ae..92b525600 100644 --- a/src/octoprint/util/comm.py +++ b/src/octoprint/util/comm.py @@ -2593,7 +2593,7 @@ class MachineCom: ) for key in [ - key for key in parsed if key.startswith("e") and len(key) > 1 + x for x in parsed if x.startswith("e") and len(x) > 1 ]: setattr(self.last_position, key, parsed.get(key)) From 54207abbe16533513a46787172308963e7f507f7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Gina=20H=C3=A4u=C3=9Fge?= Date: Mon, 28 Mar 2022 11:23:35 +0200 Subject: [PATCH 08/14] =?UTF-8?q?=E2=AC=86=EF=B8=8F=20Require=20latest=20v?= =?UTF-8?q?ersion=20of=20the=20PiSupport=20plugin?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- setup.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/setup.py b/setup.py index df469c257..2d5dc5126 100644 --- a/setup.py +++ b/setup.py @@ -31,7 +31,7 @@ SETUP_REQUIRES = [] bundled_plugins = [ "OctoPrint-FileCheck>=2021.2.23", "OctoPrint-FirmwareCheck>=2021.10.11", - "OctoPrint-PiSupport>=2022.3.1", + "OctoPrint-PiSupport>=2022.3.28", ] core_deps = [ "cachelib>=0.2,<0.3", From 3be85646cd599841f57afcd5a4acc5a240c018c5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Gina=20H=C3=A4u=C3=9Fge?= Date: Mon, 28 Mar 2022 14:27:38 +0200 Subject: [PATCH 09/14] =?UTF-8?q?=F0=9F=94=96=20Preparing=20release=20of?= =?UTF-8?q?=201.8.0rc3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- SUPPORTERS.md | 6 ++--- .../plugins/errortracking/__init__.py | 4 ++-- .../translations/de/LC_MESSAGES/messages.mo | Bin 211551 -> 211551 bytes .../translations/de/LC_MESSAGES/messages.po | 22 +++++++++--------- translations/de/LC_MESSAGES/messages.mo | Bin 211551 -> 211551 bytes translations/de/LC_MESSAGES/messages.po | 22 +++++++++--------- translations/messages.pot | 20 ++++++++-------- 7 files changed, 36 insertions(+), 38 deletions(-) diff --git a/SUPPORTERS.md b/SUPPORTERS.md index 13674e7b9..b9601c24e 100644 --- a/SUPPORTERS.md +++ b/SUPPORTERS.md @@ -45,7 +45,6 @@ thanks to everyone who contributed! * Kurt Wubbels * Kyle Menigoz * Lachlan Bell - * Lee Dohm * Lefteris Lertas * LulzBot * Makespace Madrid @@ -54,7 +53,6 @@ thanks to everyone who contributed! * Mike Kershaw * Miles Flavel * Mosaic Manufacturing - * Nat Friedman * Norman Jaffe * Peopoly * Pete Barnwell @@ -74,7 +72,7 @@ thanks to everyone who contributed! * The Spaghetti Detective * TJ Horner * Trent Shumay - * Ulderico Cirello * Ulrich Kempken + * Yehuda Katz -and 2298 more wonderful people pledging on the [Patreon campaign](https://patreon.com/foosel) or via [GitHub Sponsors](https://github.com/users/foosel/sponsorship)! +and 2307 more wonderful people pledging on the [Patreon campaign](https://patreon.com/foosel) or via [GitHub Sponsors](https://github.com/users/foosel/sponsorship)! diff --git a/src/octoprint/plugins/errortracking/__init__.py b/src/octoprint/plugins/errortracking/__init__.py index 03e1037dd..c1fe9c07f 100644 --- a/src/octoprint/plugins/errortracking/__init__.py +++ b/src/octoprint/plugins/errortracking/__init__.py @@ -18,10 +18,10 @@ from octoprint.util.version import ( ) SENTRY_URL_SERVER = ( - "https://a12e10f3ca4b418dba3ed99c1d220d14@o118517.ingest.sentry.io/1373987" + "https://4f9abc3158334309ad3c22f6693ee6e7@o118517.ingest.sentry.io/1373987" ) SENTRY_URL_COREUI = ( - "https://988f6e4854ee49188df51642ab576346@o118517.ingest.sentry.io/1374096" + "https://ef731a61e7a146228b720c54e21c554c@o118517.ingest.sentry.io/1374096" ) SETTINGS_DEFAULTS = { diff --git a/src/octoprint/translations/de/LC_MESSAGES/messages.mo b/src/octoprint/translations/de/LC_MESSAGES/messages.mo index 63654a9396f028ae8218d3da6c629a6ae506f711..f6d94d1289883b36336ad95645011913df827e87 100644 GIT binary patch delta 32 ocmccrh3Ebko`xliJGqT46bwzQ42`u7jM}+(GH&PI$rREE0MvpDU;qFB delta 32 ocmccrh3Ebko`xliJGl)_6$~w{jLfwS4BNSPGH&PI$rREE0Mx<@WdHyG diff --git a/src/octoprint/translations/de/LC_MESSAGES/messages.po b/src/octoprint/translations/de/LC_MESSAGES/messages.po index a725cf668..8aedbc772 100644 --- a/src/octoprint/translations/de/LC_MESSAGES/messages.po +++ b/src/octoprint/translations/de/LC_MESSAGES/messages.po @@ -5,7 +5,7 @@ msgid "" msgstr "" "Project-Id-Version: OctoPrint 1.8.0\n" "Report-Msgid-Bugs-To: i18n@octoprint.org\n" -"POT-Creation-Date: 2022-03-15 19:27+0100\n" +"POT-Creation-Date: 2022-03-28 14:13+0200\n" "PO-Revision-Date: 2021-08-04 11:01+0200\n" "Last-Translator: Gina Häußge \n" "Language: de\n" @@ -4661,7 +4661,7 @@ msgstr "Aus" #: src/octoprint/static/js/app/helpers.js:793 #: src/octoprint/static/js/app/viewmodels/access.js:324 #: src/octoprint/static/js/app/viewmodels/access.js:656 -#: src/octoprint/static/js/app/viewmodels/connection.js:187 +#: src/octoprint/static/js/app/viewmodels/connection.js:188 msgid "Are you sure?" msgstr "Bist Du sicher?" @@ -4804,21 +4804,21 @@ msgstr "Gruppe \"%(name)s\" bearbeiten" msgid "You are about to delete the group \"%(name)s\"." msgstr "Du bist im Begriff die Gruppe\"%(name)s\" zu löschen." -#: src/octoprint/static/js/app/viewmodels/connection.js:47 +#: src/octoprint/static/js/app/viewmodels/connection.js:48 #: src/octoprint/templates/sidebar/connection.jinja2:17 msgid "Connect" msgstr "Verbinden" -#: src/octoprint/static/js/app/viewmodels/connection.js:48 -#: src/octoprint/static/js/app/viewmodels/connection.js:200 +#: src/octoprint/static/js/app/viewmodels/connection.js:49 +#: src/octoprint/static/js/app/viewmodels/connection.js:201 msgid "Disconnect" msgstr "Trennen" -#: src/octoprint/static/js/app/viewmodels/connection.js:52 +#: src/octoprint/static/js/app/viewmodels/connection.js:53 msgid "No serial port found" msgstr "Keine serielle Schnittstelle gefunden" -#: src/octoprint/static/js/app/viewmodels/connection.js:188 +#: src/octoprint/static/js/app/viewmodels/connection.js:189 msgid "" "

You are about to disconnect from the printer while a print is " "in progress.

Disconnecting while a print is in progress " @@ -4833,11 +4833,11 @@ msgstr "" "Versuch, OctoPrint neuzustarten oder erneut mit dem Drucker zu verbinden " "den Druck unterbrechen.

" -#: src/octoprint/static/js/app/viewmodels/connection.js:196 +#: src/octoprint/static/js/app/viewmodels/connection.js:197 msgid "Are you sure you want to disconnect from the printer?" msgstr "Bist Du sicher, dass du die Verbindung zum Drucker trennen willst?" -#: src/octoprint/static/js/app/viewmodels/connection.js:199 +#: src/octoprint/static/js/app/viewmodels/connection.js:200 msgid "Stay Connected" msgstr "Verbunden bleiben" @@ -6962,8 +6962,8 @@ msgid "" "By checking this you'll disable OctoPrint warning you if no serial ports " "to connect to were found." msgstr "" -"Wenn du das auswählst, wird OctoPrint dich nicht warnen, wenn keine seriellen " -"Ports zum Verbinden gefunden werden konnten." +"Wenn du das auswählst, wird OctoPrint dich nicht warnen, wenn keine " +"seriellen Ports zum Verbinden gefunden werden konnten." #: src/octoprint/templates/dialogs/settings/serialconnection.jinja2:110 msgid "Serial logging" diff --git a/translations/de/LC_MESSAGES/messages.mo b/translations/de/LC_MESSAGES/messages.mo index 63654a9396f028ae8218d3da6c629a6ae506f711..f6d94d1289883b36336ad95645011913df827e87 100644 GIT binary patch delta 32 ocmccrh3Ebko`xliJGqT46bwzQ42`u7jM}+(GH&PI$rREE0MvpDU;qFB delta 32 ocmccrh3Ebko`xliJGl)_6$~w{jLfwS4BNSPGH&PI$rREE0Mx<@WdHyG diff --git a/translations/de/LC_MESSAGES/messages.po b/translations/de/LC_MESSAGES/messages.po index 829507ecd..993176454 100644 --- a/translations/de/LC_MESSAGES/messages.po +++ b/translations/de/LC_MESSAGES/messages.po @@ -5,7 +5,7 @@ msgid "" msgstr "" "Project-Id-Version: OctoPrint 1.8.0\n" "Report-Msgid-Bugs-To: i18n@octoprint.org\n" -"POT-Creation-Date: 2022-03-15 19:27+0100\n" +"POT-Creation-Date: 2022-03-28 14:13+0200\n" "PO-Revision-Date: 2021-08-04 11:01+0200\n" "Last-Translator: Gina Häußge \n" "Language: de\n" @@ -4661,7 +4661,7 @@ msgstr "Aus" #: src/octoprint/static/js/app/helpers.js:793 #: src/octoprint/static/js/app/viewmodels/access.js:324 #: src/octoprint/static/js/app/viewmodels/access.js:656 -#: src/octoprint/static/js/app/viewmodels/connection.js:187 +#: src/octoprint/static/js/app/viewmodels/connection.js:188 msgid "Are you sure?" msgstr "Bist Du sicher?" @@ -4804,21 +4804,21 @@ msgstr "Gruppe \"%(name)s\" bearbeiten" msgid "You are about to delete the group \"%(name)s\"." msgstr "Du bist im Begriff die Gruppe\"%(name)s\" zu löschen." -#: src/octoprint/static/js/app/viewmodels/connection.js:47 +#: src/octoprint/static/js/app/viewmodels/connection.js:48 #: src/octoprint/templates/sidebar/connection.jinja2:17 msgid "Connect" msgstr "Verbinden" -#: src/octoprint/static/js/app/viewmodels/connection.js:48 -#: src/octoprint/static/js/app/viewmodels/connection.js:200 +#: src/octoprint/static/js/app/viewmodels/connection.js:49 +#: src/octoprint/static/js/app/viewmodels/connection.js:201 msgid "Disconnect" msgstr "Trennen" -#: src/octoprint/static/js/app/viewmodels/connection.js:52 +#: src/octoprint/static/js/app/viewmodels/connection.js:53 msgid "No serial port found" msgstr "Keine serielle Schnittstelle gefunden" -#: src/octoprint/static/js/app/viewmodels/connection.js:188 +#: src/octoprint/static/js/app/viewmodels/connection.js:189 msgid "" "

You are about to disconnect from the printer while a print is " "in progress.

Disconnecting while a print is in progress " @@ -4833,11 +4833,11 @@ msgstr "" "Versuch, OctoPrint neuzustarten oder erneut mit dem Drucker zu verbinden " "den Druck unterbrechen.

" -#: src/octoprint/static/js/app/viewmodels/connection.js:196 +#: src/octoprint/static/js/app/viewmodels/connection.js:197 msgid "Are you sure you want to disconnect from the printer?" msgstr "Bist Du sicher, dass du die Verbindung zum Drucker trennen willst?" -#: src/octoprint/static/js/app/viewmodels/connection.js:199 +#: src/octoprint/static/js/app/viewmodels/connection.js:200 msgid "Stay Connected" msgstr "Verbunden bleiben" @@ -6962,8 +6962,8 @@ msgid "" "By checking this you'll disable OctoPrint warning you if no serial ports " "to connect to were found." msgstr "" -"Wenn du das auswählst, wird OctoPrint dich nicht warnen, wenn keine seriellen " -"Ports zum Verbinden gefunden werden konnten." +"Wenn du das auswählst, wird OctoPrint dich nicht warnen, wenn keine " +"seriellen Ports zum Verbinden gefunden werden konnten." #: src/octoprint/templates/dialogs/settings/serialconnection.jinja2:110 msgid "Serial logging" diff --git a/translations/messages.pot b/translations/messages.pot index 898a1398d..69723ce10 100644 --- a/translations/messages.pot +++ b/translations/messages.pot @@ -6,9 +6,9 @@ #, fuzzy msgid "" msgstr "" -"Project-Id-Version: OctoPrint 1.8.0rc2.dev12+g056eb122f.dirty\n" +"Project-Id-Version: OctoPrint 1.8.0rc3.dev8+g54207abbe.dirty\n" "Report-Msgid-Bugs-To: i18n@octoprint.org\n" -"POT-Creation-Date: 2022-03-15 19:27+0100\n" +"POT-Creation-Date: 2022-03-28 14:13+0200\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n" @@ -3999,7 +3999,7 @@ msgstr "" #: src/octoprint/static/js/app/helpers.js:793 #: src/octoprint/static/js/app/viewmodels/access.js:324 #: src/octoprint/static/js/app/viewmodels/access.js:656 -#: src/octoprint/static/js/app/viewmodels/connection.js:187 +#: src/octoprint/static/js/app/viewmodels/connection.js:188 msgid "Are you sure?" msgstr "" @@ -4140,21 +4140,21 @@ msgstr "" msgid "You are about to delete the group \"%(name)s\"." msgstr "" -#: src/octoprint/static/js/app/viewmodels/connection.js:47 +#: src/octoprint/static/js/app/viewmodels/connection.js:48 #: src/octoprint/templates/sidebar/connection.jinja2:17 msgid "Connect" msgstr "" -#: src/octoprint/static/js/app/viewmodels/connection.js:48 -#: src/octoprint/static/js/app/viewmodels/connection.js:200 +#: src/octoprint/static/js/app/viewmodels/connection.js:49 +#: src/octoprint/static/js/app/viewmodels/connection.js:201 msgid "Disconnect" msgstr "" -#: src/octoprint/static/js/app/viewmodels/connection.js:52 +#: src/octoprint/static/js/app/viewmodels/connection.js:53 msgid "No serial port found" msgstr "" -#: src/octoprint/static/js/app/viewmodels/connection.js:188 +#: src/octoprint/static/js/app/viewmodels/connection.js:189 msgid "" "

You are about to disconnect from the printer while a print is " "in progress.

Disconnecting while a print is in progress " @@ -4163,11 +4163,11 @@ msgid "" "OctoPrint or reconnect to the printer could interrupt the print.

" msgstr "" -#: src/octoprint/static/js/app/viewmodels/connection.js:196 +#: src/octoprint/static/js/app/viewmodels/connection.js:197 msgid "Are you sure you want to disconnect from the printer?" msgstr "" -#: src/octoprint/static/js/app/viewmodels/connection.js:199 +#: src/octoprint/static/js/app/viewmodels/connection.js:200 msgid "Stay Connected" msgstr "" From 24b5b3a857d0339107904536ba004a64b69920b3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Gina=20H=C3=A4u=C3=9Fge?= Date: Mon, 28 Mar 2022 16:42:46 +0200 Subject: [PATCH 10/14] =?UTF-8?q?=F0=9F=90=9B=20Fix=20potential=20race=20c?= =?UTF-8?q?ondition=20in=20webassets?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Could trigger when reloading page while preliminary cache was being done, causing an internal server error on page load, immediately fixed by a second reload. Seems to be caused by the change in webasset handling in 1.8.0, hence considering this a regression. Fix consists of switching to a thread-safe in-memory manifest storage. --- src/octoprint/server/__init__.py | 7 +++++-- src/octoprint/server/util/webassets.py | 18 ++++++++++++++++++ 2 files changed, 23 insertions(+), 2 deletions(-) diff --git a/src/octoprint/server/__init__.py b/src/octoprint/server/__init__.py index cb1b88fa7..bcb8f84bd 100644 --- a/src/octoprint/server/__init__.py +++ b/src/octoprint/server/__init__.py @@ -1944,6 +1944,8 @@ class Server: global assets global pluginManager + from octoprint.server.util.webassets import MemoryManifest # noqa: F401 + util.flask.fix_webassets_filtertool() base_folder = self._settings.getBaseFolder("generated") @@ -1955,7 +1957,8 @@ class Server: for entry, recreate in ( ("webassets", True), - (".webassets-cache", False), # no longer used, but clean up just in case + # no longer used, but clean up just in case + (".webassets-cache", False), (".webassets-manifest.json", False), ): path = os.path.join(base_folder, entry) @@ -2042,7 +2045,7 @@ class Server: # few seconds for regeneration in development, if it means we can get rid of # a whole monkey patch and in internal use of pickle with non-tamperproof files assets.cache = False - assets.manifest = "json:.webassets-manifest.json" + assets.manifest = "memory" UpdaterType = type(util.flask.SettingsCheckUpdater)( util.flask.SettingsCheckUpdater.__name__, diff --git a/src/octoprint/server/util/webassets.py b/src/octoprint/server/util/webassets.py index 08c01bee8..5fb9d0c80 100644 --- a/src/octoprint/server/util/webassets.py +++ b/src/octoprint/server/util/webassets.py @@ -6,6 +6,7 @@ import gzip import logging import os import re +import threading from urllib import parse as urlparse import webassets.filter.cssrewrite.urlpath as urlpath @@ -14,6 +15,7 @@ from webassets.filter import Filter from webassets.filter.cssrewrite.base import PatternRewriter from webassets.filter.rjsmin import rjsmin from webassets.merge import BaseHunk, MemoryHunk +from webassets.version import Manifest def replace_url(source_url, output_url, url): @@ -207,3 +209,19 @@ class JsPluginBundle(Bundle): (hunk, lambda x: x.replace("\n", "\n ")), MemoryHunk(_PLUGIN_BUNDLE_WRAPPER_SUFFIX.format(plugin=self.plugin)), ) + + +class MemoryManifest(Manifest): + id = "memory" + + def __init__(self, *args, **kwargs): + self.manifest = {} + self._lock = threading.RLock() + + def remember(self, bundle, ctx, version): + with self._lock: + self.manifest[bundle.output] = version + + def query(self, bundle, ctx): + with self._lock: + return self.manifest.get(bundle.output, None) From ccd5fa56a239d42830cb6825b779bc5aa141ee93 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Gina=20H=C3=A4u=C3=9Fge?= Date: Tue, 29 Mar 2022 10:38:04 +0200 Subject: [PATCH 11/14] =?UTF-8?q?=F0=9F=93=8C=20Pin=20werkzeug=20to=202.0.?= =?UTF-8?q?x=20for=20now?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Apparently werkzeug removes stuff on minor releases and that just broke flask-login 0.5. A newer version isn't out yet, so we pin to a lower version of werkzeug for 1.8.0 and will then see what to do with this situation for 1.9 and later (potentially even vendor flask-login as it appears pretty dead currently). --- setup.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/setup.py b/setup.py index 2d5dc5126..1a1e33f93 100644 --- a/setup.py +++ b/setup.py @@ -42,7 +42,6 @@ core_deps = [ "filetype>=1.0.7,<2", "Flask-Assets>=2.0,<3", "Flask-Babel>=2.0,<3", - "Flask-Login>=0.5,<0.6", # flask-login doesn't use semver & breaks stuff on minor version increases "flask>=2,<3", "frozendict>=2.0,<3", "future>=0.18.2,<1", # not really needed anymore, but leaving in for py2/3 compat plugins @@ -62,6 +61,7 @@ core_deps = [ "tornado>=6.0.4,<7", "watchdog>=1,<2", "websocket-client>=1.2.1,<2", + "werkzeug>=2.0,<2.1", # breaking changes can happen on minor version increases, flask-login 0.5 is incompatible with 2.1 "wrapt>=1.13.3,<1.14", "zeroconf>=0.33,<0.34", # breaking changes can happen on minor version increases "zipstream-ng>=1.3.4,<2.0.0", From ad32bbfdb819b92dbedc10ea083fd57a7017116d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Gina=20H=C3=A4u=C3=9Fge?= Date: Tue, 29 Mar 2022 10:55:15 +0200 Subject: [PATCH 12/14] =?UTF-8?q?=F0=9F=90=9B=20Add=20back=20accidentally?= =?UTF-8?q?=20removed=20flask-login=20req?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- setup.py | 1 + 1 file changed, 1 insertion(+) diff --git a/setup.py b/setup.py index 1a1e33f93..a5a4224e1 100644 --- a/setup.py +++ b/setup.py @@ -42,6 +42,7 @@ core_deps = [ "filetype>=1.0.7,<2", "Flask-Assets>=2.0,<3", "Flask-Babel>=2.0,<3", + "Flask-Login>=0.5,<0.6", # flask-login doesn't use semver & breaks stuff on minor version increases "flask>=2,<3", "frozendict>=2.0,<3", "future>=0.18.2,<1", # not really needed anymore, but leaving in for py2/3 compat plugins From 76e87ba81329e6ce761c9307d3e80c291000871e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Gina=20H=C3=A4u=C3=9Fge?= Date: Tue, 29 Mar 2022 11:19:16 +0200 Subject: [PATCH 13/14] =?UTF-8?q?=F0=9F=92=9A=20Pin=20click=20in=20pre-com?= =?UTF-8?q?mit=20black?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit See psf/black#2964 To be replaced by an update of black et al in dev branches. --- .pre-commit-config.yaml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 0f25d2818..fcfd2ebee 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -29,6 +29,8 @@ repos: hooks: - id: black args: ["--config", "black.toml"] + additional_dependencies: + - click==8.0.4 - repo: https://gitlab.com/pycqa/flake8 rev: 3.8.1 hooks: From 9faec6e9823aaec24d883bcfa692252c59c7f59a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Gina=20H=C3=A4u=C3=9Fge?= Date: Tue, 29 Mar 2022 14:05:23 +0200 Subject: [PATCH 14/14] =?UTF-8?q?=F0=9F=94=96=20staging/maintenance=20is?= =?UTF-8?q?=20now=201.8.0rc4.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 8bec63231..d85a311e2 100644 --- a/.versioneer-lookup +++ b/.versioneer-lookup @@ -29,10 +29,10 @@ improve/.* 1.8.0 3fe45661cd79c5137d9d4f5f4adb4d9519bc2084 pep440-dev staging/bugfix 1.7.4 59cbfadf8922d85b9df40f8d0173e8c21724c3b8 pep440-dev bug/.* 1.7.4 59cbfadf8922d85b9df40f8d0173e8c21724c3b8 pep440-dev -# staging/maintenance is currently the branch for preparation of 1.8.0rc3 +# staging/maintenance is currently the branch for preparation of 1.8.0rc4 # so is regressionfix/... -staging/maintenance 1.8.0rc3 76c59245329b8f485061ba20d21a56df4d474c34 pep440-dev -regressionfix/.* 1.8.0rc3 76c59245329b8f485061ba20d21a56df4d474c34 pep440-dev +staging/maintenance 1.8.0rc4 3c478036ae9edde3dd294af28bf1d8c78a2555d5 pep440-dev +regressionfix/.* 1.8.0rc4 3c478036ae9edde3dd294af28bf1d8c78a2555d5 pep440-dev # staging/devel is currently inactive (but has the 1.4.1rc4 namespace) staging/devel 1.4.1rc4 650d54d1885409fa1d411eb54b9e8c7ff428910f pep440-dev