[Cython] Cython is not PEP-420 (Implicit Namespace Packages) compliant

Stefan Behnel stefan_ml at behnel.de
Sat Dec 15 06:51:19 CET 2012


Alexey V Gorshkov, 15.12.2012 02:17:
> Reporting about Cython PEP-420 (Implicit Namespace Packages) incompliance.
> 
> (Sample package setup attached)
> 
> (http://www.python.org/dev/peps/pep-0420/)
> 
> Next package's tree will not work and will return error
> [...]

I'm sure it's not - the compile time package resolution code in Cython was
written long before namespace packages were even being thought about. (For
comparison, remember that almost none of the existing CPython versions
supports namespaces packages either, 3.3 is the only exception).

Basically, the runtime import code should be ok, but the package resolution
at compile time, that is used mainly for cimports and for figuring out the
fully qualified module name of compiled modules, doesn't have any support
for packages that don't have an __init__.py.

Would you care to change that? You could try to come up with a patch, we'd
certainly appreciate it.

Stefan



More information about the cython-devel mailing list