Skip to content

admin-tests failing with Setuptools 58.0.2 #6091

@cfm

Description

@cfm

Description

admin-tests fails on coverage 4.4.2:

Collecting coverage==4.4.2
  Using cached coverage-4.4.2.tar.gz (374 kB)
    ERROR: Command errored out with exit status 1:
     command: /opt/admin/.tox/py3/bin/python3 -c 'import io, os, sys, setuptools, tokenize; sys.argv[0] = '"'"'/tmp/pip-install-_rkd31hn/coverage_845758de132444beb3b5decce5a5fef8/setup.py'"'"'; __file__='"'"'/tmp/pip-install-_rkd31hn/coverage_845758de132444beb3b5decce5a5fef8/setup.py'"'"';f = getattr(tokenize, '"'"'open'"'"', open)(__file__) if os.path.exists(__file__) else io.StringIO('"'"'from setuptools import setup; setup()'"'"');code = f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' egg_info --egg-base /tmp/pip-pip-egg-info-gy9kcads
         cwd: /tmp/pip-install-_rkd31hn/coverage_845758de132444beb3b5decce5a5fef8/
    Complete output (1 lines):
    error in coverage setup command: use_2to3 is invalid.

setuptools point (!) release 58.0.2 includes pypa/setuptools#2770, which does indeed "fail[] fast" when setup() is passed use_2to3, even in the form of setup(use_2to3=False):

https://github.com/nedbat/coveragepy/blob/4e721ad7877c4c037c93631e9411c38ad9439d89/setup.py#L189-L192

Steps to Reproduce

https://app.circleci.com/pipelines/github/freedomofpress/securedrop/2928/workflows/40bec789-34fc-4b7f-9f8a-9fe58f56a4b4/jobs/56476

Expected Behavior

Tests pass.

Actual Behavior

Tests fail with the error above.

Comments

It appears it may be necessary to upgrade as far as coverage 5.0 for the fix in coveragepy/coveragepy#724.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions