-
Type:
Task
-
Resolution: Unresolved
-
Priority:
Unknown
-
Affects Version/s: None
-
Component/s: None
-
None
Name of Failure:
The kerberos package we use for GSSAPI support on macOS and Linux throws a RuntimeWarning when using free-threaded Python. This manifests in our Enterprise Auth test variants. The winkerberos package we use for Windows is internally maintained and supports free-threaded Python without issue.
Link to task:
Context of when and why the failure occurred:
Adding 3.14t as a CPython version in our test matrix.
Stack trace:
[2025/09/26 09:29:53.743] _______________ ERROR collecting test/asynchronous/test_auth.py ________________ [2025/09/26 09:29:53.743] pymongo/asynchronous/auth.py:58: in <module> [2025/09/26 09:29:53.743] import winkerberos as kerberos # type:ignore[import] [2025/09/26 09:29:53.743] ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [2025/09/26 09:29:53.743] E ModuleNotFoundError: No module named 'winkerberos' [2025/09/26 09:29:53.743] During handling of the above exception, another exception occurred: [2025/09/26 09:29:53.743] test/asynchronous/test_auth.py:38: in <module> [2025/09/26 09:29:53.743] from pymongo.asynchronous.auth import HAVE_KERBEROS, _canonicalize_hostname [2025/09/26 09:29:53.743] pymongo/asynchronous/auth.py:64: in <module> [2025/09/26 09:29:53.743] import kerberos # type:ignore[import] [2025/09/26 09:29:53.743] ^^^^^^^^^^^^^^^ [2025/09/26 09:29:53.743] E RuntimeWarning: The global interpreter lock (GIL) has been enabled to load module 'kerberos', which has not declared that it can run safely without the GIL. To override this behavior and keep the GIL disabled (at your own risk), run with PYTHON_GIL=0 or -Xgil=0.