Skip to content

Commit 8f8b514

Browse files
Backport PR pandas-dev#56615 on branch 2.2.x (CI: Fix deprecation warnings) (pandas-dev#56620)
Backport PR pandas-dev#56615: CI: Fix deprecation warnings Co-authored-by: Patrick Hoefler <[email protected]>
1 parent b59e594 commit 8f8b514

File tree

3 files changed

+5
-6
lines changed

3 files changed

+5
-6
lines changed

pandas/tests/io/parser/common/test_chunksize.py

+3-2
Original file line numberDiff line numberDiff line change
@@ -223,7 +223,7 @@ def test_chunks_have_consistent_numerical_type(all_parsers, monkeypatch):
223223
warn = None
224224
if parser.engine == "pyarrow":
225225
warn = DeprecationWarning
226-
depr_msg = "Passing a BlockManager to DataFrame"
226+
depr_msg = "Passing a BlockManager to DataFrame|make_block is deprecated"
227227
with tm.assert_produces_warning(warn, match=depr_msg, check_stacklevel=False):
228228
with monkeypatch.context() as m:
229229
m.setattr(libparsers, "DEFAULT_BUFFER_HEURISTIC", heuristic)
@@ -254,7 +254,8 @@ def test_warn_if_chunks_have_mismatched_type(all_parsers):
254254
if parser.engine == "pyarrow":
255255
df = parser.read_csv_check_warnings(
256256
DeprecationWarning,
257-
"Passing a BlockManager to DataFrame is deprecated",
257+
"Passing a BlockManager to DataFrame is deprecated|"
258+
"make_block is deprecated",
258259
buf,
259260
check_stacklevel=False,
260261
)

pandas/tests/io/parser/common/test_read_errors.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -171,7 +171,7 @@ def test_suppress_error_output(all_parsers):
171171
warn = None
172172
if parser.engine == "pyarrow":
173173
warn = DeprecationWarning
174-
msg = "Passing a BlockManager to DataFrame"
174+
msg = "Passing a BlockManager to DataFrame|make_block is deprecated"
175175

176176
with tm.assert_produces_warning(warn, match=msg, check_stacklevel=False):
177177
result = parser.read_csv(StringIO(data), on_bad_lines="skip")

pandas/tests/io/test_parquet.py

+1-3
Original file line numberDiff line numberDiff line change
@@ -1000,9 +1000,7 @@ def test_filter_row_groups(self, pa):
10001000
df = pd.DataFrame({"a": list(range(3))})
10011001
with tm.ensure_clean() as path:
10021002
df.to_parquet(path, engine=pa)
1003-
result = read_parquet(
1004-
path, pa, filters=[("a", "==", 0)], use_legacy_dataset=False
1005-
)
1003+
result = read_parquet(path, pa, filters=[("a", "==", 0)])
10061004
assert len(result) == 1
10071005

10081006
def test_read_parquet_manager(self, pa, using_array_manager):

0 commit comments

Comments
 (0)