[Zope-dev] Re: Deprecation Warning

Tres Seaver tseaver at palladion.com
Mon Jul 28 14:39:31 EDT 2008


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

vyshakh krishnan wrote:
> Hi Everyone,
> 
> 
> The deprecation warning while testing Product module is
> 
> /home/zope/ztrunk25/lib/python/OFS/SimpleItem.py:248:
> DeprecationWarning: raising a string exception is deprecated
>   raise error_type, v, tb
> 
> 
> 
> Is it enough to define a new sub class of Exception which accept
> error_type,v as arguments and just print these messages to fix this
> warning?

First, remove the forced conversion of 'error_type' to a string.  Does
that make the warning go away?

> Many of the the warnings in other modules are found similar to this warning.

Please enumerate them.


Tres.
- --
===================================================================
Tres Seaver          +1 540-429-0999          tseaver at palladion.com
Palladion Software   "Excellence by Design"    http://palladion.com
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.6 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iD8DBQFIjhJj+gerLs4ltQ4RArauAKDDLVHNc936dYCXUI4v9Ec22/sbfQCfcMHq
+N2ioO1db1R86IYZAFONNSY=
=cLbS
-----END PGP SIGNATURE-----



More information about the Zope-Dev mailing list