[all] pep8 job failing due to flake8 3.8.0

Brian Haley haleyb.dev at gmail.com
Tue May 12 18:07:43 UTC 2020


On 5/12/20 1:23 PM, Ghanshyam Mann wrote:
<snip>

>   > > This is also failing on some stable branches that had not moved to
>   > > hacking 3.0 yet. In this case, it may be better to add a flake8 cap to
>   > > the repo's test-requirements.txt file rather than backporting a major
>   > > bump in hacking and dealing with the need to make a lot of code changes.
>   > >
>   > > Here is an example of that approach:
>   > >
>   > > https://review.opendev.org/#/c/727265/
>   >
>   > I found in the neutron stable/ussuri repo that capping flake8<3.8.0
>   > didn't work, but capping pycodestyle did.  So that's another option.
>   >
>   > -pycodestyle>=2.0.0 # MIT
>   > +pycodestyle>=2.0.0,<2.6.0 # MIT
>   >
>   > https://review.opendev.org/#/c/727274/
> 
> I will say remove rhe pycodestyle from neutron test-reqruiement and let hacking
> via flake8 cap handle the compatible pycodestyle. Otherwise we end up maintaining and
> fixing it project side for future.

So the problem in this case was having both of these in 
test-requirements.txt:

flake8>=3.6.0,<3.8.0 # MIT
pycodestyle>=2.0.0 # MIT

Test versions were:

flake8==3.7.9
pycodestyle==2.6.0

Removing the pycodestyle line altogether worked however, it pulled 
pycodestye 3.5.0 then.

-Brian



More information about the openstack-discuss mailing list