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 ebfortin
Recipients ebfortin, paul.moore, steve.dower, tim.golden, zach.ware
Date 2015-07-29.13:20:21
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1438176027.56.0.467476097176.issue24748@psf.upfronthosting.co.za>
In-reply-to
Content
The pywin32 package use imp.load_dynamic() to load a DLL with Windows specific type. On Python 3.4+ imp.load_dynamic() point to the following code which use the newer importlib module:

        import importlib.machinery
        loader = importlib.machinery.ExtensionFileLoader(name, path)
        return loader.load_module()

In pywin32 a mechanism is used to be able to have part of a module globals defined in python (pywintypes.py), and the reminder in a DLL (pywintypesXX.dll). The code in pywin32 between 3.4 and 3.5 is the same.

In Python 3.4, calling imp.load_dynamic(), which point to the code above, inside the python part of the module definition loads the types defined in the DLL.

In Python 3.5, calling imp.load_dynamic(), which also points to the code above, inside the python part of the module definition reloads the same python module, not the DLL. Even though a path to a DLL is given AND when doing introspection of the module it clearly points to the specified DLL. 

This is a change of behavior that breaks pywin32, but possibly other modules that rely on this behavior.
History
Date User Action Args
2015-07-29 13:20:27ebfortinsetrecipients: + ebfortin, paul.moore, tim.golden, zach.ware, steve.dower
2015-07-29 13:20:27ebfortinsetmessageid: <1438176027.56.0.467476097176.issue24748@psf.upfronthosting.co.za>
2015-07-29 13:20:27ebfortinlinkissue24748 messages
2015-07-29 13:20:26ebfortincreate