This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author serhiy.storchaka
Recipients Jakob.Bowyer, Ramchandra Apte, alexandre.vassalotti, r.david.murray, rhettinger, serhiy.storchaka, terry.reedy
Date 2015-09-02.18:59:18
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1441220358.68.0.979358244716.issue14350@psf.upfronthosting.co.za>
In-reply-to
Content
Actually the tp_new field of list iterator class is NULL. Unpickler raises other error in such case (see issue24900 for example).

    UnpicklingError: NEWOBJ class argument has NULL tp_new

Backported to 2.7 the part of the patch for issue22995 fixes this issue.

>>> copy.copy(iter([]))
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/home/serhiy/py/cpython-2.7/Lib/copy.py", line 88, in copy
    rv = reductor(2)
TypeError: can't pickle listiterator objects
History
Date User Action Args
2015-09-02 18:59:18serhiy.storchakasetrecipients: + serhiy.storchaka, rhettinger, terry.reedy, alexandre.vassalotti, r.david.murray, Jakob.Bowyer, Ramchandra Apte
2015-09-02 18:59:18serhiy.storchakasetmessageid: <1441220358.68.0.979358244716.issue14350@psf.upfronthosting.co.za>
2015-09-02 18:59:18serhiy.storchakalinkissue14350 messages
2015-09-02 18:59:18serhiy.storchakacreate