The `should_ignore_error()` method was added in f191809 to support
context preservation for debugging, but it no longer serves its
original purpose and adds unnecessary overhead.
Issues with the current implementation:
- Always returns False by default
- Called on every single request with no benefit
- The original intention for error ignoring during debugging is not
how context preservation works anymore
- No documentation beyond API reference
- No tests for the functionality
- No evidence of real-world usage
Changes:
- Add deprecation warning to App.should_ignore_error() that will be
removed in Flask 4.0
- Optimize call site to only invoke the method if it's been overridden
by a subclass, eliminating the function call overhead for 99.9% of
requests
- Add comprehensive tests for the deprecation behavior
- Update CHANGES.rst with deprecation notice
Teardown handlers should manage their own error handling instead of
relying on this method.
Fixes#5816
* add fixtures to conftest.py
* use fixtures in test_appctx.py
* use fixtures in test_blueprints.py
* use fixtures in test_depreciations.py
* use fixtures in test_regressions.py
* use fixtures in test_reqctx.py
* use fixtures in test_templating.py
* use fixtures in test_user_error_handler.py
* use fixtures in test_views.py
* use fixtures in test_basics.py
* use fixtures in test_helpers.py
* use fixtures in test_testing.py
* update conftest.py
* make docstrings PEP-257 compliant
* cleanup
* switch dictonary format
* use pytest parameterization for test_json_as_unicode