Re: Python 2.7 disables deprecation warnings by default
Hanno Schlichting <[email protected]>
| Newsgroups | gmane.comp.web.zope.devel |
|---|---|
| Message-ID | <[email protected]> |
On Wed, Jul 7, 2010 at 12:55 PM, Jim Fulton <[email protected]> wrote: > I'm not sure what the best way to handle this is. My initial thought > is that all test runners should enable deprecations by default. This > seems hard to enforce. > > Individual test modules can do this, but I'm uncomfortable having a > test script make a global setting like this and the warning module > doesn't seem to provide a way to capture the current state so it can > be reset after running tests. What about letting the testrunner (zope.testing / zope.testrunner) enable deprecation warnings by default, but add a command line switch to disable them or use the Python default? The test.py script from Zope 2 used to have a --nowarn option to disable all warnings. I think developers should always care about deprecation warnings and it's only developers who will run tests. I can understand why normal users of a Python program shouldn't see deprecation warnings - they usually cannot do anything about them. I also heard many reports from people asking questions about those deprecation warnings in a Plone context. Normal users don't know the difference between a deprecation warning and a SyntaxError or any other warning for that matter. All they see is a "warning" and get anxious. Hanno _______________________________________________ Zope-Dev maillist - [email protected] https://mail.zope.org/mailman/listinfo/zope-dev ** No cross posts or HTML encoding! ** (Related lists - https://mail.zope.org/mailman/listinfo/zope-announce https://mail.zope.org/mailman/listinfo/zope )