-
-
Notifications
You must be signed in to change notification settings - Fork 2.1k
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
Upgrading to 3.4.2 breaks autodoc for Flask projects when importing "flask.request" #8655
Labels
Milestone
Comments
This was referenced Jan 5, 2021
Sorry for the inconvenience. I don't know |
tk0miya
added a commit
to tk0miya/sphinx
that referenced
this issue
Jan 5, 2021
… on hasattr() autodoc crashes when the target object raises an exception on `hasattr()`. The `hasattr()` function internally calls the `obj.__getattr__()` or `obj.__getattribute__()` of the target object. Hence the reaction can be changed on the target object. Is starts to use `safe_getattr()` to check the object is mocked or not and to prevent the unexpected errors.
tk0miya
added a commit
to tk0miya/sphinx
that referenced
this issue
Jan 5, 2021
… on hasattr() autodoc crashes when the target object raises an exception on `hasattr()`. The `hasattr()` function internally calls the `obj.__getattr__()` or `obj.__getattribute__()` of the target object. Hence the reaction can be changed on the target object. This starts to use `safe_getattr()` to check the object is mocked or not and to prevent the unexpected errors.
tk0miya
added a commit
to tk0miya/sphinx
that referenced
this issue
Jan 5, 2021
… on hasattr() autodoc crashes when the target object raises an exception on `hasattr()`. The `hasattr()` function internally calls the `obj.__getattr__()` or `obj.__getattribute__()` of the target object. Hence the reaction can be changed on the target object. This starts to use `safe_getattr()` to check the object is mocked or not and to prevent an unexpected error.
u8sand
added a commit
to MaayanLab/appyter
that referenced
this issue
Jan 5, 2021
tk0miya
added a commit
that referenced
this issue
Jan 6, 2021
Fix #8655: autodoc: Crashes when object raises an exception on hasattr()
GraemeWatt
added a commit
to HEPData/hepdata
that referenced
this issue
Jan 6, 2021
* The Read the Docs build with Sphinx v3.4.2 fails. * See sphinx-doc/sphinx#8655 (already closed).
openstack-mirroring
pushed a commit
to openstack/requirements
that referenced
this issue
Jan 7, 2021
Using sphinx version 3.4.2 with Flask and documentation builds results in an error: Exception occurred: File "/opt/stack/keystone/.tox/docs/lib/python3.8/site-packages/flask/globals.py", line 38, in _lookup_req_object raise RuntimeError(_request_ctx_err_msg) RuntimeError: Working outside of request context. This issue has occured a few times with sphinx in the past and has been reported upstream [0][1]. This commit blacklists sphinx 3.4.2 until we get a newer release with a fix. [0] sphinx-doc/sphinx#8655 [1] sphinx-doc/sphinx#2796 Partial-Bug: 1910419 Change-Id: Ie80e45571efafe73a553ddd89c5be90fe97bea4d
openstack-mirroring
pushed a commit
to openstack/openstack
that referenced
this issue
Jan 7, 2021
* Update requirements from branch 'master' to 8b7a53cac1cc1fdcd4ab94aad9a7b7d24362fdc3 - Blacklist sphinx 3.4.2 because of Flask regressions Using sphinx version 3.4.2 with Flask and documentation builds results in an error: Exception occurred: File "/opt/stack/keystone/.tox/docs/lib/python3.8/site-packages/flask/globals.py", line 38, in _lookup_req_object raise RuntimeError(_request_ctx_err_msg) RuntimeError: Working outside of request context. This issue has occured a few times with sphinx in the past and has been reported upstream [0][1]. This commit blacklists sphinx 3.4.2 until we get a newer release with a fix. [0] sphinx-doc/sphinx#8655 [1] sphinx-doc/sphinx#2796 Partial-Bug: 1910419 Change-Id: Ie80e45571efafe73a553ddd89c5be90fe97bea4d
Closed
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Description
All our CI pipelines failed on "Flask" based projects this morning. Downgrading to Sphinx 3.4.1 works. The error was introduced in 3.4.2
The issue originates from the "request" import.
How to Reproduce
File Structure
File contents
Build Command
Expected Behaviour
Successful build
Observed Behaviour
Traceback:
Environment info
The text was updated successfully, but these errors were encountered: