question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Community Meeting Meta Issue [BREAKING CHANGES]

See original GitHub issue

Let’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 Deprecate

    from 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 option settings_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:closed
  • Created 3 years ago
  • Reactions:2
  • Comments:14 (9 by maintainers)

github_iconTop GitHub Comments

github_iconTop Results From Across the Web

Policy Forum Minutes | Transparency Center - Facebook
A meeting called the Policy Forum takes place on a regular basis where we discuss potential changes to our Community Standards, Community ...
Read more >
Meta's Proposed Reforms Are Significant - The Atlantic
In its new decision, the board reveals some significant and insightful recommendations for how to improve speech online.
Read more >
Community Meeting Recap (22 November 2022)
Add HEAD requests support to DelayedRequester — fixing four issues at once! Change the URL for Get Involved link in the new header...
Read more >
United States Attorney Resolves Groundbreaking Suit Against ...
Because of this ground-breaking lawsuit, Meta will—for the first time—change its ad delivery system to address algorithmic discrimination.
Read more >
Porter Community Meeting Minutes - HackMD
We plan to release dependencies as a minor patch to v1. · No breaking changes to database schema, or document schema without increasing...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found