[issue24748] Change of behavior for importlib between 3.4 and 3.5 with DLL loading

2015-07-30 Thread Etienne Fortin

Etienne Fortin added the comment:

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

With:
import importlib.machinery
loader = importlib.machinery.ExtensionFileLoader(modname, filename)
spec = importlib.machinery.ModuleSpec(
name = modname,
loader = loader,
origin = filename,
loader_state = 1234,
is_package = False,
)
mod = loader.create_module(spec)
loader.exec_module(mod)

And it now works as advertised. Since load_module() is flagged as Deprecated, I 
believe no correction is necessary as the preffered way to load a module, with 
exec_module(), is working. 

I will do some more tests to be sure it's the case.

--

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue24748
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue24748] Change of behavior for importlib between 3.4 and 3.5 with DLL loading

2015-07-29 Thread Etienne Fortin

Etienne Fortin added the comment:

It is also possible that the root cause is related to Microsoft Windows Update 
2999226 and/or 3065987. The behavior was the same between 3.4 and 3.5 on a 
machine without these updates and is believed to have changed after the install 
of these updates.

--

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue24748
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue24748] Change of behavior for importlib between 3.4 and 3.5 with DLL loading

2015-07-29 Thread Etienne Fortin

Etienne Fortin added the comment:

No the behavior only changed for 3.5. 3.4 works just fine.

--

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue24748
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue24748] Change of behavior for importlib between 3.4 and 3.5 with DLL loading

2015-07-29 Thread Etienne Fortin

Etienne Fortin added the comment:

I suggest the test should use pywin32. The test script could be only:

import pywintypes
dir(pywintypes)

Testing for an attribute that is defined in the DLL would make it pass or fail.

--

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue24748
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue24748] Change of behavior for importlib between 3.4 and 3.5 with DLL loading

2015-07-29 Thread Etienne Fortin

Etienne Fortin added the comment:

The only dll / pyd files I have are all in pywin32. I don't have a build 
environment for extensions. Can anyone provide me with a very simple extension 
DLL with at least one exported attribute?

--

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue24748
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue24748] Change of behavior for importlib between 3.4 and 3.5 with DLL loading

2015-07-29 Thread Etienne Fortin

Etienne Fortin added the comment:

At this point I can't say if it's Windows only or if it affect all platform. I 
can't even guarantee that it will appear on all Windows platform. On my 
platform (see following), it doesn't work:

Windows 7 64 bits with updates 2999226 and 3065987 installed.

I can't confirm the update are related either. I just did a quick analysis and 
between the time 3.5 was working and wasn't anymore these updates were 
installed.

I will create a quick script to reproduce the behavior.

--

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue24748
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue24748] Change of behavior for importlib between 3.4 and 3.5 with DLL loading

2015-07-29 Thread Etienne Fortin

Etienne Fortin added the comment:

Is it possible that the C runtime introduced with 2999226, which I believe is 
the universal runtime Microsoft is trying to introduce, modified something 
that makes importlib break on 3.5???

--

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue24748
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com