diff mbox series

[ovs-dev,v2] Fix compilation issue in fedora 37/rawhide.

Message ID 20220721011440.1178178-1-numans@ovn.org
State Accepted
Headers show
Series [ovs-dev,v2] Fix compilation issue in fedora 37/rawhide. | expand

Checks

Context Check Description
ovsrobot/apply-robot success apply and check: success

Commit Message

Numan Siddique July 21, 2022, 1:14 a.m. UTC
From: Numan Siddique <numans@ovn.org>

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.

Signed-off-by: Numan Siddique <numans@ovn.org>
---
 Documentation/conf.py | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Comments

Dumitru Ceara July 21, 2022, 8:41 p.m. UTC | #1
On 7/21/22 03:14, numans@ovn.org wrote:
> From: Numan Siddique <numans@ovn.org>
> 
> 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.
> 
> Signed-off-by: Numan Siddique <numans@ovn.org>
> ---

Looks good to me, thanks!

Acked-by: Dumitru Ceara <dceara@redhat.com>
Numan Siddique July 22, 2022, 1:18 a.m. UTC | #2
On Thu, Jul 21, 2022 at 3:44 PM Dumitru Ceara <dceara@redhat.com> wrote:
>
> On 7/21/22 03:14, numans@ovn.org wrote:
> > From: Numan Siddique <numans@ovn.org>
> >
> > 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.
> >
> > Signed-off-by: Numan Siddique <numans@ovn.org>
> > ---
>
> Looks good to me, thanks!
>
> Acked-by: Dumitru Ceara <dceara@redhat.com>

Thanks.  I applied this patch to main and backported to branch-22.06
and branch-22.03.

Numan

>
> _______________________________________________
> dev mailing list
> dev@openvswitch.org
> https://mail.openvswitch.org/mailman/listinfo/ovs-dev
>
Dumitru Ceara Dec. 12, 2022, 12:41 p.m. UTC | #3
On 7/22/22 03:18, Numan Siddique wrote:
> On Thu, Jul 21, 2022 at 3:44 PM Dumitru Ceara <dceara@redhat.com> wrote:
>>
>> On 7/21/22 03:14, numans@ovn.org wrote:
>>> From: Numan Siddique <numans@ovn.org>
>>>
>>> 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.
>>>
>>> Signed-off-by: Numan Siddique <numans@ovn.org>
>>> ---
>>
>> Looks good to me, thanks!
>>
>> Acked-by: Dumitru Ceara <dceara@redhat.com>
> 
> Thanks.  I applied this patch to main and backported to branch-22.06
> and branch-22.03.
> 

We're still backporting fixes on demand to branch-21.12.  So I went
ahead and backported this patch there so we have CI running on that
branch too.

Regards,
Dumitru
diff mbox series

Patch

diff --git a/Documentation/conf.py b/Documentation/conf.py
index d89c64e775..f7eceaec83 100644
--- a/Documentation/conf.py
+++ b/Documentation/conf.py
@@ -58,7 +58,7 @@  author = u'The Open Virtual Network (OVN) 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)":