[issue37287] picke cannot dump Exception subclasses with different super() args

2019-06-28 Thread Fabian Raab


Change by Fabian Raab :


--
nosy: +raabf

___
Python tracker 
<https://bugs.python.org/issue37287>
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue37287] picke cannot dump Exception subclasses with different super() args

2019-07-26 Thread Fabian Raab


Fabian Raab  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 "", line 1, in 
TypeError: __new__() missing 1 required positional argument: 'arg'

--

___
Python tracker 
<https://bugs.python.org/issue37287>
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com