Skip to content
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

Fix documentation build by skipping Sphinx 3.0.0 #1844

Merged
merged 2 commits into from Apr 8, 2020

Conversation

pquentin
Copy link
Member

@pquentin pquentin commented Apr 7, 2020

Sphinx 3 currently fails with an mysterious ValueError: wrapper loop when unwrapping <MockModule id='139897808864312'>

Sphinx 3 currently fails with an mysterious ValueError: `wrapper loop
when unwrapping <MockModule id='139897808864312'>`
@codecov
Copy link

codecov bot commented Apr 7, 2020

Codecov Report

Merging #1844 into master will not change coverage by %.
The diff coverage is n/a.

Impacted file tree graph

@@            Coverage Diff            @@
##            master     #1844   +/-   ##
=========================================
  Coverage   100.00%   100.00%           
=========================================
  Files           22        22           
  Lines         2013      2013           
=========================================
  Hits          2013      2013           
Flag Coverage Δ
#unittests 98.65% <ø> (-0.95%) ⬇️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 84073f9...482411e. Read the comment docs.

hodbn
hodbn previously requested changes Apr 7, 2020
Copy link
Member

@hodbn hodbn left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Apparently this is a known issue (https://bugs.python.org/issue25532#msg253887).

The suggested workaround works on my machine (python3.6), in docs/conf.py:

class MockModule(mock.Mock):
     @classmethod
     def __getattr__(cls, name):
         # See https://bugs.python.org/issue25532#msg253887
         if name == '__wrapped__':
             raise AttributeError()
         return MockModule()

Can you add it?

@sethmlarson
Copy link
Member

Give @hodbn's comment a try but if it doesn't work we can pin to 2.x. We don't gain a lot from 3.x from their changelog.

The autodoc_mock_imports failure will be fixed in Sphinx 3.0.1.
@pquentin
Copy link
Member Author

pquentin commented Apr 8, 2020

This is a bug in Sphinx that will be fixed in 3.0.1 so I just skip 3.0.0 for now.

@pquentin pquentin changed the title Stick to Sphinx 2 for now Fix documentation build by skipping Sphinx 3.0.0 Apr 8, 2020
@pquentin
Copy link
Member Author

pquentin commented Apr 8, 2020

I fixed the macOS flaky test in #1846, please consider merging this as is: the docs CI passed.

@hodbn hodbn dismissed their stale review April 8, 2020 12:15

No need for the workaround

@hodbn hodbn self-requested a review April 8, 2020 12:16
Copy link
Member

@hodbn hodbn left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good :)

@hodbn hodbn merged commit c63903a into urllib3:master Apr 8, 2020
@pquentin pquentin deleted the fix-docs branch April 8, 2020 13:37
@sethmlarson sethmlarson mentioned this pull request Apr 8, 2020
sethmlarson pushed a commit to sethmlarson/urllib3 that referenced this pull request Apr 11, 2020
The autodoc_mock_imports failure will be fixed in Sphinx 3.0.1.
Dobatymo pushed a commit to Dobatymo/urllib3 that referenced this pull request Mar 16, 2022
The autodoc_mock_imports failure will be fixed in Sphinx 3.0.1.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants