Community Meeting Meta Issue [BREAKING CHANGES]
See original GitHub issueLet’s discuss the breaking changes coming on Dynaconf 3.0.0 https://doodle.com/poll/ke2g4kc6mzwgtavh
There are some issues still opened for 3.0 https://github.com/rochacbruno/dynaconf/milestone/9
The highlights to be discussed are:
-
Global
settings
object is going to be deprecated Users must create their own instance of dynaconf Deprecatefrom dynaconf import settings
New recommended way
# yourprogram/config.py settings = Dynaconf(**options)`
reason Most users are confused about importing direct from dynaconf a singleton config object and when customizations via
**options
are needed they have to change the whole codebase. -
No more default file paths Right now Dynaconf loads all files named
settings.*
idea is making it explicit only via optionsettings_files=[list of paths or globs]
e.g:from dynaconf import Dynaconf settings = Dynaconf(settings_files=["main.toml", "other.toml", "path/*.toml"])
reason Debugging file loading is hard, permissions and other I/O problems may happen idea is to make explicit and raise earlier for errors.
-
Envless mode will be default
Now dynaconf has an
envless_mode
, which means it can load all variables direct from the main level of a file.server = 'bar.com' port = 5050
This will be the default and if needed users will provide the list of environments.
settings = Dynaconf(envs=["development", "production"])
then
[default] server = 'bar.com' port = 5050 [development] server = 'dev.com' [production] server = 'prod.com' port = 80
-
Allow parser to be changed or disabled Right now
toml
is the only parser for every variable, idea is to make it configurable (and allow users to opt-out) reason Some users reported that wanted raw values instead of parsed by toml. -
dotenv will be disabled by default No more loading of
.env
unless users explicitly enables it. reason In some environments dotenv is already loaded by the shell tool -
Validators will fire by default if passed to the settings object No need to explicity call settings.validators.validate() if
Dynaconf(validators=[...])
is passed it will be called right after the initialization. -
Remove logging completely reason It is easier to debug using pdb/ipdb, logging right now is useless.
-
Allow Pydantic BaseModels as validators
Issue Analytics
- State:
- Created 3 years ago
- Reactions:2
- Comments:14 (9 by maintainers)
Top GitHub Comments
@RonnyPfannschmidt @JacobCallahan looks like it is fixed now https://calendar.google.com/calendar/event?eid=NTJiZDJoY2M1MDg2bWJwcWJjcjV1MTBvNWcgNGlrZm5rbTdmb25namFuMWhlcHNxYm5nbnNAZw&ctz=America/Sao_Paulo
Dynaconf Community Meeting is going to happen on
Thursday June 11 See all timezones here: https://everytimezone.com/s/3b188d2d UTC: 16:00-17:00 EDT: 12:00-13:00 BRT: 13:00-14:00
Add to Google Calendar: https://calendar.google.com/calendar/event?eid=NTJiZDJoY2M1MDg2bWJwcWJjcjV1MTBvNWcgNGlrZm5rbTdmb25namFuMWhlcHNxYm5nbnNAZw&ctz=America/Sao_Paulo
Participate in the meeting: https://meet.google.com/xyh-jrcv-phz
Watch it public on: https://twitch.tv/codeshow
Topics: https://github.com/rochacbruno/dynaconf/issues/354