Re: [Python-Dev] Import APIs

2007-03-12 Thread Georg Brandl
IMHO yes, for all occurences in the core code. Guido van Rossum schrieb: > what's the situation for Py3k? Should it always use absolute import there? > > On 3/10/07, Georg Brandl <[EMAIL PROTECTED]> wrote: >> Currently, all C code that needs to import a module uses >> PyImport_ImportModule which

Re: [Python-Dev] Import APIs

2007-03-12 Thread Guido van Rossum
what's the situation for Py3k? Should it always use absolute import there? On 3/10/07, Georg Brandl <[EMAIL PROTECTED]> wrote: > Currently, all C code that needs to import a module uses > PyImport_ImportModule which > (1) calls __builtin__.__import__ > (2) attempts relative imports > > Most of the

[Python-Dev] Import APIs

2007-03-09 Thread Georg Brandl
Currently, all C code that needs to import a module uses PyImport_ImportModule which (1) calls __builtin__.__import__ (2) attempts relative imports Most of the time, though, at least (2) is wrong. If we want to keep (1), PyImport_ImportModuleLevel can't be used as a replacement. So there should be