Skip to content

BUG: don't cache pandas matplotlib converters (#27036) #27968

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

Closed
wants to merge 1 commit into from

Conversation

amerberg
Copy link

#27036 is caused by pandas converters replacing default converters in the cache when we register our matplotlib converters.

@amerberg amerberg changed the title BUG: don't cache pandas matplotlib converters (GH27036) BUG: don't cache pandas matplotlib converters (#27036) Aug 17, 2019
@@ -67,7 +67,13 @@ def register(explicit=True):
converter = cls()
if type_ in units.registry:
previous = units.registry[type_]
_mpl_units[type_] = previous
# Exclude our converters from caching to make this idempotent.
if type(previous) not in {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

the preferred way to do this check would be if not isinstance(previous, ...)

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

... though now that i look below, it looks like someone else used this pattern before, so never mind

@jbrockmendel
Copy link
Member

Can you add a test for the bugfix

@TomAugspurger
Copy link
Contributor

How does this interact with #27481?

@amerberg
Copy link
Author

I believe this addresses the same issue as #27481, so I'm closing.

@amerberg amerberg closed this Aug 23, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

df.plot() does not work for time series after deregistering converters Prophet
4 participants