[all] pep8 job failing due to flake8 3.8.0
Ghanshyam Mann
gmann at ghanshyammann.com
Tue May 12 17:41:28 UTC 2020
---- On Tue, 12 May 2020 12:20:19 -0500 Sean Mooney <smooney at redhat.com> wrote ----
> On Tue, 2020-05-12 at 13:00 -0400, Brian Haley wrote:
> > On 5/12/20 12:25 PM, Sean McGinnis 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/
> >
> > 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
> ya i created a test env on ubuntu 20.04 with python 3.8 and i had the issue and then
> if i downgraded flake8 to even 3.5.0
>
> if i do
> /opt/repos/nova$ .tox/venv/bin/pip install -U pycodestyle\<2.6 flake8\<3.8
> and then run pep8 in nova it still fails not resovle the issue
>
> ubuntu at devstack-ubuntu-latest:/opt/repos/nova$ .tox/venv/bin/pip freeze | grep -E "flake8|pycodestyle"
> flake8==3.7.9
> pycodestyle==2.5.0
>
> and i went older too
> ubuntu at devstack-ubuntu-latest:/opt/repos/nova$ .tox/venv/bin/pip freeze | grep -E "flake8|pycodestyle"
> flake8==3.6.0
> pycodestyle==2.4.0
>
> on ubuntu 20.04 under python 3.8 all of the above fail with the same errors for nova.
>
> so there is something more going on then just flake8 and pycodestyle i think.
This might be something else.
hacking 3.0.1 will pull the flake8 2.7.9 and pycodestyle 2.5.0 [1]
that is what I see in python-novaclient changes
- https://zuul.opendev.org/t/openstack/build/c9c3ed3010d64af685ce8aecc699864c/log/job-output.txt#538
[1]
- https://gitlab.com/pycqa/flake8/-/blob/ee2920d775df18481d638c2da084d229d56f95b9/setup.cfg#L17
>
> >
> > https://review.opendev.org/#/c/727274/
> >
> > -Brian
> >
>
>
>
More information about the openstack-discuss
mailing list