report at bugs
Apr 25, 2012, 8:38 AM
Post #44 of 73
Nick Coghlan <ncoghlan [at] gmail> 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 <report [at] bugs>
Python-bugs-list mailing list