Skip to content

Commit 7669497

Browse files
authored
CI: Filter any SSLSocket ResouceWarnings from dependencies (#44775)
1 parent 9f48b88 commit 7669497

File tree

1 file changed

+8
-3
lines changed

1 file changed

+8
-3
lines changed

pandas/_testing/_warnings.py

+8-3
Original file line numberDiff line numberDiff line change
@@ -147,9 +147,14 @@ def _assert_caught_no_extra_warnings(
147147

148148
for actual_warning in caught_warnings:
149149
if _is_unexpected_warning(actual_warning, expected_warning):
150-
unclosed = "unclosed transport <asyncio.sslproto._SSLProtocolTransport"
151-
if actual_warning.category == ResourceWarning and unclosed in str(
152-
actual_warning.message
150+
# GH 44732: Don't make the CI flaky by filtering SSL-related
151+
# ResourceWarning from dependencies
152+
unclosed_ssl = (
153+
"unclosed transport <asyncio.sslproto._SSLProtocolTransport",
154+
"unclosed <ssl.SSLSocket",
155+
)
156+
if actual_warning.category == ResourceWarning and any(
157+
msg in str(actual_warning.message) for msg in unclosed_ssl
153158
):
154159
# FIXME(GH#38630): kludge because pytest.filterwarnings does not
155160
# suppress these

0 commit comments

Comments
 (0)