[Zope-dev] Deprecate ITerms in zope.app.form? [Re: zope.browser?]

Martijn Faassen faassen at startifact.com
Wed Dec 17 08:31:22 EST 2008


Marius Gedminas wrote:
> On Tue, Dec 16, 2008 at 03:45:01PM -0500, Tres Seaver wrote:
[why would we ever want to avoid giving deprecation warnings?]
>> One issue is that adding deprecation messages for importing symbols from
>> the old makes all "downstream" code add ugly BBB warts in order to
>> suppress them when run against multiple versions.
> 
> Also consider deprecation messages triggered not by code, but by the use
> in existing ZODB databases.  ISite is often directlyProvided by
> persistent objects, which makes the ZODB store a fully-qualified
> interface name.  You'd need an evolution script to walk the container
> tree and force a repickling of every site to prevent the app from
> spewing deprecation warnings at runtime.

I don't understand Tres' issue very well; I'm with Roger in that 
deprecation warnings are there for a reason. That said if there's an 
easier way to shut them up for people who don't want to bother with them 
immediately that sounds reasonable. PendingDeprecationWarning as Brian 
points out sounds like something we should look into.

The ZODB issue I do understand and perhaps that is the effect Tres is 
pointing to as well. I hadn't realized that ISite was pickled 
frequently. This may make it different from ITerms, which I assume isn't 
generally pickled.

If we can get PendingDeprecationWarning working, people like Roger can 
keep refactoring without bothering too many people and still get the 
deprecation warnings they want to see. Then at some stage when a new 
release of a framework (Zope 3, Grok, Zope 2) is made, we could convert 
these warnings into true DeprecationWarnings and provide upgrade code 
for ZODB-level code. Or even not - the Grok project could for instance 
just have the policy not to release with any PendingDeprecationWarnings 
present either.

For things we know never get pickled, we could choose to use 
DeprecationWarning right away. This might run into Tres' issue, which I 
don't quite understand yet. :)

How does that sound?

Regards,

Martijn



More information about the Zope-Dev mailing list