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: typing._TypeVarLike missing __slots__
Type: behavior Stage: resolved
Components: Library (Lib) Versions: Python 3.11
process
Status: closed Resolution: fixed
Dependencies: Superseder:
Assigned To: Nosy List: AlexWaygood, ariebovenberg, gvanrossum, kj, kumaraditya
Priority: normal Keywords: patch

Created on 2022-01-03 14:47 by ariebovenberg, last changed 2022-04-11 14:59 by admin. This issue is now closed.

Pull Requests
URL Status Linked Edit
PR 30444 merged ariebovenberg, 2022-01-06 20:20
Messages (9)
msg409587 - (view) Author: Arie Bovenberg (ariebovenberg) * Date: 2022-01-03 14:47
The mixin class "typing._TypeVarLike" has no __slots__. Its subclasses do define __slots__, so it looks like a mistake. 

Agree?

It should be an easy fix, and I'd like to pick this up.
msg409589 - (view) Author: Arie Bovenberg (ariebovenberg) * Date: 2022-01-03 15:10
I've also encountered other classes in the stdlib possibly missing slots:

- importlib.metadata.DeprecatedList (subclass EntryPoints has slots)
- xml.dom.minidom.Node, xml.dom.xmlbuilder.DocumentLS (5 subclasses have slots)

Will investigate.
msg409602 - (view) Author: Guido van Rossum (gvanrossum) * (Python committer) Date: 2022-01-03 18:31
Confirmed about _TypeVarLike. Go ahead and make a PR. Do add a news blurb when requested.

Please open separate issues for other such classes, each fix may need to be reviewed by a different expert.
msg409603 - (view) Author: Arie Bovenberg (ariebovenberg) * Date: 2022-01-03 18:34
Thanks! I'll open new issues shortly on xml and importlib
msg409678 - (view) Author: Ken Jin (kj) * (Python committer) Date: 2022-01-04 14:01
Good catch Arie. Would you like to submit a PR for this?
msg409690 - (view) Author: Arie Bovenberg (ariebovenberg) * Date: 2022-01-04 16:44
@kj I would very much like to! Seems like a good place to start contributing :)
msg410267 - (view) Author: Ken Jin (kj) * (Python committer) Date: 2022-01-10 23:43
New changeset 081a2140083680ffc309e53699aea29e71760d70 by Arie Bovenberg in branch 'main':
bpo-46244: Remove __slots__ from typing.TypeVar, .ParamSpec (#30444)
https://github.com/python/cpython/commit/081a2140083680ffc309e53699aea29e71760d70
msg410274 - (view) Author: Kumar Aditya (kumaraditya) * (Python triager) Date: 2022-01-11 04:45
Can this be closed now ?
msg410276 - (view) Author: Guido van Rossum (gvanrossum) * (Python committer) Date: 2022-01-11 05:38
Yes.--
--Guido (mobile)
History
Date User Action Args
2022-04-11 14:59:54adminsetgithub: 90402
2022-01-11 09:44:30AlexWaygoodsetstatus: open -> closed
type: performance -> behavior
resolution: fixed
stage: patch review -> resolved
2022-01-11 05:38:28gvanrossumsetmessages: + msg410276
2022-01-11 04:45:56kumaradityasetmessages: + msg410274
versions: - Python 3.10
2022-01-10 23:43:43kjsetmessages: + msg410267
2022-01-06 20:20:52ariebovenbergsetkeywords: + patch
stage: patch review
pull_requests: + pull_request28650
2022-01-06 16:56:45AlexWaygoodsetnosy: + AlexWaygood
2022-01-06 14:51:20kumaradityasetnosy: + kumaraditya
2022-01-04 16:44:39ariebovenbergsetmessages: + msg409690
2022-01-04 14:01:45kjsetmessages: + msg409678
2022-01-03 18:34:53ariebovenbergsetmessages: + msg409603
2022-01-03 18:31:18gvanrossumsetmessages: + msg409602
2022-01-03 16:32:45AlexWaygoodsetnosy: + gvanrossum, kj
2022-01-03 15:10:48ariebovenbergsetmessages: + msg409589
2022-01-03 14:47:44ariebovenbergcreate