[issue43814] Fix the error message for disallowed __weakref__ slots

2022-01-15 Thread Irit Katriel
Change by Irit Katriel : -- versions: +Python 3.11 -Python 3.10, Python 3.6, Python 3.7, Python 3.8, Python 3.9 ___ Python tracker ___

[issue43814] Fix the error message for disallowed __weakref__ slots

2021-04-12 Thread Géry
Change by Géry : -- keywords: +patch pull_requests: +24096 stage: -> patch review pull_request: https://github.com/python/cpython/pull/25362 ___ Python tracker ___

[issue43814] Fix the error message for disallowed __weakref__ slots

2021-04-12 Thread Géry
New submission from Géry : 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 imposs