4758: Celery fails to start ReviewBot if flake8 is installed with Python 3

fschlager

What version of Review Board are you running?

3.0.8

What version of Review Bot are you running?

1.0.1.1

What tool(s) is Review Bot running?

flake8

What steps will reproduce the problem?

  1. Install reviewbot using Python 2.7
  2. Uninstall flake8
  3. Install flake8 using pip3 (python3)
  4. Try to start reviewbot through celery

What is the expected output? What do you see instead?

I expect ReviewBot to start without issues. Instead, it fails with pkg_resources.DistributionNotFound: The 'flake8>=3.3.0' distribution was not found and is required by the application.

To fix it, you can edit reviewbot_worker-1.0.1.1.dist-info/METADATA and remove the dependency on flake8, e.g. this line: Requires-Dist: flake8 (>=3.3.0).

I don't quite understand why this dependency exists in the first place, as flake8 is run as a process, and not imported and called directly from Python. We need to install flake8 using pip3 as we need to it verify Python3 code.

david
#1 david

We're going to be making these optional dependencies in the next major release of Review Bot. This is now fixed in git and will ship in Review Bot 2.0. Thanks!

  • -New
    +Fixed