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
On windows, there is a subtle difference between the installations of the python interpreter between what comes from uv python install and the distribution from python.org. The name of the OpenSSL DLL is different.
The uvbuild script seems to configure openSSL using the configure|prefix = VC-WIN64A|64
CPython does not document their configure/build scripts for OpenSSL. One of their maintainers updates cpython-source-deps with thirdparty changes and uploads binary artifactos to cpython-bin-deps, and then copy from those binary deps when packaging python. I looked on their issue tracker and forum and found some information (1, 2, 3, 4) but no specific instructions. I am considering opening an issue on CPython to ask them to provide their build configurations for reproducibility.
How are users affected?
If CPython distributes OpenSSL version 3.0.X using the dll name libssl-3.dll, and a CPython extension module links against OpenSSL version 3.0.Y using the dll name libssl-3-x64.dll, both Python and the extension module use the version of SSL that they were built against. When using uv, if version 3.0.X is distributed using libssl-3-x64.dll, then only one of these can be loaded into the process at a time, causing either the extension module or the python interpreter to fail depending on which DLL was loaded first. (For extension modules, Python's copy is loaded first, for embedding scenarios that use such an extension module, the extension module's version may be loaded first).
Thoughts
This seems like a corner case not explicitly addressed by the maintainers of CPython, but according to Hyrum's law Python users could be affected. My opinion is that uv should match the behavior of CPython unless there is a specific reason not to (I didn't find anything in the uv history or source code indicating an intention to use a different DLL name than CPython). I also feel there should be clarification from the CPython developers on how they build binary dependencies like SSL and how extension modules ought to build against it.
The text was updated successfully, but these errors were encountered:
Thanks for the detailed explanation @koubaa.
This is something we plan to share with the entire PyAnsys community, as we continue expanding our use of uv.
The issue
On windows, there is a subtle difference between the installations of the python interpreter between what comes from
uv python install
and the distribution frompython.org
. The name of the OpenSSL DLL is different.Python.org distribution:
libssl-3.dll
libcrypto-3.dll
uv python install:
libcrypto-3-x64.dll
libssl-3-x64.dll
The cause of the issue
The
uv
build script seems to configure openSSL using theconfigure|prefix
=VC-WIN64A|64
CPython does not document their configure/build scripts for OpenSSL. One of their maintainers updates cpython-source-deps with thirdparty changes and uploads binary artifactos to cpython-bin-deps, and then copy from those binary deps when packaging python. I looked on their issue tracker and forum and found some information (1, 2, 3, 4) but no specific instructions. I am considering opening an issue on CPython to ask them to provide their build configurations for reproducibility.
How are users affected?
If CPython distributes OpenSSL version 3.0.X using the dll name libssl-3.dll, and a CPython extension module links against OpenSSL version 3.0.Y using the dll name libssl-3-x64.dll, both Python and the extension module use the version of SSL that they were built against. When using
uv
, if version 3.0.X is distributed using libssl-3-x64.dll, then only one of these can be loaded into the process at a time, causing either the extension module or the python interpreter to fail depending on which DLL was loaded first. (For extension modules, Python's copy is loaded first, for embedding scenarios that use such an extension module, the extension module's version may be loaded first).Thoughts
This seems like a corner case not explicitly addressed by the maintainers of CPython, but according to Hyrum's law Python users could be affected. My opinion is that
uv
should match the behavior of CPython unless there is a specific reason not to (I didn't find anything in the uv history or source code indicating an intention to use a different DLL name than CPython). I also feel there should be clarification from the CPython developers on how they build binary dependencies like SSL and how extension modules ought to build against it.The text was updated successfully, but these errors were encountered: