[all] pep8 job failing due to flake8 3.8.0
Ghanshyam Mann
gmann at ghanshyammann.com
Tue May 12 17:48:24 UTC 2020
---- On Tue, 12 May 2020 12:18:09 -0500 Ghanshyam Mann <gmann at ghanshyammann.com> wrote ----
> ---- On Tue, 12 May 2020 11:25:14 -0500 Sean McGinnis <sean.mcginnis at gmx.com> wrote ----
> > On 5/12/20 11:14 AM, Ghanshyam Mann wrote:
> > > Hello Everyone.
> > >
> > > You might have noticed that few or most of the projects pep8 job started failing.
> > >
> > > That is because flake8 new version 3.8.0 added the new pycodestyle with new rules. Hacking capped
> > > it with 4.0.0 version not with the minor version for 3.*.
> > >
> > > The new hacking version 3.0.1 is released which cap the flake8<3.8.0. Thanks to dtantsur and stephenfin for
> > > tacking care of it.
> > >
> > > To fix your pep8 job you can,
> > >
> > > - Either fix the pep8 error in code if easy and fast to fix.
> > >
> > > - Or bump the hacking minimum version to 3.0.1. I have proposed it for a few projects failing pep8.
> > > - https://review.opendev.org/#/q/topic:hacking-fix+(status:open+OR+status:merged)
> > >
> > > If pep8 job is passing then you do not need to do anything. The existing hacking version cap will work fine.
> > >
> > > -gmann
> >
> > 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/
>
> It will only fail stable/ussuri not older stable as hacking flake8 cap issue is released
> in hacking 2.0 which is in ussuri. So all other stable branches will be using hacking <1.20 which does not
> have this issue.
>
> having flake8 in project test-requirement also need more maintainance to keep both place (hacking as well as project's
> test-requirements) in sync otherwise it can break anytime.
> example: https://review.opendev.org/#/c/727206/
Or even stable/ussuri for many projects has older hacking so we are safe there. i checked neutron, keystone at least.
- https://github.com/openstack/neutron/blob/86b57718966dc2165b4cfb54bcae21b515ffe68f/test-requirements.txt#L4
So we can backport the hacking min version to only projects have hacking >2.0 cap in stable/ussuri. All older stable branch are
safe until projects explicitly having flake8 (in ironic case) or pycodestyle (in neutron case).
-gmann
>
> -gmann
>
>
>
> >
> >
> >
>
>
More information about the openstack-discuss
mailing list