8000 [3.12] GH-125069: Fix inconsistent joining in `WindowsPath(PosixPath(...))` (GH-125156) by barneygale · Pull Request #125410 · python/cpython · GitHub
[go: up one dir, main page]

Skip to content
< 8000 h1 class="gh-header-title mb-2 lh-condensed f1 mr-0 flex-auto wb-break-word"> [3.12] GH-125069: Fix inconsistent joining in WindowsPath(PosixPath(...)) (GH-125156) #125410
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

Merged
merged 2 commits into from
Oct 13, 2024

Conversation

barneygale
Copy link
Contributor
@barneygale barneygale commented Oct 13, 2024

PurePath.__init__() incorrectly uses the _raw_paths of a given PurePath object with a different flavour, even though the procedure to join path segments can differ between flavours.

This change makes the _raw_paths-enabled deferred joining apply only when the path flavours match.

(cherry picked from commit cb8e599)

…xPath(...))` (pythonGH-125156)

`PurePath.__init__()` incorrectly uses the `_raw_paths` of a given
`PurePath` object with a different flavour, even though the procedure to
join path segments can differ between flavours.

This change makes the `_raw_paths`-enabled deferred joining apply _only_
when the path flavours match.

Co-authored-by: Bénédikt Tran <10796600+picnixz@users.noreply.github.com>.
(cherry picked from commit cb8e599)

Co-authored-by: Barney Gale <barney.gale@gmail.com>
@barneygale barneygale enabled auto-merge (squash) October 13, 2024 18:03
@barneygale barneygale merged commit f49221a into python:3.12 Oct 13, 2024
28 checks passed
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.

1 participant
0