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
I haven't done the historical work, but at some point this code below was added/changed.
It's not mysterious - conda-forge has a patch to disable add_dll_directory and reenable finding DLLs on PATH. Because regular CPython does not have this patch, this change won't work in a range of scenarios where PATH is ignored.
So this needs the add_dll_directory call as well (or ideally, conda-forge would improve their patch, but I think that's unlikely right now).
There are two ways libzmq can be 'bundled' with pyzmq:
externally built libzmq vendored in pyzmq.libs by delvewheel/auditwheel/delocate, in which case it is loaded as a regular DLL dependency of the backend at import time, and
libzmq built by pyzmq itself as a Python Extension, in which case it's loaded via import zmq._libzmq before importing the backend
Option 2 was how we did it on Windows for a long time time, and what happens when pyzmq is built from source with libzmq unavailable on the system (~never on Windows). 1. is generally preferable, and, thanks to delvewheel, is how we do it now in almost all cases (I couldn't get it to work on Windows + PyPy for some reason, so that's the only remaining case where a pyzmq wheel bundles libzmq as an Extension).
Whatever advice you have for finding DLLs in pyzmq.libs that works consistently across Python versions and implementations would be welcome!
I haven't done the historical work, but at some point this code below was added/changed.
It's not mysterious - conda-forge has a patch to disable
add_dll_directory
and reenable finding DLLs onPATH
. Because regular CPython does not have this patch, this change won't work in a range of scenarios wherePATH
is ignored.So this needs the
add_dll_directory
call as well (or ideally, conda-forge would improve their patch, but I think that's unlikely right now).pyzmq/zmq/__init__.py
Lines 65 to 96 in b33873c
The text was updated successfully, but these errors were encountered: