-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 vyshakh krishnan wrote: > Hi everybody, > > > While porting Zope2 on Python2.5, I am now trying to remove the > deprecation warnings.Most of them are due to the raising of string > exceptions. One of such warnings in the module Products is > > /home/zope/ztrunk25/lib/python/OFS/SimpleItem.py:248: > DeprecationWarning: raising a string exception is deprecated > raise error_type, v, tb > > These warnings can be removed by changing these string exceptions to > class based exceptions. > Can anyone suggest how these changes can be made?
That code is not in the Products module: it is inside OFS.SimpleItem's 'raise_standardErrorMessage' method. Note that the method explicitly converts the error_type to a string above: that is the source of the DeprecationWarning, almost certainly, as there should be no remaining traces of explicitly-created string exceptions anywhere in the Zope codebase. Tres. - -- =================================================================== Tres Seaver +1 540-429-0999 [EMAIL PROTECTED] 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 iD8DBQFIh1FR+gerLs4ltQ4RAt7AAJ96zocnGl6fMw6qKfLn59/bV6/ZyQCcCdL+ Vqw6L0yBM1eQ4z0D3yxS0kM= =2F4j -----END PGP SIGNATURE----- _______________________________________________ Zope-Dev maillist - [email protected] 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 )
