Skip to content

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

Merged
merged 4 commits into from
Oct 8, 2024

Conversation

QuLogic
Copy link
Member

@QuLogic QuLogic commented Sep 24, 2024

PR summary

Still need to write docs, and also commit all the rest of them.

PR checklist

Comment on lines +78 to +79
views: dict[Figure | Axes, cbook._Stack]
positions: dict[Figure | Axes, cbook._Stack]
Copy link
Member Author

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?

Copy link
Member Author

@QuLogic QuLogic Sep 26, 2024

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.

@QuLogic QuLogic force-pushed the remove-deprecations branch 3 times, most recently from 764a2a3 to 5f5a560 Compare September 26, 2024 20:37
QuLogic added a commit to QuLogic/matplotlib that referenced this pull request Sep 27, 2024
This fixes the "unused allowlist entry" error we see in matplotlib#28874.
QuLogic added a commit to QuLogic/matplotlib that referenced this pull request Sep 27, 2024
This fixes the "unused allowlist entry" error we see in matplotlib#28874.
QuLogic added a commit to QuLogic/matplotlib that referenced this pull request Sep 27, 2024
This fixes the "unused allowlist entry" error we see in matplotlib#28874.
@QuLogic QuLogic force-pushed the remove-deprecations branch from 5f5a560 to d9fdae8 Compare September 30, 2024 22:26
@QuLogic QuLogic marked this pull request as ready for review September 30, 2024 23:03
Copy link
Member

@ksunden ksunden left a 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: ...
Copy link
Member

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)

Copy link
Member Author

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.

Copy link
Member

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.

@ksunden ksunden added this to the v3.10.0 milestone Oct 2, 2024
@ksunden ksunden added the Release critical For bugs that make the library unusable (segfaults, incorrect plots, etc) and major regressions. label Oct 2, 2024
@greglucas greglucas merged commit 7593423 into matplotlib:main Oct 8, 2024
46 of 47 checks passed
@QuLogic QuLogic deleted the remove-deprecations branch October 8, 2024 20:42
kyracho pushed a commit to kyracho/matplotlib that referenced this pull request Oct 10, 2024
This fixes the "unused allowlist entry" error we see in matplotlib#28874.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants