[issue45680] Documentation on `GenericAlias` objects could be improved
New submission from Alex Waygood <Alex.Waygood@Gmail.com>: The documentation on `GenericAlias` objects implies at multiple points that only container classes can implement `__class_getitem__`, and goes into very little detail about what it means for a non-container class to be parameterized. ---------- assignee: docs@python components: Documentation messages: 405384 nosy: AlexWaygood, docs@python, gvanrossum, kj, lukasz.langa priority: normal severity: normal status: open title: Documentation on `GenericAlias` objects could be improved type: behavior versions: Python 3.10, Python 3.11, Python 3.9 _______________________________________ Python tracker <report@bugs.python.org> <https://bugs.python.org/issue45680> _______________________________________
Change by Alex Waygood <Alex.Waygood@Gmail.com>: ---------- keywords: +patch pull_requests: +27603 stage: -> patch review pull_request: https://github.com/python/cpython/pull/29335 _______________________________________ Python tracker <report@bugs.python.org> <https://bugs.python.org/issue45680> _______________________________________
Alex Waygood <Alex.Waygood@Gmail.com> added the comment: This issue is related, but distinct, to previous issue https://bugs.python.org/issue42280. ---------- _______________________________________ Python tracker <report@bugs.python.org> <https://bugs.python.org/issue45680> _______________________________________
Change by Alex Waygood <Alex.Waygood@Gmail.com>: ---------- title: Documentation on `GenericAlias` objects could be improved -> Documentation on `GenericAlias` objects and `__class_getitem__` could be improved _______________________________________ Python tracker <report@bugs.python.org> <https://bugs.python.org/issue45680> _______________________________________
Change by Alex Waygood <Alex.Waygood@Gmail.com>: ---------- pull_requests: +27645 pull_request: https://github.com/python/cpython/pull/29387 _______________________________________ Python tracker <report@bugs.python.org> <https://bugs.python.org/issue45680> _______________________________________
Change by Alex Waygood <Alex.Waygood@Gmail.com>: ---------- pull_requests: +27646 pull_request: https://github.com/python/cpython/pull/29388 _______________________________________ Python tracker <report@bugs.python.org> <https://bugs.python.org/issue45680> _______________________________________
Change by Alex Waygood <Alex.Waygood@Gmail.com>: ---------- pull_requests: +27647 pull_request: https://github.com/python/cpython/pull/29389 _______________________________________ Python tracker <report@bugs.python.org> <https://bugs.python.org/issue45680> _______________________________________
Ken Jin <kenjin4096@gmail.com> added the comment: New changeset e03e50377d6f8f212af60fed4ae405ebeb73237d by Alex Waygood in branch 'main': bpo-45680: ``typing`` docs: improve links to docs on ``GenericAlias``/``__class_getitem__`` (GH-29387) https://github.com/python/cpython/commit/e03e50377d6f8f212af60fed4ae405ebeb7... ---------- _______________________________________ Python tracker <report@bugs.python.org> <https://bugs.python.org/issue45680> _______________________________________
Change by miss-islington <mariatta.wijaya+miss-islington@gmail.com>: ---------- nosy: +miss-islington nosy_count: 5.0 -> 6.0 pull_requests: +27658 pull_request: https://github.com/python/cpython/pull/29399 _______________________________________ Python tracker <report@bugs.python.org> <https://bugs.python.org/issue45680> _______________________________________
Change by miss-islington <mariatta.wijaya+miss-islington@gmail.com>: ---------- pull_requests: +27659 pull_request: https://github.com/python/cpython/pull/29400 _______________________________________ Python tracker <report@bugs.python.org> <https://bugs.python.org/issue45680> _______________________________________
miss-islington <mariatta.wijaya+miss-islington@gmail.com> added the comment: New changeset c10896696f47a8348e6d9ea3c1d96fa6ba131a31 by Miss Islington (bot) in branch '3.10': bpo-45680: ``typing`` docs: improve links to docs on ``GenericAlias``/``__class_getitem__`` (GH-29387) https://github.com/python/cpython/commit/c10896696f47a8348e6d9ea3c1d96fa6ba1... ---------- _______________________________________ Python tracker <report@bugs.python.org> <https://bugs.python.org/issue45680> _______________________________________
miss-islington <mariatta.wijaya+miss-islington@gmail.com> added the comment: New changeset e813dd4d7bb0ecfabc7dae75e13f58164bcf8da6 by Miss Islington (bot) in branch '3.9': bpo-45680: ``typing`` docs: improve links to docs on ``GenericAlias``/``__class_getitem__`` (GH-29387) https://github.com/python/cpython/commit/e813dd4d7bb0ecfabc7dae75e13f58164bc... ---------- _______________________________________ Python tracker <report@bugs.python.org> <https://bugs.python.org/issue45680> _______________________________________
Change by miss-islington <mariatta.wijaya+miss-islington@gmail.com>: ---------- pull_requests: +27701 pull_request: https://github.com/python/cpython/pull/29447 _______________________________________ Python tracker <report@bugs.python.org> <https://bugs.python.org/issue45680> _______________________________________
Łukasz Langa <lukasz@langa.pl> added the comment: New changeset 77a2c77c84d2ead2d19f96df862c119308e90071 by Alex Waygood in branch 'main': [doc] bpo-45680: Improve glossary entry for generic types (GH-29388) https://github.com/python/cpython/commit/77a2c77c84d2ead2d19f96df862c119308e... ---------- _______________________________________ Python tracker <report@bugs.python.org> <https://bugs.python.org/issue45680> _______________________________________
Change by miss-islington <mariatta.wijaya+miss-islington@gmail.com>: ---------- pull_requests: +27702 pull_request: https://github.com/python/cpython/pull/29448 _______________________________________ Python tracker <report@bugs.python.org> <https://bugs.python.org/issue45680> _______________________________________
Łukasz Langa <lukasz@langa.pl> added the comment: New changeset 494f8da741054e5bab33f23f3961400ea5778235 by Miss Islington (bot) in branch '3.10': [doc] bpo-45680: Improve glossary entry for generic types (GH-29388) (GH-29447) https://github.com/python/cpython/commit/494f8da741054e5bab33f23f3961400ea57... ---------- _______________________________________ Python tracker <report@bugs.python.org> <https://bugs.python.org/issue45680> _______________________________________
Łukasz Langa <lukasz@langa.pl> added the comment: New changeset 643f50ca5e9e12a4d8269ddc8baf2279d8608745 by Miss Islington (bot) in branch '3.9': [doc] bpo-45680: Improve glossary entry for generic types (GH-29388) (GH-29448) https://github.com/python/cpython/commit/643f50ca5e9e12a4d8269ddc8baf2279d86... ---------- _______________________________________ Python tracker <report@bugs.python.org> <https://bugs.python.org/issue45680> _______________________________________
Change by Alex Waygood <Alex.Waygood@Gmail.com>: ---------- pull_requests: +27730 pull_request: https://github.com/python/cpython/pull/29479 _______________________________________ Python tracker <report@bugs.python.org> <https://bugs.python.org/issue45680> _______________________________________
Łukasz Langa <lukasz@langa.pl> added the comment: New changeset 31b3a70edb1216bdc8fab3b2eafd8ddb00487f41 by Alex Waygood in branch 'main': [doc] bpo-45680: Disambiguate ``__getitem__`` and ``__class_getitem__`` in the data model (GH-29389) https://github.com/python/cpython/commit/31b3a70edb1216bdc8fab3b2eafd8ddb004... ---------- _______________________________________ Python tracker <report@bugs.python.org> <https://bugs.python.org/issue45680> _______________________________________
Change by miss-islington <mariatta.wijaya+miss-islington@gmail.com>: ---------- pull_requests: +27854 pull_request: https://github.com/python/cpython/pull/29619 _______________________________________ Python tracker <report@bugs.python.org> <https://bugs.python.org/issue45680> _______________________________________
Change by miss-islington <mariatta.wijaya+miss-islington@gmail.com>: ---------- pull_requests: +27855 pull_request: https://github.com/python/cpython/pull/29620 _______________________________________ Python tracker <report@bugs.python.org> <https://bugs.python.org/issue45680> _______________________________________
Łukasz Langa <lukasz@langa.pl> added the comment: New changeset fde9f61e70bc38850783c81bf7c80c764ba6d9fa by Miss Islington (bot) in branch '3.10': [3.10] [doc] bpo-45680: Disambiguate ``__getitem__`` and ``__class_getitem__`` in the data model (GH-29389) (GH-29620) https://github.com/python/cpython/commit/fde9f61e70bc38850783c81bf7c80c764ba... ---------- _______________________________________ Python tracker <report@bugs.python.org> <https://bugs.python.org/issue45680> _______________________________________
Łukasz Langa <lukasz@langa.pl> added the comment: New changeset 591bf416090fb00795eed51f6863e3c5d9036c89 by Miss Islington (bot) in branch '3.9': [3.9] [doc] bpo-45680: Disambiguate ``__getitem__`` and ``__class_getitem__`` in the data model (GH-29389) (GH-29619) https://github.com/python/cpython/commit/591bf416090fb00795eed51f6863e3c5d90... ---------- _______________________________________ Python tracker <report@bugs.python.org> <https://bugs.python.org/issue45680> _______________________________________
Ken Jin <kenjin4096@gmail.com> added the comment: New changeset 0eae9a2a2db6cc5a72535f61bb988cc417011640 by Alex Waygood in branch 'main': bpo-45680: Clarify documentation on ``GenericAlias`` objects (GH-29335) https://github.com/python/cpython/commit/0eae9a2a2db6cc5a72535f61bb988cc4170... ---------- _______________________________________ Python tracker <report@bugs.python.org> <https://bugs.python.org/issue45680> _______________________________________
Change by Ken Jin <kenjin4096@gmail.com>: ---------- pull_requests: +28887 pull_request: https://github.com/python/cpython/pull/30689 _______________________________________ Python tracker <report@bugs.python.org> <https://bugs.python.org/issue45680> _______________________________________
Change by Ken Jin <kenjin4096@gmail.com>: ---------- pull_requests: +28888 pull_request: https://github.com/python/cpython/pull/30690 _______________________________________ Python tracker <report@bugs.python.org> <https://bugs.python.org/issue45680> _______________________________________
miss-islington <mariatta.wijaya+miss-islington@gmail.com> added the comment: New changeset 24d0b331e81b4e4af8dd4c1b66ea7159c1fdabc5 by Miss Islington (bot) in branch '3.10': [3.10] bpo-45680: Clarify documentation on ``GenericAlias`` objects (GH-29335) (GH-30688) https://github.com/python/cpython/commit/24d0b331e81b4e4af8dd4c1b66ea7159c1f... ---------- _______________________________________ Python tracker <report@bugs.python.org> <https://bugs.python.org/issue45680> _______________________________________
Ken Jin <kenjin4096@gmail.com> added the comment: New changeset 1faf7c4effbe8b66f9b0347cab570fb3b5c91fb0 by Ken Jin in branch 'main': bpo-45680: Minor formatting fix in stdtypes.rst (GH-30690) https://github.com/python/cpython/commit/1faf7c4effbe8b66f9b0347cab570fb3b5c... ---------- _______________________________________ Python tracker <report@bugs.python.org> <https://bugs.python.org/issue45680> _______________________________________
Ken Jin <kenjin4096@gmail.com> added the comment: New changeset 00645166b64e68001a425a15281a1ccdcb78f818 by Ken Jin in branch '3.9': [3.9] bpo-45680: Clarify documentation on ``GenericAlias`` objects (GH-29335) (GH-30689) https://github.com/python/cpython/commit/00645166b64e68001a425a15281a1ccdcb7... ---------- _______________________________________ Python tracker <report@bugs.python.org> <https://bugs.python.org/issue45680> _______________________________________
Ken Jin <kenjin4096@gmail.com> added the comment: Phew, we're finally done. Thanks Alex for the PRs, and Łukasz, Guido (and many others) for all the reviews! ---------- resolution: -> fixed stage: patch review -> resolved status: open -> closed _______________________________________ Python tracker <report@bugs.python.org> <https://bugs.python.org/issue45680> _______________________________________
Alex Waygood <Alex.Waygood@Gmail.com> added the comment: Wait... there's still PR 29479 open! But that can wait a little while -- getting PR 29335 over the line is definitely worth celebrating!! ---------- _______________________________________ Python tracker <report@bugs.python.org> <https://bugs.python.org/issue45680> _______________________________________
Ken Jin <kenjin4096@gmail.com> added the comment:
Wait... there's still PR 29479 open!
Sorry, I was too excited when PR 29335 merged and missed that. In the future, please re-open if you feel I closed an issue wrongly. Thanks! ---------- resolution: fixed -> status: closed -> open _______________________________________ Python tracker <report@bugs.python.org> <https://bugs.python.org/issue45680> _______________________________________
Alex Waygood <Alex.Waygood@Gmail.com> added the comment:
Sorry, I was too excited when PR 29335 merged and missed that. In the future, please re-open if you feel I closed an issue wrongly. Thanks!
No worries — will do! ---------- _______________________________________ Python tracker <report@bugs.python.org> <https://bugs.python.org/issue45680> _______________________________________
Change by miss-islington <mariatta.wijaya+miss-islington@gmail.com>: ---------- pull_requests: +29860 stage: resolved -> patch review pull_request: https://github.com/python/cpython/pull/31743 _______________________________________ Python tracker <report@bugs.python.org> <https://bugs.python.org/issue45680> _______________________________________
Change by miss-islington <mariatta.wijaya+miss-islington@gmail.com>: ---------- pull_requests: +29861 pull_request: https://github.com/python/cpython/pull/31744 _______________________________________ Python tracker <report@bugs.python.org> <https://bugs.python.org/issue45680> _______________________________________
Jelle Zijlstra <jelle.zijlstra@gmail.com> added the comment: New changeset 50731297a9b6d57eec3b3f89522785b23f7b3e71 by Alex Waygood in branch 'main': bpo-45680: Improve docs on subscriptions w.r.t. `GenericAlias` objects (GH-29479) https://github.com/python/cpython/commit/50731297a9b6d57eec3b3f89522785b23f7... ---------- nosy: +Jelle Zijlstra _______________________________________ Python tracker <report@bugs.python.org> <https://bugs.python.org/issue45680> _______________________________________
Jelle Zijlstra <jelle.zijlstra@gmail.com> added the comment: And now I think we're really done! Thanks for all your work here @AlexWaygood. ---------- resolution: -> fixed stage: patch review -> resolved status: open -> closed _______________________________________ Python tracker <report@bugs.python.org> <https://bugs.python.org/issue45680> _______________________________________
miss-islington <mariatta.wijaya+miss-islington@gmail.com> added the comment: New changeset 06108c08ddbb4efda804eb74dd33928348102e6f by Miss Islington (bot) in branch '3.10': bpo-45680: Improve docs on subscriptions w.r.t. `GenericAlias` objects (GH-29479) https://github.com/python/cpython/commit/06108c08ddbb4efda804eb74dd339283481... ---------- _______________________________________ Python tracker <report@bugs.python.org> <https://bugs.python.org/issue45680> _______________________________________
miss-islington <mariatta.wijaya+miss-islington@gmail.com> added the comment: New changeset e83f084084296a9b16b83b324a715045d3614c92 by Miss Islington (bot) in branch '3.9': bpo-45680: Improve docs on subscriptions w.r.t. `GenericAlias` objects (GH-29479) https://github.com/python/cpython/commit/e83f084084296a9b16b83b324a715045d36... ---------- _______________________________________ Python tracker <report@bugs.python.org> <https://bugs.python.org/issue45680> _______________________________________
Alex Waygood <Alex.Waygood@Gmail.com> added the comment: Thanks so much to Ken, Łukasz, Jelle, Guido, and everybody else who helped review these PRs! ---------- _______________________________________ Python tracker <report@bugs.python.org> <https://bugs.python.org/issue45680> _______________________________________
participants (5)
-
Alex Waygood
-
Jelle Zijlstra
-
Ken Jin
-
miss-islington
-
Łukasz Langa