You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Bypass PyPy-specific check_home DeprecationWarning from stdlib distutils - #5251
On PyPy with SETUPTOOLS_USE_DISTUTILS=stdlib, 50+ tests fail because PyPy's own stdlib distutils.command.install.finalize_options() calls sysconfig.is_python_build(True), and PyPy's sysconfig has deprecated the check_home positional argument — raising DeprecationWarning: check_home argument is deprecated and ignored. Since pytest.ini treats unfiltered warnings as errors, this kills the entire test run.
CPython's sysconfig.is_python_build() still accepts check_home silently; the deprecation is PyPy-specific. The warning originates inside PyPy's own stdlib code, so it cannot be fixed at the setuptools level.
Changes
pytest.ini: Added ignore:check_home argument is deprecated and ignored. filterwarnings entry, consistent with how other PyPy/stdlib-specific warnings are already handled (e.g. ignore:Distutils was imported before setuptools)
@copilot Remove the build artifacts. Remember, when working with a jaraco/skeleton-based project, you must first incorporate the shared ignored files in the local checkout (https://github.com/jaraco/s...
Done. Populated .git/info/exclude from jaraco/dotfiles .gitignore_global and removed all the accidentally committed build artifacts (.coverage, setuptools.egg-info/, __pycache__/, and .pyc files) in ebb58bc.
@copilot Maybe we should consider just removing stdlib distutils for PyPy. Yeah, probably, since Python 3.12 removes it completely. The real value of having PyPy here is to test the implementation and not its distutils.
@copilot Maybe we should consider just removing stdlib distutils for PyPy. Yeah, probably, since Python 3.12 removes it completely. The real value of having PyPy here is to test the implementation a...
Done in the latest commit — removed distutils: stdlib from the PyPy CI matrix entry (PyPy will now use local/setuptools distutils) and reverted the pytest.ini workaround that was added to handle the PyPy+stdlib case.
jaraco
changed the title
Suppress PyPy-specific check_home DeprecationWarning from stdlib distutils in pytest
Bypass PyPy-specific check_home DeprecationWarning from stdlib distutils
Jul 4, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary of changes
On PyPy with
SETUPTOOLS_USE_DISTUTILS=stdlib, 50+ tests fail because PyPy's own stdlibdistutils.command.install.finalize_options()callssysconfig.is_python_build(True), and PyPy'ssysconfighas deprecated thecheck_homepositional argument — raisingDeprecationWarning: check_home argument is deprecated and ignored.Sincepytest.initreats unfiltered warnings as errors, this kills the entire test run.CPython's
sysconfig.is_python_build()still acceptscheck_homesilently; the deprecation is PyPy-specific. The warning originates inside PyPy's own stdlib code, so it cannot be fixed at the setuptools level.Changes
pytest.ini: Addedignore:check_home argument is deprecated and ignored.filterwarnings entry, consistent with how other PyPy/stdlib-specific warnings are already handled (e.g.ignore:Distutils was imported before setuptools)Pull Request Checklist
newsfragments/.(See documentation for details)