[issue20797] zipfile.extractall should accept bytes path as parameter

2014-08-21 Thread Serhiy Storchaka

Serhiy Storchaka added the comment:

See also a discussion at Python-Dev:
http://comments.gmane.org/gmane.comp.python.devel/149048

Looks as there are no need to add bytes path in such high-level API. In any 
case you can call os.fsdecode() on path argument.

--
resolution:  - rejected
stage: needs patch - resolved
status: open - closed

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue20797
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue20797] zipfile.extractall should accept bytes path as parameter

2014-08-18 Thread Serhiy Storchaka

Changes by Serhiy Storchaka storch...@gmail.com:


--
assignee:  - serhiy.storchaka
nosy: +serhiy.storchaka
stage:  - needs patch
versions: +Python 3.5 -Python 3.3

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue20797
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue20797] zipfile.extractall should accept bytes path as parameter

2014-02-27 Thread Laurent Mazuel

New submission from Laurent Mazuel:

Many methods which use path in Python now accept string or bytes in parameter 
(e.g. all methods in os.path, the open method, etc.).

Actually, sometimes it is not possible to handle a file without using bytes 
path. For example, path coded in another encoding system than the current 
locale system (e.g. a Windows filename encoded in cp1252 against a Linux 
utf-8 system).

Since zipfile.extractall uses path, it should accept bytes as path. Currently 
it leads to an error:
  File /usr/local/lib/python3.3/zipfile.py, line 1262, in _extract_member
targetpath = os.path.join(targetpath, arcname)
  File /usr/local/lib/python3.3/posixpath.py, line 92, in join
components.) from None
TypeError: Can't mix strings and bytes in path components.

This bug is closely related to bug 20329 but is not the same (but maybe this 
enhancement will create a good debate around bytes support in zipfile module 
:-) )

--
components: Library (Lib)
messages: 212358
nosy: Laurent.Mazuel
priority: normal
severity: normal
status: open
title: zipfile.extractall should accept bytes path as parameter
type: enhancement
versions: Python 3.3

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue20797
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com