On 11/14/23 15:57, Ilya Maximets wrote:
> On 11/14/23 12:38, Dumitru Ceara 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 ':'
>>
>> This was reported and discussed in a couple of contexts:
>> https://mail.openvswitch.org/pipermail/ovs-dev/2023-November/409325.html
>> https://mail.openvswitch.org/pipermail/ovs-dev/2023-November/409277.html
>>
>> And it's fixed in recent flake8/pycodestyle versions:
>> https://github.com/PyCQA/flake8/issues/1845#issuecomment-1766073353
>>
>> Unfortunately we have to remove the 'hacking' requirement because that
>> introduces a dependency on 'flake8<4.0.0 and >=3.6.0'.  On the other
>> hand the currently enabled hacking checks were only applicable to
>> Python 2 code.  OVN has stopped supporting Python 2 for a while now,
>> since 0c042c2d28d8 ("Require Python 3 and remove support for Python
>> 2.").
>>
>> Signed-off-by: Dumitru Ceara <[email protected]>
>> ---
>> NOTE: this patch should be backported to all supported branches.
>>
>> V3:
>> - Addressed Ilya's comments:
>>   - keep hacking checks on flake8 ignore list for the case when hacking
>>     is installed.
>>
>> V2:
>> - Addressed Ilya's comments:
>>   - removed remaining hacking references
>> - updated commit log
>> ---
>>  Documentation/intro/install/general.rst  | 5 +----
>>  Makefile.am                              | 6 ------
>>  utilities/containers/py-requirements.txt | 4 ++--
>>  3 files changed, 3 insertions(+), 12 deletions(-)
>>
>> diff --git a/Documentation/intro/install/general.rst 
>> b/Documentation/intro/install/general.rst
>> index 5895188462..4ace64f6ec 100644
>> --- a/Documentation/intro/install/general.rst
>> +++ b/Documentation/intro/install/general.rst
>> @@ -134,10 +134,7 @@ following to obtain better warnings:
>>  
>>  - clang, version 3.4 or later
>>  
>> -- flake8 along with the hacking flake8 plugin (for Python code). The 
>> automatic
>> -  flake8 check that runs against Python code has some warnings enabled that
>> -  come from the "hacking" flake8 plugin. If it's not installed, the warnings
>> -  just won't occur until it's run on a system with "hacking" installed.
>> +- flake8, version 6.1.0 or later
> 
> Looks fine in general, but I'm not sure if we need to call out the
> version of flake8 specifically here.  It's not really a dependency
> for OVN itself.  It's just an incompatibility between older flake8
> and the python 3.12 that has nothing to do with OVN.
> 
> Maybe go back to a version before commit cd8747c54254 ("INSTALL.md:
> Note use of "hacking" flake8 plugin.") ?  i.e.:
> 
>   - flake8 (for Python code)

Sure, I changed it like that.

> 
> Either way:
> 
> Acked-by: Ilya Maximets <[email protected]>
> 

Thanks, Ales, Ilya and Mark for the reviews!  I pushed this to main and
backported it to all stable branches down to 22.03.

I did restrict flake8 to version flake8==5.0.4 on stable branches so
that we can use tagged ovs releases as submodule version.

CI is still unhappy but for a few other reasons:
a. ARM CI needs an updated container (without hacking installed): I
triggered a run manually now
b. stable branches CI, <= 23.06, need to run with python 3.11 so we need
custom container images for them; I'm trying to address that with the
other series (needs v2):

https://patchwork.ozlabs.org/project/ovn/cover/[email protected]/

Regards,
Dumitru

_______________________________________________
dev mailing list
[email protected]
https://mail.openvswitch.org/mailman/listinfo/ovs-dev

Reply via email to