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

Allow users to suppress autodoc.mocked_object warnings #9732

Merged

Conversation

CyrilRoelandteNovance
Copy link
Contributor

No description provided.

@tk0miya
Copy link
Member

tk0miya commented Oct 30, 2021

I don't understand why you'd like to suppress these warnings. I think Sphinx generates broken (unexpected) document if they are emitted. Is there any reason to ignore such a situation? I need to know the real case you're facing.

@CyrilRoelandteNovance
Copy link
Contributor Author

In https://github.com/openstack/glance_store , going from Sphinx 4.1.0 to 4.2.0 breaks the documentation build:

(docs)cyril@debian:~/openstack/glance_store$ sphinx-build -W -b html doc/source doc/build/html
...
Warning, treated as error:
A mocked object is detected: 'glance_store.common.cinder_utils'

We do mock glance_store.common.cinder_utils.

Someone mentioned that this commit could be a fix, but I tried using the 4.x branch and got the same error:

(docs) cyril@debian:~/openstack/glance_store$ pip install git+https://github.com/sphinx-doc/[email protected]
...
(docs) cyril@debian:~/openstack/glance_store$ pip list | grep Sphinx
Sphinx                        4.3.0.dev20211103
(docs)cyril@debian:~/openstack/glance_store$ sphinx-build -W -b html doc/source doc/build/html
...
Warning, treated as error:
A mocked object is detected: 'glance_store.common.cinder_utils'

Are we doing someting wrong?

@tk0miya tk0miya changed the base branch from 4.x to 5.x May 22, 2022 12:57
@AA-Turner AA-Turner changed the base branch from 5.x to master October 16, 2022 15:24
@AA-Turner AA-Turner added this to the some future version milestone Apr 29, 2023
# Conflicts:
#	doc/usage/configuration.rst
#	sphinx/ext/autodoc/__init__.py
@AA-Turner
Copy link
Member

This PR seems harmless, happy to merge.

A

@AA-Turner AA-Turner merged commit 34037aa into sphinx-doc:master Jan 19, 2025
22 checks passed
@AA-Turner AA-Turner modified the milestones: some future version, 8.2.0 Jan 19, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants