This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author jaraco
Recipients jaraco
Date 2019-07-07.20:54:03
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1562532843.64.0.14097351238.issue37520@roundup.psfhosted.org>
In-reply-to
Content
Originally reported in https://github.com/jaraco/zipp/issues/7, the parent of a Path object referencing a directory is returning the incorrect result:

cpython master $ docker run -it python:rc-buster                                                                                             
Python 3.8.0b1 (default, Jun 27 2019, 22:38:51) 
[GCC 8.3.0] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> import zipfile
>>> import io
>>> zf = zipfile.ZipFile(io.BytesIO(), 'w')
>>> p = zipfile.Path(zf)
>>> p.joinpath('missing/').parent
Path(None, 'missing/')
>>> p.joinpath('missing/').parent.at
'missing/'

The expected value is '' as the parent of a single-level directory is the parent directory.
History
Date User Action Args
2019-07-07 20:54:03jaracosetrecipients: + jaraco
2019-07-07 20:54:03jaracosetmessageid: <1562532843.64.0.14097351238.issue37520@roundup.psfhosted.org>
2019-07-07 20:54:03jaracolinkissue37520 messages
2019-07-07 20:54:03jaracocreate