Skip to content

CI: test (pypy3.11, ubuntu-latest, stdlib) fails because PyPy's bundled distutils calls sysconfig.is_python_build(True) #5327

Description

@jaraco

The test (pypy3.11, ubuntu-latest, stdlib) matrix job has been failing on main for some time — 53 failures plus 3 errors in a recent run, spread across test_build_meta.py, test_install_scripts.py, test_editable_install.py, test_bdist_wheel.py and test_config_discovery.py. Every one of them is the same warning-turned-error:

E           DeprecationWarning: check_home argument is deprecated and ignored.
/opt/hostedtoolcache/PyPy/3.11.15/x64/lib/pypy3.11/sysconfig.py:230: DeprecationWarning

Cause

It is not setuptools' call. PyPy 3.11.15 ships a bundled distutils that is inconsistent with its own sysconfig:

lib/pypy3.11/distutils/command/install.py:339: in finalize_options
    if sysconfig.is_python_build(True):

lib/pypy3.11/sysconfig.py:230: in is_python_build
    warnings.warn("check_home argument is deprecated and ignored.",
                  DeprecationWarning, stacklevel=2)

is_python_build deprecated its check_home argument, but the distutils shipped alongside it still passes it positionally. setuptools/command/install.py:74 calls super().finalize_options(), which lands in that code, and pytest.ini sets filterwarnings = error, so the warning fails the test.

Nothing in setuptools passes check_home — grep -rn check_home setuptools/ is empty. The job only fails in the distutils: stdlib configuration, i.e. SETUPTOOLS_USE_DISTUTILS=stdlib, where PyPy's copy is used instead of the vendored one. The other stdlib job in the matrix, 3.10 / ubuntu-latest, is unaffected.

Options

  1. Report upstream to PyPy — this looks like a genuine bug in their bundled distutils, and the real fix belongs there.
  2. Add a targeted ignore::DeprecationWarning filter in pytest.ini scoped to this message, so the job tests setuptools rather than PyPy's stdlib.
  3. Drop the pypy3.11 + stdlib combination. distutils is gone from CPython 3.12+, so the stdlib variant is legacy coverage; it may no longer be worth a matrix slot on PyPy specifically.

I have no strong opinion between 2 and 3, but the job is currently red on every PR, which makes it hard to tell a real regression from the standing failure — that is the part worth fixing either way.

Noticed while working on #5325, whose CI it obscured.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

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