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
=== modified file 'src/launchpadlib/tests/test_launchpad.py'
--- src/launchpadlib/tests/test_launchpad.py 2014-07-14 20:29:51 +0000
+++ src/launchpadlib/tests/test_launchpad.py 2015-07-10 22:46:17 +0000
@@ -579,6 +579,7 @@
579 # login() works but triggers a deprecation warning.579 # login() works but triggers a deprecation warning.
580 with warnings.catch_warnings(record=True) as caught:580 with warnings.catch_warnings(record=True) as caught:
581 warnings.simplefilter("always")581 warnings.simplefilter("always")
582 warnings.simplefilter("ignore", PendingDeprecationWarning)
582 NoNetworkLaunchpad.login('consumer', 'token', 'secret')583 NoNetworkLaunchpad.login('consumer', 'token', 'secret')
583 self.assertEqual(len(caught), 1)584 self.assertEqual(len(caught), 1)
584 self.assertEqual(caught[0].category, DeprecationWarning)585 self.assertEqual(caught[0].category, DeprecationWarning)
@@ -587,6 +588,7 @@
587 # get_token_and_login() works but triggers a deprecation warning.588 # get_token_and_login() works but triggers a deprecation warning.
588 with warnings.catch_warnings(record=True) as caught:589 with warnings.catch_warnings(record=True) as caught:
589 warnings.simplefilter("always")590 warnings.simplefilter("always")
591 warnings.simplefilter("ignore", PendingDeprecationWarning)
590 NoNetworkLaunchpad.get_token_and_login('consumer')592 NoNetworkLaunchpad.get_token_and_login('consumer')
591 self.assertEqual(len(caught), 1)593 self.assertEqual(len(caught), 1)
592 self.assertEqual(caught[0].category, DeprecationWarning)594 self.assertEqual(caught[0].category, DeprecationWarning)

Subscribers

People subscribed via source and target branches