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
New mock warning in Sphinx 4.2.0 breaks strict builds #9631
Comments
Perhaps a solution could be to give the warning a |
Was working with 4.1.2, broke with 4.2.0, see sphinx-doc/sphinx#9631
I reproduced the error with this Dockerfile:
It seems your project generates stub files using
After that, Sphinx goes to build it and detects |
See suggestion here: sphinx-doc/sphinx#9631
Using the exclude option with I'm happy to close this issue - unless you think there is value in keeping it open to define a warning |
We've hit an issue with some mock objects that class/Enum definition point to. They are documented perfectly fine, but now getting this warning. A |
Thank you for confirming. Closing. |
@sdhiscocks I think your problem is not related to this issue. Please file another issue. Thanks, |
Exclude rather than mock Bio.Alphabet etc as per suggestion here: sphinx-doc/sphinx#9631 Should be OK with latest Sphinx now (on both GitHub actions and CircleCI)
Describe the bug
Upgraded from Sphinx 4.1.2 to 4.2.0, build fails due to #9507
Success with 4.1.2,
https://app.circleci.com/pipelines/github/biopython/biopython/473/workflows/40320ef7-dfcf-43bd-9b7f-088f97e0892e/jobs/476
Failure with 4.2.0,
https://app.circleci.com/pipelines/github/biopython/biopython/474/workflows/e08f89ec-aac0-4d3f-995c-ccb903dd6fca/jobs/477
Configuration:
https://github.com/biopython/biopython/tree/fb570dfa3c04ba7570c59b992b0cf2dc50cd4a84/Doc/api
Note this in the
Makefile
:And this in
conf.py
:Here
MySQLdb
is a dependency which may not be installed.We deliberately mock
Bio.Restriction.Restriction
to avoid Sphinx documenting it (very large repetitive autogenerated file), andBio.Alphabet
is now a stub from some removed code with a customImportError
.How to Reproduce
Expected behavior
Successful build with warning mode enabled (as with Sphinx 4.1.2).
Your project
https://github.com/biopython/biopython/tree/master/Doc/api
Screenshots
No response
OS
Linux
Python version
3.9.7
Sphinx version
4.2.0
Sphinx extensions
sphinx.ext.autodoc, sphinx.ext.todo, sphinx.ext.autosummary, numpydoc
Extra tools
No response
Additional context
I suspect we have to drop
-W
, or is there a better way than mock to tell Sphinx/autodoc to skip certain modules?The text was updated successfully, but these errors were encountered: