This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author AlexWaygood
Recipients AlexWaygood, BTaskaya, asvetlov, gvanrossum, kj, serhiy.storchaka, sobolevn
Date 2022-01-23.15:09:18
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1642950558.61.0.0859785385285.issue46483@roundup.psfhosted.org>
In-reply-to
Content
It looks like __class_getitem__ was added to PurePath at @asvetlov's request  in PR 17498. But, I'm also not quite sure why. The class is not generic in typeshed, so type-checkers will raise an error if you do PurePath[str], even if it is possible to do so at runtime.

Typeshed stub for PurePath: https://github.com/python/typeshed/blob/dff461fc6adef1ec3a4b58af5abdf0cdebf2429a/stdlib/pathlib.pyi#L20
History
Date User Action Args
2022-01-23 15:09:18AlexWaygoodsetrecipients: + AlexWaygood, gvanrossum, asvetlov, serhiy.storchaka, BTaskaya, sobolevn, kj
2022-01-23 15:09:18AlexWaygoodsetmessageid: <1642950558.61.0.0859785385285.issue46483@roundup.psfhosted.org>
2022-01-23 15:09:18AlexWaygoodlinkissue46483 messages
2022-01-23 15:09:18AlexWaygoodcreate