Issue 26015: Add new tests for pickling iterators of mutable sequences (original) (raw)

Issue26015

Created on 2016-01-05 14:47 by serhiy.storchaka, last changed 2022-04-11 14:58 by admin. This issue is now closed.

Files
File name Uploaded Description Edit
iterators_pickle_tests.patch serhiy.storchaka,2016-01-05 14:47 review
Messages (4)
msg257530 - (view) Author: Serhiy Storchaka (serhiy.storchaka) * (Python committer) Date: 2016-01-05 14:47
Proposed patch updates tests for iterators of mutable sequences. Now tested iterators in all four states (initial, running, empty and exhausted), and tested that unpickled iterator is linked with a sequence, not with an independed copy (as in case of dict iterators). Note that there is a difference in the behavior of exhausted array iterator from other iterators. Perhaps this should be changed.
msg261244 - (view) Author: Raymond Hettinger (rhettinger) * (Python committer) Date: 2016-03-06 11:20
These tests look fine. I won't miss "orgit" ;-) In test_reversed_pickle, please add the blank line before each section like you did for the other tests. I agree that exhausted array iterator should change to match the others. Once an iterator is exhausted, it is required to remain exhausted even if the underlying data mutates. That rule should survive even after dumping and loading.
msg261248 - (view) Author: Roundup Robot (python-dev) (Python triager) Date: 2016-03-06 12:12
New changeset dfef42311c71 by Serhiy Storchaka in branch '3.5': Issue #26015: Added new tests for pickling iterators of mutable sequences. https://hg.python.org/cpython/rev/dfef42311c71 New changeset be96b2784f73 by Serhiy Storchaka in branch 'default': Issue #26015: Added new tests for pickling iterators of mutable sequences. https://hg.python.org/cpython/rev/be96b2784f73
msg261249 - (view) Author: Serhiy Storchaka (serhiy.storchaka) * (Python committer) Date: 2016-03-06 12:34
In 2.7 iterators are not pickleable.
History
Date User Action Args
2022-04-11 14:58:25 admin set github: 70203
2016-03-06 12:34:10 serhiy.storchaka set status: open -> closedversions: - Python 2.7messages: + resolution: fixedstage: patch review -> resolved
2016-03-06 12:12:26 python-dev set nosy: + python-devmessages: +
2016-03-06 11:20:19 rhettinger set assignee: rhettinger -> serhiy.storchakamessages: +
2016-03-06 07:28:11 serhiy.storchaka set assignee: rhettingernosy: + rhettinger
2016-01-05 14:47:59 serhiy.storchaka link issue25776 dependencies
2016-01-05 14:47:37 serhiy.storchaka create