Skip to content

[3.15] gh-102475: Fix os.path.realpath() for names which look like a drive (GH-155399) - #156593

Merged
serhiy-storchaka merged 3 commits into
python:3.15from
miss-islington:backport-0c38e05-3.15
Oct 10, 2026
Merged

serhiy-storchaka merged 3 commits into
python:3.15from
miss-islington:backport-0c38e05-3.15

Conversation

@miss-islington

@miss-islington miss-islington commented Aug 29, 2026 •

Copy link
Copy Markdown
Contributor

The unresolved part of the path was joined with the resolved part using
join(), so a component containing a colon (e.g. "spam:eggs") reset the path.
It is now simply appended.

A path relative to a drive which does not exist (e.g. "Z:spam") is now
resolved against the root directory of that drive, as the Windows path
normalization does.
(cherry picked from commit 0c38e05)

Co-authored-by: Serhiy Storchaka storchaka@gmail.com

…rive (pythonGH-155399)

The unresolved part of the path was joined with the resolved part using
join(), so a component containing a colon (e.g. "spam:eggs") reset the path.
It is now simply appended.

A path relative to a drive which does not exist (e.g. "Z:spam") is now
resolved against the root directory of that drive, as the Windows path
normalization does.
(cherry picked from commit 0c38e05)

Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
@serhiy-storchaka
serhiy-storchaka enabled auto-merge (squash) October 10, 2026 09:24
@serhiy-storchaka
serhiy-storchaka merged commit 6531b40 into python:3.15 Oct 10, 2026
53 checks passed
@miss-islington
miss-islington deleted the backport-0c38e05-3.15 branch October 10, 2026 09:52
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants