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-01.21:25:06
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <>
The following crashes the interpreter in Python 3.11, and works fine in older versions:

# --- 
import types

class MyModule (types.ModuleType):
    __slots__ = (

    def __init__(self, name):

m = MyModule("name")
# -- end of file

The key in this is the ``__slots__`` definition: The script does not crash without ``__slots__``, or with a slots tuple with 1 item.

This is a reproducer based on code in PyObjC.
Date User Action Args
2022-03-01 21:25:06ronaldoussorensetrecipients: + ronaldoussoren
2022-03-01 21:25:06ronaldoussorensetmessageid: <>
2022-03-01 21:25:06ronaldoussorenlinkissue46891 messages
2022-03-01 21:25:06ronaldoussorencreate