You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Fix pandas DeprecationWarning for is_period_dtype in anoph/frq_base.py #1366
Running poetry run pytest tests/anoph/test_snp_frq.py with pandas 2.2.3 (Python 3.12, macOS) emits a DeprecationWarning from malariagen_data/anoph/frq_base.py at lines 73 and 118: is_period_dtype is deprecated and will be removed in a future version. Use isinstance(dtype, pd.PeriodDtype) instead
pandas deprecated this function in 2.2.0. The tests pass, but the call will break when pandas removes it.
Proposed fix: replace both calls with isinstance(dtype, pd.PeriodDtype). I’ve made this change locally and the tests pass with the warning gone. Happy to open a PR if that works for you.
Activity