[New-bugs-announce] [issue42659] Objects of uname_result Class Cannot be Successfully Pickled
CrocoDuck
report at bugs.python.org
Wed Dec 16 10:12:58 EST 2020
New submission from CrocoDuck <crocoduck.oducks at gmail.com>:
See the code example below.
```python
import platform
import pickle
pack = {
'uname_result': platform.uname()
}
with open('test.pickle', 'wb') as f:
pickle.dump(pack, f, protocol=pickle.HIGHEST_PROTOCOL)
with open('test.pickle', 'rb') as f:
data = pickle.load(f)
```
It works smoothly on Python 3.8.5. However, on Python 3.9.0, the last line produces this error:
```
Traceback (most recent call last):
File "/Users/crocoduck/pickle/3.9.0/make_pickle.py", line 12, in <module>
data = pickle.load(f)
TypeError: <lambda>() takes 6 positional arguments but 7 were given
```
The files produced by the code snipped above are attached for reference.
This was observed in macOS Catalina 10.15.7.
----------
files: pickles.zip
messages: 383174
nosy: CrocoDuck
priority: normal
severity: normal
status: open
title: Objects of uname_result Class Cannot be Successfully Pickled
type: behavior
versions: Python 3.9
Added file: https://bugs.python.org/file49688/pickles.zip
_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue42659>
_______________________________________
More information about the New-bugs-announce
mailing list