Uh oh!
There was an error while loading. Please reload this page.
bpo-37330: open() no longer accept 'U' in file mode - #14204
Conversation
Uh oh!
There was an error while loading. Please reload this page.
serhiy-storchaka
left a comment
There was a problem hiding this comment.
Needed changes in imp.py and fileinput.py.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
bedevere-bot
commented
Jun 18, 2019
When you're done making the requested changes, leave the comment: |
Line 228 in 5954334 ValueError that "U" is invalid so not sure if it needs to be changed.Edit: Saw Serhiy's review about |
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.vstinner
commented
Jun 18, 2019
@tirkarthi@serhiy-storchaka: I made requested changes. |
vstinner
commented
Jun 19, 2019
Oh, the Doc job of Travis CI fails with: Sphinx still uses rU mode. |
vstinner
commented
Jun 19, 2019
Sphinx issue comes from docutils: Extract of the code, it seems to contain a copy of fileinput.FileInput: |
vstinner
commented
Jun 20, 2019
I reported the docutils issue to docutils bug tracker with a patch: https://sourceforge.net/p/docutils/bugs/363/ |
vstinner
commented
Jul 16, 2019
This PR cannot be merged because it breaks the Python CI because of docutils: https://bugs.python.org/issue37330#msg346219 I prefer to close this PR right now. I will not be available next weeks, so I prefer to close the PR. I may reopen it later, once docutils is fixed. |
tirkarthi
commented
Jul 22, 2019
@vstinner docutils 0.15 was released on July 21 which has the patch for 'U' mode. The current build config uses |
vstinner
commented
Oct 27, 2019
Nice. I tried to reopen the issue after I rebased my branch, but I made a mistake and I'm no longer able to open the PR. So I created PR #16959 instead. |
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.
https://bugs.python.org/issue37330