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

Consider removing the .onLoad functionality #14

Open
dshemetov opened this issue Apr 14, 2023 · 1 comment · May be fixed by #13
Open

Consider removing the .onLoad functionality #14

dshemetov opened this issue Apr 14, 2023 · 1 comment · May be fixed by #13

Comments

@dshemetov
Copy link

The function in #13 is especially useful when you want to load variables, but not overwrite your env vars. This is moot due to the .onLoad function in this package, which eagerly loads the env vars. FWIW, the python-dotenv package also separates package import and the env var load.

I understand if the migration/backwards incompatibility is not worth it for the maintainers, but just want to open this idea up for your consideration at some point in the future.

@gaborcsardi
Copy link
Owner

Yeah, that would be great, but it would also break practically every project that uses this package, so we cannot do it at this point, at least not by default.

You could opt in into the new behavior by setting an env var. Not as nice, but possible ok?

@dshemetov dshemetov linked a pull request Apr 17, 2023 that will close this issue
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 a pull request may close this issue.

2 participants