bpo-43651: Fix EncodingWarning in test_io#25097
bpo-43651: Fix EncodingWarning in test_io#25097methane merged 3 commits intopython:masterpython/cpython:masterfrom methane:fix-encodingwarning-iomethane/cpython:fix-encodingwarning-ioCopy head branch name to clipboard
Conversation
|
This PR can be simplified after #25103 is merged. |
|
#25103 did not help OpenWrapper(). I don't think we should allow |
| with self.open(os_helper.TESTFN, mode) as fp: | ||
| self.assertRaises(exc, fp.read) | ||
| self.assertRaises(exc, fp.readline) | ||
| with self.open(os_helper.TESTFN, "w", encoding="ascii") as fp: |
There was a problem hiding this comment.
I would prefer to replace all "ascii" with "utf-8". Come on, ASCII is now legacy!
|
https://bugs.python.org/issue43651