[Cython] Py3k builds broken due to CPython changes

Stefan Behnel stefan_ml at behnel.de
Mon Apr 16 11:28:51 CEST 2012

Stefan Behnel, 16.04.2012 10:05:
> just a quick heads-up that the Py3k builds are completely broken since this
> week-end because the internal CPython import mechanism changed. The most
> visible effect for us is that Py2-style imports no longer work in Py3.3,
> which, I guess, impacts the majority of existing Py2-style Cython code.
> Only absolute and relative imports continue to work, import level "-1"
> raises a ValueError.
> I asked on python-dev to see what they think about this regression.
> http://thread.gmane.org/gmane.comp.python.devel/131858/focus=131909
> If they end up considering it the intended behaviour, we may have to
> duplicate the original behaviour in one way or another to keep this working.

Apparently, the easiest work-around is to execute the whole import twice in
Py3.3, first for a relative import, then for an absolute one. Likely
somewhat slower than before, but at least it keeps working.



More information about the cython-devel mailing list