This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author martin.panter
Recipients Brian.Larsen, Daniel.Blanchard, Pau Tallada, amaury.forgeotdarc, belopolsky, jniehof, lukasz.langa, martin.panter, vinay.sajip, yaroslavvb
Date 2016-04-25.02:38:59
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <>
I also found Issue 18502 essentially about the same incompatibility between CDLL() and find_library().

The problem I see with using find_library() to blindly load a library is that you could be loading an incompatible version (wrong soname). That is why I asked Pau why they couldn’t give the proper library name to CDLL().

I noticed that Python’s own “uuid” module calls CDLL(find_library("uuid")); see <>. On my Linux computer, the full library name is, and according to online man pages, this is also the case on Free BSD. So I wonder if the “uuid” module should call CDLL("") directly. If somebody invented a new incompatible version, Python’s uuid module might crash, or become subtly broken, but programs that linked directly to would continue to work.

Does anyone have any valid use cases where they want to use a shared library on LD_LIBRARY_PATH or similar, but cannot use CDLL() or LoadLibrary() directly? If people really want a way to load a library given its compile-time name, maybe changing find_library() is a valid way forward. But to me the use case does not seem robust or worth blessing in Python’s standard library.
Date User Action Args
2016-04-25 02:39:00martin.pantersetrecipients: + martin.panter, vinay.sajip, amaury.forgeotdarc, belopolsky, lukasz.langa, jniehof, Brian.Larsen, yaroslavvb, Daniel.Blanchard, Pau Tallada
2016-04-25 02:38:59martin.pantersetmessageid: <>
2016-04-25 02:38:59martin.panterlinkissue9998 messages
2016-04-25 02:38:59martin.pantercreate