Message159296
OK, I'm leaning back towards my original preference of getting _frozen_importlib out of the way as quickly as we can.
Specifically, I'm thinking of separating out the entry point used by importlib.__init__ from that used by pythonrun.c, such that the latter calls a "_bootstrap_from_frozen" function that returns a reference to "importlib._bootstrap", which pythonrun then places in the interpreter state.
There would be a few builtin modules that still end up with loaders from _frozen_importlib (specifically, those referenced from importlib._bootstrap._setup as well as importlib itself), but the vast majority of imported modules would only see the "real" versions from importlib._bootstrap.
Attached patch is an initial attempt (the reference counting on the two modules is likely still a bit dodgy - this is my first version that didn't segfault as I got used to the mechanics of dealing with a frozen module, so it errs on the side of leaking references) |
|
Date |
User |
Action |
Args |
2012-04-25 15:15:00 | ncoghlan | set | recipients:
+ ncoghlan, lemburg, brett.cannon, pitrou, eric.smith, Arfrever, eric.snow |
2012-04-25 15:14:59 | ncoghlan | set | messageid: <1335366899.52.0.47982029836.issue14657@psf.upfronthosting.co.za> |
2012-04-25 15:14:56 | ncoghlan | link | issue14657 messages |
2012-04-25 15:14:56 | ncoghlan | create | |
|