Closed czerw closed 4 years ago
Confirming on FreeBSD CURRENT (13.x), Python 3.8, Flask 1.1.1, Flask-Cors 3.0.8
======================================================================
FAIL: NoExceptionInterceptionTestCase.test_acl_uncaught_exception_500
----------------------------------------------------------------------
Traceback (most recent call last):
File "/var/tmp/tmpfs0/usr/home/user/repos/freebsd/ports/www/py-flask-cors/work-py38/Flask-Cors-3.0.8/tests/decorator/test_exception_interception.py", line 209, in test_acl_uncaught_exception_500
self.assertFalse(ACL_ORIGIN in resp.headers)
AssertionError: True is not false
-------------------- >> begin captured logging << --------------------
tests.decorator.test_exception_interception: ERROR: Exception on /test_acl_uncaught_exception_500 [GET]
Traceback (most recent call last):
File "/usr/local/lib/python3.8/site-packages/flask/app.py", line 2446, in wsgi_app
response = self.full_dispatch_request()
File "/usr/local/lib/python3.8/site-packages/flask/app.py", line 1951, in full_dispatch_request
rv = self.handle_user_exception(e)
File "/usr/local/lib/python3.8/site-packages/flask/app.py", line 1820, in handle_user_exception
reraise(exc_type, exc_value, tb)
File "/usr/local/lib/python3.8/site-packages/flask/_compat.py", line 39, in reraise
raise value
File "/usr/local/lib/python3.8/site-packages/flask/app.py", line 1949, in full_dispatch_request
rv = self.dispatch_request()
File "/usr/local/lib/python3.8/site-packages/flask/app.py", line 1935, in dispatch_request
return self.view_functions[rule.endpoint](**req.view_args)
File "/var/tmp/tmpfs0/usr/home/user/repos/freebsd/ports/www/py-flask-cors/work-py38/Flask-Cors-3.0.8/tests/decorator/test_exception_interception.py", line 30, in test_acl_uncaught_exception_500
raise Exception("This could've been any exception")
Exception: This could've been any exception
Hello, I got the same issue on gentoo, with flask-1.1 python3.7 flask-cors-3.0.8
tests.decorator.test_exception_interception: ERROR: Exception on /test_acl_uncaught_exception_500 [GET]
Traceback (most recent call last):
File "/usr/lib/python3.7/site-packages/flask/app.py", line 2447, in wsgi_app
response = self.full_dispatch_request()
File "/usr/lib/python3.7/site-packages/flask/app.py", line 1952, in full_dispatch_request
rv = self.handle_user_exception(e)
File "/usr/lib/python3.7/site-packages/flask/app.py", line 1821, in handle_user_exception
reraise(exc_type, exc_value, tb)
File "/usr/lib/python3.7/site-packages/flask/_compat.py", line 39, in reraise
raise value
File "/usr/lib/python3.7/site-packages/flask/app.py", line 1950, in full_dispatch_request
rv = self.dispatch_request()
File "/usr/lib/python3.7/site-packages/flask/app.py", line 1936, in dispatch_request
return self.view_functions[rule.endpoint](**req.view_args)
File "/var/tmp/portage/dev-python/flask-cors-3.0.8/work/Flask-Cors-3.0.8/tests/decorator/test_exception_interception.py", line 30, in test_acl_uncaught_exception_500
raise Exception("This could've been any exception")
Exception: This could've been any exception
The problem seems to come from this line: https://github.com/corydolphin/flask-cors/blob/master/tests/decorator/test_exception_interception.py#L209
Fixed in release 3.0.9 by skipping the test. Flask improved the error handling behavior, so our exception interception is no longer necessary!
Build test started to fail after Flask update to 1.1.0. Failure is not dependent on python version(2/3). Last working Flask version was 1.0.4.