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
Now, on Python 3.11 and earlier, tests are failing.
On pytest 8.2, test collection fails:
_________________________________________________ ERROR collecting distutils/cygwinccompiler.py __________________________________________________
ImportError while importing test module '/Users/jaraco/code/pypa/distutils/distutils/cygwinccompiler.py'.
Hint: make sure your test modules/packages have valid Python names.
Traceback:
distutils/cygwinccompiler.py:27: in <module>
from .version import LooseVersion, suppress_known_deprecation
E ImportError: cannot import name 'suppress_known_deprecation' from 'distutils.version' (/opt/homebrew/Cellar/[email protected]/3.11.9/Frameworks/Python.framework/Versions/3.11/lib/python3.11/distutils/version.py)
____________________________________________ ERROR collecting distutils/tests/test_cygwinccompiler.py ____________________________________________
ImportError while importing test module '/Users/jaraco/code/pypa/distutils/distutils/tests/test_cygwinccompiler.py'.
Hint: make sure your test modules/packages have valid Python names.
Traceback:
distutils/tests/test_cygwinccompiler.py:6: in <module>
from distutils.cygwinccompiler import (
E ImportError: cannot import name 'CONFIG_H_NOTOK' from 'distutils.cygwinccompiler' (/Users/jaraco/code/pypa/distutils/distutils/cygwinccompiler.py)
_____________________________________________ ERROR collecting distutils/tests/test_unixccompiler.py _____________________________________________
ImportError while importing test module '/Users/jaraco/code/pypa/distutils/distutils/tests/test_unixccompiler.py'.
Hint: make sure your test modules/packages have valid Python names.
Traceback:
distutils/tests/test_unixccompiler.py:10: in <module>
from distutils.util import _clear_cached_macosx_ver
E ImportError: cannot import name '_clear_cached_macosx_ver' from 'distutils.util' (/opt/homebrew/Cellar/[email protected]/3.11.9/Frameworks/Python.framework/Versions/3.11/lib/python3.11/distutils/util.py)
Additionally, a warning is emitted about importing distutils from stdlib:
<frozen importlib.util>:95
<frozen importlib.util>:95: DeprecationWarning: The distutils package is deprecated and slated for removal in Python 3.12. Use setuptools or check PEP 632 for potential alternatives
../../../../../opt/homebrew/Cellar/[email protected]/3.11.9/Frameworks/Python.framework/Versions/3.11/lib/python3.11/distutils/util.py:92
/opt/homebrew/Cellar/[email protected]/3.11.9/Frameworks/Python.framework/Versions/3.11/lib/python3.11/distutils/util.py:92: DeprecationWarning: The distutils.sysconfig module is deprecated, use sysconfig instead
import _osx_support, distutils.sysconfig
-- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html
Pinning to pytest 8.1, the collection succeeds, but the tests fail when they end up importing distutils from the stdlib. For example:
Two months ago, on pytest 8.0.2, tests were passing.
Now, on Python 3.11 and earlier, tests are failing.
On pytest 8.2, test collection fails:
Additionally, a warning is emitted about importing distutils from stdlib:
Pinning to pytest 8.1, the collection succeeds, but the tests fail when they end up importing distutils from the stdlib. For example:
Pinning to
pytest<8.1
allows the tests to pass again.The text was updated successfully, but these errors were encountered: