[issue37287] picke cannot dump Exception subclasses with different super() args
Fabian Raab
report at bugs.python.org
Fri Jul 26 12:39:50 EDT 2019
Fabian Raab <fabian at raab.link> added the comment:
It seems to that this problem is affecting __new__ methods independent of exceptions:
>>> class NewBreaker:
... def __new__(cls, arg):
... return super().__new__(cls)
...
>>> nb = NewBreaker(42)
>>> import pickle
>>> dumped = pickle.dumps(nb)
>>> pickle.loads(dumped)
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
TypeError: __new__() missing 1 required positional argument: 'arg'
----------
_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue37287>
_______________________________________
More information about the Python-bugs-list
mailing list