Re: [Zope3-dev], [Zope-dev] Import checking code
Fred Drake wrote: On Thursday 15 April 2004 13:22, Martijn Faassen wrote: If somebody lets me know which API they want implemented for retrieving imports (and use of imports) I could do this lifting work myself. I'm not sure simply re-implementing one of the finddeps.py internal interfaces is the right thing to do; that's some incredibly cludgey code in Zope 3. There's a lot of confusion about what values are paths and which are module names, and that makes me very uncomfortable. If you'd like to replace the code that locates imports, feel free to do so. It may be that conciseness wins; the tokenize-based approach certainly ended up being more code than I'd expected initially. I'll try to find some time to take a look at it. Dependency checking is sort of a natural thing to use importchecker stuff for, but importchecker itself may need some refactoring. :) On Thursday 15 April 2004 01:21 pm, Stephan Richter wrote: Fred has fixed that a while ago already (if I read the checkins correctly). :-) No, Martijn's talking about something else... kinda. I imagine he had even stronger feelings about your initial implementation. ;-) Right, I'd missed the transition to the tokenize based code, which probably is reasonably reliable. I did have objections to the regular expressions. :) Regards, Martijn ___ Zope-Dev maillist - [EMAIL PROTECTED] http://mail.zope.org/mailman/listinfo/zope-dev ** No cross posts or HTML encoding! ** (Related lists - http://mail.zope.org/mailman/listinfo/zope-announce http://mail.zope.org/mailman/listinfo/zope )
[Zope3-dev], [Zope-dev] Import checking code
On Thursday 15 April 2004 13:22, Martijn Faassen wrote: Note that for checking dependencies in Python code I still think this tool could be improved by using technology from importchecker.py ... which can use Python's compiler module to lift all imports from source code, which I think is safer than the hand crafted parser approach finddeps.py takes now. I keep meaning to get back to you about this; sorry it's taken me so long. I wrote the tokenize-based code before I saw your importchecker.py code; I'd decided to go with the tokenize module instead of the compiler package since the later was poorly documented (IMHO). I've no really strong feeling about either approach being better. If somebody lets me know which API they want implemented for retrieving imports (and use of imports) I could do this lifting work myself. I'm not sure simply re-implementing one of the finddeps.py internal interfaces is the right thing to do; that's some incredibly cludgey code in Zope 3. There's a lot of confusion about what values are paths and which are module names, and that makes me very uncomfortable. If you'd like to replace the code that locates imports, feel free to do so. It may be that conciseness wins; the tokenize-based approach certainly ended up being more code than I'd expected initially. On Thursday 15 April 2004 01:21 pm, Stephan Richter wrote: Fred has fixed that a while ago already (if I read the checkins correctly). :-) No, Martijn's talking about something else... kinda. I imagine he had even stronger feelings about your initial implementation. ;-) -Fred -- Fred L. Drake, Jr. fred at zope.com PythonLabs at Zope Corporation ___ Zope-Dev maillist - [EMAIL PROTECTED] http://mail.zope.org/mailman/listinfo/zope-dev ** No cross posts or HTML encoding! ** (Related lists - http://mail.zope.org/mailman/listinfo/zope-announce http://mail.zope.org/mailman/listinfo/zope )