GH-125069: Fix inconsistent joining in WindowsPath(PosixPath(...))#125156
GH-125069: Fix inconsistent joining in WindowsPath(PosixPath(...))#125156barneygale merged 6 commits intopython:mainfrom
WindowsPath(PosixPath(...))#125156Conversation
…..))` `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.
…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 |
|
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_pathsof a givenPurePathobject 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.