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: only pass .env as default to starlette config if it exists #184

Merged
merged 2 commits into from
Feb 5, 2024

Conversation

daniellok-db
Copy link
Collaborator

@daniellok-db daniellok-db commented Feb 5, 2024

The latest version of starlette throws if the provided config file doesn't exist.

This PR changes the Limiter class's __init__ function to pass ".env" to Config only if it exists. This should preserve existing behavior while preventing guaranteed exceptions.

@daniellok-db daniellok-db changed the title Only pass .env as default if it exists fix: only pass .env as default to starlette config if it exists Feb 5, 2024
@daniellok-db
Copy link
Collaborator Author

daniellok-db commented Feb 5, 2024

cc @laurentS @thentgesMindee would it be possible to take a look at this? please let me know if you have any concerns, or if you need more context on the issue!

Signed-off-by: Daniel Lok <daniel.lok@databricks.com>
Copy link
Owner

@laurentS laurentS left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hi @daniellok-db thank you for this PR. I think this is fine.
I have a feeling that the initial design was not the best, as it's essentially forcing the use of an env file, but let's not break behaviour now.

@laurentS laurentS merged commit 4eb45eb into laurentS:master Feb 5, 2024
6 checks passed
@daniellok-db
Copy link
Collaborator Author

@laurentS thanks for merging! do you have an idea of when the next release might be?

@laurentS
Copy link
Owner

laurentS commented Feb 5, 2024

@laurentS thanks for merging! do you have an idea of when the next release might be?

I'm maintaining this on my spare time, so releases are not my top priority. If you want to help speed up a new one, don't hesitate to open a release PR, like #159 and we should be able to push a new one out pretty soon.
There's been talk of a more automated release process, but we never got around to implementing anything...

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 this pull request may close these issues.

None yet

2 participants