classification
Title: Passing format= to unpack_archive fails
Type: behavior Stage: resolved
Components: Library (Lib) Versions: Python 3.3, Python 3.2
process
Status: closed Resolution: fixed
Dependencies: Superseder:
Assigned To: ncoghlan Nosy List: ev, ncoghlan, python-dev, tarek
Priority: normal Keywords: patch

Created on 2011-03-15 03:30 by ev, last changed 2011-03-16 17:58 by r.david.murray. This issue is now closed.

Files
File name Uploaded Description Edit
fix_unpack_with_format.patch ev, 2011-03-15 21:31 review
Messages (2)
msg130948 - (view) Author: Evan Dandrea (ev) * Date: 2011-03-15 03:30
Passing the format keyword parameter to shutil.unpack_archive triggers an exception:

Traceback (most recent call last):
  File "Lib/test/test_shutil.py", line 650, in test_unpack_archive
    unpack_archive(filename, tmpdir2, format=format)
  File "/home/evan/hg/cpython/Lib/shutil.py", line 741, in unpack_archive
    func(filename, extract_dir, **dict(format_info[1]))
TypeError: 'function' object is not iterable

This is due to that function incorrectly using the _UNPACK_FORMATS dictionary, which is fixed with the attached patch and test case.
msg131150 - (view) Author: Roundup Robot (python-dev) Date: 2011-03-16 17:50
New changeset d1619747c17d by Nick Coghlan in branch '3.2':
Close #11548: Correctly handle format argument in shutil.unpack_archive
http://hg.python.org/cpython/rev/d1619747c17d

New changeset e376d04539bb by Nick Coghlan in branch 'default':
Merge fix for #11548 from 3.2
http://hg.python.org/cpython/rev/e376d04539bb
History
Date User Action Args
2011-03-16 17:58:57r.david.murraysetnosy: ncoghlan, tarek, python-dev, ev
type: crash -> behavior
versions: + Python 3.2, Python 3.3
2011-03-16 17:50:46python-devsetstatus: open -> closed

nosy: + python-dev
messages: + msg131150

resolution: fixed
stage: resolved
2011-03-16 17:24:37ncoghlansetassignee: ncoghlan

nosy: + ncoghlan
2011-03-15 21:31:28evsetfiles: - fix_unpack_with_format.patch
nosy: tarek, ev
2011-03-15 21:31:15evsetfiles: + fix_unpack_with_format.patch
nosy: tarek, ev
2011-03-15 03:30:26evcreate