[issue36068] Make _tuplegetter objects serializable

2019-02-21 Thread Joe Jevnik


Joe Jevnik  added the comment:

Thank you for reviewing this so quickly!

--

___
Python tracker 

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



[issue36068] Make _tuplegetter objects serializable

2019-02-21 Thread Raymond Hettinger


Change by Raymond Hettinger :


--
resolution:  -> fixed
stage: patch review -> resolved
status: open -> closed

___
Python tracker 

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



[issue36068] Make _tuplegetter objects serializable

2019-02-21 Thread Raymond Hettinger


Raymond Hettinger  added the comment:

Thanks for noticing this.  We really should have stuck with the original plan 
of subclassing property().

--
assignee:  -> rhettinger

___
Python tracker 

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



[issue36068] Make _tuplegetter objects serializable

2019-02-21 Thread Raymond Hettinger


Raymond Hettinger  added the comment:


New changeset f36f89257b30e0bf88e8aaff6da14a9a96f57b9e by Raymond Hettinger 
(Joe Jevnik) in branch 'master':
bpo-36068: Make _tuplegetter objects serializable (GH-11981)
https://github.com/python/cpython/commit/f36f89257b30e0bf88e8aaff6da14a9a96f57b9e


--

___
Python tracker 

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



[issue36068] Make _tuplegetter objects serializable

2019-02-21 Thread Karthikeyan Singaravelan


Change by Karthikeyan Singaravelan :


--
nosy: +rhettinger

___
Python tracker 

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



[issue36068] Make _tuplegetter objects serializable

2019-02-21 Thread Joe Jevnik


Change by Joe Jevnik :


--
keywords: +patch
pull_requests: +12006
stage:  -> patch review

___
Python tracker 

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



[issue36068] Make _tuplegetter objects serializable

2019-02-21 Thread Joe Jevnik


New submission from Joe Jevnik :

The new _tuplegetter objects for accessing fields of a namedtuple are no longer 
serializable with pickle. Cloudpickle, a library which provides extensions to 
pickle to facilitate distributed computing in Python, depended on being able to 
pickle the members of namedtuple classes. While property isn't serializable, 
cloudpickle has support for properties allowing us to serialize the old 
property(itemgetter) members.

The attached PR adds a __reduce__ method to _tuplegetter objects which will 
allow serialization without special support. Another option would be to expose 
`index` as a read-only attribute, allowing cloudpickle or other libraries to 
provide the pickle implementation as a third-party library.

--
components: Library (Lib)
messages: 336251
nosy: ll
priority: normal
severity: normal
status: open
title: Make _tuplegetter objects serializable
type: enhancement
versions: Python 3.8

___
Python tracker 

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