[Grok-dev] strategy for losing the zope.app packages

Reinout van Rees reinout at vanrees.org
Wed Dec 9 08:29:25 EST 2009


On 12/3/09 5:04 PM, Martijn Faassen wrote:
>
> When we migrate to the ZTK we would like new installations of Grok not
> to depend on zope.app packages where we can avoid it. Making Grok as
> clean as possible from zope.app packages would also help us making sure
> we get the dependencies in Grok and grokcore.* right.

[...]

> For grokcore.* I think we should be more ruthless and not provide
> backwards compatibility. grokcore.* packages are used as libraries and
> not as a framework environment, so I think we'd be all right in doing so.

For internal use I took your "importchecker" script and turned it into 
z3c.dependencychecker.  It is now in zope's svn. (And on pypi).

What it does? It uses importchecker to look in the code: which imports 
are done? Which imports are done in the tests? It adds what it can 
deduct from .zcml files.  So now we know what gets imported.

It then looks at the setup.py (well, indirectly via the egginfo). And it 
reports on missing dependencies and on extra dependencies.  And on 
dependencies that should be test dependencies.

It doesn't catch everything: the "from zope import interface" style 
isn't handled yet, so it complains about a missing "zope" dependency :-)


It really helped getting our internal setup.py's up to date. I've gone 
through the grokcore packages yesterday and this morning, adding missing 
imports here and there. And I added missing test dependencies.

Note that all except one grokcore.* packages don't have [test] 
extra_require (or test_require). I'm planning on adding them once I 
verify that it all works and which one of the two to pick.  Also depends 
on how the run-all-tests thingy runs those tests.  Any opinions?


Reinout



More information about the Grok-dev mailing list