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 Kevin Schlossser
Recipients Kevin Schlossser
Date 2019-10-26.19:48:19
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1572119300.64.0.0138111717141.issue38597@roundup.psfhosted.org>
In-reply-to
Content
System
Windows 7 x64 SP2
Ram 16GB
6 Core AMD @ 3.2ghz

CPython 3.7.2


C Extension (pyd) import cap.

There seems to be a cap on the number of extensions that a package is able to contain. I am able to import 123 extension modules that my package has but when i go to import number 124 i get the following traceback

ImportError: DLL load failed: A dynamic link library (DLL) initialization routine failed.

these extension modules are part of my package, importing an extension module from another package does not change this behavior. it is only when I import the 124th extension that is in my package does it occur. 

When I change the order of the imports the error does not follow the import. I end up getting the same error when the 124th extension gets loaded doesn't matter what extension it is. 

I have tried to see if maybe it was a module limit and I spread the imports across multiple files and it still fails when the 124th gets loaded. I also tried imp.load_dynamic and importlib.import_module and the same error occurs.

If there is a way to work around this limitation it would be very helpful.
History
Date User Action Args
2019-10-26 19:48:20Kevin Schlosssersetrecipients: + Kevin Schlossser
2019-10-26 19:48:20Kevin Schlosssersetmessageid: <1572119300.64.0.0138111717141.issue38597@roundup.psfhosted.org>
2019-10-26 19:48:20Kevin Schlossserlinkissue38597 messages
2019-10-26 19:48:19Kevin Schlosssercreate