summaryrefslogtreecommitdiffstats
path: root/Lib/pathlib/_local.py
Commit message (Collapse)AuthorAgeFilesLines
* [3.13] GH-125069: Fix inconsistent joining in `WindowsPath(PosixPath(...))` ↵Miss Islington (bot)2024-10-131-2/+2
| | | | | | | | | | | | | | | (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 cb8e5995d89d9b90e83cf43310ec50e177484e70) Co-authored-by: Barney Gale <barney.gale@gmail.com> Co-authored-by: Bénédikt Tran <10796600+picnixz@users.noreply.github.com>
* [3.13] GH-119169: Implement `pathlib.Path.walk()` using `os.walk()` ↵Miss Islington (bot)2024-05-291-1/+3
| | | | | | | | | | | | | (GH-119573) (#119750) GH-119169: Implement `pathlib.Path.walk()` using `os.walk()` (GH-119573) For silly reasons, pathlib's generic implementation of `walk()` currently resides in `glob._Globber`. This commit moves it into `pathlib._abc.PathBase.walk()` where it really belongs, and makes `pathlib.Path.walk()` call `os.walk()`. (cherry picked from commit 7ff61f51b6f75315291419269295a8ac3933397b) Co-authored-by: Barney Gale <barney.gale@gmail.com>
* GH-116380: Revert move of pathlib globbing code to `pathlib._glob` (#118678)Barney Gale2024-05-071-2/+2
| | | | | | The previous change made the `glob` module slower to import, because it imported `pathlib._glob` and hence the rest of `pathlib`. Reverts a40f557d7b7a355a55bb90c068e3e9202fd9c8f2.
* Move pathlib implementation out of `__init__.py` (#118582)Barney Gale2024-05-051-0/+859
Use the `__init__.py` file only for imports that define the API, following the example of asyncio.