0
0
mirror of https://github.com/python/cpython.git synced 2024-11-27 15:27:06 +01:00
cpython/Lib/pathlib
Barney Gale 266328552e
pathlib ABCs: tighten up resolve() and absolute() (#126611)
In `PathBase.resolve()`, raise `UnsupportedOperation` if a non-POSIX path
parser is used (our implementation uses `posixpath._realpath()`, which
produces incorrect results for non-POSIX path flavours.) Also tweak code to
call `self.absolute()` upfront rather than supplying an emulated `getcwd()`
function.

Adjust `PathBase.absolute()` to work somewhat like `resolve()`. If a POSIX
path parser is used, we treat the root directory as the current directory.
This is the simplest useful behaviour for concrete path types without a
current directory cursor.
2024-11-09 18:47:49 +00:00
..
__init__.py
_abc.py pathlib ABCs: tighten up resolve() and absolute() (#126611) 2024-11-09 18:47:49 +00:00
_local.py pathlib ABCs: defer path joining (#126409) 2024-11-05 21:19:36 +00:00
_os.py