From: Numan Siddique <[email protected]>
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 <[email protected]>
Signed-off-by: Numan Siddique <[email protected]>
(cherry picked from commit 500982b84280fdc451877c76f5fdb9a0ac19e805)
Signed-off-by: Vladislav Odintsov <[email protected]>
---
Documentation/conf.py | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/Documentation/conf.py b/Documentation/conf.py
index 2c85dcf4d..c253e00e3 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, [email protected])":
--
2.36.1
_______________________________________________
dev mailing list
[email protected]
https://mail.openvswitch.org/mailman/listinfo/ovs-dev