-
-
Notifications
You must be signed in to change notification settings - Fork 7.9k
Remove remaining 3.8 deprecations #28874
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
a5ba87a
to
3d24148
Compare
3d24148
to
50e3c09
Compare
views: dict[Figure | Axes, cbook._Stack] | ||
positions: dict[Figure | Axes, cbook._Stack] |
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.
So this is a bit weird to have here in the public API when the cbook.Stack
is going away. mypy doesn't like this since it's not in cbook.pyi
. Is this really something that should be public?
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.
We discussed on the call today and decided to keep cbook._Stack
in the type stubs to keep this working. If we want, then probably could also deprecate access to these attributes as they are probably internal.
764a2a3
to
5f5a560
Compare
This fixes the "unused allowlist entry" error we see in matplotlib#28874.
This fixes the "unused allowlist entry" error we see in matplotlib#28874.
This fixes the "unused allowlist entry" error we see in matplotlib#28874.
5f5a560
to
d9fdae8
Compare
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.
One minor typing comment, but not sure there is anything to be done about it and it is only on load_sample_data
, so not too worried about type hinting there.
fname: str | os.PathLike, asfileobj: Literal[True] = ..., *, np_load: Literal[True] | ||
) -> np.ndarray: ... | ||
fname: str | os.PathLike, asfileobj: Literal[True] = ... | ||
) -> np.ndarray | IO: ... |
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.
Unions in returns are mildly annoying... but this is an ancillary function anyway, so not too worried.
(Also the old one was not technically accurate, though practically speaking if you passed True, you better be using a valid filetype for numpy loading)
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.
Unfortunately, the return value depends on the extension in fname
, so I don't think there's any easy way to split the union.
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.
Yeah, could extend to just Any
, but that isn't a satisfying answer... I'm okay with it, just noted in case you or someone else wanted to suggest a change based on that.
This fixes the "unused allowlist entry" error we see in matplotlib#28874.
PR summary
Still need to write docs, and also commit all the rest of them.
PR checklist