[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.

https://github.com/cython/cython/commit/cb40a3e6264b794681492a01c223cc23d40d8350

Stefan


More information about the cython-devel mailing list