You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
tarfile.open: improper handling of path-like object #81325
Activity
DarkaMaul commentedon Jun 3, 2019
According to the documentation, tarfile.open accepts a path-like object since Python 3.6
However, it is not the case when writing a compressed gzip (w|gz).
See the attached file for minimal POC
Note 1: tested on 3.6 and 3.7
Note 2: https://docs.python.org/3.6/library/tarfile.html#tarfile.open
tirkarthi commentedon Jun 4, 2019
This was documented in c45cd16 but it seems a test for opening gzip file with 'w|gz' mode as in the original report was missing.
terryjreedy commentedon Jun 7, 2019
3.6 only gets security patches. Thanks for testing with 3.7 also.
pythongh-81325: tarfile should accept a path-like object when writing…
gh-81325: Support path-like objects with streaming TarFile (#137188)
pythongh-81325: Support path-like objects with streaming TarFile (pyt…
pythongh-81325: Support path-like objects with streaming TarFile (pyt…
[3.13] gh-81325: Support path-like objects with streaming TarFile (GH…
pythongh-81325: Support path-like objects with streaming TarFile (pyt…
[3.14] gh-81325: Support path-like objects with streaming TarFile (GH…