Repository navigation
Remove remaining 3.8 deprecations - #28874
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.
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.
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
ksunden
left a comment
There was a problem hiding this comment.
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.
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.
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.
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