Thanks to visit codestin.com
Credit goes to github.com

Skip to content

gh-124825: Adding PurePath.erase_parents() to pathlib #135406

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
wants to merge 2 commits into from

Conversation

dlenski
Copy link
Contributor

@dlenski dlenski commented Jun 11, 2025

The PurePath.erase_parents() method remove path components referring to parent directories ('..').

Unlike Pure.resolve(), this occurs without an attempt to verify the existence or structure of any path components.

See discussion in gh-124825 for use cases, involving lexical normalization and simplification of paths without reference to any particular underlying filesystem.

Issue:

The `PurePath.erase_parents()` method remove path components
referring to parent directories ('..').

Unlike `Pure.resolve()`, this occurs without an attempt to verify
the existence or structure of any path components.

See discussion in python#124825 for use cases, involving lexical
normalization and simplification of paths without reference to
any particular underlying filesystem.

Issue:

- pythongh-124825
@bedevere-app
Copy link

bedevere-app bot commented Jun 11, 2025

Most changes to Python require a NEWS entry. Add one using the blurb_it web app or the blurb command-line tool.

If this change has little impact on Python users, wait for a maintainer to apply the skip news label instead.

@AA-Turner
Copy link
Member

We don't accept pull requests for maintence branches. Please re-target to the default branch.

A

@AA-Turner AA-Turner closed this Jun 11, 2025
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.

2 participants