#1741 closed defect (was already fixed)

consider suppressing all DeprecationWarnings (and maybe RuntimeWarnings and UserWarnings?)

Reported by: davidsarah Owned by: davidsarah
Priority: normal Milestone: soon
Component: code Version: 1.9.1
Keywords: deprecation warning error Cc:
Launchpad Bug:

Description (last modified by davidsarah)

We currently suppress 8 DeprecationWarnings (possibly 10 after fixing #1740), 2 UserWarnings, and 1 RuntimeWarning from various dependencies. I don't remember a case where a warning ever told us anything useful. Let's consider suppressing all warnings unconditionally.

Change History (9)

comment:1 Changed at 2012-05-17T01:20:07Z by davidsarah

  • Description modified (diff)

comment:2 Changed at 2012-05-17T01:22:46Z by davidsarah

  • Description modified (diff)

comment:3 Changed at 2012-05-18T12:43:06Z by killyourtv

I think that'd be a good idea. I've seen a few people freak out over

zope.interface-3.8.0-py2.6-win32.egg\zope\interface\interface.py:688: UserWarning: Hashing uninitialized InterfaceClass instance

...from an older version and users don't need to see warnings like this one.

comment:4 Changed at 2012-06-18T21:04:15Z by davidsarah

  • Milestone changed from undecided to 1.10.0
  • Owner set to davidsarah
  • Status changed from new to assigned

This annoyed me one too many times; it's going in 1.10.

comment:5 Changed at 2012-06-21T22:39:00Z by warner

It might be useful to have a --display-deprecation-warnings option, and then have a buildbot step that just runs tahoe --version --display-deprecation-warnings and counts the output, just to keep an eye on them in an inconspicious place.

comment:6 Changed at 2012-06-22T13:42:42Z by davidsarah

What I was thinking was that we could display unexpected warnings (captured using logging.captureWarnings) in a test that gets run last. That would mean that previous tests will have imported or exercised any code that would have caused a warning, whereas a standalone command option wouldn't necessarily do that. Then the definition of which warnings are expected would go just in that test, rather than being used by src/allmydata/__init__.py.

Last edited at 2012-06-22T13:42:55Z by davidsarah (previous) (diff)

comment:7 Changed at 2012-06-22T13:50:59Z by davidsarah

Hmm, but logging.captureWarnings is only in Python 2.7, even though the docs don't say so. Well, we could skip the test for unexpected warnings if < Python 2.7.

comment:8 Changed at 2012-12-20T16:44:00Z by davidsarah

  • Milestone changed from 1.10.0 to 1.11.0

comment:9 Changed at 2020-01-17T14:09:59Z by exarkun

  • Resolution set to was already fixed
  • Status changed from assigned to closed

Python has suppressed DeprecationWarning? by default for a long time now.

Note: See TracTickets for help on using tickets.