Ditch bizarre inclusion-then-mock-out of matplotlib from sphinx #625
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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]