On 11/13/23 11:41, Dumitru Ceara wrote:
> On 11/13/23 11:07, Ales Musil wrote:
>> On Sat, Nov 11, 2023 at 11:40 PM Dumitru Ceara <dce...@redhat.com> wrote:
>>
>>> Without this, when using Python 3.12 and flake8 5.0.4, the following
>>> errors are flagged:
>>>   tests/check_acl_log.py:97:25: E231 missing whitespace after ':'
>>>   tests/check_acl_log.py:102:71: E231 missing whitespace after ':'
>>>
>>> While this seems a bit too restrictive from flake8 we can easily work
>>> around it by just not using f-strings unless necessary.
>>>
>>> This unblocks GitHub CI runs on branches <= 23.06.  These started
>>> failing since the Python version we get in CI (in the Ubuntu runner)
>>> changed to CPython (3.12.0).
>>>
>>> Signed-off-by: Dumitru Ceara <dce...@redhat.com>
>>> ---
>>> NOTE: this patch should be backported to all supported branches.
>>> ---
>>>  tests/check_acl_log.py | 6 ++++--
>>>  1 file changed, 4 insertions(+), 2 deletions(-)
>>>
>>> diff --git a/tests/check_acl_log.py b/tests/check_acl_log.py
>>> index 0c1968b2eb..ed98044f77 100644
>>> --- a/tests/check_acl_log.py
>>> +++ b/tests/check_acl_log.py
>>> @@ -94,12 +94,14 @@ def main():
>>>                  print(
>>>                      f"Expected log {key}={val} but got "
>>>                      f"{key}={parsed_log[key]} "
>>> -                    f"in:\n\t'{acl_log}'"
>>> +                    "in:\n\t"
>>> +                    f"'{acl_log}'"
>>>                  )
>>>                  exit(1)
>>>          except KeyError:
>>>              print(
>>> -                f"Expected log {key}={val} but {key} does not exist in:\n"
>>> +                f"Expected log {key}={val} but {key} "
>>> +                "does not exist in:\n"
>>>                  f"\t'{acl_log}'"
>>>              )
>>>              exit(1)
>>> --
>>> 2.39.3
>>>
>>> _______________________________________________
>>> dev mailing list
>>> d...@openvswitch.org
>>> https://mail.openvswitch.org/mailman/listinfo/ovs-dev
>>>
>>>
>> Hi Dumitru,
>>
>> thank you for the patch. It seems that we are not the first ones to run
>> into that issue [0]. It doesn't seem right to "bend" f-strings because of
>> that. All we need apparently is to upgrade pycodestyle past 2.11.
>>
> 
> Hi Ales,
> 
> Good point!  We couldn't upgrade flake8/pycodestyle because of the
> "hacking" dependency.  I'll post a patch to remove hacking, it's causing
> trouble and we don't really need it (it's about the OpenStack coding
> style).  That will also address what Numan tries to fix in
> https://mail.openvswitch.org/pipermail/ovs-dev/2023-November/409300.html.
> 

I'm marking this patch as "rejected" in patchwork; new patch posted:

https://patchwork.ozlabs.org/project/ovn/patch/20231113133337.767803-1-dce...@redhat.com/

Thanks,
Dumitru

_______________________________________________
dev mailing list
d...@openvswitch.org
https://mail.openvswitch.org/mailman/listinfo/ovs-dev

Reply via email to