[Zope-dev] Deprecate ITerms in zope.app.form? [Re:zope.browser?]
Martijn Faassen
faassen at startifact.com
Thu Jan 8 21:08:22 EST 2009
Hey there,
Roger Ineichen wrote:
[snip]
> I don't like that. Probably we should use the existing devmode
> or something like that? Devmode whould allow us to use it at
> runtime and during testing. What about a deprecation mode?
>
> I really like to use such deprecation messages in production too.
> I think it's a must that we can use them on productive servers
> and see what happens with things stored the ZODB.
I don't like the use of devmode for that, especially as I hardly ever
use devmode for anything (Grok doesn't really do much with it as far as
I know).
I prefer a tool that's external to the source code in question. You
could base it off something like that importchecker (see pypi) does.
It'd analyze what imports take place and whether it's importing from a
place that marks itself as deprecated.
Your mention of the ZODB issue brings up a good point. We'd also need a
ZODB-level tool that can do this reporting in this case. The current
deprecation system already covers this case, though, right? Besides an
import checker you'd need a system that would be able to thrawl through
a ZODB and report deprecated classes. The drawback is that it'd need to
thrawl through a ZODB, so that's rather costly. The benefit is also that
it'd be thorough and find all instances, not just those that happen to
be in use by a particular application.
Regards,
Martijn
More information about the Zope-Dev
mailing list