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.

classification
Title: Document that collections.abc types are subscriptable
Type: enhancement Stage: resolved
Components: Documentation Versions: Python 3.11, Python 3.10, Python 3.9
process
Status: closed Resolution: fixed
Dependencies: Superseder:
Assigned To: docs@python Nosy List: FFY00, docs@python, gvanrossum, kj, lukasz.langa, miss-islington
Priority: normal Keywords: patch

Created on 2021-10-12 17:11 by FFY00, last changed 2022-04-11 14:59 by admin. This issue is now closed.

Pull Requests
URL Status Linked Edit
PR 29047 merged FFY00, 2021-10-19 00:42
PR 29067 merged miss-islington, 2021-10-19 18:18
PR 29068 merged lukasz.langa, 2021-10-19 18:22
Messages (6)
msg403744 - (view) Author: Filipe Laíns (FFY00) * (Python triager) Date: 2021-10-12 17:11
Since 3.9, the types in collections.abc are subscriptable and can be used as type hints, but this is not documented.
We should write something similar to what's on the typing module documentation for the deprecated types.
msg403746 - (view) Author: Filipe Laíns (FFY00) * (Python triager) Date: 2021-10-12 17:17
Just to clarify: some type checkers will still allow using them as type hints in Python versions before 3.9, but `from __future__ import annotations` needs to be used so that we don't error out at ruuntime.
msg404323 - (view) Author: Łukasz Langa (lukasz.langa) * (Python committer) Date: 2021-10-19 18:18
New changeset 7bafa0cf586227987d3d662264d491e3780024b7 by Filipe Laíns in branch 'main':
bpo-45449: add note about PEP 585 in collections.abc's documentation (GH-29047)
https://github.com/python/cpython/commit/7bafa0cf586227987d3d662264d491e3780024b7
msg404328 - (view) Author: Łukasz Langa (lukasz.langa) * (Python committer) Date: 2021-10-19 18:41
New changeset 092ec4b9d144c493cb514df0978638fdd2d9622a by Miss Islington (bot) in branch '3.10':
bpo-45449: add note about PEP 585 in collections.abc's documentation (GH-29047) (GH-29067)
https://github.com/python/cpython/commit/092ec4b9d144c493cb514df0978638fdd2d9622a
msg404333 - (view) Author: Łukasz Langa (lukasz.langa) * (Python committer) Date: 2021-10-19 18:50
New changeset a18e4e9c15a0be833e01c3892206661fc91e6918 by Łukasz Langa in branch '3.9':
[3.9] bpo-45449: add note about PEP 585 in collections.abc's documentation (GH-29047) (GH-29068)
https://github.com/python/cpython/commit/a18e4e9c15a0be833e01c3892206661fc91e6918
msg404334 - (view) Author: Łukasz Langa (lukasz.langa) * (Python committer) Date: 2021-10-19 18:50
Thanks, Filipe! ✨ 🍰 ✨
History
Date User Action Args
2022-04-11 14:59:51adminsetgithub: 89612
2021-10-19 18:50:43lukasz.langasetstatus: open -> closed
resolution: fixed
messages: + msg404334

stage: patch review -> resolved
2021-10-19 18:50:20lukasz.langasetmessages: + msg404333
2021-10-19 18:41:37lukasz.langasetmessages: + msg404328
2021-10-19 18:22:59lukasz.langasetpull_requests: + pull_request27335
2021-10-19 18:18:58lukasz.langasetnosy: + lukasz.langa
messages: + msg404323
2021-10-19 18:18:58miss-islingtonsetnosy: + miss-islington
pull_requests: + pull_request27334
2021-10-19 00:42:36FFY00setkeywords: + patch
stage: patch review
pull_requests: + pull_request27318
2021-10-12 17:17:23FFY00setmessages: + msg403746
2021-10-12 17:11:41FFY00create