Skip to content

Commit

Permalink
Fix compilation issue in fedora 37/rawhide.
Browse files Browse the repository at this point in the history
Compilation is failing with the error:

File "Documentation/conf.py", line 61, in <module>
    with open(filename, 'rU') as f:
         ^^^^^^^^^^^^^^^^^^^^
ValueError: invalid mode: 'rU'

The python 3 documentation [1] says:

There is an additional mode character permitted, 'U', which no
longer has any effect, and is considered deprecated. It
previously enabled universal newlines in text mode, which
became the default behaviour in Python 3.0. Refer to the
documentation of the newline parameter for further details.

[1] - https://docs.python.org/3.9/library/functions.html#open

This patch fixes this issue.

Acked-by: Dumitru Ceara <dceara@redhat.com>
Signed-off-by: Numan Siddique <numans@ovn.org>
(cherry picked from commit 500982b)
  • Loading branch information
numansiddique committed Jul 22, 2022
1 parent 16599fb commit 822f78a
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion Documentation/conf.py
Expand Up @@ -58,7 +58,7 @@
# 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)":
Expand Down

0 comments on commit 822f78a

Please sign in to comment.