Compare commits

..
17 Commits
Author SHA1 Message Date
Gina Häußge c5b095a8b9 🔖 Preparing release of 1.8.0rc4 2022-04-05 13:25:05 +02:00
Gina Häußge f4b4f50cfd 🐛 Fix handling of invalid intermittend values
We not only ignore None values on our subkey paths, we ignore
anything that isn't a dict we can further level down in.

Closes #4479
2022-04-04 19:02:44 +02:00
Gina Häußge 9faec6e982 🔖 staging/maintenance is now 1.8.0rc4.dev 2022-03-29 14:05:23 +02:00
Gina Häußge 3c478036ae Merge branch 'master' into staging/maintenance 2022-03-29 11:19:35 +02:00
Gina Häußge 76e87ba813 💚 Pin click in pre-commit black
See psf/black#2964

To be replaced by an update of black et al in dev branches.
2022-03-29 11:19:16 +02:00
Gina Häußge ad32bbfdb8 🐛 Add back accidentally removed flask-login req 2022-03-29 10:55:15 +02:00
Gina Häußge ccd5fa56a2 📌 Pin werkzeug to 2.0.x for now
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).
2022-03-29 10:38:04 +02:00
Gina Häußge 24b5b3a857 🐛 Fix potential race condition in webassets
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.
2022-03-28 16:42:46 +02:00
Gina Häußge 3be85646cd 🔖 Preparing release of 1.8.0rc3 2022-03-28 14:27:38 +02:00
Gina Häußge 54207abbe1 ⬆️ Require latest version of the PiSupport plugin 2022-03-28 11:23:35 +02:00
Gina Häußge 4c4721518c Merge branch 'master' into staging/maintenance 2022-03-23 10:24:02 +01:00
Gina Häußge 772f9f95da 📌 pre-commit: Pin flake8 bugbear
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).
2022-03-23 10:23:18 +01:00
Gina Häußge 6728a17448 🚸 Re-enable connect dialog w/ no serial ports
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.
2022-03-22 12:07:59 +01:00
Zack Lewis 7bc2a79642 ✏️ Spelling correction in software update docs (#4466)
* Spelling Correction

supplyting -> supplying

* Update AUTHORS.md
2022-03-17 22:32:24 +00:00
Gina Häußge 8c9536f323 🐛 GCV: Send the final layer to the UI as well
Closes #4463
2022-03-17 14:28:16 +01:00
Charlie Powell 594b660bb6 :pencil2 2022-03-16 21:44:03 +00:00
Gina Häußge 23f90060c6 🔖 staging/maintenance is now 1.8.0rc3.dev 2022-03-16 11:53:23 +01:00
19 changed files with 105 additions and 50 deletions

No files matched your search

+3 -1
View File
@@ -47,12 +47,14 @@ repos:
hooks:
- id: black
args: ["--config", "black.toml"]
additional_dependencies:
- click==8.0.4
- repo: https://gitlab.com/pycqa/flake8
rev: 3.9.2
hooks:
- id: flake8
additional_dependencies:
- flake8-bugbear
- flake8-bugbear==22.1.11
- repo: https://github.com/pre-commit/mirrors-prettier
rev: v2.5.1
hooks:
+3 -3
View File
@@ -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.0rc2
# staging/maintenance is currently the branch for preparation of 1.8.0rc4
# so is regressionfix/...
staging/maintenance 1.8.0rc2 fa2c4680cca0d1d6b46e6c1ed68ceea4d9b79afb pep440-dev
regressionfix/.* 1.8.0rc2 fa2c4680cca0d1d6b46e6c1ed68ceea4d9b79afb 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
+1
View File
@@ -164,6 +164,7 @@ date of first contribution):
* [Shell M. Shrader](https://github.com/synman)
* [Johan Verrept](https://github.com/JoveToo)
* [Nicu Surdu](https://github.com/surdu)
* [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
+5 -4
View File
@@ -20,6 +20,7 @@ thanks to everyone who contributed!
* Christian Wolf
* Christian Würthner
* Christoph Sigrist
* Craig Parker
* Creality3D
* David Bounds
* DeltaMaker 3D Printers
@@ -34,6 +35,7 @@ thanks to everyone who contributed!
* Hog Duske
* Itay Shem-tov
* James Mackay
* Jeff Green
* Jeff Moe
* Jeremy Cole
* Joshua Wills
@@ -45,16 +47,15 @@ thanks to everyone who contributed!
* Kurt Wubbels
* Kyle Menigoz
* Lachlan Bell
* Lee Dohm
* Lefteris Lertas
* LulzBot
* Makespace Madrid
* Mark Walker
* Matt Van Itallie
* Michael Aumock
* Mike Kershaw
* Miles Flavel
* Mosaic Manufacturing
* Nat Friedman
* Norman Jaffe
* Peopoly
* Pete Barnwell
@@ -74,7 +75,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)!
+1 -1
View File
@@ -560,7 +560,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 <https://docs.github.com/en/free-pro-team@latest/github/authenticating-to-github/creating-a-personal-access-token>`_
+5
View File
@@ -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:
+2 -1
View File
@@ -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",
@@ -62,6 +62,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",
@@ -18,10 +18,10 @@ from octoprint.util.version import (
)
SENTRY_URL_SERVER = (
"https://a12e10f3ca4b418dba3ed99c1d220d14@o118517.ingest.sentry.io/1373987"
"https://b39cd0dcaea5404798ec3eb193b291db@o118517.ingest.sentry.io/1373987"
)
SENTRY_URL_COREUI = (
"https://988f6e4854ee49188df51642ab576346@o118517.ingest.sentry.io/1374096"
"https://ab48b21452fe424eaf79468aa6c94bd7@o118517.ingest.sentry.io/1374096"
)
SETTINGS_DEFAULTS = {
@@ -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);
};
+5 -2
View File
@@ -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__,
+18
View File
@@ -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)
+16 -2
View File
@@ -577,16 +577,30 @@ class HierarchicalChainMap:
if d is None:
return {}
result = dict()
result = {}
for key, value in d.items():
if not key.startswith(prefix):
continue
subkeys = key[len(prefix) :].split(_CHAINMAP_SEP)
current = result
path = []
for subkey in subkeys[:-1]:
if subkey not in current or current[subkey] is None:
# we only need that for logging in case of data weirdness below
path.append(subkey)
# make sure the subkey is in the current dict, and that it is a dict
if subkey not in current:
current[subkey] = {}
elif not isinstance(current[subkey], dict):
logging.getLogger(__name__).warning(
f"There is a non-dict value on the path to {key} at {path!r}, ignoring."
)
current[subkey] = {}
# go down a level
current = current[subkey]
current[subkeys[-1]] = value
return result
@@ -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 () {
@@ -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 <gina@octoprint.org>\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 ""
"<p><strong>You are about to disconnect from the printer while a print is "
"in progress.</strong></p><p>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.<p>"
#: 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"
+4
View File
@@ -791,6 +791,10 @@ class ChainmapTest(unittest.TestCase):
{_key("a"): None, _key("a", "b"): "b"},
{"a": {"b": "b"}},
),
(
{_key("a"): "", _key("a", "b"): "b"},
{"a": {"b": "b"}},
),
)
@ddt.unpack
def test_unflatten(self, value, expected):
Binary file not shown.
+11 -11
View File
@@ -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 <gina@octoprint.org>\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 ""
"<p><strong>You are about to disconnect from the printer while a print is "
"in progress.</strong></p><p>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.<p>"
#: 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"
+10 -10
View File
@@ -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 <EMAIL@ADDRESS>\n"
"Language-Team: LANGUAGE <LL@li.org>\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 ""
"<p><strong>You are about to disconnect from the printer while a print is "
"in progress.</strong></p><p>Disconnecting while a print is in progress "
@@ -4163,11 +4163,11 @@ msgid ""
"OctoPrint or reconnect to the printer could interrupt the print.<p>"
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 ""