Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

GH-99334: Explain thatPurePath.is_relative_to() is purely lexical.#114031

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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.

Already on GitHub?Sign in to your account

Merged
barneygale merged 3 commits intopython:mainfrombarneygale:gh-99334
Jan 23, 2024

Conversation

@barneygale
Copy link
Contributor

@barneygalebarneygale commentedJan 13, 2024
edited by github-actionsbot
Loading

@barneygalebarneygale added needs backport to 3.11only security fixes needs backport to 3.12only security fixes labelsJan 13, 2024
Copy link
Member

@AA-TurnerAA-Turner left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others.Learn more.

Perhaps you could add a note that users may wish to only call it with resolved / normalised / casefolded / etc paths, and provide a brief sketch of doing so?

@barneygale
Copy link
ContributorAuthor

Thanks for the review!

Perhaps you could add a note that users may wish to only call it with resolved / normalised / casefolded / etc paths, and provide a brief sketch of doing so?

It's hard to give good advice, because there are several edge cases that may or may not be relevant depending on user need.resolve() only emulates (perhaps imperfectly) what the OS does to resolve paths, and there's a TOC/TOU thing because someone could swap a symlink target in the path immediately after you call it.

(tbh I'd ratheris_relative_to() didn't exist, but we're here now)

AA-Turner reacted with thumbs up emoji

@AA-Turner
Copy link
Member

I think the actual change here is fine to merge -- the comment was just the cherry on top, but it would simply add confusion then best avoided -- and the reader can infer that no path processing is done from the current text as proposed.

A

barneygale reacted with thumbs up emoji

@barneygale
Copy link
ContributorAuthor

Thanks again!

@barneygalebarneygale merged commit3a61d24 intopython:mainJan 23, 2024
@miss-islington-app
Copy link

Thanks@barneygale for the PR 🌮🎉.. I'm working now to backport this PR to: 3.11, 3.12.
🐍🍒⛏🤖

miss-islington pushed a commit to miss-islington/cpython that referenced this pull requestJan 23, 2024
…xical. (pythonGH-114031)(cherry picked from commit3a61d24)Co-authored-by: Barney Gale <barney.gale@gmail.com>
@miss-islington-app
Copy link

Sorry,@barneygale, I could not cleanly backport this to3.11 due to a conflict.
Please backport usingcherry_picker on command line.

cherry_picker 3a61d24062aaa1e13ba794360b6c765d9a1f2b06 3.11

@bedevere-app
Copy link

GH-114460 is a backport of this pull request to the3.12 branch.

@bedevere-appbedevere-appbot removed the needs backport to 3.12only security fixes labelJan 23, 2024
barneygale added a commit to barneygale/cpython that referenced this pull requestJan 23, 2024
barneygale added a commit to barneygale/cpython that referenced this pull requestJan 23, 2024
…rely lexical. (pythonGH-114031).(cherry picked from commit3a61d24)Co-authored-by: Barney Gale <barney.gale@gmail.com>
@bedevere-app
Copy link

GH-114461 is a backport of this pull request to the3.11 branch.

@bedevere-appbedevere-appbot removed the needs backport to 3.11only security fixes labelJan 23, 2024
barneygale pushed a commit that referenced this pull requestJan 23, 2024
barneygale added a commit that referenced this pull requestJan 23, 2024
aisk pushed a commit to aisk/cpython that referenced this pull requestFeb 11, 2024
Glyphack pushed a commit to Glyphack/cpython that referenced this pull requestSep 2, 2024
Sign up for freeto join this conversation on GitHub. Already have an account?Sign in to comment

Reviewers

@AA-TurnerAA-TurnerAA-Turner approved these changes

Assignees

@barneygalebarneygale

Labels

docsDocumentation in the Doc dirskip newstopic-pathlib

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

2 participants

@barneygale@AA-Turner

[8]ページ先頭

©2009-2025 Movatter.jp