Opened on 02/13/2017 at 01:01:17 PM

Closed on 02/13/2017 at 02:45:50 PM

#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):

https://codereview.adblockplus.org/29375621/

Description

How to reproduce

cd codingtools/flake8-eyeo
tox

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 "setup.py", line 130, in <module>
    cmdclass={'test': TestCommand}
  File "/usr/lib/python2.7/distutils/core.py", line 151, in setup
    dist.run_commands()
  File "/usr/lib/python2.7/distutils/dist.py", line 953, in run_commands
    self.run_command(cmd)
  File "/usr/lib/python2.7/distutils/dist.py", line 972, in run_command
    cmd_obj.run()
  File "setup.py", line 96, in run
    reported = self._get_reported_errors(filename, style_guide)
  File "setup.py", line 64, in _get_reported_errors
    style_guide.check_files([filename])
  File "/home/sebastian/src/codingtools/flake8-eyeo/.tox/py27-flake83/local/lib/python2.7/site-packages/flake8/api/legacy.py", line 95, in check_files
    self._application.run_checks(paths)
  File "/home/sebastian/src/codingtools/flake8-eyeo/.tox/py27-flake83/local/lib/python2.7/site-packages/flake8/main/application.py", line 246, in run_checks
    self.file_checker_manager.run()
  File "/home/sebastian/src/codingtools/flake8-eyeo/.tox/py27-flake83/local/lib/python2.7/site-packages/flake8/checker.py", line 317, in run
    self.run_parallel()
  File "/home/sebastian/src/codingtools/flake8-eyeo/.tox/py27-flake83/local/lib/python2.7/site-packages/flake8/checker.py", 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 setup.py 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.

Attachments (0)

Change History (3)

comment:1 Changed on 02/13/2017 at 01:06:14 PM by sebastian

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

comment:2 Changed on 02/13/2017 at 02:32:52 PM by abpbot

comment:3 Changed on 02/13/2017 at 02:45:50 PM by sebastian

  • Resolution set to fixed
  • Status changed from reviewing to closed

Add Comment

Modify Ticket

Change Properties
Action
as closed .
The resolution will be deleted. Next status will be 'reopened'.
to The owner will be changed from sebastian.
 
Note: See TracTickets for help on using tickets.