Merge lp:~wgrant/launchpad/filter-apt_pkg-deprecationwarnings into lp:launchpad

Proposed by William Grant
Status: Merged
Approved by: Julian Edwards
Approved revision: no longer in the source branch.
Merged at revision: not available
Proposed branch: lp:~wgrant/launchpad/filter-apt_pkg-deprecationwarnings
Merge into: lp:launchpad
Diff against target: 12 lines (+5/-0)
1 file modified
lib/canonical/__init__.py (+5/-0)
To merge this branch: bzr merge lp:~wgrant/launchpad/filter-apt_pkg-deprecationwarnings
Reviewer Review Type Date Requested Status
Julian Edwards (community) Approve
Review via email: mp+22317@code.launchpad.net

Commit message

Filter DeprecationWarnings caused by Lucid's new python-apt API.

Description of the change

Lucid's python-apt recently had a big API refresh, and deprecated the old version. This causes lots of Soyuz tests to fail with DeprecationWarnings, so this branch filters them out until we can move to the new API.

To post a comment you must log in.
Revision history for this message
Julian Edwards (julian-edwards) wrote :

Looks fine, thanks. Can you also file a bug to remind us to fix the code when we're running on lucid on the servers in the DC.

Cheers.

review: Approve
Revision history for this message
Julian Edwards (julian-edwards) wrote :

Oh, I'll land this when PQM is open again.

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'lib/canonical/__init__.py'
2--- lib/canonical/__init__.py 2009-06-25 05:39:50 +0000
3+++ lib/canonical/__init__.py 2010-03-30 08:53:25 +0000
4@@ -14,3 +14,8 @@
5 filter_pattern = '.*(Zope 3.6|provide.*global site manager).*'
6 warnings.filterwarnings(
7 'ignore', filter_pattern, category=DeprecationWarning)
8+
9+# XXX wgrant 2010-03-30 bug=551510:
10+# Also filter apt_pkg warnings, since Lucid's python-apt has a new API.
11+warnings.filterwarnings(
12+ 'ignore', '.*apt_pkg.*', category=DeprecationWarning)