New submission from Ronald Oussoren <ronaldousso...@mac.com>:
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 ---------- components: Interpreter Core messages: 414386 nosy: ronaldoussoren priority: normal severity: normal status: open title: Crash when setting attribute with string subclass as the name (--with-pydebug) type: crash versions: Python 3.11 _______________________________________ Python tracker <rep...@bugs.python.org> <https://bugs.python.org/issue46903> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com