Merge lp:~xnox/launchpadlib/httplib-proxy into lp:launchpadlib

Proposed by Dimitri John Ledkov
Status: Merged
Merged at revision: 139
Proposed branch: lp:~xnox/launchpadlib/httplib-proxy
Merge into: lp:launchpadlib
Diff against target: 57 lines (+7/-5)
1 file modified
src/launchpadlib/launchpad.py (+7/-5)
To merge this branch: bzr merge lp:~xnox/launchpadlib/httplib-proxy
Reviewer Review Type Date Requested Status
Barry Warsaw Pending
LAZR Developers Pending
Review via email: mp+243880@code.launchpad.net

Description of the change

Use httplib2.Http default value for proxy_info.

To post a comment you must log in.
lp:~xnox/launchpadlib/httplib-proxy updated
139. By Dimitri John Ledkov

Use httplib's default for proxy_info - callable to detect proxy.

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'src/launchpadlib/launchpad.py'
2--- src/launchpadlib/launchpad.py 2014-07-03 10:44:33 +0000
3+++ src/launchpadlib/launchpad.py 2014-12-05 23:22:15 +0000
4@@ -28,6 +28,8 @@
5 from urlparse import urlsplit
6 import warnings
7
8+from httplib2 import proxy_info_from_environment
9+
10 from lazr.restfulclient.resource import (
11 CollectionWithKeyBasedLookup,
12 HostedFile, # Re-import for client convenience
13@@ -165,7 +167,7 @@
14
15 def __init__(self, credentials, authorization_engine,
16 credential_store, service_root=uris.STAGING_SERVICE_ROOT,
17- cache=None, timeout=None, proxy_info=None,
18+ cache=None, timeout=None, proxy_info=proxy_info_from_environment,
19 version=DEFAULT_VERSION):
20 """Root access to the Launchpad API.
21
22@@ -216,7 +218,7 @@
23 @classmethod
24 def login(cls, consumer_name, token_string, access_secret,
25 service_root=uris.STAGING_SERVICE_ROOT,
26- cache=None, timeout=None, proxy_info=None,
27+ cache=None, timeout=None, proxy_info=proxy_info_from_environment,
28 authorization_engine=None, allow_access_levels=None,
29 max_failed_attempts=None, credential_store=None,
30 credential_save_failed=None, version=DEFAULT_VERSION):
31@@ -268,7 +270,7 @@
32 @classmethod
33 def get_token_and_login(cls, consumer_name,
34 service_root=uris.STAGING_SERVICE_ROOT,
35- cache=None, timeout=None, proxy_info=None,
36+ cache=None, timeout=None, proxy_info=proxy_info_from_environment,
37 authorization_engine=None, allow_access_levels=[],
38 max_failed_attempts=None, credential_store=None,
39 credential_save_failed=None,
40@@ -364,7 +366,7 @@
41 @classmethod
42 def login_anonymously(
43 cls, consumer_name, service_root=uris.STAGING_SERVICE_ROOT,
44- launchpadlib_dir=None, timeout=None, proxy_info=None,
45+ launchpadlib_dir=None, timeout=None, proxy_info=proxy_info_from_environment,
46 version=DEFAULT_VERSION):
47 """Get access to Launchpad without providing any credentials."""
48 (service_root, launchpadlib_dir, cache_path,
49@@ -378,7 +380,7 @@
50 @classmethod
51 def login_with(cls, application_name=None,
52 service_root=uris.STAGING_SERVICE_ROOT,
53- launchpadlib_dir=None, timeout=None, proxy_info=None,
54+ launchpadlib_dir=None, timeout=None, proxy_info=proxy_info_from_environment,
55 authorization_engine=None, allow_access_levels=None,
56 max_failed_attempts=None, credentials_file=None,
57 version=DEFAULT_VERSION, consumer_name=None,

Subscribers

People subscribed via source and target branches