Merge lp:~barry/launchpadlib/lp1473577 into lp:launchpadlib

Proposed by Barry Warsaw
Status: Merged
Merged at revision: 144
Proposed branch: lp:~barry/launchpadlib/lp1473577
Merge into: lp:launchpadlib
Diff against target: 19 lines (+2/-0)
1 file modified
src/launchpadlib/tests/test_launchpad.py (+2/-0)
To merge this branch: bzr merge lp:~barry/launchpadlib/lp1473577
Reviewer Review Type Date Requested Status
Dimitri John Ledkov Approve
Review via email: mp+264464@code.launchpad.net

Description of the change

Python 3.5 makes platform.linux_distribution() a PendingDeprecationWarning. lazr.restfulclient's use of this API breaks two tests in launchpadlib under Python 3.5. I don't have a fix for lazr.restfulclient, but this will help make launchpadlib's test suite pass.

To post a comment you must log in.
Revision history for this message
Dimitri John Ledkov (xnox) :
review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'src/launchpadlib/tests/test_launchpad.py'
2--- src/launchpadlib/tests/test_launchpad.py 2014-07-14 20:29:51 +0000
3+++ src/launchpadlib/tests/test_launchpad.py 2015-07-10 22:46:17 +0000
4@@ -579,6 +579,7 @@
5 # login() works but triggers a deprecation warning.
6 with warnings.catch_warnings(record=True) as caught:
7 warnings.simplefilter("always")
8+ warnings.simplefilter("ignore", PendingDeprecationWarning)
9 NoNetworkLaunchpad.login('consumer', 'token', 'secret')
10 self.assertEqual(len(caught), 1)
11 self.assertEqual(caught[0].category, DeprecationWarning)
12@@ -587,6 +588,7 @@
13 # get_token_and_login() works but triggers a deprecation warning.
14 with warnings.catch_warnings(record=True) as caught:
15 warnings.simplefilter("always")
16+ warnings.simplefilter("ignore", PendingDeprecationWarning)
17 NoNetworkLaunchpad.get_token_and_login('consumer')
18 self.assertEqual(len(caught), 1)
19 self.assertEqual(caught[0].category, DeprecationWarning)

Subscribers

People subscribed via source and target branches