[issue1567] Patch for new API method _PyImport_ImportModuleNoLock(char *name)

2008-01-04 Thread Christian Heimes
Changes by Christian Heimes: -- resolution: -> fixed status: open -> closed __ Tracker <[EMAIL PROTECTED]> __ ___ Python-bugs-list mailing list

[issue1567] Patch for new API method _PyImport_ImportModuleNoLock(char *name)

2008-01-03 Thread Christian Heimes
Christian Heimes added the comment: Guido van Rossum wrote: > The only thing that really worries me here is the possibility of > relative import. I'm thinking that relative import is really never > meant to be when called from C, so perhaps it would be sufficient to > modify the call to __import

[issue1567] Patch for new API method _PyImport_ImportModuleNoLock(char *name)

2008-01-03 Thread Guido van Rossum
Guido van Rossum added the comment: I see. I think there's still something uncomfortable with this function though -- it looks in sys.modules, but if it doesn't find it there, it invokes the full-blown import machinery, which calls the (possibly overridden) __import__ builtin, which in turn migh

[issue1567] Patch for new API method _PyImport_ImportModuleNoLock(char *name)

2008-01-03 Thread Christian Heimes
Changes by Christian Heimes: Removed file: http://bugs.python.org/file/import_nolock.diff __ Tracker <[EMAIL PROTECTED]> __ ___ Python-bugs-list mai

[issue1567] Patch for new API method _PyImport_ImportModuleNoLock(char *name)

2008-01-03 Thread Christian Heimes
Christian Heimes added the comment: The patch does't replace all PyImport_ImportModule() calls with the new function. It replaces only the calls which may occure more than once and have a fixed name like "time". I've renamed the function to PyImport_ImportModuleNoBlock(). It should explain the p

[issue1567] Patch for new API method _PyImport_ImportModuleNoLock(char *name)

2008-01-02 Thread Guido van Rossum
Guido van Rossum added the comment: Can you produce a version of the patch that applies cleanly to 2.6? Then we can apply it there first and merge into 3.0 later. But I wonder. It seems this changes every single call to PyImport_ImportModule() in the core to _PyImport_ImportModuleNoLock(). Wha

[issue1567] Patch for new API method _PyImport_ImportModuleNoLock(char *name)

2007-12-12 Thread Kurt B. Kaiser
Kurt B. Kaiser added the comment: Doesn't seem to be IDLE related, removed IDLE tag. -- components: -IDLE nosy: +kbk __ Tracker <[EMAIL PROTECTED]> __

[issue1567] Patch for new API method _PyImport_ImportModuleNoLock(char *name)

2007-12-07 Thread Christian Heimes
Changes by Christian Heimes: -- assignee: -> tiran components: +IDLE, Interpreter Core type: -> behavior __ Tracker <[EMAIL PROTECTED]> __ ___

[issue1567] Patch for new API method _PyImport_ImportModuleNoLock(char *name)

2007-12-07 Thread Christian Heimes
New submission from Christian Heimes: The patch adds a new API method _PyImport_ImportModuleNoLock(const char *name). It works mostly like PyImport_ImportModule except it does not block. It tries to fetch the module from sys.modules first and falls back to PyImport_ImportModule UNLESS the import