Skip to content

Fix misleading docstring for teardown_request (closes #5102) #5703

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

Closed
wants to merge 1 commit into from

Conversation

cureprotocols
Copy link

This PR fixes the misleading docstring for Scaffold.teardown_request().

The original docstring implied that teardown functions always run after every request, which is not true if exception propagation is enabled (e.g., in debug mode).

This PR:

  • Clarifies when teardown_request functions are invoked
  • Adds context around typical usage (resource cleanup, connection closing)
  • Matches tone and structure of other Flask internal docstrings

Closes #5102


No functional code was changed
This improves developer understanding and aligns with current Flask behavior

Author: Michael Alexander Montoya (@cureprotocols)

@davidism davidism closed this Mar 30, 2025
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Apr 14, 2025
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants