-
-
Notifications
You must be signed in to change notification settings - Fork 32k
bpo-43651: Fix EncodingWarning in test_io #25097
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
This PR can be simplified after #25103 is merged. |
#25103 did not help OpenWrapper(). I don't think we should allow |
Lib/test/test_io.py
Outdated
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I would prefer to replace all "ascii" with "utf-8". Come on, ASCII is now legacy!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM.
|
https://bugs.python.org/issue43651