hacking not compatible with flake8 3.0.x

Bug #1607942 reported by Russell Bryant
32
This bug affects 7 people
Affects Status Importance Assigned to Milestone
hacking
New
Undecided
Unassigned

Bug Description

I use flake8+hacking with a project outside of OpenStack and it just started failing. It appears to be an incompatibility between flake8 3.0.x and hacking. The error goes away after I remove hacking. Things also work if I install flake8<3.0.

I see that the issue has been reported against flake8, as well. https://gitlab.com/pycqa/flake8/issues/153

The error I get is:

Traceback (most recent call last):
  File "/usr/lib64/python2.7/multiprocessing/process.py", line 258, in _bootstrap
    self.run()
  File "/usr/lib64/python2.7/multiprocessing/process.py", line 114, in run
    self._target(*self._args, **self._kwargs)
  File "/usr/lib/python2.7/site-packages/flake8/checker.py", line 222, in _run_checks_from_queue
    checker.run_checks(self.results_queue, self.statistics_queue)
  File "/usr/lib/python2.7/site-packages/flake8/checker.py", line 558, in run_checks
    self.process_tokens()
  File "/usr/lib/python2.7/site-packages/flake8/checker.py", line 542, in process_tokens
    self.handle_newline(token_type)
  File "/usr/lib/python2.7/site-packages/flake8/checker.py", line 592, in handle_newline
    self.run_logical_checks()
  File "/usr/lib/python2.7/site-packages/flake8/checker.py", line 494, in run_logical_checks
    results = self.run_check(plugin, logical_line=logical_line) or ()
  File "/usr/lib/python2.7/site-packages/flake8/checker.py", line 447, in run_check
    self.processor.keyword_arguments_for(plugin.parameters, arguments)
  File "/usr/lib/python2.7/site-packages/flake8/processor.py", line 213, in keyword_arguments_for
    arguments[param] = getattr(self, param)
AttributeError: 'FileProcessor' object has no attribute 'physical_line'

Revision history for this message
Scott Moser (smoser) wrote :

Well, it seems to work now without stack tracing with current flake8 (3.3.0) in that running flake8 will report hacking problems (such as H304). However, hacking still , but hacking 0.13.0 still explicitly states dependencies on flake8, pyflakes and mccabe at older versions:

  flake8<2.6.0,>=2.5.4
  pyflakes==0.8.1
  mccabe==0.2.1

Revision history for this message
Paras Babbar (pbabbar) wrote :

Are we still seeing this problem? or does this path https://review.opendev.org/#/c/335965/ fixes the issue? If yes then we can close this bug.

Thanks

Paras

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.