Issue 28790: Error when using Generic and slots (original) (raw)
Issue28790
Created on 2016-11-24 20:04 by gvanrossum, last changed 2022-04-11 14:58 by admin. This issue is now closed.
Messages (4) | ||
---|---|---|
msg281649 - (view) | Author: Guido van Rossum (gvanrossum) * ![]() |
Date: 2016-11-24 20:04 |
Proxy for https://github.com/python/typing/issues/332 (issue) and https://github.com/python/typing/pull/334 (fix). """ from typing import Generic, TypeVar class C(Generic[TypeVar('T')]): __slots__ = ('potato',) # ValueError: 'potato' in __slots__ conflicts with class variable C[int] This is because bare C is created with a class member descriptor potato, and instantiating it tries to create a class with all the attributes in C. """ @ned, I'll leave it up to you whether this is of sufficient severity to put in 3.6rc1 or not. Do I need to attach the fix as a diff to this bug? | ||
msg281940 - (view) | Author: Ned Deily (ned.deily) * ![]() |
Date: 2016-11-29 03:35 |
I don't have a good sense of the severity of this issue but it doesn't seem like it qualifies as release critical. On the other hand, the changes are isolated to typing and typing is more fluid than older, more established modules. If you think it should go in 3.6.0rc1, I won't object. | ||
msg282023 - (view) | Author: Guido van Rossum (gvanrossum) * ![]() |
Date: 2016-11-29 17:44 |
OK, having thought about it some more, given that you don't seem to object too strenuously, I'm going to merge the fix. May it be the last one! | ||
msg282025 - (view) | Author: Roundup Robot (python-dev) ![]() |
Date: 2016-11-29 17:51 |
New changeset 0bbd29405c9d by Guido van Rossum in branch '3.5': Issue #28790: Fix error when using Generic and __slots__ (Ivan L) https://hg.python.org/cpython/rev/0bbd29405c9d New changeset 2dd08b5b5ee6 by Guido van Rossum in branch '3.6': Issue #28790: Fix error when using Generic and __slots__ (Ivan L) (3.5->3.6) https://hg.python.org/cpython/rev/2dd08b5b5ee6 New changeset b9915ca4b3da by Guido van Rossum in branch 'default': Issue #28790: Fix error when using Generic and __slots__ (Ivan L) (3.6->3.7) https://hg.python.org/cpython/rev/b9915ca4b3da |
History | |||
---|---|---|---|
Date | User | Action | Args |
2022-04-11 14:58:40 | admin | set | github: 72976 |
2016-11-29 19:41:23 | ned.deily | set | stage: commit review -> resolved |
2016-11-29 17:51:44 | gvanrossum | set | status: open -> closedtype: behaviorresolution: fixedstage: commit review |
2016-11-29 17:51:22 | python-dev | set | nosy: + python-devmessages: + |
2016-11-29 17:44:14 | gvanrossum | set | messages: + |
2016-11-29 03:35:59 | ned.deily | set | messages: + |
2016-11-24 20:05:34 | gvanrossum | set | nosy: + levkivskyi |
2016-11-24 20:04:07 | gvanrossum | create |