Skip to content

Conversation

miss-islington
Copy link
Contributor

@miss-islington miss-islington commented Oct 17, 2025

In Python 3.13 (but not 3.12 or 3.14), pathlib classes are defined in
pathlib._local rather than pathlib. In hindsight this was a mistake,
but it was difficult to predict how the abstract/local split would pan out.

In this patch we re-introduce pathlib._local as a stub module that
re-exports the classes from pathlib. This allows path objects pickled in
3.13 to be unpicked in 3.14+
(cherry picked from commit f4e51f2)

Co-authored-by: Barney Gale [email protected]

…3.13 (pythonGH-133831)

In Python 3.13 (but not 3.12 or 3.14), pathlib classes are defined in
`pathlib._local` rather than `pathlib`. In hindsight this was a mistake,
but it was difficult to predict how the abstract/local split would pan out.

In this patch we re-introduce `pathlib._local` as a stub module that
re-exports the classes from `pathlib`. This allows path objects pickled in
3.13 to be unpicked in 3.14+
(cherry picked from commit f4e51f2)

Co-authored-by: Barney Gale <[email protected]>
@barneygale barneygale enabled auto-merge (squash) October 17, 2025 22:01
@barneygale barneygale merged commit f59236b into python:3.14 Oct 17, 2025
50 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.

2 participants