fix(set): non-str key raising type error #1005#1008
fix(set): non-str key raising type error #1005#1008rochacbruno merged 5 commits intodynaconf:masterfrom
Conversation
✅ Deploy Preview for dynaconf ready!
To edit notification comments on pull requests, go to your Netlify site configuration. |
| def test_set_with_non_str_types(): | ||
| """This replicates issue #1005 in a simplified setup.""" | ||
| settings = Dynaconf(merge_enabled=True) | ||
| settings.set("a", {"b": {1: "foo"}}) |
There was a problem hiding this comment.
I think the test case must cover the higher levels of the structure also
settings.set(1, {"b": {1: "foo"}})
tings.set("a", {"1": {1: "foo"}})
There was a problem hiding this comment.
we can take the example provided on #1005 and add as a test_functional/issues/
Codecov Report
@@ Coverage Diff @@
## master #1008 +/- ##
=======================================
Coverage 98.70% 98.70%
=======================================
Files 23 23
Lines 2242 2247 +5
=======================================
+ Hits 2213 2218 +5
Misses 29 29
📣 We’re building smart automated test selection to slash your CI/CD build times. Learn more |
|
Hey @pedro-psb just popping in to thank you for your work on this issue! Sorry I couldn't tackle it though, in all honesty, I would've never been able to make this fix with the time I've had these past weeks. I'll keep an eye out for this release! |
Shortlog of commit since last release:
Bruno Rocha (2):
Release version 3.2.3
fix(env): allow underscore in env name dynaconf#1011 (dynaconf#1015)
Jake Callahan (1):
fix(vault): pin hvac minimum version
Pedro Pessoa (3):
fix(set): non-str key raising type error dynaconf#1005 (dynaconf#1008)
fix(merge): dynaconf_merge=False on nested structures (dynaconf#1012)
fix(cli): support for 'entrypoint-path' in FLASK_APP dynaconf#946 (dynaconf#1014)
Sebastian Correa (1):
doc(validation): Improve Configuration and Validation sections of the docs (dynaconf#989)
Vladislav Sharapov (1):
doc(envvars): Fix link to configuration page (dynaconf#1020)
Shortlog of commit since last release:
Bruno Rocha (2):
Release version 3.2.3
fix(env): allow underscore in env name dynaconf#1011 (dynaconf#1015)
Jake Callahan (1):
fix(vault): pin hvac minimum version
Pedro Pessoa (3):
fix(set): non-str key raising type error dynaconf#1005 (dynaconf#1008)
fix(merge): dynaconf_merge=False on nested structures (dynaconf#1012)
fix(cli): support for 'entrypoint-path' in FLASK_APP dynaconf#946 (dynaconf#1014)
Sebastian Correa (1):
doc(validation): Improve Configuration and Validation sections of the docs (dynaconf#989)
Vladislav Sharapov (1):
doc(envvars): Fix link to configuration page (dynaconf#1020)
settings.set(1: {"b": {1: "foo}})).Overview
There are some internal functions that expect only string keys and are called just in specific program flows, such as the one reported #1005.
In this case, the reported setup would trigger
find_the_correct_casing, which didn't have a non-str treatment yet.This specific setup was: