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
Conversation
No more `from dynaconf import settings`
Codecov Report
@@ 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.
|
settings = LazySettings(warn_dynaconf_global_settings=True) | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
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.
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)
No description provided.