Skip to content

Commit 829ae73

Browse files
authored
CLN: Remove 3rd party warning filters (#50674)
* CLN: Remove 3rd party warning filers * Move 3rd party warnings to pyproject.toml, some comments * Move 3rd party warnings to pyproject.toml, some comments
1 parent 9991d5e commit 829ae73

18 files changed

+71
-215
lines changed

pandas/io/parquet.py

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -285,9 +285,6 @@ def write(
285285
**kwargs,
286286
) -> None:
287287
self.validate_dataframe(df)
288-
# thriftpy/protocol/compact.py:339:
289-
# DeprecationWarning: tostring() is deprecated.
290-
# Use tobytes() instead.
291288

292289
if "partition_on" in kwargs and partition_cols is not None:
293290
raise ValueError(

pandas/tests/frame/test_unary.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -114,7 +114,10 @@ def test_pos_object(self, df):
114114
[
115115
pytest.param(
116116
pd.DataFrame({"a": ["a", "b"]}),
117-
marks=[pytest.mark.filterwarnings("ignore")],
117+
# filterwarnings removable once min numpy version is 1.25
118+
marks=[
119+
pytest.mark.filterwarnings("ignore:Applying:DeprecationWarning")
120+
],
118121
),
119122
],
120123
)

pandas/tests/io/__init__.py

Lines changed: 0 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -1,20 +0,0 @@
1-
import pytest
2-
3-
pytestmark = [
4-
# fastparquet
5-
pytest.mark.filterwarnings(
6-
"ignore:PY_SSIZE_T_CLEAN will be required.*:DeprecationWarning"
7-
),
8-
pytest.mark.filterwarnings(
9-
r"ignore:`np\.bool` is a deprecated alias:DeprecationWarning"
10-
),
11-
# xlrd
12-
pytest.mark.filterwarnings(
13-
"ignore:This method will be removed in future versions:DeprecationWarning"
14-
),
15-
pytest.mark.filterwarnings(
16-
"ignore:This method will be removed in future versions. "
17-
r"Use 'tree.iter\(\)' or 'list\(tree.iter\(\)\)' instead."
18-
":PendingDeprecationWarning"
19-
),
20-
]

pandas/tests/io/excel/__init__.py

Lines changed: 0 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +0,0 @@
1-
import pytest
2-
3-
pytestmark = [
4-
pytest.mark.filterwarnings(
5-
# Looks like tree.getiterator is deprecated in favor of tree.iter
6-
"ignore:This method will be removed in future versions:"
7-
"PendingDeprecationWarning"
8-
),
9-
pytest.mark.filterwarnings(
10-
"ignore:This method will be removed in future versions:DeprecationWarning"
11-
),
12-
]

pandas/tests/io/excel/test_readers.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,6 @@
4242
"openpyxl",
4343
marks=[
4444
td.skip_if_no("openpyxl"),
45-
pytest.mark.filterwarnings("ignore:.*html argument"),
4645
],
4746
),
4847
pytest.param(

pandas/tests/io/pytables/__init__.py

Lines changed: 0 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +0,0 @@
1-
import pytest
2-
3-
pytestmark = [
4-
# pytables https://github.com/PyTables/PyTables/issues/822
5-
pytest.mark.filterwarnings(
6-
"ignore:a closed node found in the registry:UserWarning"
7-
),
8-
pytest.mark.filterwarnings(
9-
r"ignore:`np\.object` is a deprecated alias.*:DeprecationWarning"
10-
),
11-
pytest.mark.filterwarnings(
12-
r"ignore:`np\.bool` is a deprecated alias.*:DeprecationWarning"
13-
),
14-
]

pandas/tests/io/pytables/test_categorical.py

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -16,10 +16,6 @@
1616

1717
pytestmark = [
1818
pytest.mark.single_cpu,
19-
# pytables https://github.com/PyTables/PyTables/issues/822
20-
pytest.mark.filterwarnings(
21-
"ignore:a closed node found in the registry:UserWarning"
22-
),
2319
]
2420

2521

pandas/tests/io/pytables/test_subclass.py

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -13,9 +13,6 @@
1313
)
1414

1515
pytest.importorskip("tables")
16-
pytestmark = pytest.mark.filterwarnings(
17-
"ignore:`np.object` is a deprecated alias:DeprecationWarning"
18-
)
1916

2017

2118
class TestHDFStoreSubclass:

pandas/tests/io/sas/test_sas7bdat.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,6 @@ def data_test_ix(request, dirpath):
3838

3939

4040
# https://github.com/cython/cython/issues/1720
41-
@pytest.mark.filterwarnings("ignore:can't resolve package:ImportWarning")
4241
class TestSAS7BDAT:
4342
@pytest.mark.slow
4443
def test_from_file(self, dirpath, data_test_ix):

pandas/tests/io/test_common.py

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,6 @@ def __fspath__(self):
5050

5151

5252
# https://github.com/cython/cython/issues/1720
53-
@pytest.mark.filterwarnings("ignore:can't resolve package:ImportWarning")
5453
class TestCommonIOCapabilities:
5554
data1 = """index,A,B,C,D
5655
foo,2,3,4,5
@@ -317,9 +316,6 @@ def test_read_expands_user_home_dir(
317316
),
318317
],
319318
)
320-
@pytest.mark.filterwarnings( # pytables np.object_ usage
321-
"ignore:`np.object` is a deprecated alias:DeprecationWarning"
322-
)
323319
def test_read_fspath_all(self, reader, module, path, datapath):
324320
pytest.importorskip(module)
325321
path = datapath(*path)
@@ -372,9 +368,6 @@ def test_write_fspath_all(self, writer_name, writer_kwargs, module):
372368
expected = f_path.read()
373369
assert result == expected
374370

375-
@pytest.mark.filterwarnings( # pytables np.object_ usage
376-
"ignore:`np.object` is a deprecated alias:DeprecationWarning"
377-
)
378371
def test_write_fspath_hdf5(self):
379372
# Same test as write_fspath_all, except HDF5 files aren't
380373
# necessarily byte-for-byte identical for a given dataframe, so we'll

0 commit comments

Comments
 (0)