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.

Author maggyero
Recipients maggyero
Date 2021-04-12.13:55:17
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1618235717.97.0.321047672472.issue43814@roundup.psfhosted.org>
In-reply-to
Content
When

```
TypeError: __weakref__ slot disallowed: either we already got one, or __itemsize__ != 0
```

is raised, the second condition `base->tp_itemsize != 0` (i.e. the base is a *variable-length* type, like `int`, `tuple` and `bytes`) in the error message is impossible since using a non-empty `__slots__` (e.g. `__slots__ = ('__weakref__',)`) for a subtype of a variable-length type raises a

```
TypeError: nonempty __slots__ not supported for subtype of '…'
```

earlier in the `type.__new__` implementation.
History
Date User Action Args
2021-04-12 13:55:17maggyerosetrecipients: + maggyero
2021-04-12 13:55:17maggyerosetmessageid: <1618235717.97.0.321047672472.issue43814@roundup.psfhosted.org>
2021-04-12 13:55:17maggyerolinkissue43814 messages
2021-04-12 13:55:17maggyerocreate