Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Lowecase read allowed by default #357

Merged
merged 2 commits into from Jun 16, 2020
Merged

Lowecase read allowed by default #357

merged 2 commits into from Jun 16, 2020

Conversation

rochacbruno
Copy link
Member

No description provided.

@codecov
Copy link

codecov bot commented Jun 16, 2020

Codecov Report

Merging #357 into master will not change coverage.
The diff coverage is n/a.

Impacted file tree graph

@@            Coverage Diff            @@
##            master      #357   +/-   ##
=========================================
  Coverage   100.00%   100.00%           
=========================================
  Files           17        17           
  Lines          813       813           
=========================================
  Hits           813       813           

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update fe19d5e...2b97954. Read the comment docs.

Comment on lines +13 to +14
settings = LazySettings(warn_dynaconf_global_settings=True)

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
settings = LazySettings(warn_dynaconf_global_settings=True)
def __construct_singleton_dynaconf_instance():
warnings.warn(
"Usage of `from dynaconf import settings` is now "
"DEPRECATED in 3.0.0+. You are encouraged to change it to "
"your own instance e.g: `settings = Dynaconf(*options)`",
DeprecationWarning,
)
return LazySettings()
settings = __construct_singleton_dynaconf_instance()

In this case we would not need to change LazySettings class.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I like that, using a FActory/Builder instead of class state, thanks will change it.

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sorry, my bad. In this case we will always raise a warning. Even if the user created LazySettings instance, in an adequate way.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@VaultVulp yes the idea is nice but it is not going to be lazy.

@rochacbruno rochacbruno merged commit 00ab517 into master Jun 16, 2020
@rochacbruno rochacbruno deleted the lowercase_default branch June 16, 2020 16:26
rochacbruno added a commit that referenced this pull request Jun 22, 2020
Shortlog of commits since last release:

    Bernardo Gomes (2):
          Adding f string (#319)
          Added little information about how dev into this project. (#321)

    Bruno Rocha (18):
          Release version 3.0.0rc1
          Better exception handling on env_loader (#316)
          Add support for config aliases (#332)
          Add ENVLESS_MODE (#337)
          Fix #272 allow access of lowercase keys (#338)
          Fix #298 allow auto complete for editors and console (#339)
          Vendoring dependencies Fix #301 (#345)
          Clean tox installation for local testing (#346)
          Validator improvements on conditions (#353)
          Add note about quoting in env vars (#347)
          DEPRECATED global settings object.
          DEPRECATED global settings object. (#356)
          Lowecase read allowed by default (#357)
          Merge branch 'master' of github.com:rochacbruno/dynaconf
          envless by default - breaking change ⚠️ (#358)
          dotenv is no more loaded by default (#360)
          No more loading of `settings.*` by default (#361)
          NO more logger and debug messages (#362)

    Douglas Maciel d'Auriol Souza (1):
          Insert news validator conditions: (len_eq, len_ne, len_min, len_max, contd) (#328)

    Jeff Wayne (1):
          s/DYNACONF_ENV/ENV_FOR_DYNACONF (#335)

    Marcos Benevides (1):
          Fix minor typo in Flask extension docs (#318)

    Nicholas Nadeau, Ph.D., P.Eng (1):
          Fixed comma typo (#334)

    sfunkhouser (1):
          Add option to override default mount_point for vault (#349)
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.

None yet

2 participants