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 MrQubo
Recipients MrQubo, jaraco, miguendes
Date 2021-05-14.12:31:36
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1620995497.12.0.467992471286.issue44095@roundup.psfhosted.org>
In-reply-to
Content
Thank for your interest Miguel. I have no experience with CPython codebase so I'll be glad if you work on this.

I think treating ZipFile's like a separate drive would be the best. If we agree on this then probably all of the properties and methods from pathlib could be implemented. But without this at least `suffix`, `suffixes`, `stem`, `with_name()`, `with_stem()`, and `with_suffix()` makes perfect sense.

If some of the properties/methods won't be implemented on zipfile.Path then it would be useful to raise `NotImplementedError`. Currently, trying to use suffix property, raises the error `AttributeError: 'Path' object has no attribute 'suffix'`. This is confusing as the name of the class is the same as in `pathlib.Path` so it's not immediately obvious that it meant `zipfile.Path`.

The use-case for mimicking those two interfaces closely is to use both interchangeably (thanks to duck-typing).
History
Date User Action Args
2021-05-14 12:31:37MrQubosetrecipients: + MrQubo, jaraco, miguendes
2021-05-14 12:31:37MrQubosetmessageid: <1620995497.12.0.467992471286.issue44095@roundup.psfhosted.org>
2021-05-14 12:31:37MrQubolinkissue44095 messages
2021-05-14 12:31:36MrQubocreate