-
-
Notifications
You must be signed in to change notification settings - Fork 18.5k
Setting xticks with time series broken in 0.21 #18283
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
Comments
Thanks. It would be really nice to have deprecations. |
It's certainly an annoying one, but I don't think it was possible to provide a deprecation warning. Given the apparent widespread dependence of people doing only matplotlib but relying on pandas converters, we might need to think about that though |
I might not be familiar enough with the technical details, but if you registered the conversion, you could have by default registered a deprecated conversion, right? |
Or we could consider to re-enable to register on pandas import, until there is basic support in matplotlib itself for datetime64 data (if there would be a clear timeline for that) |
I don't care so much for support as for deprecations. This is printed on paper and shipped to people and now they have broken code. I guess it will break eventually, but it just breaks constantly without warning, which is a bit frustrating. I have no idea how to ensure that the code that I write in pandas now will still work in 3 month. |
That might work yes. But more general the problem is that this is very brittle: if someone first did a pandas
I know it is not always easy to get done, but that's why we also would really appreciate more feedback like this for a RC |
Well, if matplotlib actually supported datetime64, there would be less of a problem if pandas removed the automatic registration of its own converters.
And I fully understand you here. I think we also underestimated the impact in this case. And I think we should consider reverting this partially |
No, I don't think so. The converter wasn't deprecated, it's just no longer registered as a side effect of
If you're frustrated and venting, I understand and apologize. I underestimated the number of people relying on a pandas import modifying matplotlib's state. If you're looking for a solution, this is compatible going back a long ways: from pandas.tseries import converter
converter.register()
# your plotting stuff In general though, the old way of doing things wasn't great. I don't think an
Matplotlib 2.2 in January hopefully. |
Trying to deprecate it properly probably means importing matplotlib again on import untill the deprecation can be removed. But given the feedback from several people I think we should consider that (it wad only about import time correct?) |
Correct. Let me see if there's a way to issue a deprecation warning if it's used without explicitly registering. It may be worth the slower import time for now. |
Yeah, I agree, modifying matplotlib state on import is not a great way to do it ;) |
(One was
breaking without deprecation between 0.19 and 0.20 I think, and the other one was
breaking between 0.18 and 0.19 without deprecation. ) |
I opened #18301 to make sure we look at this for 0.21.1 |
thanks :) |
See this pandas issue pandas-dev/pandas#18283
Hey. So this worked in 0.20 but not in 0.21:
I'm not sure that was on purpose. So far every
minormajor release of pandas since my book came out broke the code in my book :-/ It would be nice to get deprecation warnings.The text was updated successfully, but these errors were encountered: