Hi! When we switched python-build-standalone to statically linking libpython into bin/python, we ran into some code that made assumptions that libpython was dynamically linked and expected to be able to open libpython3.x.so.1 and have that be the running libpython. We had to introduce some poor workarounds for such code. I want to propose that CPython actively monitor for this assumption and raise DeprecationWarnings with the intention of breaking such code in the future.
As background, the Python interpreter executable, which I'll call "bin/python", is a short C program that just calls Py_BytesMain(argc, argv). The actual Python runtime is in libpython, which can be either statically or dynamically linked into bin/python. Static linking is better for performance, especially on the free-threaded build for reasons involving thread-local storage access, which is why we switc