New submission from Jason R. Coombs <jar...@jaraco.com>:
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. ---------- components: Library (Lib) messages: 347479 nosy: jaraco priority: normal severity: normal status: open title: zipfile.Path.parent returns incorrect value (same as self) for directory ref versions: Python 3.8 _______________________________________ Python tracker <rep...@bugs.python.org> <https://bugs.python.org/issue37520> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com