Skip to content

Lost distutils.ccompiler.compiler_class in latest release #336

@effigies

Description

@effigies

As of this morning, my tests have begun failing with:

   /home/runner/work/pybids/pybids/.tox/py39-min/lib/python3.9/site-packages/numpy/distutils/__init__.py:24: in <module>
      from . import ccompiler
  _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
  
      import os
      import re
      import sys
      import shlex
      import time
      import subprocess
      from copy import copy
      from distutils import ccompiler
  >   from distutils.ccompiler import (
          compiler_class, gen_lib_options, get_default_compiler, new_compiler,
          CCompiler
      )
  E   ImportError: cannot import name 'compiler_class' from 'distutils.ccompiler' (/home/runner/work/pybids/pybids/.tox/py39-min/lib/python3.9/site-packages/setuptools/_distutils/ccompiler.py)

Note that this import is removed from the latest numpy; this only occurs because I test my declared minimum versions using a lowest-direct resolution. This means that if I say I support numpy >=1.22, then I get numpy 1.22, but if setuptools is an indirect dependency, it is allowed to be the latest. (It's infeasible to use a recursive lowest for long-standing packages, since that will currently find dependencies with no minimum stated version or with sdists that predate requires-python and attempt to install python 2 packages.)

If necessary, I can pin an older version of setuptools in my tox.ini, but if it's possible to re-add this import, it would save doing this across many repositories.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions