[ZODB-Dev] importchecker and the zodb
Tim Peters
tim at zope.com
Thu Feb 26 14:25:20 EST 2004
[Martijn Faassen]
> I have a tool called importchecker which can quite reliably detect
> unused imports in large Python packages. It's been used successfully
> against Zope 3.
>
> http://www.zope.org/Members/faassen/importchecker
>
> When I run it against Zope 3, I notice that the ZODB code seems to
> contain quite a few unused imports as well. I've however refrained in
> the past from removing these unused imports from ZODB code.
That's only because you know you'd get in deep trouble <wink>.
> Do I have permission to run the tool over ZODB as well and remove
> unused imports? Of course I'll be running the tests and the like
> before checking in.
Sounds good to me -- please do!
> Should I run it in the ZODB tree or is it okay to run it in the Zope 3
> tree -- are these now the same trees in CVS?
ZODB in ZODB HEAD and Zope3 HEAD and Zope2 HEAD are all the same now (well,
at least so far as the core code goes). It's best to run the tests from all
checkouts, because the decorative addons differ, and because Zope sometimes
does, umm, creative things with ZODB internals that are neither documented
nor covered by the ZODB test suite. Note too that it's important to run
test.py with --all when changing ZODB, else the bulk of the expensive ZEO
tests don't get run at all. Also note that it's traditional for at least
one of the ZODB tool scripts to be broken at any given time (including
releases, alas), since there's almost no test coverage of those.
> Alternatively of course you can download the tool and run it yourself.
So far, it sounds easier for me if you do this <wink>.
More information about the ZODB-Dev
mailing list