]> git.ipfire.org Git - thirdparty/Python/cpython.git/commit
gh-91526: io: Remove device encoding support from TextIOWrapper (GH-91529)
authorInada Naoki <songofacandy@gmail.com>
Tue, 19 Apr 2022 02:44:36 +0000 (11:44 +0900)
committerGitHub <noreply@github.com>
Tue, 19 Apr 2022 02:44:36 +0000 (11:44 +0900)
commit6fdb62b1fa344b9cdf1f221eac83404fb1980822
tree97badf048e8285069490b1753bc1a77f997070e7
parent39a54ba63850e081a4a5551a773df5b4d5b1d3cd
gh-91526: io: Remove device encoding support from TextIOWrapper (GH-91529)

`TextIOWrapper.__init__()` called `os.device_encoding(file.fileno())` if fileno is 0-2 and encoding=None.
But it is very rarely works, and never documented behavior.
Lib/_pyio.py
Lib/test/test_io.py
Misc/NEWS.d/next/Library/2022-04-14-18-06-00.gh-issue-91526.cwfhSB.rst [new file with mode: 0644]
Modules/_io/textio.c