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

Ditch bizarre inclusion-then-mock-out of matplotlib from sphinx #625

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

AdamWill
Copy link

@AdamWill AdamWill commented Mar 8, 2018

A long time ago, commit ff358b3 - "add plotting to conf.py" -
added several plotting-related sphinx modules provided by
matplotlib to the sphinx config. Notably, it did not actually
add any use of these modules, so far as I can tell. Neither
did anything else later, again so far as I can tell.

Bizarrely, commit 9323618 - which followed it a month later -
proceeded to mock these modules and their dependencies right
back out again
.

I have no idea what the idea was here, but it seems rather
weird. More to the point, it breaks build of the docs with
recent Sphinx, as this artisanal Mock() implementation is not
iterable:

Exception occurred:
File "/usr/lib/python2.7/site-packages/sphinx/registry.py", line 225, in load_extension
app.extensions[extname] = Extension(extname, mod, **metadata)
TypeError: 'Mock' object is not iterable

So, let's throw out this entire edifice of zaniness. The docs
build just fine with the remaining matplotlib module (the others
got taken out over the years) cut out from the extensions list,
and the whole weird Mock bit chopped.

Signed-off-by: Adam Williamson [email protected]

A long time ago, commit ff358b3 - "add plotting to conf.py" -
added several plotting-related sphinx modules provided by
matplotlib to the sphinx config. Notably, it did not actually
add any *use* of these modules, so far as I can tell. Neither
did anything else later, again so far as I can tell.

Bizarrely, commit 9323618 - which followed it a month later -
proceeded to *mock these modules and their dependencies right
back out again*.

I have no idea what the idea was here, but it seems rather
weird. More to the point, it breaks build of the docs with
recent Sphinx, as this artisanal Mock() implementation is not
iterable:

Exception occurred:
  File "/usr/lib/python2.7/site-packages/sphinx/registry.py", line 225, in load_extension
    app.extensions[extname] = Extension(extname, mod, **metadata)
TypeError: 'Mock' object is not iterable

So, let's throw out this entire edifice of zaniness. The docs
build just fine with the remaining matplotlib module (the others
got taken out over the years) cut out from the extensions list,
and the whole weird Mock bit chopped.

Signed-off-by: Adam Williamson <[email protected]>
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.

1 participant