Skip to content

GH1366: Replace deprecated pandas is_period_dtype in anoph/frq_base.py - #1367

Open
HeeraThakurrr wants to merge 1 commit into
malariagen:masterfrom
HeeraThakurrr:GH1366-fix-is-period-dtype
Open

HeeraThakurrr wants to merge 1 commit into
malariagen:masterfrom
HeeraThakurrr:GH1366-fix-is-period-dtype

Conversation

@HeeraThakurrr

Copy link
Copy Markdown

Fixes #1366

Summary

Replaces the deprecated pd.api.types.is_period_dtype(...) calls in malariagen_data/anoph/frq_base.py (lines 73 and 118) with isinstance(..., pd.PeriodDtype).

pandas deprecated is_period_dtype in 2.2.0, and the project is on pandas 2.2.3, so the tests emitted a DeprecationWarning.

Verification

  • pytest tests/anoph/test_snp_frq.py -W "error:is_period_dtype:DeprecationWarning" passes, so the warning no longer fires.
  • pytest tests/anoph/test_frq_base.py passes.
  • mypy and pre-commit pass.

@HeeraThakurrr HeeraThakurrr changed the title fix: replace deprecated is_period_dtype with isinstance(..., pd.Perio… GH1366: Replace deprecated pandas is_period_dtype in anoph/frq_base.py Oct 22, 2026

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Fix pandas DeprecationWarning for is_period_dtype in anoph/frq_base.py

1 participant