diff --git a/.versioneer-lookup b/.versioneer-lookup index 674e4c88b..28de35100 100644 --- a/.versioneer-lookup +++ b/.versioneer-lookup @@ -31,8 +31,8 @@ bug/.* 1.7.4 59cbfadf8922d85b9df40f8d0173e8c21724c3b8 pep440-dev # staging/maintenance is currently the branch for preparation of 1.8.0rc4 # so is regressionfix/... -staging/maintenance 1.8.0rc4 3c478036ae9edde3dd294af28bf1d8c78a2555d5 pep440-dev -regressionfix/.* 1.8.0rc4 3c478036ae9edde3dd294af28bf1d8c78a2555d5 pep440-dev +staging/maintenance 1.8.0rc5 c5b095a8b905d759c84acab5e8a65ed3170d124c pep440-dev +regressionfix/.* 1.8.0rc5 c5b095a8b905d759c84acab5e8a65ed3170d124c pep440-dev # staging/devel is currently inactive (but has the 1.4.1rc4 namespace) staging/devel 1.4.1rc4 650d54d1885409fa1d411eb54b9e8c7ff428910f pep440-dev diff --git a/SUPPORTERS.md b/SUPPORTERS.md index b9601c24e..94ed52f15 100644 --- a/SUPPORTERS.md +++ b/SUPPORTERS.md @@ -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 @@ -49,6 +51,7 @@ thanks to everyone who contributed! * LulzBot * Makespace Madrid * Mark Walker + * Matt Van Itallie * Michael Aumock * Mike Kershaw * Miles Flavel diff --git a/src/octoprint/plugins/errortracking/__init__.py b/src/octoprint/plugins/errortracking/__init__.py index c1fe9c07f..e15b1bb57 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://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 = { diff --git a/src/octoprint/settings.py b/src/octoprint/settings.py index 8beb349ce..649090240 100644 --- a/src/octoprint/settings.py +++ b/src/octoprint/settings.py @@ -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 diff --git a/tests/settings/test_settings.py b/tests/settings/test_settings.py index 468589c82..4192ec1fc 100644 --- a/tests/settings/test_settings.py +++ b/tests/settings/test_settings.py @@ -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):