You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Missing class getitems in standard library classes #83200
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=Noneclosed_at=<Date2020-04-07.20:37:14.175>created_at=<Date2019-12-10.17:55:54.056>labels= ['library', '3.9']
title='Missing class getitems in standard library classes'updated_at=<Date2020-04-07.20:55:44.241>user='https://github.com/isidentical'
After working on bpo-38994 and bpo-38978, I decided to write a simple AST analyzer to find class getitem syntax usage in typeshed. It discovered a few classes (I am not sure if there are more). As @brett.cannon suggested in PR 17498 I'll prepare individual pull requests.
New changeset 4dc5a9d by Ivan Levkivskyi (Batuhan Taşkaya) in branch 'master': bpo-39019: Implement missing __class_getitem__ for subprocess classes (GH-17558) 4dc5a9d
New changeset 09c482f by Ivan Levkivskyi (Batuhan Taşkaya) in branch 'master': bpo-39019: Implement missing __class_getitem__ for SpooledTemporaryFile (GH-17560) 09c482f
Activity
isidentical commentedon Dec 10, 2019
After working on bpo-38994 and bpo-38978, I decided to write a simple AST analyzer to find class getitem syntax usage in typeshed. It discovered a few classes (I am not sure if there are more). As @brett.cannon suggested in PR 17498 I'll prepare individual pull requests.
typeshed/stdlib/3/subprocess.pyi:868 => Popen
typeshed/stdlib/3/subprocess.pyi:82 => CompletedProcess
typeshed/stdlib/3/tempfile.pyi:98 => SpooledTemporaryFile
typeshed/stdlib/3/os/init.pyi:463 => DirEntry
typeshed/stdlib/3/http/cookies.pyi:5 => Morsel
ilevkivskyi commentedon Dec 30, 2019
New changeset 4dc5a9d by Ivan Levkivskyi (Batuhan Taşkaya) in branch 'master':
bpo-39019: Implement missing __class_getitem__ for subprocess classes (GH-17558)
4dc5a9d
ilevkivskyi commentedon Dec 30, 2019
New changeset 09c482f by Ivan Levkivskyi (Batuhan Taşkaya) in branch 'master':
bpo-39019: Implement missing __class_getitem__ for SpooledTemporaryFile (GH-17560)
09c482f
gvanrossum commentedon Feb 23, 2020
Once PEP-585 is implemented these should be rolled back and replaced with that, right?
ilevkivskyi commentedon Feb 23, 2020
I would say that ideally yes.
isidentical commentedon Apr 7, 2020
PEP-585 is landed, closing the issue (and linked PRs)
gvanrossum commentedon Apr 7, 2020
Hold on, os.DirEntry[str] still doesn't work.
isidentical commentedon Apr 7, 2020
That is what I asked on the bpo-39481. I couldn't find anything about its cover on PEP-585.