Merge branch 'maintenance' into devel
This commit is contained in:
commit
c0c9bf0ea5
18 files changed
+43
-129
No files matched your search
@@ -631,12 +631,10 @@ class UiPlugin(OctoPrintPlugin, SortablePlugin):
|
||||
at it being a mobile device:
|
||||
|
||||
.. onlineinclude:: https://raw.githubusercontent.com/OctoPrint/Plugin-Examples/master/dummy_mobile_ui/__init__.py
|
||||
:linenos:
|
||||
:tab-width: 4
|
||||
:caption: `dummy_mobile_ui/__init__.py <https://github.com/OctoPrint/Plugin-Examples/blob/master/dummy_mobile_ui/__init__.py>`_
|
||||
|
||||
.. onlineinclude:: https://raw.githubusercontent.com/OctoPrint/Plugin-Examples/master/dummy_mobile_ui/templates/dummy_mobile_ui_index.jinja2
|
||||
:linenos:
|
||||
:tab-width: 4
|
||||
:caption: `dummy_mobile_ui/templates/dummy_mobile_ui_index.jinja2 <https://github.com/OctoPrint/Plugin-Examples/blob/master/dummy_mobile_ui/templates/dummy_mobile_ui_index.jinja2>`_
|
||||
|
||||
@@ -1191,7 +1189,6 @@ class SimpleApiPlugin(OctoPrintPlugin):
|
||||
Take this example of a plugin registered under plugin identifier ``mysimpleapiplugin``:
|
||||
|
||||
.. code-block:: python
|
||||
:linenos:
|
||||
|
||||
import octoprint.plugin
|
||||
|
||||
@@ -1327,7 +1324,6 @@ class BlueprintPlugin(OctoPrintPlugin, RestartNeedingPlugin):
|
||||
which behaves exactly the same like Flask's regular ``route`` decorators. Example:
|
||||
|
||||
.. code-block:: python
|
||||
:linenos:
|
||||
|
||||
import octoprint.plugin
|
||||
import flask
|
||||
|
||||
@@ -18,10 +18,10 @@ from octoprint.util.version import (
|
||||
)
|
||||
|
||||
SENTRY_URL_SERVER = (
|
||||
"https://4f9abc3158334309ad3c22f6693ee6e7@o118517.ingest.sentry.io/1373987"
|
||||
"https://b39cd0dcaea5404798ec3eb193b291db@o118517.ingest.sentry.io/1373987"
|
||||
)
|
||||
SENTRY_URL_COREUI = (
|
||||
"https://ef731a61e7a146228b720c54e21c554c@o118517.ingest.sentry.io/1374096"
|
||||
"https://ab48b21452fe424eaf79468aa6c94bd7@o118517.ingest.sentry.io/1374096"
|
||||
)
|
||||
|
||||
SETTINGS_DEFAULTS = {
|
||||
|
||||
@@ -576,16 +576,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
|
||||
|
||||
@@ -1723,7 +1723,7 @@ def serialize(filename, data, encoding="utf-8", compressed=True):
|
||||
If `compressed` is True (the default), the serialized data put through zlib.compress.
|
||||
|
||||
Supported data types are listed at the bottom of
|
||||
:ref:`octoprint.util.comprehensive_json`, and include some data types that are not
|
||||
:func:`octoprint.util.comprehensive_json`, and include some data types that are not
|
||||
supported by json.dumps by default.
|
||||
|
||||
This is not thread-safe, if concurrent access is required, the caller needs to ensure
|
||||
|
||||
@@ -43,7 +43,7 @@ def clean_ansi(line: Union[str, bytes]) -> Union[str, bytes]:
|
||||
Returns:
|
||||
(str or bytes) The line without any ANSI control codes
|
||||
|
||||
.. changed:: 1.8.0
|
||||
.. versionchanged:: 1.8.0
|
||||
|
||||
Usage as ``clean_ansi(line: bytes) -> bytes`` is now deprecated and will be removed
|
||||
in a future version of OctoPrint.
|
||||
|
||||
Reference in new issue
Block a user