Skip to content

Commit d1717e9

Browse files
Backport PR #46767: CI: Fail Numpy Dev build on DeprecationWarnings from numpy only (#46773)
Co-authored-by: Matthew Roeschke <[email protected]>
1 parent 2886388 commit d1717e9

File tree

2 files changed

+11
-2
lines changed

2 files changed

+11
-2
lines changed

.github/workflows/posix.yml

+2-2
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,7 @@ jobs:
6161
env_file: actions-310-numpydev.yaml
6262
pattern: "not slow and not network and not single_cpu"
6363
pandas_testing_mode: "deprecate"
64-
test_args: "-W error"
64+
test_args: "-W error::DeprecationWarning:numpy"
6565
fail-fast: false
6666
name: ${{ matrix.name || format('{0} pyarrow={1} {2}', matrix.env_file, matrix.pyarrow_version, matrix.pattern) }}
6767
env:
@@ -174,7 +174,7 @@ jobs:
174174
if: always()
175175

176176
- name: Build Version
177-
run: pushd /tmp && python -c "import pandas; pandas.show_versions();" && popd
177+
run: conda list
178178

179179
- name: Publish test results
180180
uses: actions/upload-artifact@v3

pandas/tests/util/test_show_versions.py

+9
Original file line numberDiff line numberDiff line change
@@ -4,13 +4,22 @@
44

55
import pytest
66

7+
from pandas.compat import is_numpy_dev
78
from pandas.util._print_versions import (
89
_get_dependency_info,
910
_get_sys_info,
1011
)
1112

1213
import pandas as pd
1314

15+
# This is failing on the Numpy Dev build,
16+
# but the error may just be from distutils?
17+
pytestmark = pytest.mark.xfail(
18+
is_numpy_dev,
19+
reason="_distutils not in python3.10/distutils/core.py",
20+
raises=AssertionError,
21+
)
22+
1423

1524
@pytest.mark.filterwarnings(
1625
# openpyxl

0 commit comments

Comments
 (0)