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

fix(settings): stop using Config.env_prefix for secrets in BaseSettings #2190

Closed
wants to merge 5 commits into from

Conversation

PrettyWood
Copy link
Member

@PrettyWood PrettyWood commented Dec 9, 2020

Change Summary

We were using the env_prefix for secrets, which doesn't make sense and is very confusing.
Now we just don't

⚠️ ⚠️ Probably good to first be sure we want to go with this option. Feedback welcome on the linked issue ⚠️ ⚠️

Related issue number

closes pydantic/pydantic-settings#30

Checklist

  • Unit tests for the changes exist
  • Tests pass on CI and coverage remains at 100%
  • Documentation reflects the changes where applicable
  • changes/<pull request or issue id>-<github username>.md file added describing change
    (see changes/README.md for details)

@codecov
Copy link

codecov bot commented Dec 9, 2020

Codecov Report

Merging #2190 (b6a1c2c) into master (13a5c7d) will not change coverage.
The diff coverage is 100.00%.

@@            Coverage Diff            @@
##            master     pydantic/pydantic#2190   +/-   ##
=========================================
  Coverage   100.00%   100.00%           
=========================================
  Files           21        21           
  Lines         4199      4198    -1     
  Branches       854       853    -1     
=========================================
- Hits          4199      4198    -1     
Impacted Files Coverage Δ
pydantic/env_settings.py 100.00% <100.00%> (ø)

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 13a5c7d...b6a1c2c. Read the comment docs.

pydantic/env_settings.py Outdated Show resolved Hide resolved
@samuelcolvin
Copy link
Member

I think this is great but we need:

  • a prominent !note in the docs explaining this
  • a **breaking change:** prefix on the description

@PrettyWood
Copy link
Member Author

Added the "breaking change" mention and a note in the doc
Screen Shot 2021-01-02 at 4 30 58 PM
Hope it's clear enough

@PrettyWood PrettyWood added Feedback Wanted deferred deferred until future release or until something else gets done labels Jan 17, 2021
@samuelcolvin
Copy link
Member

Looks good to me, but sadly this has some fairly complicated conflicts.

@samuelcolvin samuelcolvin added awaiting author revision and removed Feedback Wanted deferred deferred until future release or until something else gets done labels May 1, 2021
@PrettyWood PrettyWood added deferred deferred until future release or until something else gets done and removed awaiting author revision labels Jun 1, 2021
@samuelcolvin
Copy link
Member

Wow this is old 🙈.

@PrettyWood what do you think? V1.10, V2 or close.

@PrettyWood
Copy link
Member Author

I would close as much as possible and avoid a breaking change

@samuelcolvin samuelcolvin mentioned this pull request Aug 4, 2022
14 tasks
@samuelcolvin
Copy link
Member

But should we keep this for V2?

@PrettyWood
Copy link
Member Author

PrettyWood commented Aug 4, 2022

the env_prefix for secrets, which doesn't make sense and is very confusing.

I still agree with myself 😄 If we can change this in v2, that will be great! We can keep this open not to forget but if the issue remains open, I don't know it's worth the duplicate. Your call

@samuelcolvin
Copy link
Member

Great, keeping it open.

@samuelcolvin
Copy link
Member

Closing this, as any new PR would need to be against https://github.com/pydantic/pydantic-settings

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
deferred deferred until future release or until something else gets done
Projects
None yet
Development

Successfully merging this pull request may close these issues.

BaseSettings env_prefix also apply for secrets
2 participants