Opened 3 years ago

Closed 3 years ago

#4884 closed defect (fixed)

flake8-eyeo (formerly flake8-abp) tests are failing with flake8 3.3.0

Reported by: sebastian Assignee: sebastian
Priority: P3 Milestone:
Module: Sitescripts Keywords:
Cc: kvas, jsonesen Blocked By:
Blocking: Platform: Unknown / Cross platform
Ready: yes Confidential: no
Tester: Unknown Verified working: no
Review URL(s):


How to reproduce

cd codingtools/flake8-eyeo

Observed behaviour

For all environments that use the the latest flake8 (i.e. 3.3.0) you get following exception:

Traceback (most recent call last):
  File "", line 130, in <module>
    cmdclass={'test': TestCommand}
  File "/usr/lib/python2.7/distutils/", line 151, in setup
  File "/usr/lib/python2.7/distutils/", line 953, in run_commands
  File "/usr/lib/python2.7/distutils/", line 972, in run_command
  File "", line 96, in run
    reported = self._get_reported_errors(filename, style_guide)
  File "", line 64, in _get_reported_errors
  File "/home/sebastian/src/codingtools/flake8-eyeo/.tox/py27-flake83/local/lib/python2.7/site-packages/flake8/api/", line 95, in check_files
  File "/home/sebastian/src/codingtools/flake8-eyeo/.tox/py27-flake83/local/lib/python2.7/site-packages/flake8/main/", line 246, in run_checks
  File "/home/sebastian/src/codingtools/flake8-eyeo/.tox/py27-flake83/local/lib/python2.7/site-packages/flake8/", line 317, in run
  File "/home/sebastian/src/codingtools/flake8-eyeo/.tox/py27-flake83/local/lib/python2.7/site-packages/flake8/", line 278, in run_parallel
    pool_map = self.pool.imap_unordered(
AttributeError: 'NoneType' object has no attribute 'imap_unordered'
ERROR: InvocationError: '/home/sebastian/src/codingtools/flake8-eyeo/.tox/py27-flake83/bin/python test'

This seems to be related to a change in flake8 3.3.0. The tests for flake8==2.* pass. The tests pass as well when you pin flake8==3.2.1 in tox.ini.

The problem seems to be only with the way flake8 is integrated in the tests for flake8-eyeo. So I don't expect any compatiblity issues with other projects where we use flake8-eyeo.

Expected behaviour

The tests should pass with the flake8 3.3.0. It seems the best approach is to not use flake8's API (which is deprecated anyway) and use flake8's command line interface instead, through the subprocess module.

Change History (3)

comment:1 Changed 3 years ago by sebastian

  • Review URL(s) modified (diff)
  • Status changed from new to reviewing

comment:2 Changed 3 years ago by abpbot

comment:3 Changed 3 years ago by sebastian

  • Resolution set to fixed
  • Status changed from reviewing to closed
Note: See TracTickets for help on using tickets.