shortlist() issues UserWarnings rather than raising soft OOPSes

Bug #708099 reported by Gavin Panella
This bug report is a duplicate of:  Bug #636700: Convert UserWarning to oops. Edit Remove
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Launchpad itself
Triaged
High
Unassigned

Bug Description

The checkwatches logs are littered with warnings like:

  shortlist() should not be used here. It's meant to listify
  sequences with no more than 15 items. There were 40 items.
    return self.getConjoinedMaster(shortlist(self.bug.bugtasks))

It would be more useful to generate a soft OOPS report in these cases - they get collated and reported to developers.

Gavin Panella (allenap)
description: updated
Gavin Panella (allenap)
description: updated
Revision history for this message
Robert Collins (lifeless) wrote : Re: [Bug 708099] Re: shortlist() should accept a context argument

Perhaps we should just emit an OOPS rather than emit a warning.
warnings go to logs but skip a lot of context. oopses give us
backtraces, urls etc etc.

Revision history for this message
Gavin Panella (allenap) wrote : Re: shortlist() should accept a context argument

Or we could bite the bullet and log all warnings as OOPSes.

http://docs.python.org/release/2.6/library/warnings.html#warnings.showwarning
states:

  You may replace this function with an alternative implementation by
  assigning to warnings.showwarning.

Revision history for this message
Robert Collins (lifeless) wrote : Re: [Bug 708099] Re: shortlist() should accept a context argument

On Fri, Jan 28, 2011 at 2:50 AM, Gavin Panella
<email address hidden> wrote:
> Or we could bite the bullet and log all warnings as OOPSes.

Sounds great to me.

-Rob

summary: - shortlist() should accept a context argument
+ shortlist() issues UserWarnings rather than raising soft OOPSes
description: updated
Changed in launchpad:
importance: Low → High
tags: added: easy
tags: added: oops-infrastructure
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.