[issue28231] zipfile does not support pathlib

2017-03-24 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: New changeset eb65edd1029876a4a5bb70b009aeb914088ac749 by Serhiy Storchaka in branch '3.6': [3.6] bpo-28231: The zipfile module now accepts path-like objects for external paths. (#561)

[issue28231] zipfile does not support pathlib

2017-03-24 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: New changeset 8606e9524a7a4065042f7f228dc57eb74f88e4d3 by Serhiy Storchaka in branch 'master': bpo-28231: The zipfile module now accepts path-like objects for external paths. (#511)

[issue28231] zipfile does not support pathlib

2017-03-17 Thread Larry Hastings
Changes by Larry Hastings : -- pull_requests: +587 ___ Python tracker ___ ___

[issue28231] zipfile does not support pathlib

2017-03-08 Thread Serhiy Storchaka
Changes by Serhiy Storchaka : -- resolution: -> fixed stage: patch review -> resolved status: open -> closed ___ Python tracker

[issue28231] zipfile does not support pathlib

2017-03-08 Thread Serhiy Storchaka
Changes by Serhiy Storchaka : -- pull_requests: +462 ___ Python tracker ___ ___

[issue28231] zipfile does not support pathlib

2017-03-06 Thread Serhiy Storchaka
Changes by Serhiy Storchaka : -- pull_requests: +420 ___ Python tracker ___ ___

[issue28231] zipfile does not support pathlib

2017-02-27 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: The patch is backported to 3.6.1. -- versions: +Python 3.6 Added file: http://bugs.python.org/file46677/zipfile-pathlib-3.6.1.patch ___ Python tracker

[issue28231] zipfile does not support pathlib

2017-02-27 Thread Ned Deily
Ned Deily added the comment: > Note that Ned gave us a permission to get this into 3.6.1. I may have although I don't remember specifically discussing zipfile. In any case, I'm willing to consider it. I think you can make good arguments for and against. Yes, it could smell like adding a

[issue28231] zipfile does not support pathlib

2017-02-27 Thread Serhiy Storchaka
Changes by Serhiy Storchaka : -- nosy: +ned.deily ___ Python tracker ___ ___

[issue28231] zipfile does not support pathlib

2017-02-27 Thread Berker Peksag
Berker Peksag added the comment: Note that Ned gave us a permission to get this into 3.6.1. -- ___ Python tracker ___

[issue28231] zipfile does not support pathlib

2017-02-27 Thread Steve Dower
Steve Dower added the comment: Why can't we fix this in 3.6? We were meant to support pathlike in that version, and this is an oversight, not a new feature. -- ___ Python tracker

[issue28231] zipfile does not support pathlib

2017-02-27 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: I consider this a new feature. Some modules got the support of path-like objects for free after implementing the support of path-like objects in os, os.path and io modules. But others need additional work for implementing it, writing tests and

[issue28231] zipfile does not support pathlib

2017-02-26 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: I have different path. It adds the support of path-like objects for all external paths. -- type: behavior -> enhancement versions: -Python 3.6 Added file: http://bugs.python.org/file46672/zipfile-pathlib.patch

[issue28231] zipfile does not support pathlib

2017-02-26 Thread Berker Peksag
Berker Peksag added the comment: PR 322 should make the example in msg284754 work: >>> import pathlib, zipfile >>> f = pathlib.Path('spam.zip') >>> with zipfile.ZipFile(f) as zf: ... zf.namelist() ... ['LICENSE'] It doesn't implement full PathLike support, but it at least covers the use

[issue28231] zipfile does not support pathlib

2017-02-26 Thread Berker Peksag
Changes by Berker Peksag : -- pull_requests: +283 ___ Python tracker ___ ___

[issue28231] zipfile does not support pathlib

2017-01-30 Thread Steve Dower
Steve Dower added the comment: Speaking as a "regular user" who just ran into this, my main concern is that PathLike paths get used properly. For filenames being passed back out, if I really want them to be Path objects, I'll wrap them in Path() anyway. Please don't let a full conversion to

[issue28231] zipfile does not support pathlib

2017-01-11 Thread Ethan Furman
Ethan Furman added the comment: Any path/file attributes, etc, inside a ZipFile should be str. ZipFile should also function properly if path/file requests are given as os.PathLike objects. -- ___ Python tracker

[issue28231] zipfile does not support pathlib

2017-01-10 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: > I am not sure what "Shouldn't the ZipFile.filename attribute be converted to > str?" means, can you elaborate? If you pass a Path object to ZipFile constructor, should the filename attribute be a Path object or a str? --

[issue28231] zipfile does not support pathlib

2017-01-10 Thread Jeremy Freeman
Jeremy Freeman added the comment: I have reviewed the code and docs for the public API that should take a pathlib.Path object: - zipfile.is_zipfile(filename) - filename - zipfile.ZipFile(file) - file - ZipFile.extract(member, path=None) - path - ZipFile.extractall(path=None) - path -

[issue28231] zipfile does not support pathlib

2017-01-05 Thread Berker Peksag
Berker Peksag added the comment: I think the next steps are: 1. Add tests for the cases Serhiy has mentioned in msg277109: > Shouldn't the ZipFile.filename attribute be converted to str? and > The file name of ZipFile is only a part of the issue. There are other uses of file paths:

[issue28231] zipfile does not support pathlib

2017-01-05 Thread Jeremy Freeman
Jeremy Freeman added the comment: OK, I understand. How can I help get this issue fixed? 1) review the patch? 2) update the docs to reflect the patch? 3) find the other uses of pathlib in the zipfile module? 4) something else ... I am a longtime user of python but a first time contributor but

[issue28231] zipfile does not support pathlib

2017-01-05 Thread R. David Murray
R. David Murray added the comment: In 3.5 the stdlib is not supporting PathLib. So this issue only affects 3.6 and 3.7. -- nosy: +r.david.murray ___ Python tracker

[issue28231] zipfile does not support pathlib

2017-01-05 Thread Jeremy Freeman
Jeremy Freeman added the comment: This also affects python 3.5 on Windows and OSX. Python 3.5.2 (default, Sep 21 2016, 15:07:18) [GCC 4.2.1 Compatible Apple LLVM 7.3.0 (clang-703.0.31)] on darwin Type "help", "copyright", "credits" or "license" for more information. >>> from pathlib import Path

[issue28231] zipfile does not support pathlib

2016-10-05 Thread Berker Peksag
Changes by Berker Peksag : -- components: +Library (Lib) nosy: +berker.peksag versions: +Python 3.7 ___ Python tracker ___

[issue28231] zipfile does not support pathlib

2016-09-25 Thread Brett Cannon
Brett Cannon added the comment: the patch LGTM, but Serhiy has a point that maybe we should add tests for dealing with other paths such as those contained within the zipfile. -- ___ Python tracker

[issue28231] zipfile does not support pathlib

2016-09-21 Thread Serhiy Storchaka
New submission from Serhiy Storchaka: Shouldn't the ZipFile.filename attribute be converted to str? If add support of pathlib, maybe add support of bytes? The file name of ZipFile is only a part of the issue. There are other uses of file paths: paths for added files, path for extracted

[issue28231] zipfile does not support pathlib

2016-09-21 Thread Ethan Furman
Changes by Ethan Furman : -- files: open-zipfile.stoneleaf.patch keywords: patch nosy: brett.cannon, ethan.furman priority: normal severity: normal stage: patch review status: open title: zipfile does not support pathlib type: behavior versions: Python 3.6 Added