Skip to content

Commit 65fab2f

Browse files
committed
Suppress 'Distutils was imported before Setuptools' warning on PyPy due to #2868.
1 parent 4f3c3a1 commit 65fab2f

File tree

1 file changed

+13
-0
lines changed

1 file changed

+13
-0
lines changed

conftest.py

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -36,3 +36,16 @@ def pytest_addoption(parser):
3636
'ignore',
3737
'The distutils.sysconfig module is deprecated, use sysconfig instead',
3838
)
39+
40+
41+
is_pypy = '__pypy__' in sys.builtin_module_names
42+
if is_pypy:
43+
# Workaround for pypa/setuptools#2868
44+
warnings.filterwarnings(
45+
'ignore',
46+
'Distutils was imported before setuptools',
47+
)
48+
warnings.filterwarnings(
49+
'ignore',
50+
'Setuptools is replacing distutils',
51+
)

0 commit comments

Comments
 (0)