New submission from Marek Marczykowski-Górecki <marma...@mimuw.edu.pl>:
In Python 3.10 it is no longer possible to create an exception type that inherits from both OSError and AttributeError. This has worked in Python 3.9. I don't see anything in changelog/release notes that would suggest it being intentional. Behavior in Python 3.9: Python 3.9.2 (default, Feb 28 2021, 17:03:44) [GCC 10.2.1 20210110] on linux Type "help", "copyright", "credits" or "license" for more information. >>> class C(OSError, AttributeError): pass ... >>> C <class '__main__.C'> Behavior in Python 3.10: Python 3.10.0 (default, Oct 4 2021, 00:00:00) [GCC 11.2.1 20210728 (Red Hat 11.2.1-1)] on linux Type "help", "copyright", "credits" or "license" for more information. >>> class C(OSError, AttributeError): pass ... Traceback (most recent call last): File "<stdin>", line 1, in <module> TypeError: multiple bases have instance lay-out conflict My (very) wild guess is this being related to https://bugs.python.org/issue38530 ---------- components: Interpreter Core messages: 403870 nosy: marmarek priority: normal severity: normal status: open title: TypeError when inheriting from both OSError and AttributeError type: behavior versions: Python 3.10 _______________________________________ Python tracker <rep...@bugs.python.org> <https://bugs.python.org/issue45464> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com