From: <bc...@wo...> - 2000-11-03 15:37:48
|
[cc'ed to Greg Stein] [Samuele Pedroni] >[..] >I have read the archive of import-sig and looked at the version of imputil >distributed with Python 2.0. > >Finn or somebody else knows what is the actual state of the issue? It is my impression and recollection, that Greg Stein (the author of imputil) wanted to move the implementation of dotted import into python code. That should make it easier to change and experiment with. That would have been a good and noble goal which could have helped JPython as well. That was why I was watching the import-sig. Some design disagreements could not quite be worked out between Greg and GvR. One of the issues that GvR wanted was the ability to use the imputil to fake an import. Rather than running the code object and creating an module object, the fake should just return the text/identification of the imported module. That way freeze tools would not have to re implement the entire dotted import algorithm all over again. >will imputil substitute ihooks, the distributed version seems not finished >and contains todos and referees and (Finn's) notes about what should be done >to make it possibly work under J(P)ython. I don't think that imputil will replace anything. At least not at the moment. It is a useful frame work for making interesting import features, like f.ex importing from a zip file or downloading module from a CPAN library. >If it will be the future imp hooks framework, not ignoring it for the design >of load sets is maybe a not bad design idea, but clearly imp hooks >and load sets are in some sense orthogonal and the latter very java specific. In its current state it is not the future of anything. It will stay a somewhat obscure and undocumented module until Greg starts pushing it again. >[into the future] >My first look impression, is that imputil design and import-sig discussion >have ignored the jython side of the problem. Yes. But then it is just our task to keep reminding the nice CPython people that it also have to work with jython. >imputil should support RExec and the import practice of major py pkgs >and extensions plus freeze and try to offer the primitives for mimicking >the java load behaviours (url loading).... > >jython imp should support jpythonc, maybe somekind of poor freeze, java >reloading, mixing of classpath and sys.path ... > >My impression is that both world have something to learn from each other, I agree. >for example jython is maybe the right ground to decide what could make sense >on sys.path (urls vs. 'importers' ...) and given the constraints for load sets >design, that the concept of virtual pkg can sometimes be useful. > >On the other side jython lacks something like RExec, ok we have >java security but it is (very) difficult to use it for python code directly, >maybe we need an extension of RExec concepts that fits with java model: >but that's a real challenge (completely aware of that!) and maybe not that >much useful (very low prio ;)). regards, finn |