diff mbox

[ovs-dev] travis: Fix flake8 failures from flake8 3.0.

Message ID 1469819915-20496-1-git-send-email-russell@ovn.org
State Accepted
Headers show

Commit Message

Russell Bryant July 29, 2016, 7:18 p.m. UTC
The "hacking" plugin for flake8 is not currently compatible with flake8
3.0.  Ensure that we install flake8 2.x on travis-ci.  Also update the
docs to indicate this incompatibility.

Signed-off-by: Russell Bryant <russell@ovn.org>
---
 .travis/linux-prepare.sh |  2 +-
 INSTALL.md               | 12 +++++++-----
 2 files changed, 8 insertions(+), 6 deletions(-)

 - Note: successfully tested in a run on travis-ci.

Comments

Andy Zhou July 29, 2016, 7:30 p.m. UTC | #1
On Fri, Jul 29, 2016 at 12:18 PM, Russell Bryant <russell@ovn.org> wrote:

> The "hacking" plugin for flake8 is not currently compatible with flake8
> 3.0.  Ensure that we install flake8 2.x on travis-ci.  Also update the
> docs to indicate this incompatibility.
>
> Signed-off-by: Russell Bryant <russell@ovn.org>
>
 Acked-by: Andy Zhou <azhou@ovn.org>

>
>  - Note: successfully tested in a run on travis-ci.
>
> Thanks for working on this. It should help the health of travis. I noticed
master has been failing for a while.

>
> _______________________________________________
> dev mailing list
> dev@openvswitch.org
> http://openvswitch.org/mailman/listinfo/dev
>
>
Russell Bryant July 29, 2016, 8:57 p.m. UTC | #2
On Fri, Jul 29, 2016 at 3:30 PM, Andy Zhou <azhou@ovn.org> wrote:

>
>
> On Fri, Jul 29, 2016 at 12:18 PM, Russell Bryant <russell@ovn.org> wrote:
>
>> The "hacking" plugin for flake8 is not currently compatible with flake8
>> 3.0.  Ensure that we install flake8 2.x on travis-ci.  Also update the
>> docs to indicate this incompatibility.
>>
>> Signed-off-by: Russell Bryant <russell@ovn.org>
>>
>  Acked-by: Andy Zhou <azhou@ovn.org>
>
>>
>>  - Note: successfully tested in a run on travis-ci.
>>
>> Thanks for working on this. It should help the health of travis. I
> noticed master has been failing for a while.
>

No problem.  Thanks for Joe for raising it on IRC.  That's how it caught my
attention.

It's not completely clear if the problem is the fault of flake8 or
hacking.  There was an existing bug filed against flake8, and I filed a bug
against hacking.  I'll include these links in the travis config to remember
why we did it.

https://gitlab.com/pycqa/flake8/issues/153

https://bugs.launchpad.net/hacking/+bug/1607942
Russell Bryant July 29, 2016, 9 p.m. UTC | #3
On Fri, Jul 29, 2016 at 4:57 PM, Russell Bryant <russell@ovn.org> wrote:

>
>
> On Fri, Jul 29, 2016 at 3:30 PM, Andy Zhou <azhou@ovn.org> wrote:
>
>>
>>
>> On Fri, Jul 29, 2016 at 12:18 PM, Russell Bryant <russell@ovn.org> wrote:
>>
>>> The "hacking" plugin for flake8 is not currently compatible with flake8
>>> 3.0.  Ensure that we install flake8 2.x on travis-ci.  Also update the
>>> docs to indicate this incompatibility.
>>>
>>> Signed-off-by: Russell Bryant <russell@ovn.org>
>>>
>>  Acked-by: Andy Zhou <azhou@ovn.org>
>>
>>>
>>>  - Note: successfully tested in a run on travis-ci.
>>>
>>> Thanks for working on this. It should help the health of travis. I
>> noticed master has been failing for a while.
>>
>
> No problem.  Thanks for Joe for raising it on IRC.  That's how it caught
> my attention.
>
> It's not completely clear if the problem is the fault of flake8 or
> hacking.  There was an existing bug filed against flake8, and I filed a bug
> against hacking.  I'll include these links in the travis config to remember
> why we did it.
>
> https://gitlab.com/pycqa/flake8/issues/153
>
> https://bugs.launchpad.net/hacking/+bug/1607942
>

I applied this to master.
diff mbox

Patch

diff --git a/.travis/linux-prepare.sh b/.travis/linux-prepare.sh
index f66146b..6570d5a 100755
--- a/.travis/linux-prepare.sh
+++ b/.travis/linux-prepare.sh
@@ -2,4 +2,4 @@ 
 
 git clone git://git.kernel.org/pub/scm/devel/sparse/chrisl/sparse.git
 cd sparse && make && make install && cd ..
-pip install --disable-pip-version-check --user six flake8 hacking
+pip install --disable-pip-version-check --user six "flake8<3.0" hacking
diff --git a/INSTALL.md b/INSTALL.md
index 6fbf9ea..bb40e4a 100644
--- a/INSTALL.md
+++ b/INSTALL.md
@@ -127,11 +127,13 @@  installing the 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 2.X, 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.  Note that there are problems with flake8 3.0 and the
+    “hacking” plugin.  To ensure you get flake8 2.X, you can use
+    “pip install ‘flake8<3.0’”.
 
 Also, you may find the ovs-dev script found in utilities/ovs-dev.py useful.