bpo-37330: open() no longer accept 'U' in file mode#16959
Conversation
open(), io.open(), codecs.open() and fileinput.FileInput no longer
accept "U" ("universal newline") in the file mode. This flag was
deprecated since Python 3.3.
test_fileinput: add tests for 'rU' and 'U' modes
Run make regen-all.
|
This is the rebased PR #14204 that I failed to reopen. docutils and Sphinx were updated: they no longer use open("U"). @serhiy-storchaka: You approved PR #14204, would you mind to approve this PR as well? |
Sorry, something went wrong.
tirkarthi
left a comment
There was a problem hiding this comment.
LGTM. It seems test_pty failure is tracked with https://bugs.python.org/issue38547. Thanks Victor.
Sorry, something went wrong.
|
@serhiy-storchaka: I added more tests, does it look good to you now? |
Sorry, something went wrong.
|
@serhiy-storchaka: Sorry, I misunderstood the codecs module for "rt" mode. Adding an encoding was the fix :-) I added more tests for this mode as well. |
Sorry, something went wrong.
open(), io.open(), codecs.open() and fileinput.FileInput no longer
accept "U" ("universal newline") in the file mode. This flag was
deprecated since Python 3.3.
open(), io.open(), codecs.open() and fileinput.FileInput no longer
accept "U" ("universal newline") in the file mode. This flag was
deprecated since Python 3.3.
open(), io.open(), codecs.open() and fileinput.FileInput no longer
accept "U" ("universal newline") in the file mode. This flag was
deprecated since Python 3.3.
test_fileinput: add tests for 'rU' and 'U' modes
Run make regen-all.
https://bugs.python.org/issue37330