New submission from Étienne Pot <etiennefg....@gmail.com>: Currently, zipfile.Path inheritance behavior is inconsistent with pathlib.Path:
``` class MyPath(zipfile.Path): pass path = MyPath(zf) path = path.joinpath('other') assert isinstance(path, MyPath) # Oups, type(path) is zipfile.Path ``` Calling parent, /,... should keep the class, as for pathlib.Path Use case: I'm writing a wrapper around `zipfile.Path` which adds `os.fspath` compatibility (the file is extracted in a tmp dir when os.path.join, open,...). ---------- components: Library (Lib) messages: 378678 nosy: Étienne Pot priority: normal severity: normal status: open title: zipfile.Path should support inheritance type: enhancement versions: Python 3.10 _______________________________________ Python tracker <rep...@bugs.python.org> <https://bugs.python.org/issue42043> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com