Merge lp:~zulcss/python-novaclient/novaclient-requests into lp:~openstack-ubuntu-testing/python-novaclient/grizzly

Proposed by Chuck Short
Status: Merged
Merged at revision: 62
Proposed branch: lp:~zulcss/python-novaclient/novaclient-requests
Merge into: lp:~openstack-ubuntu-testing/python-novaclient/grizzly
Diff against target: 99 lines (+78/-0)
3 files modified
debian/changelog (+2/-0)
debian/patches/fix-requests-requirements.patch (+75/-0)
debian/patches/series (+1/-0)
To merge this branch: bzr merge lp:~zulcss/python-novaclient/novaclient-requests
Reviewer Review Type Date Requested Status
Adam Gandelman (community) Approve
Review via email: mp+146678@code.launchpad.net
To post a comment you must log in.
Revision history for this message
Adam Gandelman (gandelman-a) wrote :

LGTM assuming it gets updated/dropped according to current review @ https://review.openstack.org/#/c/20119/

review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'debian/changelog'
2--- debian/changelog 2013-01-17 14:02:55 +0000
3+++ debian/changelog 2013-02-05 16:55:27 +0000
4@@ -4,6 +4,8 @@
5 * debian/control: Add python-requests as a build-dep.
6 * debian/control: Add python-fixtures as a build-dep.
7 * debian/control: Use python-testtools instead of python-unittest2
8+ * debian/patches/fix-requests-requirements.patch: Fix python-requests
9+ requirements.
10
11 -- Chuck Short <zulcss@ubuntu.com> Sat, 29 Dec 2012 12:57:45 -0600
12
13
14=== added directory 'debian/patches'
15=== added file 'debian/patches/fix-requests-requirements.patch'
16--- debian/patches/fix-requests-requirements.patch 1970-01-01 00:00:00 +0000
17+++ debian/patches/fix-requests-requirements.patch 2013-02-05 16:55:27 +0000
18@@ -0,0 +1,75 @@
19+From 055823d99b4a5fd6350b29ba6b0b8c939ee2deef Mon Sep 17 00:00:00 2001
20+From: Sascha Peilicke <saschpe@suse.de>
21+Date: Mon, 21 Jan 2013 12:00:54 +0100
22+Subject: [PATCH] Update to requests >= 1.0.0
23+
24+The requests module dropped all configuration with the 1.0.0 release.
25+There's no danger_mode and no 'verbose'' mode. The former
26+shouldn't be necessary anymore and the latter can be done by setting
27+a different log handler for the request.logging root logger.
28+
29+Change-Id: Iec169ef6e39097814cdbf1b777bc0590236692ba
30+---
31+ novaclient/client.py | 7 +------
32+ tests/utils.py | 1 -
33+ tools/pip-requires | 2 +-
34+ 3 files changed, 2 insertions(+), 8 deletions(-)
35+
36+diff --git a/novaclient/client.py b/novaclient/client.py
37+index 9b97979..e66a545 100644
38+--- a/novaclient/client.py
39++++ b/novaclient/client.py
40+@@ -51,10 +51,6 @@ class HTTPClient(object):
41+
42+ USER_AGENT = 'python-novaclient'
43+
44+- requests_config = {
45+- 'danger_mode': False,
46+- }
47+-
48+ def __init__(self, user, password, projectid, auth_url=None,
49+ insecure=False, timeout=None, proxy_tenant_id=None,
50+ proxy_token=None, region_name=None,
51+@@ -106,7 +102,7 @@ class HTTPClient(object):
52+ ch = logging.StreamHandler()
53+ self._logger.setLevel(logging.DEBUG)
54+ self._logger.addHandler(ch)
55+- self.requests_config['verbose'] = sys.stderr
56++ requests.logging.getLogger(requests.__name__).addHandler(ch)
57+
58+ def use_token_cache(self, use_it):
59+ self.os_cache = use_it
60+@@ -168,7 +164,6 @@ class HTTPClient(object):
61+ method,
62+ url,
63+ verify=self.verify_cert,
64+- config=self.requests_config,
65+ **kwargs)
66+ self.http_log_resp(resp)
67+
68+diff --git a/tests/utils.py b/tests/utils.py
69+index ef231a7..0c9cb89 100644
70+--- a/tests/utils.py
71++++ b/tests/utils.py
72+@@ -4,7 +4,6 @@ import testtools
73+
74+ class TestCase(testtools.TestCase):
75+ TEST_REQUEST_BASE = {
76+- 'config': {'danger_mode': False},
77+ 'verify': True,
78+ }
79+
80+diff --git a/tools/pip-requires b/tools/pip-requires
81+index 7fbcbbe..a64ff5a 100644
82+--- a/tools/pip-requires
83++++ b/tools/pip-requires
84+@@ -1,5 +1,5 @@
85+ argparse
86+ iso8601>=0.1.4
87+ prettytable>=0.6,<0.7
88+-requests<1.0
89++requests>=1.0.0
90+ simplejson
91+--
92+1.8.1.2
93+
94
95=== added file 'debian/patches/series'
96--- debian/patches/series 1970-01-01 00:00:00 +0000
97+++ debian/patches/series 2013-02-05 16:55:27 +0000
98@@ -0,0 +1,1 @@
99+fix-requests-requirements.patch

Subscribers

People subscribed via source and target branches