GeezerVison is showing github.com — [3.14] gh-160506: Fix ntpath.realpath() for broken links via directory links (GH-160507) by miss-islington · Pull Request #161027 · python/cpython
Conversation
miss-islington
commented
Oct 31, 2026
•
edited by bedevere-app
Bot
Loading
Uh oh!
There was an error while loading. Please reload this page.
Resolve the directory containing a broken relative symlink before
joining the link target to it, so that '..' in the target is applied
to the real directory.
ANT-2026-27II3A20
(cherry picked from commit 65665a4)
Co-authored-by: Gregory P. Smith [email protected]
Sorry, something went wrong.
Uh oh!
There was an error while loading. Please reload this page.
… links (pythonGH-160507)
Resolve the directory containing a broken relative symlink before
joining the link target to it, so that '..' in the target is applied
to the real directory.
ANT-2026-27II3A20
(cherry picked from commit 65665a4)
Co-authored-by: Gregory P. Smith <[email protected]>
This was referenced Oct 31, 2026
File "/Users/runner/work/cpython/cpython/Lib/test/test_ntpath.py", line 555, in TestNtpath
@_parameterize({}, {'strict': ALL_BUT_LAST}, {'strict': ALLOW_MISSING})
^^^^^^^^^^^^
NameError: name 'ALL_BUT_LAST' is not defined
@gpshead ALL_BUT_LAST was added in #117562 and not backported.
|
gpshead reacted with thumbs up emoji
Sorry, something went wrong.
Uh oh!
There was an error while loading. Please reload this page.
Before 3.15, tarfile keeps the '/' in symlink targets on Windows
(pythongh-57911), so writing through the '../evil' link fails, as already
handled in test_parent_symlink2.
Before 3.15, tarfile keeps the '/' in symlink targets on Windows
(pythongh-57911), so the links it creates cannot be followed and realpath()
fails on them. test_ntpath covers the fix on Windows.
Uh oh!
There was an error while loading. Please reload this page.
Reviewers
ethanfurman
Awaiting requested review from ethanfurman
ethanfurman is a code owner
Uh oh!
There was an error while loading. Please reload this page.
Milestone
No milestone
Development
Successfully merging this pull request may close these issues.
Uh oh!
There was an error while loading. Please reload this page.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
|