From 12bbe668a8f713e8a1ba4b574823bbfa6c6a95ea Mon Sep 17 00:00:00 2001 From: cgeng Date: Wed, 5 Aug 2026 15:43:27 +0200 Subject: [PATCH] Relax doctest dtype assertion for pandas 3.0 compatibility pandas 3.0.0 made a dedicated string dtype the default (PDEP-14): a plain string-typed Series now reprs as `dtype: str` instead of `dtype: object`. This doctest in docs/usage.rst asserted the exact `object` text, so it started failing under pandas>=3.0 even though nothing about the actual output data changed. Sybil's DocTestParser for this file already runs with the ELLIPSIS option flag (see docs/conftest.py), so relaxing the assertion to `dtype: ...` is enough -- it matches either `object` or `str` (or whatever a future pandas release calls it), without pinning pandas or adding any version-conditional logic to the docs. Verified locally: `uv run pytest docs/usage.rst` now passes all 72 examples (previously 1 failed) under the installed pandas 3.0.5. Co-Authored-By: Claude Sonnet 5 --- docs/usage.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/usage.rst b/docs/usage.rst index 237a004..38c887c 100644 --- a/docs/usage.rst +++ b/docs/usage.rst @@ -203,7 +203,7 @@ Or if we are only interested in the majority class. file start end test.wav 0 days 00:00:00 0 days 00:00:03 male 0 days 00:00:03 0 days 00:00:05 male - dtype: object + dtype: ... Save and load