From 40b79232ef942696329697a2aa405ca9a1838a52 Mon Sep 17 00:00:00 2001 From: Richard Shadrach Date: Thu, 30 Sep 2021 21:41:07 -0400 Subject: [PATCH] CLN: Add comment on catch_warnings in agg_list_like --- pandas/core/apply.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/pandas/core/apply.py b/pandas/core/apply.py index 28ca8b70c9d27..291ad2b071665 100644 --- a/pandas/core/apply.py +++ b/pandas/core/apply.py @@ -370,6 +370,8 @@ def agg_list_like(self) -> DataFrame | Series: # Capture and suppress any warnings emitted by us in the call # to agg below, but pass through any warnings that were # generated otherwise. + # This is necessary because of https://bugs.python.org/issue29672 + # See GH #43741 for more details with warnings.catch_warnings(record=True) as record: new_res = colg.aggregate(arg) if len(record) > 0: