[Zope-dev] Deprecation warning in zope.app.appsetup.bootstrap
Hi, the utility setup code in zope.app.appsetup.bootstrap contains a somewhat annoying deprecation warning which said that the default option would go away in 3.5. This package moved beyond 3.5 and still has the code in it. It throws the folloing warning: /home/ctheune/.buildout/eggs/zope.app.appsetup-3.4.1-py2.4.egg/zope/app/appsetup/bootstrap.py:85: DeprecationWarning: asObject=False is deprecated and will not be supported after Zope 3.5 The deprecation seems to intend to remove the behaviour of the existing default parameter by removing the parameter completely. I'd be happy with that, but I can't write my code in a way to both silences the deprecation warning and stays future compatible (because of the argument that will go away). I wonder whether removing that argument is still a todo. If it is, I'd be happy to do so now. Christian -- Christian Theune · [EMAIL PROTECTED] gocept gmbh & co. kg · forsterstraße 29 · 06112 halle (saale) · germany http://gocept.com · tel +49 345 1229889 7 · fax +49 345 1229889 1 Zope and Plone consulting and development signature.asc Description: This is a digitally signed message part ___ 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 )
[Zope-dev] Deprecation Warning
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? Many of the the warnings in other modules are found similar to this warning. regards vyshakh ___ 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 )
[Zope-dev] Deprecation Warning
Hello everyone, Since the deprecation warning is due to the conversion of error_type into string by 'raise_standardErrorMessage' method, is it still necessary to use new user defined Exception class or do we want to modify the function 'raise_standardErrorMessage' . ___ 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 )
Re: [Zope-dev] Deprecation Warning
On Wed, Jul 23, 2008 at 14:03, vyshakh krishnan <[EMAIL PROTECTED]> 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? Well, typically you create classes based on Exception or BaseException, and use them instead. Maybe you could expand a bit on what your worries are? -- Lennart Regebro: Zope and Plone consulting. http://www.colliberty.com/ +33 661 58 14 64 ___ 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 )
[Zope-dev] Deprecation Warning
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? With regards Vyshakh ___ 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 )