Author marmarek
Recipients marmarek
Date 2021-10-13.20:05:16
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1634155516.92.0.207915157302.issue45464@roundup.psfhosted.org>
In-reply-to
Content
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
History
Date User Action Args
2021-10-13 20:05:16marmareksetrecipients: + marmarek
2021-10-13 20:05:16marmareksetmessageid: <1634155516.92.0.207915157302.issue45464@roundup.psfhosted.org>
2021-10-13 20:05:16marmareklinkissue45464 messages
2021-10-13 20:05:16marmarekcreate