Repository navigation
Implement PEP 585 (Type Hinting Generics In Standard Collections) #83662
Copy link
Copy link
Closed
Labels
3.9 (EOL)end of lifeend of lifeinterpreter-core(Objects, Python, Grammar, and Parser dirs)(Objects, Python, Grammar, and Parser dirs)type-bugAn unexpected behavior, bug, or errorAn unexpected behavior, bug, or error
Description
Note: these values reflect the state of the issue at the time it was migrated and might not reflect the current state.
Show more details
GitHub fields:
assignee = None
closed_at = <Date 2020-07-25.21:57:06.912>
created_at = <Date 2020-01-28.17:16:57.906>
labels = ['interpreter-core', 'type-bug', '3.9']
title = 'Implement PEP 585 (Type Hinting Generics In Standard Collections)'
updated_at = <Date 2020-10-12.23:52:11.592>
user = 'https://github.com/gvanrossum'bugs.python.org fields:
activity = <Date 2020-10-12.23:52:11.592>
actor = 'gvanrossum'
assignee = 'none'
closed = True
closed_date = <Date 2020-07-25.21:57:06.912>
closer = 'gvanrossum'
components = ['Interpreter Core']
creation = <Date 2020-01-28.17:16:57.906>
creator = 'gvanrossum'
dependencies = []
files = []
hgrepos = []
issue_num = 39481
keywords = ['patch']
message_count = 29.0
messages = ['360885', '364311', '365357', '365914', '365916', '365936', '365943', '365949', '366102', '366104', '366105', '366106', '366108', '366109', '366131', '366288', '366309', '366311', '366333', '366366', '366367', '366464', '366468', '366476', '367244', '368697', '374286', '378343', '378535']
nosy_count = 7.0
nosy_names = ['gvanrossum', 'lukasz.langa', 'serhiy.storchaka', 'ethan smith', 'miss-islington', 'BTaskaya', 'gousaiyang']
pr_nums = ['18239', '19415', '19417', '19418', '19421', '19422', '19423', '19425', '19427', '19434', '19435', '19469', '19497', '20045', '22619', '22624']
priority = 'normal'
resolution = 'fixed'
stage = 'resolved'
status = 'closed'
superseder = None
type = 'behavior'
url = 'https://bugs.python.org/issue39481'
versions = ['Python 3.9']Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
3.9 (EOL)end of lifeend of lifeinterpreter-core(Objects, Python, Grammar, and Parser dirs)(Objects, Python, Grammar, and Parser dirs)type-bugAn unexpected behavior, bug, or errorAn unexpected behavior, bug, or error
Activity
gvanrossum commentedon Jan 28, 2020
See PEP-585, which is still under review and may change in response to this work.
https://www.python.org/dev/peps/pep-0585/
ambv commentedon Mar 16, 2020
Submitted a request for consideration by the Steering Council: python/steering-council#21
gvanrossum commentedon Mar 30, 2020
The SC approved the PEP!
Łukasz, do you want to submit the PR to update the PEP status?
We should get the implementation reviewed (e.g. by Serhiy) and land it before alpha 6 goes out, April 22 (we should aim for a week before at least).
gvanrossum commentedon Apr 7, 2020
New changeset 48b069a by Guido van Rossum in branch 'master':
bpo-39481: Implementation for PEP-585 (bpo-18239)
48b069a
gvanrossum commentedon Apr 7, 2020
The base implementation has landed. We still need docs, and I'm sure that the alpha and beta release cycle will find small things that need to be improved.
Perhaps the next priority is an update for Doc/whatsnew/3.9.rst.
isidentical commentedon Apr 7, 2020
@gvanrossum is new types going to support generic alias protocol or this subset will be kept? Like typeshed uses os.DirEntry as a generic, but in reality it is not. (#17561)
gvanrossum commentedon Apr 7, 2020
Ethan Smith produced a list of types that are Generic in typeshed but not in the stdlib. So these could be added.
gvanrossum#1 (comment)
gvanrossum commentedon Apr 7, 2020
New changeset f9dd51e by Batuhan Taşkaya in branch 'master':
bpo-39481: Make os.DirEntry generic (GH-19415)
f9dd51e
gvanrossum commentedon Apr 10, 2020
New changeset 2fa67df by Batuhan Taşkaya in branch 'master':
bpo-39481: PEP-585 for ipaddress.py (GH-19418)
2fa67df
8 remaining items
serhiy-storchaka commentedon Apr 13, 2020
No, I did not check other changes. These two just looked too suspicious.
gvanrossum commentedon Apr 13, 2020
New changeset 25a6833 by Chih-Hsuan Yen in branch 'master':
bpo-39481: fix test_genericalias on Android (GH-19469)
25a6833
gvanrossum commentedon Apr 14, 2020
New changeset cecf049 by Ethan Smith in branch 'master':
bpo-39481: Make functools.cached_property, partial, partialmethod generic (bpo-19427)
cecf049
gvanrossum commentedon Apr 14, 2020
New changeset 8ef8750 by Ethan Smith in branch 'master':
bpo-39481: Make weakref and WeakSet generic (GH-19497)
8ef8750
gvanrossum commentedon Apr 14, 2020
New changeset d01628e by Ethan Smith in branch 'master':
bpo-39481: PEP-585 for dataclasses, mailbox, contextvars (GH-19425)
d01628e
ethanhs commentedon Apr 15, 2020
I went through the list I generated and it seems that the
ipaddress._BaseNetwork and mmap.mmap cases are the only one I saw that
shouldn't be generic. I will submit a PR to revert those. The only item
left after that which I know of is _lru_cache_wrapper.
On Tue, Apr 14, 2020 at 4:14 PM Guido van Rossum <report@bugs.python.org>
wrote:
gvanrossum commentedon Apr 15, 2020
Thanks!
--Guido (mobile)
gvanrossum commentedon Apr 25, 2020
In commit 0e80b56 a What's New section was added.
gvanrossum commentedon May 12, 2020
New changeset f3a5b7a by Batuhan Taskaya in branch 'master':
bpo-39481: remove generic classes from ipaddress/mmap (GH-20045)
f3a5b7a
gvanrossum commentedon Jul 25, 2020
This can be closed. It needs docs though; there's a separate issue for that (bpo-40814).
miss-islington commentedon Oct 9, 2020
New changeset b2c0a43 by Saiyang Gou in branch 'master':
bpo-39481: Fix duplicate SimpleQueue type in test_genericalias.py (GH-22619)
b2c0a43
gvanrossum commentedon Oct 12, 2020
New changeset 1c21765 by Saiyang Gou in branch '3.9':
[3.9] bpo-39481: Fix duplicate SimpleQueue type in test_genericalias.py (GH-22619) (bpo-22624)
1c21765