Login | Register For Free | Help
Search for: (Advanced)

Mailing List Archive: Python: Dev
Re: importlib is now bootstrapped (and what that means)
 

Index | Next | Previous | View Flat


g.brandl at gmx

Apr 14, 2012, 12:37 PM


Views: 303
Permalink
Re: importlib is now bootstrapped (and what that means) [In reply to]

On 14.04.2012 20:12, Brett Cannon wrote:
> My multi-year project -- started in 2006 according to my blog -- to rewrite
> import in pure Python and then bootstrap it into CPython as *the* implementation
> of __import__() is finally over (mostly)! Hopefully I didn't break too much code
> in the process. =)
>
> Now this is "mostly" finished because the single incompatibility that importlib
> has is that it doesn't check the Windows registry for paths to search since I
> lack a Windows installation to develop and test on. If someone can tackle that
> issue that would be greatly appreciated (http://bugs.python.org/issue14578).
>
> Next up is how to maintain/develop for all of this. So the Makefile will
> regenerate Python/importlib.h whenever Lib/importlib/_bootstrap.py or
> Python/freeze_importlib.py changes. So if you make a change to importlib make
> sure to get it working and tested before running 'make' again else you will
> generate a bad frozen importlib (if you do mess up you can also revert the
> changes to importlib.h and re-run make; a perk to having importlib.h checked
> in). Otherwise keep in mind that you can't use any module that isn't a builtin
> (sys.builtin_module_names) in importlib._bootstrap since you can't import
> something w/o import working. =)

We've just now talked on IRC about this regeneration. Since both files --
_bootstrap.py and importlib.h -- are checked in, a make run can try to re-
generate importlib.h. This depends on the timestamps of the two files, which I
don't think Mercurial makes any guarantees about.

We have other instances of this (e.g. the Objects/typeslots.inc file is
generated and checked in), but in the case of importlib, we have to use the
./python binary for freezing to avoid bytecode incompatibilities, which
obviously is a problem if ./python isn't built yet.

> And the only outstanding point of contention in all of this is that some people
> don't like having freeze_importlib.py in Python/ and instead want it in Tools/.
> I didn't leave it in Tools/ as I have always viewed that Python should build w/o
> the Tools directory, but maybe the Linux distros actually ship with it and thus
> this is an unneeded worry. Plus the scripts to generate the AST are in Parser so
> there is precedent for what I have done.

I would have no objections to Python/. There is also e.g. Objects/typeslots.py.

Georg

_______________________________________________
Python-Dev mailing list
Python-Dev [at] python
http://mail.python.org/mailman/listinfo/python-dev
Unsubscribe: http://mail.python.org/mailman/options/python-dev/list-python-dev%40lists.gossamer-threads.com

Subject User Time
importlib is now bootstrapped (and what that means) brett at python Apr 14, 2012, 11:12 AM
    Re: importlib is now bootstrapped (and what that means) g.brandl at gmx Apr 14, 2012, 12:37 PM
        Re: importlib is now bootstrapped (and what that means) martin at v Apr 16, 2012, 7:07 AM
            Re: importlib is now bootstrapped (and what that means) brett at python Apr 16, 2012, 8:21 AM
            Re: importlib is now bootstrapped (and what that means) stefan_ml at behnel Apr 16, 2012, 12:17 PM
                Re: importlib is now bootstrapped (and what that means) amauryfa at gmail Apr 16, 2012, 1:43 PM
    Re: importlib is now bootstrapped (and what that means) stefan_ml at behnel Apr 16, 2012, 12:54 AM
        Re: importlib is now bootstrapped (and what that means) solipsis at pitrou Apr 16, 2012, 4:13 AM
            Re: importlib is now bootstrapped (and what that means) stefan_ml at behnel Apr 16, 2012, 4:49 AM
    Re: importlib is now bootstrapped (and what that means) rdmurray at bitdance Apr 16, 2012, 9:15 AM
        Re: importlib is now bootstrapped (and what that means) solipsis at pitrou Apr 16, 2012, 9:31 AM
            Re: importlib is now bootstrapped (and what that means) brett at python Apr 16, 2012, 9:40 AM
        Re: importlib is now bootstrapped (and what that means) martin at v Apr 16, 2012, 10:04 AM
            Re: importlib is now bootstrapped (and what that means) brett at python Apr 16, 2012, 10:32 AM
        Re: importlib is now bootstrapped (and what that means) g.brandl at gmx Apr 16, 2012, 4:11 PM
            Re: importlib is now bootstrapped (and what that means) solipsis at pitrou Apr 16, 2012, 5:27 PM
                Re: importlib is now bootstrapped (and what that means) brett at python Apr 16, 2012, 5:41 PM
                Re: importlib is now bootstrapped (and what that means) stefan_ml at behnel Apr 16, 2012, 10:12 PM
            Re: importlib is now bootstrapped (and what that means) rdmurray at bitdance Apr 17, 2012, 5:18 AM
    Re: importlib is now bootstrapped (and what that means) martin at v Apr 16, 2012, 10:08 AM
        Re: importlib is now bootstrapped (and what that means) brett at python Apr 16, 2012, 10:33 AM
    Re: importlib is now bootstrapped (and what that means) solipsis at pitrou Apr 16, 2012, 10:44 AM
        Re: importlib is now bootstrapped (and what that means) barry at python Apr 16, 2012, 10:51 AM
            Re: importlib is now bootstrapped (and what that means) rdmurray at bitdance Apr 16, 2012, 11:38 AM
        Re: importlib is now bootstrapped (and what that means) martin at v Apr 16, 2012, 2:12 PM
    Re: importlib is now bootstrapped (and what that means) ericsnowcurrently at gmail Apr 16, 2012, 10:45 AM
    Re: importlib is now bootstrapped (and what that means) stefan_ml at behnel Apr 16, 2012, 10:05 PM
    Re: importlib is now bootstrapped (and what that means) solipsis at pitrou Apr 17, 2012, 2:52 AM
        Re: importlib is now bootstrapped (and what that means) eric at trueblade Apr 17, 2012, 3:43 AM
            Re: importlib is now bootstrapped (and what that means) brett at python Apr 17, 2012, 8:41 AM
    Re: importlib is now bootstrapped (and what that means) solipsis at pitrou Apr 17, 2012, 10:39 AM
        Re: importlib is now bootstrapped (and what that means) brett at python Apr 17, 2012, 12:52 PM
    Re: importlib is now bootstrapped (and what that means) eric at trueblade Apr 20, 2012, 6:54 AM
        Re: importlib is now bootstrapped (and what that means) brett at python Apr 20, 2012, 7:59 AM
        Re: importlib is now bootstrapped (and what that means) ericsnowcurrently at gmail Apr 20, 2012, 8:02 AM
    Re: importlib is now bootstrapped (and what that means) brett at python Apr 20, 2012, 8:04 AM
    Re: importlib is now bootstrapped (and what that means) eric at trueblade Apr 20, 2012, 8:07 AM

  Index | Next | Previous | View Flat
 
 


Interested in having your list archived? Contact Gossamer Threads
 
  Web Applications & Managed Hosting Powered by Gossamer Threads Inc.