Nick Coghlan <ncogh...@gmail.com> added the comment:

Yes, in that you'll be able to pick up changes in _bootstrap.py *without* 
having to rebuild Python.

With this in place, we could then get rid of the automatic regeneration of 
importlib.h which is a complete nightmare if you ever break your built 
interpreter while hacking on the bootstrapping (as I now know from experience).

With my approach, the experience is instead:

- modify _bootstrap.py, hack until any new tests pass
- run a new explicit "make freeze_importlib" command
- run "make"
- check everything still works
- commit and push

If you forget to run "make freeze_importlib", it doesn't really matter all that 
much, since the frozen one will only be used to find the real one, so it isn't 
a disaster if it's a little out of date. (That said, we should still have a 
test that at least checks the two modules have the same attributes)

It does mean that importlib.__init__ also needs to be able to run in a 
partially initialised interpreter, hence the switch from "import imp" to 
"import _imp".

----------

_______________________________________
Python tracker <rep...@bugs.python.org>
<http://bugs.python.org/issue14657>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to