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 ronaldoussoren
Recipients ronaldoussoren
Date 2022-03-02.21:30:36
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1646256636.59.0.442198647439.issue46903@roundup.psfhosted.org>
In-reply-to
Content
The script below fails with an assertion error with python 3.11a5+ (current trunk) when build with --with-pydebug:

# BEGIN OF FILE
class String(str):
    __slots__ = ()

name = String("hello")

class Bag:
    pass

o = Bag()
setattr(o, name, 42)

# END OF FILE

Error output:

% /tmp/py311/bin/python3 -Xdev str.py                                                                                                                 (master)pyobjc-8
Assertion failed: (PyUnicode_CheckExact(name)), function _PyObject_StoreInstanceAttribute, file dictobject.c, line 5426.
Fatal Python error: Aborted

Current thread 0x0000000100a98580 (most recent call first):
  File "/Users/ronald/Projects/pyobjc-8/pyobjc-core/str.py", line 10 in <module>
zsh: abort      /tmp/py311/bin/python3 -Xdev str.py
History
Date User Action Args
2022-03-02 21:30:36ronaldoussorensetrecipients: + ronaldoussoren
2022-03-02 21:30:36ronaldoussorensetmessageid: <1646256636.59.0.442198647439.issue46903@roundup.psfhosted.org>
2022-03-02 21:30:36ronaldoussorenlinkissue46903 messages
2022-03-02 21:30:36ronaldoussorencreate