msg176863 - (view) |
Author: Michael Birtwell (mbirtwell) * |
Date: 2012-12-03 20:01 |
If you partially iterate over a tarfile then try and restart iteration of that tarfile it will continue from where it left off rather than restarting from the beginning. I've only tried this with the tarfile implementation in python 2.7 but the 3.x code looks the same in this respect. I've included a patch with my approach to fixing this. |
|
|
msg176865 - (view) |
Author: Michael Birtwell (mbirtwell) * |
Date: 2012-12-03 20:19 |
Embarrassingly as soon as I uploaded that patch I found a problem with it. I hadn't taken in to account the special case for the first member. Here's a replacement patch |
|
|
msg176866 - (view) |
Author: R. David Murray (r.david.murray) *  |
Date: 2012-12-03 20:56 |
Thanks for the patch. Could you either include a test or post code that demonstrates the problem, please? |
|
|
msg176868 - (view) |
Author: Michael Birtwell (mbirtwell) * |
Date: 2012-12-03 23:00 |
Here's a patch on the tarfile's unittest module. |
|
|
msg177074 - (view) |
Author: Serhiy Storchaka (serhiy.storchaka) *  |
Date: 2012-12-07 09:07 |
Related issue: . |
|
|
msg179831 - (view) |
Author: Serhiy Storchaka (serhiy.storchaka) *  |
Date: 2013-01-12 21:16 |
Michael Birtwell, can you please submit a contributor form? http://python.org/psf/contrib/contrib-form/ http://python.org/psf/contrib/ |
|
|
msg181141 - (view) |
Author: Serhiy Storchaka (serhiy.storchaka) *  |
Date: 2013-02-02 07:38 |
Michael, what's the status of your contributor form? |
|
|
msg188763 - (view) |
Author: Roundup Robot (python-dev)  |
Date: 2013-05-09 11:39 |
New changeset 9b86fb6f5bc9 by Serhiy Storchaka in branch '2.7': Issue #16601: Restarting iteration over tarfile no more continues from where http://hg.python.org/cpython/rev/9b86fb6f5bc9 New changeset 9ed127d8ad61 by Serhiy Storchaka in branch '3.3': Issue #16601: Restarting iteration over tarfile no more continues from where http://hg.python.org/cpython/rev/9ed127d8ad61 New changeset 1c6a1427353b by Serhiy Storchaka in branch 'default': Issue #16601: Restarting iteration over tarfile no more continues from where http://hg.python.org/cpython/rev/1c6a1427353b |
|
|
msg188764 - (view) |
Author: Serhiy Storchaka (serhiy.storchaka) *  |
Date: 2013-05-09 12:01 |
Thank you for contribution. I have committed simpler test. |
|
|
msg188765 - (view) |
Author: Michael Birtwell (mbirtwell) * |
Date: 2013-05-09 12:13 |
Sorry about the delay in the contributor form. Things got in the way then I completely forgot about it. It's done now. |
|
|