[issue45649] Add tarinfo.Path

Barney Gale report at bugs.python.org
Sat Jan 1 19:01:26 EST 2022


Barney Gale <barney.gale at gmail.com> added the comment:

If you're only aiming for Traversable compatibility, sure.

The original bug description asks for something that's pathlib-compatible and similar to zipfile.Path, which goes beyond the Traversable interface in attempting to emulate pathlib.Path.

The pathlib.Path interface is a good one - I see no reason it can't apply to zip and tar archives in full. Methods of Path objects already raise NotImplementedError if operations aren't supported (e.g. creating symlinks)

Some prototyping from a couple years back, including a tar path implementation: https://github.com/barneygale/pathlab/tree/master/pathlab

----------

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45649>
_______________________________________


More information about the Python-bugs-list mailing list