[Zope-dev] Re: SVN: Zope/trunk/ deprecated ZGadfly/Gadfly

Tres Seaver tseaver at palladion.com
Thu Dec 22 14:56:41 EST 2005


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Andreas Jung wrote:
> Log message for revision 40981:
>   deprecated ZGadfly/Gadfly
>   
> 
> Changed:
>   U   Zope/trunk/doc/CHANGES.txt
>   U   Zope/trunk/lib/python/Products/ZGadflyDA/__init__.py
> 
> -=-
> Modified: Zope/trunk/doc/CHANGES.txt
> ===================================================================
> --- Zope/trunk/doc/CHANGES.txt	2005-12-22 11:32:11 UTC (rev 40980)
> +++ Zope/trunk/doc/CHANGES.txt	2005-12-22 11:37:44 UTC (rev 40981)
> @@ -28,6 +28,8 @@
>  
>        - ZClasses are deprecated and should no longer be used.
>  
> +      - ZGadyFlyDA/Gadfly is deprecated
> +
>        - Added a "clock server" servertype which allows users to
>          configure methods that should be called periodically as if
>          they were being called by a remote user agent on one of Zope's
> 
> Modified: Zope/trunk/lib/python/Products/ZGadflyDA/__init__.py
> ===================================================================
> --- Zope/trunk/lib/python/Products/ZGadflyDA/__init__.py	2005-12-22 11:32:11 UTC (rev 40980)
> +++ Zope/trunk/lib/python/Products/ZGadflyDA/__init__.py	2005-12-22 11:37:44 UTC (rev 40981)
> @@ -15,6 +15,12 @@
>  $Id$
>  """
>  
> +import warnings
> +warnings.warn('Using Gadfly and ZGadflyDA is deprecated. The module will be '
> +              'removed in Zope 2.11)', 
> +              DeprecationWarning,
> +              stacklevel=2) 
> +
>  import Globals, os
>  
>  classes=('DA.Connection',)
> 

Deprecation warnings at package scopy of a product aren't helpful,
because they fire *every time Zope starts*, whether the person *uses*
the deprecated pacakge or not.  Let's find a way to trigger the warning
from *third-party code*, but not from Zope code itself (I note that the
ZClass warning spews every time, as well).


Tres.
- --
===================================================================
Tres Seaver          +1 202-558-7113          tseaver at palladion.com
Palladion Software   "Excellence by Design"    http://palladion.com
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.1 (GNU/Linux)
Comment: Using GnuPG with Thunderbird - http://enigmail.mozdev.org

iD8DBQFDqwT4+gerLs4ltQ4RAtrlAJ9qcT6Qhl5JR3lJRlwtxbxSA5iVGQCcCIXq
edjqSCeMePJxdJFZVdPldTw=
=hWk4
-----END PGP SIGNATURE-----



More information about the Zope-Dev mailing list