-
-
Notifications
You must be signed in to change notification settings - Fork 30.2k
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
GH-125069: Fix inconsistent joining in WindowsPath(PosixPath(...))
#125156
Conversation
…..))` `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.
Misc/NEWS.d/next/Library/2024-10-08-21-17-16.gh-issue-125069.0RP0Mx.rst
Outdated
Show resolved
Hide resolved
…RP0Mx.rst Co-authored-by: Bénédikt Tran <10796600+picnixz@users.noreply.github.com>
Some background info: the str(Path('a') / 'b' / 'c' / 'd' / 'e') Without deferred joining, this requires four calls to
With deferred joining, it calls |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM.
Thank you very much for the review, @picnixz |
Always happy to review them! |
Thanks @barneygale for the PR 🌮🎉.. I'm working now to backport this PR to: 3.12, 3.13. |
…..))` (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. (cherry picked from commit cb8e599) Co-authored-by: Barney Gale <barney.gale@gmail.com> Co-authored-by: Bénédikt Tran <10796600+picnixz@users.noreply.github.com>
Sorry, @barneygale, I could not cleanly backport this to
|
GH-125409 is a backport of this pull request to the 3.13 branch. |
…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>
GH-125410 is a backport of this pull request to the 3.12 branch. |
…...))` (GH-125156) (#125409) `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) Co-authored-by: Barney Gale <barney.gale@gmail.com> Co-authored-by: Bénédikt Tran <10796600+picnixz@users.noreply.github.com>
…...))` (GH-125156) (#125410) `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) Co-authored-by: Bénédikt Tran <10796600+picnixz@users.noreply.github.com>
PurePath.__init__()
incorrectly uses the_raw_paths
of a givenPurePath
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.