-
-
Notifications
You must be signed in to change notification settings - Fork 18.1k
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
CI: Pin matplotlib < 3.8 #55210
CI: Pin matplotlib < 3.8 #55210
Conversation
Backport PR #55210: CI: Pin matplotlib < 3.8 Co-authored-by: Thomas Li <[email protected]>
cc @twoertwein I believe the new matplotlib version created new typing issues if you have any familiarity |
I will look into it (I can't promise how soon). Is the only reason to pin it for typing reasons? We also had a few issues in pandas-stubs: previously, mypy/pyright resolved any matplotlib types as Any/Unknown since it wasn't declared a py.typed library (I believe it is now). Technically, the new matplotlib release isn't causing new type issues but just exposing existing issues that previously weren't caught ;) |
I think two main sources triggering these many typing errors are:
Here are some type errors that seem to indicate that pandas is doing something fishy:
|
Here are my annotations on the type errors I was able to look at: Unrelated to mpl/maybe need a config/mypy plugin/other optional install?:
Legitimate type conflict in usage of mpl (though perhaps rare cases):
New mpl typing provides better way of handling this, though backwards compatibility is a potential problem:
Pandas dynamically adding things to MPL objects that aren't there by default:
Pandas using private (and thus untyped) functionality:
May need more thought on mpl side...:
Unclear where to land on what needs fixing:
Most of the fixes are fairly straightforward (especially to pandas itself), with the most sticky things probably being on our end (mpl). May require a few extra ignores in the interim, for those. Sorry to have missed these when I did run against downstreams, I think I ran against the stubs repo thinking that mypy would report inconsistencies there, but it didn't find anything, so I moved on. |
I believe code checks were the only reason why this was pinned. @lithomas1 might be able to confirm |
No, there were some other failing tests too IIRC. I don't remember, though. Sorry about that, I think I was rushing to get CI green for the release and forgot to open an issue for this. |
doc/source/whatsnew/vX.X.X.rst
file if fixing a bug or adding a new feature.