[issue28230] tarfile does not support pathlib

2017-03-24 Thread Serhiy Storchaka

Serhiy Storchaka added the comment:


New changeset c45cd167d403d7d98078d5fc4a37b16195dc7a35 by Serhiy Storchaka in 
branch 'master':
bpo-28230: Document the pathlib support in tarfile and add tests. (#512)
https://github.com/python/cpython/commit/c45cd167d403d7d98078d5fc4a37b16195dc7a35


--

___
Python tracker 

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



[issue28230] tarfile does not support pathlib

2017-03-24 Thread Serhiy Storchaka

Serhiy Storchaka added the comment:


New changeset 666165fddf499e80d10a5d9263846ec4534f6a2a by Serhiy Storchaka in 
branch '3.6':
[3.6] bpo-28230: Document the pathlib support in tarfile and add tests. (#559)
https://github.com/python/cpython/commit/666165fddf499e80d10a5d9263846ec4534f6a2a


--

___
Python tracker 

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



[issue28230] tarfile does not support pathlib

2017-03-15 Thread Berker Peksag

Berker Peksag added the comment:

PR 512 has been merged and backported to 3.6 branch. I think this can be closed 
now. Thanks, Ethan and Serhiy!

--
resolution:  -> fixed
stage: patch review -> resolved
status: open -> closed

___
Python tracker 

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



[issue28230] tarfile does not support pathlib

2017-03-08 Thread Serhiy Storchaka

Changes by Serhiy Storchaka :


--
pull_requests: +460

___
Python tracker 

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



[issue28230] tarfile does not support pathlib

2017-03-06 Thread Serhiy Storchaka

Serhiy Storchaka added the comment:

Updated documentation.

Note that path-like objects are supported only for external names. Internal 
names are not OS paths.

--

___
Python tracker 

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



[issue28230] tarfile does not support pathlib

2017-03-06 Thread Serhiy Storchaka

Changes by Serhiy Storchaka :


--
pull_requests: +421

___
Python tracker 

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



[issue28230] tarfile does not support pathlib

2017-02-26 Thread Berker Peksag

Berker Peksag added the comment:

Serhiy's patch looks good to me, but it would be nice to document the support 
for PathLike objects in the tarfile documentation.

--

___
Python tracker 

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



[issue28230] tarfile does not support pathlib

2016-10-10 Thread Serhiy Storchaka

Serhiy Storchaka added the comment:

It seems to me that tarfile already supports path protocol for all external 
patches and no changes for tarfile are needed.

Proposed patch adds tests for (already implemented) support of pathlike 
protocol in tarfile.

--
Added file: http://bugs.python.org/file45051/test_tarfile_pathlike.patch

___
Python tracker 

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



[issue28230] tarfile does not support pathlib

2016-10-10 Thread Ned Deily

Changes by Ned Deily :


--
nosy: +lars.gustaebel

___
Python tracker 

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



[issue28230] tarfile does not support pathlib

2016-10-10 Thread Ethan Furman

Ethan Furman added the comment:

As Serhiy was alluding to, if the incoming path is for the actual tar file and 
is only passed along to Python itself then we probably don't need to worry 
about os.fspath().  For names that will be interally stored, or are for 
accessing internal files, then the proper sequence is check for and call 
os.fspath if necessary, and then double-check that the name to be used is a 
str.  The double-check is needed because os.fspath may return a bytes object, 
which tar does not allow.

--

___
Python tracker 

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



[issue28230] tarfile does not support pathlib

2016-10-10 Thread Serhiy Storchaka

Serhiy Storchaka added the comment:

There are two kinds of paths in tarinfo:

1) External paths that correspond to filesystem paths. The path of the tar file 
itself, patches of added files and target directory for extraction. Supporting 
path protocol looks reasonable for them.

1) Internal paths, they are just string keys inside an archive. They come from 
TarFile.getnames() and always are strings. I'm not sure that pathlib have 
relation to this. This issue needs more thoughts. I would not haste with this.

--

___
Python tracker 

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



[issue28230] tarfile does not support pathlib

2016-10-10 Thread Berker Peksag

New submission from Berker Peksag:

Here's an updated patch with different tests and documentation changes. I 
simplified Lib/tarfile.py a bit (see my review comments)

A slightly off-topic question: I had to update both docstrings and 
documentation. Should we use this as an opportunity to simplify the docstrings?

--
Added file: http://bugs.python.org/file45042/issue28230_v2.diff

___
Python tracker 

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



[issue28230] tarfile does not support pathlib

2016-10-05 Thread Berker Peksag

Changes by Berker Peksag :


--
components: +Library (Lib)

___
Python tracker 

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



[issue28230] tarfile does not support pathlib

2016-10-05 Thread Berker Peksag

Changes by Berker Peksag :


--
nosy: +berker.peksag

___
Python tracker 

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



[issue28230] tarfile does not support pathlib

2016-09-23 Thread Ned Deily

Changes by Ned Deily :


--
nosy: +ned.deily
versions: +Python 3.7

___
Python tracker 

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



[issue28230] tarfile does not support pathlib

2016-09-21 Thread Serhiy Storchaka

Changes by Serhiy Storchaka :


--
nosy: +serhiy.storchaka

___
Python tracker 

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



[issue28230] tarfile does not support pathlib

2016-09-21 Thread Ethan Furman

Changes by Ethan Furman :


--
files: open-tarfile.stoneleaf.patch
keywords: patch
nosy: brett.cannon, ethan.furman
priority: normal
severity: normal
stage: patch review
status: open
title: tarfile does not support pathlib
type: behavior
versions: Python 3.6
Added file: http://bugs.python.org/file44772/open-tarfile.stoneleaf.patch

___
Python tracker 

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