Skip to content

GH-89812: Add pathlib._PurePathExt#104810

Closed
barneygale wants to merge 20 commits intopython:mainfrom
barneygale:gh-89812-add-lexicalpath
Closed

GH-89812: Add pathlib._PurePathExt#104810
barneygale wants to merge 20 commits intopython:mainfrom
barneygale:gh-89812-add-lexicalpath

Conversation

@barneygale
Copy link
Contributor

@barneygale barneygale commented May 23, 2023

Move __fspath__(), __bytes__() and as_uri() methods from PurePath to a new _PurePathExt subclass. This new subclass is inherited by PurePosixPath, PureWindowsPath and Path.

Because PurePath isn't directly instantiatable (you get a PurePosixPath or PureWindowsPath instance back), this shouldn't change user-facing behaviour.

The methods must not be inherited future tarfile.TarPath and pathlib.AbstractPath classes, which will subclass PurePath.

Loading
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants