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

Only lazy load on reload #3431

Closed
davidism opened this issue Nov 18, 2019 · 0 comments · Fixed by #3434
Closed

Only lazy load on reload #3431

davidism opened this issue Nov 18, 2019 · 0 comments · Fixed by #3434
Labels
Milestone

Comments

@davidism
Copy link
Member

The default behavior of the flask run command is to lazily import the application if the reloader is enabled. This prevents syntax errors from crashing the app on reload, but it also means that such errors are deferred until the first request.

If the reloader is enabled, use eager loading the first time to show errors immediately. This way, initial errors will be shown to the user when they run the command, but errors introduced later will not crash the server.

@davidism davidism added the cli label Nov 18, 2019
@davidism davidism added this to the 2.0.0 milestone Nov 18, 2019
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Nov 14, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant