Philipp von Weitershausen wrote:

See below :). Of course, you don't have to deprecate zLOG instantly.

How else do you stop people still following the old patterns ;-)

I'm happy to sign up for this, but can't promise when it'll happen...

So let's schedule it for Zope 2.10 then :).

OK, I promise, I will try, even if only to stop Jens whining ;-)

and the custom zLOG logging level constants could
be wrapped in a deprecation warnings (zope.deprecation.deprecate)

How would I do this? Can you give me an example?

Use the doctests, Luke :). Anyway, here's an example:
http://svn.zope.org/Zope3/trunk/src/zope/i18nmessageid/__init__.py?rev=39525&view=auto

It shows how to wrap stuff in deprecation proxies using 
zope.deprecation.deprecate(). Then
any access to these objects (e.g. importing) will trigger a warning. It also 
demonstrates
how to temporarily turn off those deprecation warnings, for example when you're 
using
deprecated stuff for internal use, such as still supporting old import 
locations (as in
this case).

Great, that's the bit I was looking for...

OK, I will try, but I can't make any definite problems. I'll take a branch of the trunk and get going on it, but if anyone else is thinking of adding new code that uses zLOG, please don't ;-)

Chris

--
Simplistix - Content Management, Zope & Python Consulting
           - http://www.simplistix.co.uk

_______________________________________________
Zope-Dev maillist  -  Zope-Dev@zope.org
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 )

Reply via email to