Skip to content

Conversation

@barneygale
Copy link
Contributor

@barneygale barneygale commented Nov 9, 2024

In the past I've equivocated about whether to require at least one argument in the PurePathBase (and PathBase) initializer, and what the default should be if we make it optional. I now have a local use case that has persuaded me to make it optional and default to the empty string (a zipp.Path-like class that treats relative and absolute paths similarly.) Happily this brings the base class more in line with PurePath and Path.

No user-facing changes because the pathlib ABCs are still private, and PurePath provides its own initializer.

In the past I've equivocated about whether to require at least one argument
in the `PurePathBase` (and `PathBase`) initializer, and what the default
should be if we make it optional. I now have a local use case that has
persuaded me to make it optional and default to the empty string (a
`zipp.Path`-like class that treats relative and absolute paths similarly.)
Happily this brings the base class more in line with `PurePath` and `Path`.
@barneygale barneygale merged commit 0f47a31 into python:main Nov 9, 2024
34 checks passed
picnixz pushed a commit to picnixz/cpython that referenced this pull request Dec 8, 2024
…6608)

In the past I've equivocated about whether to require at least one argument
in the `PurePathBase` (and `PathBase`) initializer, and what the default
should be if we make it optional. I now have a local use case that has
persuaded me to make it optional and default to the empty string (a
`zipp.Path`-like class that treats relative and absolute paths similarly.)
Happily this brings the base class more in line with `PurePath` and `Path`.
ebonnal pushed a commit to ebonnal/cpython that referenced this pull request Jan 12, 2025
…6608)

In the past I've equivocated about whether to require at least one argument
in the `PurePathBase` (and `PathBase`) initializer, and what the default
should be if we make it optional. I now have a local use case that has
persuaded me to make it optional and default to the empty string (a
`zipp.Path`-like class that treats relative and absolute paths similarly.)
Happily this brings the base class more in line with `PurePath` and `Path`.
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.

1 participant