From 2848cebb18c73a2b8deeeb093a10f963ec41a401 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Cl=C3=A9ment=20Robert?= Date: Tue, 23 Jan 2024 09:16:01 +0100 Subject: [PATCH] TST: ignore deprecation warning from pandas (Pyarrow will become a required dependency) --- conftest.py | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/conftest.py b/conftest.py index 9fa238c6885..fd9de962f03 100644 --- a/conftest.py +++ b/conftest.py @@ -31,6 +31,11 @@ else: SETUPTOOLS_VERSION = None +if find_spec("pandas") is not None: + PANDAS_VERSION = Version(version("pandas")) +else: + PANDAS_VERSION = None + def pytest_addoption(parser): """ @@ -169,6 +174,12 @@ def pytest_configure(config): ), ) + if PANDAS_VERSION is not None and PANDAS_VERSION >= Version("2.2.0"): + config.addinivalue_line( + "filterwarnings", + r"ignore:\s*Pyarrow will become a required dependency of pandas:DeprecationWarning", + ) + if sys.version_info >= (3, 12): # already patched (but not released) upstream: # https://github.com/dateutil/dateutil/pull/1285