-
-
Notifications
You must be signed in to change notification settings - Fork 7.9k
Fixes currently release version of cartopy #12131
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
Conversation
closes matplotlib#11966 The issue has also been fixed on the cartopy side (SciTools/cartopy#1041) but has not been released yet.
# this here to support cartopy which was using a private part of the | ||
# API to register their Axes subclasses. | ||
|
||
# In 3.1 this should be changed to a dict subclass that warns on use |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why not start warning on use in this version? Warning is basically free after all and it gives more notice.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Because there is not a released version of cartopy with the fix on their side yet. I don't want to warn at their users and give them no way to fix it.
[corrected typo]
return type("%sSubplot" % axes_class.__name__, | ||
(SubplotBase, axes_class), | ||
{'_axes_class': axes_class}) | ||
try: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think this might be clearer if you use a for / else loop.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm indifferent either way.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Indeed, for/else would be clearer, but since this is a temporary workaround I don‘t care too much.
Is there a description of the issue this is working around? |
return type("%sSubplot" % axes_class.__name__, | ||
(SubplotBase, axes_class), | ||
{'_axes_class': axes_class}) | ||
try: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Indeed, for/else would be clearer, but since this is a temporary workaround I don‘t care too much.
…131-on-v3.0.x Backport PR #12131 on branch v3.0.x (Fixes currently release version of cartopy)
I didn't check already, but we cut v0.17 of cartopy last week and I hope it is now safe to revert this change. |
ht to @anntzer for the sub-class search code.