Skip to content

Commit 04ef51e

Browse files
authored
fix(db-dtypes): support updated pandas datetime reduction error message (#18526)
Handle updated 'is not supported' TypeError message raised by pandas 3.1.0+ for any() and all() reductions on datetime64/timedelta64 dtypes.
1 parent 849a7dd commit 04ef51e

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

‎packages/db-dtypes/tests/unit/test_dtypes.py‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -534,7 +534,7 @@ def exercise_any():
534534
try:
535535
return a.any()
536536
except TypeError as e:
537-
if "does not support operation" in str(e):
537+
if "does not support operation" in str(e) or "not supported" in str(e):
538538
return
539539
raise e
540540

@@ -571,7 +571,7 @@ def exercise_all():
571571
try:
572572
return a.all()
573573
except TypeError as e:
574-
if "does not support operation" in str(e):
574+
if "does not support operation" in str(e) or "not supported" in str(e):
575575
return
576576
raise e
577577

0 commit comments

Comments
 (0)