]> git.ipfire.org Git - thirdparty/Python/cpython.git/commit
GH-128520: pathlib ABCs: raise text encoding warnings at correct stack level (#133051)
authorBarney Gale <barney.gale@gmail.com>
Mon, 28 Apr 2025 18:04:20 +0000 (19:04 +0100)
committerGitHub <noreply@github.com>
Mon, 28 Apr 2025 18:04:20 +0000 (19:04 +0100)
commitfbffd70328bb2a73d8154b4dd944e6d707fde9b3
tree4335b168ebb9c41e8bdd8ce445ff0ea650a5e7f4
parent6f0432599297635492597e3766259390e8331c62
GH-128520: pathlib ABCs: raise text encoding warnings at correct stack level (#133051)

Ensure that warnings about unspecified text encodings are emitted from
`ReadablePath.read_text()`, `WritablePath.write_text()` and `magic_open()`
with the correct stack level set.
Lib/pathlib/_os.py
Lib/pathlib/types.py
Lib/test/test_pathlib/test_read.py
Lib/test/test_pathlib/test_write.py