Skip to content

CI: Fail Numpy Dev build on DeprecationWarnings from numpy only #46767

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 3 commits into from
Apr 14, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions .github/workflows/posix.yml
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ jobs:
env_file: actions-310-numpydev.yaml
pattern: "not slow and not network and not single_cpu"
pandas_testing_mode: "deprecate"
test_args: "-W error"
test_args: "-W error::DeprecationWarning:numpy"
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

will this still catch FutureWarnings that we issue?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nope, only the DeprecationWarnings from numpy. Do we want to fail the build on our FutureWarnings?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

its possible we want to (but not this PR)

fail-fast: false
name: ${{ matrix.name || format('{0} pyarrow={1} {2}', matrix.env_file, matrix.pyarrow_version, matrix.pattern) }}
env:
Expand Down Expand Up @@ -174,7 +174,7 @@ jobs:
if: always()

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

- name: Publish test results
uses: actions/upload-artifact@v3
Expand Down
9 changes: 9 additions & 0 deletions pandas/tests/util/test_show_versions.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,13 +4,22 @@

import pytest

from pandas.compat import is_numpy_dev
from pandas.util._print_versions import (
_get_dependency_info,
_get_sys_info,
)

import pandas as pd

# This is failing on the Numpy Dev build,
# but the error may just be from distutils?
pytestmark = pytest.mark.xfail(
is_numpy_dev,
reason="_distutils not in python3.10/distutils/core.py",
raises=AssertionError,
)


@pytest.mark.filterwarnings(
# openpyxl
Expand Down