File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -7,7 +7,7 @@ https://docs.snowflake.com/
77Source code is also available at: https://github.com/snowflakedb/snowflake-connector-python
88
99# Release Notes
10- - v4.4.0(March 23 ,2026)
10+ - v4.4.0(March 24 ,2026)
1111 - Bump lower boundary of cryptography to 46.0.5 due to CVE-2026 -26007.
1212 - Added support for Python 3.14.
1313 - Removed pyOpenSSL upper bound dependency constraint to allow installation of pyOpenSSL 26.0.0+, which includes a fix for GHSA-vp96 -hxj8-p424.
Original file line number Diff line number Diff line change 22from __future__ import annotations
33
44import os
5+ import socket
56from contextlib import contextmanager
67from logging import getLogger
78from pathlib import Path
@@ -157,6 +158,27 @@ def pytest_runtest_setup(item) -> None:
157158 pytest .skip ("Skipping WIF test in current environment" )
158159
159160
161+ def pytest_unconfigure (config ) -> None :
162+ """Shut down the pytest-rerunfailures socket server to prevent session hangs.
163+
164+ The ServerStatusDB.run_server thread blocks forever on socket.accept()
165+ with no shutdown mechanism. Closing the socket here unblocks it so the
166+ interpreter can exit cleanly instead of deadlocking during teardown.
167+ See: https://github.com/pytest-dev/pytest-rerunfailures/issues/295
168+ """
169+ db = getattr (config , "failures_db" , None )
170+ sock = getattr (db , "sock" , None )
171+ if sock is not None :
172+ try :
173+ sock .shutdown (socket .SHUT_RDWR )
174+ except OSError :
175+ pass
176+ try :
177+ sock .close ()
178+ except OSError :
179+ pass
180+
181+
160182def get_server_parameter_value (connection , parameter_name : str ) -> str | None :
161183 """Get server parameter value, returns None if parameter doesn't exist."""
162184 try :
You can’t perform that action at this time.
0 commit comments