[issue42659] Objects of uname_result Class Cannot be Successfully Pickled

2021-01-16 Thread Jason R. Coombs


Change by Jason R. Coombs :


--
resolution:  -> fixed
stage: patch review -> resolved
status: open -> closed
versions: +Python 3.10

___
Python tracker 

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



[issue42659] Objects of uname_result Class Cannot be Successfully Pickled

2021-01-16 Thread Jason R. Coombs


Jason R. Coombs  added the comment:


New changeset 799722cb0ddb90752cde7798cab543f30623ebf2 by Jason R. Coombs in 
branch '3.9':
[3.9] bpo-42163, bpo-42189, bpo-42659: Support uname_tuple._replace (for all 
but processor) (GH-23010) (#24232)
https://github.com/python/cpython/commit/799722cb0ddb90752cde7798cab543f30623ebf2


--

___
Python tracker 

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



[issue42659] Objects of uname_result Class Cannot be Successfully Pickled

2021-01-16 Thread Jason R. Coombs


Change by Jason R. Coombs :


--
pull_requests: +23057
pull_request: https://github.com/python/cpython/pull/24232

___
Python tracker 

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



[issue42659] Objects of uname_result Class Cannot be Successfully Pickled

2020-12-31 Thread Jason R. Coombs


Jason R. Coombs  added the comment:


New changeset a6fd0f414c0cb4cd5cc20eb2df3340b31c6f7743 by Jason R. Coombs in 
branch 'master':
bpo-42163, bpo-42189, bpo-42659: Support uname_tuple._replace (for all but 
processor) (#23010)
https://github.com/python/cpython/commit/a6fd0f414c0cb4cd5cc20eb2df3340b31c6f7743


--

___
Python tracker 

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



[issue42659] Objects of uname_result Class Cannot be Successfully Pickled

2020-12-16 Thread Jason R. Coombs


Change by Jason R. Coombs :


--
keywords: +patch
pull_requests: +22672
stage:  -> patch review
pull_request: https://github.com/python/cpython/pull/23010

___
Python tracker 

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



[issue42659] Objects of uname_result Class Cannot be Successfully Pickled

2020-12-16 Thread CrocoDuck


CrocoDuck  added the comment:

Hi, I somehow missed the other issue while searching for something 
similar to this, sorry about that.

The main issue is that files pickled with python 3.9.0 cannot be read 
back by using python 3.9.0 if they contain a `uname_result` object.

As for expecting pickle to work across different versions: I did not 
actually think about that. In the original message I mentioned python 
3.8.5 as I noticed this issue did not happen in python 3.8.5, so I 
though it was useful information. To my (hopefully correct) 
understanding if a python version supports the same protocol that was 
used to create the pickle file then it is expected to work. For example 
I have observed that files containing `uname_result` objects pickled 
with python 3.7.6 are still readable with python 3.8.5. As far as I 
understand this is the expected behavior.

On 16/12/2020 22:08, Jason R. Coombs wrote:
> Jason R. Coombs  added the comment:
>
> The PR for the related issue does address pickling. Do you expect pickles to 
> work across Python versions?
>
> --
>
> ___
> Python tracker 
> 
> ___

--

___
Python tracker 

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



[issue42659] Objects of uname_result Class Cannot be Successfully Pickled

2020-12-16 Thread Jason R. Coombs


Jason R. Coombs  added the comment:

The PR for the related issue does address pickling. Do you expect pickles to 
work across Python versions?

--

___
Python tracker 

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



[issue42659] Objects of uname_result Class Cannot be Successfully Pickled

2020-12-16 Thread Serhiy Storchaka


Serhiy Storchaka  added the comment:

See also issue42189.

--
components: +Library (Lib)
nosy: +jaraco, serhiy.storchaka

___
Python tracker 

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



[issue42659] Objects of uname_result Class Cannot be Successfully Pickled

2020-12-16 Thread CrocoDuck


New submission from CrocoDuck :

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 
data = pickle.load(f)
TypeError: () 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 

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