Skip to content

MAINT: Remove LooseVersion#916

Merged
larsoner merged 5 commits intosphinx-gallery:masterfrom
larsoner:version
Feb 17, 2022
Merged

MAINT: Remove LooseVersion#916
larsoner merged 5 commits intosphinx-gallery:masterfrom
larsoner:version

Conversation

@larsoner
Copy link
Copy Markdown
Contributor

I don't like seeing in my Python 3.10 builds:

/home/larsoner/python/sphinx-gallery/sphinx_gallery/py_source_parser.py:105: DeprecationWarning: distutils Version classes are deprecated. Use packaging.version instead.           

So I removed one unnecessary comparison about python version (we require 3.7 already), and another involving matplotlib version that just triaged which GIF writer to use -- 3.3.1 is almost 2 years old, and the GIF-writing bug will only happen if someone actually uses GIFs in their docs and uses a quite old matplotlib version, which I think is rare enough not to worry about.

@larsoner
Copy link
Copy Markdown
Contributor Author

Pushed a fix for this, too:

  File "/home/circleci/python_env/lib/python3.8/site-packages/sphinx_gallery/backreferences.py", line 99, in get_mapping
    obj = getattr(obj, level)
RuntimeError: wrapped C/C++ object of type PyQtGraphBrowser has been deleted

We just need to except Exception rather than except AttributeError

@larsoner larsoner merged commit 877206c into sphinx-gallery:master Feb 17, 2022
@larsoner larsoner deleted the version branch February 17, 2022 13:48
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants