← All tasks
pythonpypa/setuptools #3693Not a task: not reproduced

[BUG] release v65.6.0 breaks packages downstream due to removal of `distutils.log.Log`

envgap__pypa__setuptools-3693

Original GitHub issue ↗Opened 2022-11-19

01 / FAILURE SIGNATURE

As reported upstream

error: subprocess-exited-with-error
Not a benchmark task.
  • No curated issue-specific recipe or verified environment fix is available.

02 / ENVIRONMENT RECIPE

Base commit
Not freshly verified
Manifest
requirements.txt
Reproduce
Awaiting issue-specific recipe
Run under trace
Awaiting a meaningful runtime command

03 / ORIGINAL ISSUE TEXT

pypa/setuptools #3693 · read the original issue
### setuptools version

65.6.0

### Python version

Python 3.10

### OS

Ubuntu

### Additional environment information

_No response_

### Description

The `distutils.log.Log` class was removed in https://github.com/pypa/setuptools/commit/74652cabdeaacadc76ccf126563bed8ee2ccf3ef. This causes popular packages downstream, such as `numpy`, to fail: see https://github.com/numpy/numpy/issues/22623

### Expected behavior

The module `distutils.log` module was not officially marked as deprecated even though https://github.com/pypa/setuptools/commit/74652cabdeaacadc76ccf126563bed8ee2ccf3ef added to the docstring that the module is `Retained for compatibility and should not be used.`. It would be great if the removed class could be reinstated and a deprecation pathway be provided.

### How to Reproduce

1. `pip install setuptools==65.6.0`

2. `from numpy.distutils import Log`

### Output

```

In [4]: from numpy.distutils import Log

---------------------------------------------------------------------------

ImportError                               Traceback (most recent call last)

<ipython-input-4-f8e71815afcd> in <module>

----> 1 from numpy.distutils import Log



~/.virtualenvs/aiida_dev/lib/python3.9/site-packages/numpy/distutils/__init__.py in <module>

     22 # Must import local ccompiler ASAP in order to get

     23 # customized CCompiler.spawn effective.

---> 24 from . import ccompiler

     25 from . import unixccompiler

     26 



~/.virtualenvs/aiida_dev/lib/python3.9/site-packages/numpy/distutils/ccompiler.py in <module>

     18 from distutils.version import LooseVersion

     19 

---> 20 from numpy.distutils import log

     21 from numpy.distutils.exec_command import (

     22     filepath_from_subprocess_output, forward_bytes_to_stdout



~/.virtualenvs/aiida_dev/lib/python3.9/site-packages/numpy/distutils/log.py in <module>

      2 import sys

      3 from distutils.log import *  # noqa: F403

----> 4 from distutils.log import Log as old_Log

      5 from distutils.log import _global_log

      6 



ImportError: cannot import name 'Log' from 'distutils.log' (/home/sph/.virtualenvs/aiida_dev/lib/python3.9/site-packages/setuptools/_distutils/log.py)

```
Continue on GitHub ↗

04 / LABELS

Labels from the report text only; not yet run

security
Label rules and the text that matched
[
  {
    "category": "security",
    "rule": "issue.security_keyword",
    "source": "issue_body",
    "excerpt": "on\n\n_No response_\n\n### Description\n\nThe `distutils.log.Log` class was removed in https://github.com/pypa/setuptools/commit/74652cabdeaacadc76ccf126563bed8ee2ccf3ef. This causes "
  }
]

Issue-specific recipe and runtime smoke command require review against the complete issue and repository.

Legacy reproduction is generic install-only; match the actual issue failure before admission.