Commit graph

15 commits

Author SHA1 Message Date
Ayush Patil
04a5a04140 Deprecate should_ignore_error method
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
2025-12-18 17:47:38 +05:30
David Lord
1263d3bd14
remove deprecated code 2020-04-04 12:10:00 -07:00
David Lord
1617202d91
restore and deprecate json_available 2019-07-08 10:26:12 -07:00
David Lord
5bc0d15359
un-deprecate request.json 2017-06-26 09:34:26 -07:00
David Lord
723e665004
remove deprecated Request.module 2017-06-26 07:46:33 -07:00
Christian Stade-Schuldt
4ec1fbc9f5 More DRYing up the test suite (#2325) 2017-05-24 17:27:36 -07:00
Christian Stade-Schuldt
5b0b9717da DRYing up the test suite using pytest fixtures (#2306)
* 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
2017-05-23 15:18:39 -07:00
Markus Unterwaditzer
d393597c50 Use recwarn everywhere
...instead of custom fixture. Also assert that no warnings are left over
after the test.
2016-06-03 13:59:47 +02:00
Parkayun
33534bb4a9 Happy New Year 2015 2015-01-02 11:35:00 +09:00
INADA Naoki
4d4a639ba4 Add test for deprecated flask.Request properties. 2014-10-15 03:32:04 +09:00
Markus Unterwaditzer
56db3ddf4e Remove useless imports 2014-09-11 22:09:52 +02:00
Markus Unterwaditzer
af4cb0ff2b Remove flask superclass 2014-09-11 22:09:51 +02:00
Markus Unterwaditzer
af41dbe0c4 Remove useless classes 2014-09-11 22:09:51 +02:00
Markus Unterwaditzer
8fa5e32d9a Tests pass now. 2014-09-11 22:09:50 +02:00
Markus Unterwaditzer
961db8ad72 Made tests recognizable 2014-09-11 22:09:50 +02:00
Renamed from tests/deprecations.py (Browse further)