Skip to content

CI: Get rid of some warnings #48628

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 1 commit into from
Sep 19, 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
6 changes: 4 additions & 2 deletions pandas/core/dtypes/cast.py
Original file line number Diff line number Diff line change
Expand Up @@ -1841,8 +1841,10 @@ def maybe_cast_to_integer_array(
f"casted to the dtype {dtype}"
) from err

if np.array_equal(arr, casted):
return casted
with warnings.catch_warnings():
warnings.filterwarnings("ignore")
if np.array_equal(arr, casted):
return casted

# We do this casting to allow for proper
# data and dtype checking.
Expand Down
6 changes: 5 additions & 1 deletion pandas/tests/frame/methods/test_combine_first.py
Original file line number Diff line number Diff line change
Expand Up @@ -400,7 +400,11 @@ def test_combine_first_string_dtype_only_na(self, nullable_string_dtype):
pa_version_under7p0 and nullable_string_dtype == "string[pyarrow]",
):
df2.set_index(["a", "b"], inplace=True)
result = df.combine_first(df2)
with tm.maybe_produces_warning(
PerformanceWarning,
pa_version_under7p0 and nullable_string_dtype == "string[pyarrow]",
):
result = df.combine_first(df2)
with tm.maybe_produces_warning(
PerformanceWarning,
pa_version_under7p0 and nullable_string_dtype == "string[pyarrow]",
Expand Down