◐ Shell
clean mode source ↗

GH-76846, GH-85281: Call `__new__()` and `__init__()` on pathlib subclasses by barneygale · Pull Request #102789 · python/cpython

added 3 commits

March 17, 2023 18:56

zooba

Co-authored-by: Steve Dower <steve.dower@microsoft.com>

barneygale

barneygale

This was referenced

Apr 3, 2023

gaogaotiantian pushed a commit to gaogaotiantian/cpython that referenced this pull request

Apr 8, 2023
…pathlib subclasses (pythonGH-102789)

Fix an issue where `__new__()` and `__init__()` were not called on subclasses of `pathlib.PurePath` and `Path` in some circumstances.

Paths are now normalized on-demand. This speeds up path construction, `p.joinpath(q)`, and `p / q`.

Co-authored-by: Steve Dower <steve.dower@microsoft.com>

warsaw pushed a commit to warsaw/cpython that referenced this pull request

Apr 11, 2023
…pathlib subclasses (pythonGH-102789)

Fix an issue where `__new__()` and `__init__()` were not called on subclasses of `pathlib.PurePath` and `Path` in some circumstances.

Paths are now normalized on-demand. This speeds up path construction, `p.joinpath(q)`, and `p / q`.

Co-authored-by: Steve Dower <steve.dower@microsoft.com>