https://github.com/python/cpython
Revision f20b151a1c49602282a0e80ffb92f68c28c04abd authored by Barney Gale on 13 January 2024, 08:03:21 UTC, committed by GitHub on 13 January 2024, 08:03:21 UTC
It's wrong for the `PurePathBase` methods to rely so much on `__str__()`.
Instead, they should treat the raw path(s) as opaque objects and leave the
details to `pathmod`.

This commit adds a `PurePathBase._raw_path` property and uses it through
many of the other ABC methods. These methods are all redefined in
`PurePath` and `Path`, so this has no effect on the public classes.
1 parent e4ff131
History
Tip revision: f20b151a1c49602282a0e80ffb92f68c28c04abd authored by Barney Gale on 13 January 2024, 08:03:21 UTC
pathlib ABCs: add `_raw_path` property (#113976)
Tip revision: f20b151
File Mode Size
_static
c-api
data
distributing
extending
faq
howto
includes
installing
library
reference
tools
tutorial
using
whatsnew
Makefile -rw-r--r-- 8.9 KB
README.rst -rw-r--r-- 4.7 KB
about.rst -rw-r--r-- 1.5 KB
bugs.rst -rw-r--r-- 4.7 KB
conf.py -rw-r--r-- 16.5 KB
constraints.txt -rw-r--r-- 651 bytes
contents.rst -rw-r--r-- 395 bytes
copyright.rst -rw-r--r-- 451 bytes
glossary.rst -rw-r--r-- 58.3 KB
license.rst -rw-r--r-- 52.5 KB
make.bat -rw-r--r-- 6.1 KB
requirements-oldest-sphinx.txt -rw-r--r-- 788 bytes
requirements.txt -rw-r--r-- 672 bytes

README.rst

back to top