classification
Title: Patch for 1496501 tarfile opener order
Type: Stage:
Components: None Versions:
process
Status: closed Resolution: accepted
Dependencies: Superseder:
Assigned To: lars.gustaebel Nosy List: jackdied, lars.gustaebel (2)
Priority: normal Keywords patch

Created on 2006-06-10 17:45 by jackdied, last changed 2006-12-27 10:38 by lars.gustaebel.

Files
File name Uploaded Description Edit Remove
tarfile_order.diff jackdied, 2006-06-10 17:45 tarfile and test_tarfile patch
Messages (2)
msg50456 - (view) Author: Jack Diederich (jackdied) Date: 2006-06-10 17:45
when passing a fileobj into tarfile.open() without
specifying the type open() will try openers in their
dict key order from TarFile.OPEN_METH.  This can fail
if the order changes.

This patch adds a tell() and seek() on failure of
openers.  fileobjs must already support these methods
to work so this makes no new requirements.

OpenOrderTest uses a dict-alike with shuffled keys to
try and provoke the wrong orders for openers.

Let me know if it looks good and I'll check it in.
msg50457 - (view) Author: Lars Gustäbel (lars.gustaebel) Date: 2006-12-27 10:38
Made the testcase simpler and checked it in as rev. 53161 and rev. 53162 (2.5).
History
Date User Action Args
2006-06-10 17:45:15jackdiedcreate