On 11/7/23 22:33, Mark Michelson wrote: > On 11/6/23 23:47, Dumitru Ceara wrote: >> On 11/2/23 16:30, [email protected] wrote: >>> From: Numan Siddique <[email protected]> >>> >>> With the 'ubuntu-latest' image in github CI, OVS compilation >>> is failing with the below error: >>> >>> --- >>> python/ovs/tests/test_dns_resolve.py:272:54: E231 missing whitespace >>> after ':' >>> make[1]: *** [Makefile:6784: flake8-check] Error 1 >>> --- >> >> The robot complained about: >> >> "ERROR: Author Numan Siddique <[email protected]> needs to sign off." >> >> And that's because of the sets of "---" above. They confuse "git am". >> With those removed: >> >> Acked-by: Dumitru Ceara <[email protected]> >> >> Unrelated, but we setup python 3.9 for the build-dpdk and build osx >> jobs. Would it make sense to aligned all of them on Python 3.11? > > It makes sense to pin to a specific version of python to prevent the > sort of errors this patch is trying to avoid. I think we should align > all of them on the same version. However, whether we use 3.9 or 3.11 is > not that important IMO since we don't use any features specific to 3.10 > or 3.11. >
I'm ok with any version, we can align on 3.9, that's fine. >> >> Thanks, >> Dumitru >> >>> >>> Python 3.12 and flake8 version used seems to have some issues. > > According to > https://stackoverflow.com/questions/77401175/how-to-make-flake8-ignore-syntax-within-strings > , if we use flake8 6.1.0 or newer, we shouldn't run into this issue. How is > the flake8 version we use determined when running github actions? > I tried changing the requirements to install flake8 >= 6.1.0 and I get: ERROR: Cannot install -r utilities/containers/py-requirements.txt (line 2) and flake8>=6.1.0 because these package versions have conflicting dependencies. The conflict is caused by: The user requested flake8>=6.1.0 hacking 6.0.1 depends on flake8~=5.0.1 ... The user requested flake8>=6.1.0 hacking 3.0.0 depends on flake8<4.0.0 and >=3.6.0 So it looks like hacking is forcing us to use an old version of flake8. On the flake8 PyPi page [0] I see: "hacking is a set of flake8 plugins that test and enforce the OpenStack StyleGuide" Which makes me wonder if we really need installing it.. [0] https://pypi.org/project/hacking/ I guess OVS might like to make sure the Python code it exposes follows generally agreed upon coding styles (and the Python IDL is repackaged by OVS). But OVN doesn't expose any Python. So, should we just stop with installing hacking? E.g.: diff --git a/utilities/containers/py-requirements.txt b/utilities/containers/py-requirements.txt index 0d90765c97..8b9357ff1a 100644 --- a/utilities/containers/py-requirements.txt +++ b/utilities/containers/py-requirements.txt @@ -1,5 +1,4 @@ -flake8 -hacking>=3.0 +flake8>=6.1.0 scapy sphinx setuptools >>> >>> Fallback to Python 3.11 as a temporary fix. >>> Suggested-by: Ilya Maximets <[email protected]> >>> Signed-off-by: Numan Siddique <[email protected]> >>> --- >>> .github/workflows/ovn-fake-multinode-tests.yml | 2 +- >>> 1 file changed, 1 insertion(+), 1 deletion(-) >>> >>> diff --git a/.github/workflows/ovn-fake-multinode-tests.yml >>> b/.github/workflows/ovn-fake-multinode-tests.yml >>> index 9a5cd83a65..aa55a1e3f5 100644 >>> --- a/.github/workflows/ovn-fake-multinode-tests.yml >>> +++ b/.github/workflows/ovn-fake-multinode-tests.yml >>> @@ -158,7 +158,7 @@ jobs: >>> - name: set up python >>> uses: actions/setup-python@v4 >>> with: >>> - python-version: '3.x' >>> + python-version: '3.11' >>> - name: Check out ovn >>> uses: actions/checkout@v3 >> >> _______________________________________________ >> dev mailing list >> [email protected] >> https://mail.openvswitch.org/mailman/listinfo/ovs-dev >> > Regards, Dumitru _______________________________________________ dev mailing list [email protected] https://mail.openvswitch.org/mailman/listinfo/ovs-dev
