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

Consolidate mpl version checks #2238

Merged
merged 2 commits into from
Aug 25, 2023
Merged

Conversation

rcomer
Copy link
Member

@rcomer rcomer commented Aug 22, 2023

Rationale

Closes #2237. I should have been more explicit with those imports when I added them.

I'm wondering if it's worth moving all these mpl version checks to a central place, like dask does with its numpy version checks. I guess it depends how often we need this sort of version gating.

Implications

@greglucas
Copy link
Contributor

I think consolidating some of these would make sense. See also: #1748 for a desire to print the in-use versions out somewhere too

@rcomer
Copy link
Member Author

rcomer commented Aug 22, 2023

OK I went for a clean sweep...

I put the checks in mpl.__init__ rather than mpl.geoaxes to avoid circular imports with geocollection and contour.

Edit: I also ran the tests against mpl main branch.

@rcomer rcomer changed the title import packaging.version Consolidate mpl version checks Aug 22, 2023
@greglucas greglucas merged commit 96ee0a3 into SciTools:main Aug 25, 2023
11 checks passed
@rcomer rcomer deleted the packaging-import branch August 25, 2023 07:11
@QuLogic QuLogic added this to the Next Release milestone Aug 25, 2023
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.

Correct way to check matplotlib version
3 participants