Can the error added in #2422 be made opt-in (or less ideally, opt-out)? #2446
-
Recently (in #2422), an error was added to Starlette when Config is used without the Until now, I would use an env file when testing locally and environment variables (without any env file) when deploying in a container. However, this change means that I either need to switch to setting environment variables locally (somewhat tedious) or to creating an env file when deploying. Would it be possible to make this error opt-in (or even opt-out) to avoid this incompatibility? If changing this is not in the cards (or if the decision is made to make this error opt-out), I would suggest updating the documentation here, since the new error that gets raised is currently not mentioned and the documentation implies that my previous use would be acceptable. Edit: Looking at the linked commits at the bottom of #2422 (after the merge/release), it seems I am not the only one affected by this. |
Beta Was this translation helpful? Give feedback.
Replies: 6 comments 5 replies
-
Can you show me how this part of the code looks like on your project? |
Beta Was this translation helpful? Give feedback.
-
I also suddenly have my docker containers failing to start after routine dependency update (obviously they use ENV directly instead of creating a .env inside). Making breaking changes should probably require a bit more discussion on the merits of breaking things that were documented as working. |
Beta Was this translation helpful? Give feedback.
-
our unit tests are failing because of this change "FileNotFoundError: Config file '.env' not found." |
Beta Was this translation helpful? Give feedback.
-
PR welcome to replace the error by a warning. |
Beta Was this translation helpful? Give feedback.
-
Same issue, glad it was solved. |
Beta Was this translation helpful? Give feedback.
-
Locking this discussion to avoid spam. The "issue" was solved. |
Beta Was this translation helpful? Give feedback.
PR welcome to replace the error by a warning.