← All tasks
pythoncoveragepy/coveragepy #1820Not a task: already works

Setup.py attempts to import obsolete 'distutils'

envgap__coveragepy__coveragepy-1820

01 / FAILURE SIGNATURE

As reported upstream

No identifying execution failure has been captured.
Not a benchmark task.
  • The project already builds and runs before the fix, so there is nothing to repair.

02 / ENVIRONMENT RECIPE

Base commit
9d0eb0237359978b3a650f9da444e7f3ae7233e2
Manifest
setup.py
Reproduce
Awaiting issue-specific recipe
Run under trace
Awaiting a meaningful runtime command

03 / ORIGINAL ISSUE TEXT

coveragepy/coveragepy #1820 · read the original issue
The Python 'distutils' library has been [deprecated for a long time](https://peps.python.org/pep-0632/), is [prominently documented as obsolescent](https://docs.python.org/3.11/distutils/index.html), and [as of Python 3.12, the 'distutils' import is no longer available](https://docs.python.org/3/whatsnew/3.12.html#distutils).



> Note

> The entire distutils package has been deprecated and will be removed in Python 3.12. This documentation is retained as a reference only, and will be removed with the package. See the [What’s New](https://docs.python.org/3.11/whatsnew/3.10.html#distutils-deprecated) entry for more information.



The Coverage.py `setup.py` program still imports from `distutils`; this relies on a temporary magic work-around in the `setuptools` library.



The `setup.py` should be improved to no longer attempt to import `distutils` at all.

Continue on GitHub ↗

04 / LABELS

Labels from the report text only; not yet run

No supported category has been assigned.

Label rules and the text that matched
[]