SIGN IN SIGN UP
python / cpython UNCLAIMED

The Python programming language

0 0 1 Python

GH-139174: Prepare `pathlib.Path.info` for new methods (#139175)

Merge `_WindowsPathInfo` and `_PosixPathInfo` classes into a new
`_StatResultInfo` class. On Windows, this means relying on `os.stat()`
rather than `os.path.isfile()` and friends, which is a little slower. But
there's value in making the code easier to maintain, and we're going to
need the stat result for implementing `size()`, `mode()` etc.

Also move the classes from `pathlib._os` to `pathlib` proper.
B
Barney Gale committed
9e6493849ec2389460a8933314fcc8b7be01c221
Parent: 1a2e00c
Committed by GitHub <noreply@github.com> on 9/24/2025, 1:52:24 AM