[Python-Dev] importlib is now bootstrapped (and what that means)

Eric V. Smith eric at trueblade.com
Tue Apr 17 12:43:30 CEST 2012

On 4/17/2012 5:52 AM, Antoine Pitrou wrote:
> On Mon, 16 Apr 2012 20:41:56 -0400
> Brett Cannon <brett at python.org> wrote:
>> On Mon, Apr 16, 2012 at 20:27, Antoine Pitrou <solipsis at pitrou.net> wrote:
>>> On Tue, 17 Apr 2012 01:11:14 +0200
>>> Georg Brandl <g.brandl at gmx.net> wrote:
>>>> No, it's not just an existing Python, it is (at least currently) the same
>>>> version of Python being built.  Therefore I wrote about the bootstrapping
>>>> problems when bytecode changes.
>>>> Depending on Cython is better in that it breaks the bootstrapping cycle,
>>>> but on the other hand the C code may need to be regenerated when the C
>>> API
>>>> changes in an incompatible way.
>>> Cython OTOH probably needs Python 2.x, which isn't that great for
>>> building Python 3. And requiring Cython for developing is not very
>>> contributor-friendly.
>> Well, required to regenerate _frozen_importlib, but nothing else. I mean
>> making fixes go into importlib directly and get tested that way, not
>> through __import__(). So really Cython would only be needed when
>> importlib._bootstrap has been changed and you are making a commit.
> That's still a large dependency to bring in, while we already have a
> working solution.
> I'd understand using Cython to develop some new extension module which
> requires linking against a C library (and is thus impossible to write
> in pure Python). But for importlib that's totally non-necessary.
> I guess I'm -1 on it.

I agree. If the problem we're trying to solve is that the generated file
isn't always rebuilt, bringing in a large dependency like Cython seems
like overkill to me.

We basically have a working solution now (thanks, Brett). I think we
should focus on getting it polished. Maybe we can bring in Cython in a
later release, if in the 3.4 timeframe it still seems like we have a
problem to solve. I suspect things will be working fine.


More information about the Python-Dev mailing list