]> git.ipfire.org Git - thirdparty/Python/cpython.git/commit
GH-110109: pathlib ABCs: drop use of `io.text_encoding()` (#113417)
authorBarney Gale <barney.gale@gmail.com>
Wed, 27 Dec 2023 15:32:35 +0000 (15:32 +0000)
committerGitHub <noreply@github.com>
Wed, 27 Dec 2023 15:32:35 +0000 (15:32 +0000)
commitf8b6e171ad79bf3e57e39ebc0d96ad097a310cbf
tree9b5f06f75c65f661ed36bd13f5ef4f79405e7e14
parent712afab5acbe27ceb1eddde5aa559078ae7eaa3b
GH-110109: pathlib ABCs: drop use of `io.text_encoding()` (#113417)

Do not use the locale-specific default encoding in `PathBase.read_text()`
and `write_text()`. Locale settings shouldn't influence the operation of
these base classes, which are intended mostly for implementing rich paths
on *nonlocal* filesystems.
Lib/pathlib/__init__.py
Lib/pathlib/_abc.py