<br><br><div class="gmail_quote">On Tue, Apr 17, 2012 at 06:43, Eric V. Smith <span dir="ltr"><<a href="mailto:eric@trueblade.com">eric@trueblade.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<div class="HOEnZb"><div class="h5">On 4/17/2012 5:52 AM, Antoine Pitrou wrote:<br>
> On Mon, 16 Apr 2012 20:41:56 -0400<br>
> Brett Cannon <<a href="mailto:brett@python.org">brett@python.org</a>> wrote:<br>
>> On Mon, Apr 16, 2012 at 20:27, Antoine Pitrou <<a href="mailto:solipsis@pitrou.net">solipsis@pitrou.net</a>> wrote:<br>
>><br>
>>> On Tue, 17 Apr 2012 01:11:14 +0200<br>
>>> Georg Brandl <<a href="mailto:g.brandl@gmx.net">g.brandl@gmx.net</a>> wrote:<br>
>>>><br>
>>>> No, it's not just an existing Python, it is (at least currently) the same<br>
>>>> version of Python being built. Therefore I wrote about the bootstrapping<br>
>>>> problems when bytecode changes.<br>
>>>><br>
>>>> Depending on Cython is better in that it breaks the bootstrapping cycle,<br>
>>>> but on the other hand the C code may need to be regenerated when the C<br>
>>> API<br>
>>>> changes in an incompatible way.<br>
>>><br>
>>> Cython OTOH probably needs Python 2.x, which isn't that great for<br>
>>> building Python 3. And requiring Cython for developing is not very<br>
>>> contributor-friendly.<br>
>>><br>
>><br>
>> Well, required to regenerate _frozen_importlib, but nothing else. I mean<br>
>> making fixes go into importlib directly and get tested that way, not<br>
>> through __import__(). So really Cython would only be needed when<br>
>> importlib._bootstrap has been changed and you are making a commit.<br>
><br>
> That's still a large dependency to bring in, while we already have a<br>
> working solution.<br>
> I'd understand using Cython to develop some new extension module which<br>
> requires linking against a C library (and is thus impossible to write<br>
> in pure Python). But for importlib that's totally non-necessary.<br>
><br>
> I guess I'm -1 on it.<br>
<br>
</div></div>I agree. If the problem we're trying to solve is that the generated file<br>
isn't always rebuilt, bringing in a large dependency like Cython seems<br>
like overkill to me.<br></blockquote><div><br></div><div>Actually Cython would help with a subtle maintenance burden of maintaining *any* C code for import. Right now, Python/import.c:PyImport_ImportModuleLevelObject() is an accelerated C version of importlib.__import__() through checking sys.modules, after which it calls into the Python code. Cython would do away with that C acceleration code (which I have already had to modify once and Antoine found a couple refleaks in).</div>
<div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<br>
We basically have a working solution now (thanks, Brett). I think we<br>
should focus on getting it polished. Maybe we can bring in Cython in a<br>
later release, if in the 3.4 timeframe it still seems like we have a<br>
problem to solve. I suspect things will be working fine.</blockquote><div><br></div><div>I don't view this discussion as work/not work but more of work/work better (possibly; I have severe bias here to cut the C code down to zilch since I don't want to write anymore of it so I'm definitely not going to make any final call on this topic). </div>
</div>