Message159296
| Author |
ncoghlan |
| Recipients |
Arfrever, brett.cannon, eric.smith, eric.snow, lemburg, ncoghlan, pitrou |
| Date |
2012年04月25日.15:14:49 |
| SpamBayes Score |
-1.0 |
| Marked as misclassified |
Yes |
| Message-id |
<1335366899.52.0.47982029836.issue14657@psf.upfronthosting.co.za> |
| In-reply-to |
| Content |
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) |
|