-
-
Notifications
You must be signed in to change notification settings - Fork 31.4k
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
bpo-46483: [doc] Remove pathlib
classes from list of stdlib classes that can be parameterized at runtime
#31281
Conversation
…nerics in 3.11 `__class_getitem__` has been removed from `pathlib.PurePath` due to the fact that it was only added to the class by mistake (the class was never really generic). This means that `PurePath` (and subclasses of `PurePath`) can no longer be parameterized at runtime. Therefore, these `pathlib` classes should be removed from the list in `stdtypes.rst` of classes that can be parameterized at runtime.
Do you think we should backport this change? The classes will remain parameterizable in 3.10, but the list already promises to be non-exhaustive, so we might as well remove these classes so we don't draw more attention to the previous incorrect behavior. |
Yes, good idea. They were also only added to this list fairly recently (prior to @sobolevn's PR removing |
Thanks @AlexWaygood for the PR, and @serhiy-storchaka for merging it 🌮🎉.. I'm working now to backport this PR to: 3.9, 3.10. |
Sorry @AlexWaygood and @serhiy-storchaka, I had trouble checking out the |
GH-31286 is a backport of this pull request to the 3.9 branch. |
Thanks @AlexWaygood for the PR, and @serhiy-storchaka for merging it 🌮🎉.. I'm working now to backport this PR to: 3.9. |
…rics (pythonGH-31281) Remove pathlib classes from the list in stdtypes.rst of classes that can be parameterized at runtime. (cherry picked from commit e0bc8ee) Co-authored-by: Alex Waygood <Alex.Waygood@Gmail.com>
Thanks @AlexWaygood for the PR, and @serhiy-storchaka for merging it 🌮🎉.. I'm working now to backport this PR to: 3.10. |
…rics (pythonGH-31281) Remove pathlib classes from the list in stdtypes.rst of classes that can be parameterized at runtime. (cherry picked from commit e0bc8ee) Co-authored-by: Alex Waygood <Alex.Waygood@Gmail.com>
GH-31287 is a backport of this pull request to the 3.10 branch. |
Thanks @serhiy-storchaka! |
…rics (pythonGH-31281) Remove pathlib classes from the list in stdtypes.rst of classes that can be parameterized at runtime. (cherry picked from commit e0bc8ee) Co-authored-by: Alex Waygood <Alex.Waygood@Gmail.com>
__class_getitem__
has been removed frompathlib.PurePath
due to the fact that it was only added to the class by mistake (the class was never really generic). This means thatPurePath
(and subclasses ofPurePath
) can no longer be parameterized at runtime. Therefore, thesepathlib
classes should be removed from the list instdtypes.rst
of classes that can be parameterized at runtime.https://bugs.python.org/issue46483