You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
ctypes.util.dllist is no longer used on Windows and macOS (Python 3.14+) #3
joblib#250 moved the ctypes.util.dllist import to module level and changed its condition:
# 3.7.0, in _load_librariesifsys.platformnotin ("linux", "emscripten"):
fromctypes.utilimportdllist# master, module level (since #250)ifsys.platform!="emscripten"and (
# Python 3.15 doesn't have the CFUNCTYPE anymore:sys.platform=="linux"andsys.version_info[:2] >= (3, 15)
):
fromctypes.utilimportdllist
The new condition is only true on Linux with Python 3.15+, so dllist is now always None on Windows and macOS (permalink). On Python 3.14+, _load_libraries falls back to the Toolhelp enumerator on Windows and to _dyld_* on macOS. 3.7.0 used dllist there (joblib#219, and the 3.7.0 changelog says so).
Checked on macOS arm64, Python 3.14.4, by recording which _find_libraries_* method _load_libraries calls:
3.7.0 darwin 3.14.4 -> ['_find_libraries_with_python']
3.8.0.dev0 darwin 3.14.4 -> ['_find_libraries_with_dyld']
The comment in the condition is about Linux, and the description of joblib#250 only discusses Linux. This looks unintended rather than a decision to stop using dllist on Windows and macOS.
Consequences:
Nothing breaks: the fallbacks are the code paths used on Python 3.10–3.13.
The Windows 3.14 CI jobs no longer exercise dllist.
The stdlib_dllist() helper in tests/test_threadpoolctl.py still mirrors the 3.7.0 condition, so on Windows 3.14 test_windows_library_path_exceeds_internal_limit is skipped even though the Toolhelp path, which applies the limit, is the one that runs.
Suggested fix
ifsys.platform!="emscripten"and (
sys.platform!="linux"# On Linux, dllist is only used on free-threaded 3.15+, where the# ctypes.util import no longer creates a CFUNCTYPE callback (#225):orsys.version_info[:2] >= (3, 15)
):
If dropping dllist on Windows and macOS was intended, the changelog should say so and stdlib_dllist() should be updated instead.
Activity
cakedev0 commentedon Oct 29, 2026
Fixed upstream in joblib#288.