Skip to content

Fix - Infinite recursions in django app with lowercase_read=False #867#947

Merged
rochacbruno merged 1 commit intodynaconf:masterfrom
pedro-psb:recursion-error
Jul 4, 2023
Merged

Fix - Infinite recursions in django app with lowercase_read=False #867#947
rochacbruno merged 1 commit intodynaconf:masterfrom
pedro-psb:recursion-error

Conversation

@pedro-psb
Copy link
Copy Markdown
Member

This fixes the special case that caused infinite recursion with the option lowercase_read=False in #867 .

This solution of some months ago was working at the time, but I misinterpreted the expected behavior for lowercase_read=False, which disallows only all lowercase characters (but permits other cases), as shown in those unit test:

def test_accepts_only_upper():
.

The solution consisted in replacing _store.as_dict()[name] with a more direct access method, which luckly avoided the recursive calls.

@netlify
Copy link
Copy Markdown

netlify bot commented Jul 3, 2023

Deploy Preview for dynaconf ready!

Name Link
🔨 Latest commit 43869be
🔍 Latest deploy log https://app.netlify.com/sites/dynaconf/deploys/64a3439edc7bac0008c409f5
😎 Deploy Preview https://deploy-preview-947--dynaconf.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site configuration.

@codecov-commenter
Copy link
Copy Markdown

Codecov Report

Merging #947 (43869be) into master (c43c29e) will not change coverage.
The diff coverage is 100.00%.

❗ Your organization is not using the GitHub App Integration. As a result you may experience degraded service beginning May 15th. Please install the Github App Integration for your organization. Read more.

@@           Coverage Diff           @@
##           master     #947   +/-   ##
=======================================
  Coverage   99.64%   99.64%           
=======================================
  Files          22       22           
  Lines        1994     1994           
=======================================
  Hits         1987     1987           
  Misses          7        7           
Impacted Files Coverage Δ
dynaconf/base.py 99.80% <100.00%> (ø)

📣 We’re building smart automated test selection to slash your CI/CD build times. Learn more

@rochacbruno rochacbruno merged commit f037746 into dynaconf:master Jul 4, 2023
pedro-psb added a commit to pedro-psb/dynaconf that referenced this pull request Jul 13, 2023
Shortlog of commits since last release:

    Bruno Rocha (4):
          Ignore docs build without a tag
          Cancel any running CI job when a Push is made to an existing PR or branch (dynaconf#952)
          Fix dynaconf#959 cli get will exit code 1 in case of KeyError. (dynaconf#960)
          add tech preview note to inspect docs (dynaconf#961)

    Pedro Pessoa (9):
          Docs - Update envvar.md custom token e.g. to use add_converter (dynaconf#941)
          Feature - Inspect and CLI (dynaconf#939)
          Fix - Template substitution with variable update (dynaconf#944)
          Assert dynaconf#658 works (dynaconf#945)
          fix infinite recursions in special case of django app dynaconf#867 (dynaconf#947)
          Fix - Django functions with `add_converter` (dynaconf#951)
          Fix hooks not re-running on reload dynaconf#850 (dynaconf#953)
          update vault and redis warning recommendations. fix dynaconf#950 (dynaconf#954)
          Fix - Enable merge equal False (dynaconf#957)
rochacbruno added a commit that referenced this pull request Aug 11, 2023
Shortlog of commits since last release:

    Bruno Rocha (5):
          Ignore docs build without a tag
          Cancel any running CI job when a Push is made to an existing PR or branch (#952)
          Fix #959 cli get will exit code 1 in case of KeyError. (#960)
          add tech preview note to inspect docs (#961)
          Build docs

    Hugo Prudente (1):
          Doc advanced usage for cli overrides dynaconf settings fix #967 (#970)

    Marian Ganisin (1):
          Feat: Support for multidoc yaml files (#825)

    Pedro Pessoa (11):
          Docs - Update envvar.md custom token e.g. to use add_converter (#941)
          Feature - Inspect and CLI (#939)
          Fix - Template substitution with variable update (#944)
          Assert #658 works (#945)
          fix infinite recursions in special case of django app #867 (#947)
          Fix - Django functions with `add_converter` (#951)
          Fix hooks not re-running on reload #850 (#953)
          update vault and redis warning recommendations. fix #950 (#954)
          Fix - Enable merge equal False (#957)
          CI - Test docker-compose pyyaml issue (#964)
          Fix: unexpected _bypass_evaluation in BoxList (#966)

    pedro-psb (1):
          Release version 3.2.0
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants