Hello! Would anyone be able to help review this PR?
The new class sits between PurePath and Path in the pathlib class hierarchy. After extensive discussion elsewhere on the forum and in previous PRs and issues, I’m pretty confident in the overall design. However, I don’t feel comfortable merging until these aspects have had some review:
_PathBase.resolve(), which uses absolute() and readlink() to implement pathname resolution.
_PathBase._scandir(), which uses iterdir(). We might want want to adjust how iterdir() raises exceptions - see discussion on PR.
_PathBase.is_junction(), which uses stat() and feels a bit artificial compared to the other is_*() methods.
Would anyone be willing to look over the code and share their thoughts? Many thanks
That’s a slightly different thing! It wasn’t possible to directly subclass PurePath and Path (issue here), but it’s fixed in Python 3.12 (PR here).
This feature is about providing a base class that can be used to implement things like TarPath, FTPPath, etc, similar to how io.IOBase helps users to implement custom file objects.