Skip to content

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

Closed
dlenski wants to merge 2 commits into
python:3.12from
dlenski:patch-2
Closed

gh-124825: Adding PurePath.erase_parents() to pathlib#135406
dlenski wants to merge 2 commits into
python:3.12from
dlenski:patch-2

Conversation

@dlenski

Copy link
Copy Markdown
Contributor

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
Copy Markdown

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
Copy Markdown
Member

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

A

Sign up for freeto 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

@dlenski@AA-Turner