[issue16421] importlib.machinery.ExtensionFileLoader cannot load several modules from the same shared object

2012-12-15 Thread Antoine Pitrou
Antoine Pitrou added the comment: Indeed it looks like this commit may be the culprit for numerous buildbot failures. -- nosy: +pitrou ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue16421

[issue16421] importlib.machinery.ExtensionFileLoader cannot load several modules from the same shared object

2012-12-15 Thread Antoine Pitrou
Antoine Pitrou added the comment: Naming the test modules foo and bar was perhaps not the best idea. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue16421 ___

[issue16421] importlib.machinery.ExtensionFileLoader cannot load several modules from the same shared object

2012-12-15 Thread Roundup Robot
Roundup Robot added the comment: New changeset 2e492a9a1845 by Andrew Svetlov in branch 'default': Rename test module names for #16421 to don't clash with other tests. http://hg.python.org/cpython/rev/2e492a9a1845 -- ___ Python tracker

[issue16421] importlib.machinery.ExtensionFileLoader cannot load several modules from the same shared object

2012-12-15 Thread Andrew Svetlov
Andrew Svetlov added the comment: Fixed. Antoine, you are right: foo and bar was bad names. -- resolution: - fixed status: open - closed ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue16421

[issue16421] importlib.machinery.ExtensionFileLoader cannot load several modules from the same shared object

2012-12-14 Thread Andrew Svetlov
Andrew Svetlov added the comment: Committed. Sorry for delay. Thanks, Vaclav! -- resolution: - fixed stage: - committed/rejected status: open - closed ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue16421

[issue16421] importlib.machinery.ExtensionFileLoader cannot load several modules from the same shared object

2012-12-14 Thread Roundup Robot
Roundup Robot added the comment: New changeset 6eefe4d537b3 by Andrew Svetlov in branch 'default': Issue #16421: allow to load multiple modules from the same shared object. http://hg.python.org/cpython/rev/6eefe4d537b3 -- nosy: +python-dev ___ Python

[issue16421] importlib.machinery.ExtensionFileLoader cannot load several modules from the same shared object

2012-12-14 Thread STINNER Victor
STINNER Victor added the comment: Some tests are failing since the changeset 6eefe4d537b3. Example: http://buildbot.python.org/all/builders/x86%20RHEL%206%203.x/builds/1431/steps/test/logs/stdio Please check buildbots. [176/371] test_pkgutil test_getdata_filesys

[issue16421] importlib.machinery.ExtensionFileLoader cannot load several modules from the same shared object

2012-11-29 Thread Nick Coghlan
Nick Coghlan added the comment: One nice feature of this is the potential to simplify single-file distribution - pack your application into a zip file, and only need to extract a single shared library for *all* your extension modules, which could be handled via a utility function called in

[issue16421] importlib.machinery.ExtensionFileLoader cannot load several modules from the same shared object

2012-11-29 Thread Brett Cannon
Brett Cannon added the comment: Are you still planning on committing this, Andrew? -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue16421 ___ ___

[issue16421] importlib.machinery.ExtensionFileLoader cannot load several modules from the same shared object

2012-11-12 Thread Eric Snow
Changes by Eric Snow ericsnowcurren...@gmail.com: -- nosy: +eric.snow ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue16421 ___ ___ Python-bugs-list

[issue16421] importlib.machinery.ExtensionFileLoader cannot load several modules from the same shared object

2012-11-07 Thread Václav Šmilauer
Václav Šmilauer added the comment: Attaching patch based on Andrew's review, agains latest hg (80291:859ef54bdce). For the MSVC files, I copied what was there for _testcapimodule in PC/VS9.0 and PCbuild, and created two new UUIDs: one for _testimportmultiple itself

[issue16421] importlib.machinery.ExtensionFileLoader cannot load several modules from the same shared object

2012-11-07 Thread Andrew Svetlov
Andrew Svetlov added the comment: Looks better, will check on Windows a bit later. BTW, ACKS and NEWS are usually edited by committer, but leave that as is for now. -- versions: +Python 3.4 -Python 3.5 ___ Python tracker rep...@bugs.python.org

[issue16421] importlib.machinery.ExtensionFileLoader cannot load several modules from the same shared object

2012-11-07 Thread Václav Šmilauer
Václav Šmilauer added the comment: Good, will let editors do that next time. I was following http://docs.python.org/devguide/patch.html#preparation which says Sixth, if you are not already in the Misc/ACKS file then add your name. For NEWS, I was reading

[issue16421] importlib.machinery.ExtensionFileLoader cannot load several modules from the same shared object

2012-11-07 Thread Nick Coghlan
Nick Coghlan added the comment: Yeah, ACKS is fine (we just don't mind doing it if the submitter leaves it out). Updating NEWS is less useful because it almost inevitably causes a conflict when the patch is applied. (We occasionally mutter about adopting a less conflict-prone approach to

[issue16421] importlib.machinery.ExtensionFileLoader cannot load several modules from the same shared object

2012-11-07 Thread Andrew Svetlov
Andrew Svetlov added the comment: Václav, your patch passed on Windows. Will commit it after double check. Thanks. -- assignee: - asvetlov ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue16421

[issue16421] importlib.machinery.ExtensionFileLoader cannot load several modules from the same shared object

2012-11-06 Thread Václav Šmilauer
New submission from Václav Šmilauer: This issue was split off issue16194 (I am not copying the whole discussion here). It was suggested a new issue is opened for Python3, where a proper fix can be done. Python internally caches dynamically loaded modules, but the cache is based on the

[issue16421] importlib.machinery.ExtensionFileLoader cannot load several modules from the same shared object

2012-11-06 Thread Andrew Svetlov
Andrew Svetlov added the comment: Storing several modules in single so/pyd file is crazy idea from my perspective. The test is definitely required. BTW, Why version is set to 3.5? Should component be set to Interpreter code? -- nosy: +asvetlov ___

[issue16421] importlib.machinery.ExtensionFileLoader cannot load several modules from the same shared object

2012-11-06 Thread Amaury Forgeot d'Arc
Amaury Forgeot d'Arc added the comment: It's not that crazy, if you consider that all builtin modules are stored in python33.dll. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue16421 ___

[issue16421] importlib.machinery.ExtensionFileLoader cannot load several modules from the same shared object

2012-11-06 Thread Václav Šmilauer
Václav Šmilauer added the comment: Storing several modules in one .so file offloads some issues which have to be dealt with manually (like one module needing symbols from other module, or even cross-dependencies) to the linker. In any case, unless forbidden and signalled, it should be

[issue16421] importlib.machinery.ExtensionFileLoader cannot load several modules from the same shared object

2012-11-06 Thread Václav Šmilauer
Changes by Václav Šmilauer e...@doxos.eu: -- components: +Interpreter Core -Extension Modules versions: +Python 3.4 -Python 3.5 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue16421 ___

[issue16421] importlib.machinery.ExtensionFileLoader cannot load several modules from the same shared object

2012-11-06 Thread Andrew Svetlov
Andrew Svetlov added the comment: Amaury, I'm ok with pushing several modules into python33.dll or embedding it directly into executable. For standard so/dll files you have to use different file names for modules to make regular import statement work. It can be done via symlink/hardlink, but

[issue16421] importlib.machinery.ExtensionFileLoader cannot load several modules from the same shared object

2012-11-06 Thread Václav Šmilauer
Václav Šmilauer added the comment: @Andrew: I was using symlinks to achieve this, until I found recently that some exotic systems (read: windows) have still troubles there, like not letting non-admins create symlinks. -- type: enhancement - behavior versions: +Python 3.5 -Python 3.4

[issue16421] importlib.machinery.ExtensionFileLoader cannot load several modules from the same shared object

2012-11-06 Thread R. David Murray
R. David Murray added the comment: There is an example in the test suite somewhere. Probably in the distutils tests. Search for xxmodule...but you'll need to create your own source. I'd see if you can write it out from the test rather than checking in another data file, but a data file is

[issue16421] importlib.machinery.ExtensionFileLoader cannot load several modules from the same shared object

2012-11-06 Thread R. David Murray
R. David Murray added the comment: Sorry, didn't mean to change the component back. -- components: +Interpreter Core -Extension Modules type: behavior - enhancement versions: +Python 3.4 -Python 3.5 ___ Python tracker rep...@bugs.python.org

[issue16421] importlib.machinery.ExtensionFileLoader cannot load several modules from the same shared object

2012-11-06 Thread Václav Šmilauer
Václav Šmilauer added the comment: I added the test, with a module Modules/_testimportmultiple.c. The test uses the (undocumented) imp module, but all othet tests in Lib/test/test_imp.py do the same, so I assume it is OK? -- Added file:

[issue16421] importlib.machinery.ExtensionFileLoader cannot load several modules from the same shared object

2012-11-06 Thread Brett Cannon
Brett Cannon added the comment: It's fine to cheat in tests, although test_imp predates importlib which is why it uses an undocumented API. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue16421

[issue16421] importlib.machinery.ExtensionFileLoader cannot load several modules from the same shared object

2012-11-06 Thread Andrew Svetlov
Andrew Svetlov added the comment: Reviewed and commented the last patch. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue16421 ___ ___