diff mbox series

[ovs-dev] Documentation: Fix building with Python 3.9

Message ID 688de48c43e55a7c87417478254fd14e06a29895.1579180907.git.tredaelli@redhat.com
State Accepted
Commit 197c21a63de06c0804801bb9ee674b88a7dfe08d
Headers show
Series [ovs-dev] Documentation: Fix building with Python 3.9 | expand

Commit Message

Timothy Redaelli Jan. 16, 2020, 1:21 p.m. UTC
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.
In Python 3, the "universal newline" is used by default when a file is open
in text mode.

Reported-at: https://bugzilla.redhat.com/1791681
Reported-by: Miro Hrončok <mhroncok@redhat.com>
Signed-off-by: Timothy Redaelli <tredaelli@redhat.com>
---
 Documentation/conf.py | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Comments

Flavio Leitner Jan. 16, 2020, 2:20 p.m. UTC | #1
On Thu, Jan 16, 2020 at 02:21:47PM +0100, Timothy Redaelli wrote:
> 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.
> In Python 3, the "universal newline" is used by default when a file is open
> in text mode.
> 
> Reported-at: https://bugzilla.redhat.com/1791681
> Reported-by: Miro Hrončok <mhroncok@redhat.com>
> Signed-off-by: Timothy Redaelli <tredaelli@redhat.com>
> ---

LGTM
Acked-by: Flavio Leitner <fbl@sysclose.org>
Ben Pfaff Jan. 17, 2020, 12:20 a.m. UTC | #2
On Thu, Jan 16, 2020 at 11:20:01AM -0300, Flavio Leitner wrote:
> On Thu, Jan 16, 2020 at 02:21:47PM +0100, Timothy Redaelli wrote:
> > 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.
> > In Python 3, the "universal newline" is used by default when a file is open
> > in text mode.
> > 
> > Reported-at: https://bugzilla.redhat.com/1791681
> > Reported-by: Miro Hrončok <mhroncok@redhat.com>
> > Signed-off-by: Timothy Redaelli <tredaelli@redhat.com>
> > ---
> 
> LGTM
> Acked-by: Flavio Leitner <fbl@sysclose.org>

Thanks Timothy (and Flavio).  Applied to master.
diff mbox series

Patch

diff --git a/Documentation/conf.py b/Documentation/conf.py
index 6bbfc02bd..37d92c36f 100644
--- a/Documentation/conf.py
+++ b/Documentation/conf.py
@@ -58,7 +58,7 @@  author = u'The Open vSwitch Development Community'
 # The full version, including alpha/beta/rc tags.
 release = None
 filename = "../configure.ac"
-with open(filename, 'rU') as f:
+with open(filename, 'r') as f:
     for line in f:
         if 'AC_INIT' in line:
             # Parse "AC_INIT(openvswitch, 2.7.90, bugs@openvswitch.org)":