Codebase list lazr.restfulclient / fresh-snapshots/main
[ Debian Janitor ] New upstream snapshot. Debian Janitor 2 years ago
15 changed file(s) with 434 addition(s) and 95 deletion(s). Raw diff Collapse all Expand all
0 ===========================
1 NEWS for lazr.restfulclient
2 ===========================
3
4 0.14.4
5 ======
6
7 - Drop support for Python < 2.6.
8
9 0.14.3 (2020-01-27)
10 ===================
11
12 - Restore from_string, to_string, and __str__ methods of
13 lazr.restfulclient.authorize.oauth.AccessToken, unintentionally removed
14 in 0.14.0.
15
16 0.14.2 (2018-11-17)
17 ===================
18
19 - Fix compatibility with httplib2 0.12.0 for Python 3. [bug=1803754]
20 - Really fix compatibility with httplib2 < 0.9.
21 - Fix compatibility with httplib2 0.9 for Python 3.
22 - Require httplib2 >= 0.7.7 for Python 3.
23
24 0.14.1 (2018-11-16)
25 ===================
26
27 - Add compatibility with httplib2 0.12.0. [bug=1803558]
28
29 0.14.0 (2018-05-08)
30 ===================
31
32 - Switch from buildout to tox.
33 - Port from oauth to oauthlib. Some tests still need to use oauth until
34 lazr.authentication is ported. [bug=1672458]
35 - Use the distro module rather than platform.linux_distribution, since the
36 latter is deprecated in Python 3.5 and will be removed in 3.7.
37 [bug=1473577]
38
39 0.13.5 (2017-09-04)
40 ===================
41
42 - Fix bytes vs. unicode in json.loads calls. [bug=1403524]
43 - Decode header before comparison. [bug=1414075]
44 - Fix urllib unquote imports. [bug=1414055]
45 - Fix urllib urlencode imports. [bug=1425609]
46 - Tolerate httplib2 versions earlier than 0.9 again.
47 - Fix handling of 304 responses with an empty body on Python 3.
48 [bug=1714960]
49
50 0.13.4 (2014-12-05)
51 ===================
52
53 - Port to python3.
54 - Support proxy settings from environment by default.
55
56 0.13.3 (2013-03-22)
57 ===================
58
59 - Fall back to httplib2's default certificate path if the
60 Debian/Ubuntu one doesn't exist. The default bundle might work,
61 but a path that doesn't exist is never going to. New httplib2
62 bundles contain the required CA certs.
63
64 0.13.2 (2012-12-06)
65 ===================
66
67 - lazr.restfulclient is almost exclusively used with launchpad.net,
68 but httplib2's cert bundle doesn't include launchpad's CA. Therefore
69 with the default setup launchpadlib doesn't work unless cert checking
70 is disabled. This is mitigated by the fact that Ubuntu carries a patch
71 to httplib2 to make it use the system CA certs. This release makes that
72 the default approach in lazr.restfulclient so that launchpad.net can be
73 used by anyone with the Debian/Ubuntu CA certs path
74 (/etc/ssl/certs/ca-certificates.crt), regardless of whether they are
75 using Ubuntu's patched version of httplib2. Any platforms that don't have
76 that path remain broken.
77
78 0.13.1 (2012-09-26)
79 ===================
80
81 - Named POST operations may result in a resource moving to a new location.
82 Detect the redirect and reload the resource from its new URL.
83
84 0.13.0 (2012-06-19)
85 ===================
86
87 - Add environment variable, LP_DISABLE_SSL_CERTIFICATE_VALIDATION, to
88 disable SSL certificate checks. Most useful when testing against
89 development servers.
90
91 0.12.3 (2012-05-17)
92 ===================
93
94 - Implement the mocked out authorizeRequest for the BasicHttpAuthorizer
95 object.
96
97 0.12.2 (2012-04-16)
98 ===================
99
100 - Fix ServiceRoot.load() so that it properly handles relative URLs
101 in a way that doesn't break subsequent API calls (bug 681767).
102
103 0.12.1 (2012-03-28)
104 ===================
105
106 - Made the cache safe for use by concurrent threads and processes.
107
108 0.12.0 (2011-06-30)
109 ===================
110
111 - Give a more useful AttributeError
112
113 0.11.2 (2011-02-03)
114 ===================
115
116 - The 'web_link' parameter now shows up in lp_attributes, not
117 lp_entries.
118
119 0.11.1 (2010-11-04)
120 ===================
121
122 - Restored compatibility with Python 2.4.
123
124 0.11.0 (2010-10-28)
125 ===================
126
127 - Make it possibly to specify an "application name" separate from the
128 OAuth consumer key. If present, the application name is used in the
129 User-Agent header; otherwise, the OAuth consumer key is used.
130
131 - Add a "system-wide consumer" which can be used to authorize a
132 user's entire account to use a web service, rather than doing it
133 one application at a time.
134
135 0.10.0 (2010-08-12)
136 ===================
137
138 - Add compatibility with lazr.restful 0.11.0
139
140 0.9.21 (2010-07-19)
141 ===================
142
143 - Ensure that all JSON representations are converted to Unicode.
144
145 - Restore the old behavior of CollectionWithKeyBasedLookup, which is
146 less efficient but easier to understand. That is, the following
147 code will work as it did in 0.9.17, performing the lookup
148 immediately and raising a KeyError if the object doesn't exist on
149 the server side.
150
151 service.collection['key']
152
153 The more efficient behavior (which doesn't perform the lookup until
154 you actually need the object) is still available, but you have to
155 write this code instead:
156
157 service.collection('key')
158
159 - Exceptional conditions will now raise an appropriate subclass of
160 HTTPError instead of always raising HTTPError.
161
162 - Credential files are now created as being user-readable only. (In
163 launchpadlib, they were created using the default umask and then
164 made user-readable with chmod.)
165
166 0.9.20 (2010-06-25)
167 ===================
168
169 - It's now possible to pass a relative URL (relative to the versioned
170 service root) into load().
171
172 0.9.19 (2010-06-21)
173 ===================
174
175 - When the representation of a resource, as retrieved from the
176 server, is of a different type than expected, the server value now
177 takes precedence. This means that, in rare situations, a resource
178 may start out presumed to be of one type, and change its
179 capabilities once its representation is fetched from the server.
180
181 0.9.18 (2010-06-16)
182 ===================
183
184 - Made it possible to avoid fetching a representation of every single
185 object looked up from a CollectionWithKeyBasedLookup (by defining
186 .collection_of on the class), potentially improving script
187 performance.
188
189 0.9.17 (2010-05-10)
190 ===================
191
192 - Switched back to asking for compression using the standard
193 Accept-Encoding header. Using the TE header has never worked in a
194 real situation due to HTTP intermediaries.
195
196 0.9.16 (2010-05-03)
197 ===================
198
199 - If a server returns a 502 or 503 error code, lazr.restfulclient
200 will retry its request a configurable number of times in hopes that
201 the error is transient.
202
203 - It's now possible to invoke lazr.restful destructor methods, with
204 the lp_delete() method.
205
206 0.9.15 (2010-04-27)
207 ====================
208
209 - Clients will no longer fetch a representation of a collection
210 before invoking a named operation on the collection.
211
212 0.9.14 (2010-04-15)
213 ===================
214
215 - Clients now send a useful and somewhat customizable User-Agent
216 string.
217
218 - Added a workaround for a bug in httplib2.
219
220 - Removed the software dependency on lazr.restful except when running
221 the full test suite. (The standalone_test test suite tests basic
222 functionality of lazr.restfulclient to make sure the code base
223 doesn't fundamentally depend on lazr.restful.)
224
225 0.9.13 (2010-03-24)
226 ===================
227
228 - Removed some no-longer-needed compatibility code for buggy
229 servers, and fixed the tests to work with the new release of simplejson.
230
231 - The fix in 0.9.11 to avoid errors on eCryptfs filesystems wasn't
232 strict enough. The maximum filename length is now 143 characters.
233
234 0.9.12 (2010-03-09)
235 ===================
236
237 - Fixed a bug that prevented a unicode string from being used as a
238 cache filename.
239
240 0.9.11 (2010-02-11)
241 ===================
242
243 - If a lazr.restful web service publishes multiple versions, you can
244 now specify which version to use in a separate constructor argument,
245 rather than sticking it on to the end of the service root.
246 - Filenames in the cache will never be longer than 150 characters,
247 to avoid errors on eCryptfs filesystems.
248 - Added a proof-of-concept test for OAuth-signed anonymous access.
249 - Fixed comparisons of entries and hosted files with None.
250
251 0.9.10 (2009-10-23)
252 ===================
253
254 - lazr.restfulclient now requests the correct WADL media type.
255 - Made HTTPError strings more verbose.
256 - Implemented the equality operator for entry and hosted-file resources.
257 - Resume setting the 'credentials' attribute on ServerRoot to avoid
258 breaking compatibility with launchpadlib.
259
260 0.9.9 (2009-10-07)
261 ==================
262
263 - The WSGI authentication middleware has been moved from lazr.restful
264 to the new lazr.authentication library, and lazr.restfulclient now
265 uses the new library.
266
267 0.9.8 (2009-10-06)
268 ==================
269
270 - Added support for OAuth.
271
272 0.9.7 (2009-09-30)
273 ==================
274
275 - Added support for HTTP Basic Auth.
276
277 0.9.6 (2009-09-16)
278 ==================
279
280 - Made compatible with lazr.restful 0.9.6.
281
282 0.9.5 (2009-08-28)
283 ==================
284
285 - Removed debugging code.
286
287 0.9.4 (2009-08-26)
288 ==================
289
290 - Removed unnecessary build dependencies.
291
292 - Updated tests for newer version of simplejson.
293
294 - Made tests less fragile by cleaning up lazr.restful example filemanager
295 between tests.
296
297 - normalized output of simplejson to unicode.
298
299 0.9.3 (2009-08-05)
300 ==================
301
302 Removed a sys.path hack from setup.py.
303
304 0.9.2 (2009-07-16)
305 ==================
306
307 - Fields that can contain binary data are no longer run through
308 simplejson.dumps().
309
310 - For fields that can take on a limited set of values, you can now get
311 a list of possible values.
312
313 0.9.1 (2009-07-13)
314 ==================
315
316 - The client now knows to look for multipart/form-data representations
317 and will create them as appropriate. The upshot of this is that you
318 can now send binary data when invoking named operations that will
319 accept binary data.
320
321
322 0.9 (2009-04-29)
323 ================
324
325 - Initial public release
00 Metadata-Version: 2.1
11 Name: lazr.restfulclient
2 Version: 0.14.2
2 Version: 0.14.3
33 Summary: A programmable client library that takes advantage of the commonalities among
44 Home-page: https://launchpad.net/lazr.restfulclient
55 Maintainer: LAZR Developers
3131 https://dev.launchpad.net/Hacking for how to develop in this
3232 package.
3333
34 .. toctree::
35 :glob:
36
37 toplevel
38 collections
39 entries
40 operations
41 hosted-files
42 caching
43 authorizer.standalone
44 retry.standalone
45 NEWS
46
47 .. _Sphinx: http://sphinx.pocoo.org/
48 .. _Table of contents: http://sphinx.pocoo.org/concepts.html#the-toc-tree
49
50 Importable
51 ==========
52
53 The lazr.restfulclient package is importable, and has a version number.
54
55 >>> import lazr.restfulclient
56 >>> print 'VERSION:', lazr.restfulclient.__version__
57 VERSION: ...
5834
5935 ===========================
6036 NEWS for lazr.restfulclient
6137 ===========================
6238
39 0.14.4
40 ======
41
42 - Drop support for Python < 2.6.
43
44 0.14.3 (2020-01-27)
45 ===================
46
47 - Restore from_string, to_string, and __str__ methods of
48 lazr.restfulclient.authorize.oauth.AccessToken, unintentionally removed
49 in 0.14.0.
50
6351 0.14.2 (2018-11-17)
6452 ===================
6553
6654 - Fix compatibility with httplib2 0.12.0 for Python 3. [bug=1803754]
6755 - Really fix compatibility with httplib2 < 0.9.
6856 - Fix compatibility with httplib2 0.9 for Python 3.
69 - Require httplib >= 0.7.7 for Python 3.
57 - Require httplib2 >= 0.7.7 for Python 3.
7058
7159 0.14.1 (2018-11-16)
7260 ===================
0 lazr.restfulclient (0.14.2-3) UNRELEASED; urgency=low
0 lazr.restfulclient (0.14.3+bzr174-1) UNRELEASED; urgency=low
11
22 [ Debian Janitor ]
33 * Bump debhelper from deprecated 9 to 12.
1212 * d/control: Update Uploader field with new Debian Python Team contact
1313 address.
1414
15 -- Debian Janitor <janitor@jelmer.uk> Mon, 22 Jun 2020 05:47:49 -0000
15 [ Debian Janitor ]
16 * New upstream snapshot.
17
18 -- Debian Janitor <janitor@jelmer.uk> Wed, 18 Aug 2021 12:32:18 -0000
1619
1720 lazr.restfulclient (0.14.2-2) unstable; urgency=medium
1821
1919
2020 # generic helpers primarily for the long_description
2121 def generate(*docname_or_string):
22 marker = '.. pypi description ends here'
2223 res = []
2324 for value in docname_or_string:
2425 if value.endswith('.rst'):
25 f = open(value)
26 value = f.read()
27 f.close()
26 with open(value) as f:
27 value = f.read()
28 idx = value.find(marker)
29 if idx >= 0:
30 value = value[:idx]
2831 res.append(value)
2932 if not value.endswith('\n'):
3033 res.append('')
5962 description=open('README.rst').readline().strip(),
6063 long_description=generate(
6164 'src/lazr/restfulclient/docs/index.rst',
62 'src/lazr/restfulclient/docs/NEWS.rst'),
65 'NEWS.rst'),
6366 license='LGPL v3',
6467 install_requires=[
6568 'distro',
3232 import atexit
3333 import errno
3434 from hashlib import md5
35 from io import BytesIO
36 from json import dumps
3537 import os
3638 import re
3739 import shutil
4951 except ImportError:
5052 from httplib2 import ProxyInfo
5153 proxy_info_from_environment = ProxyInfo.from_environment
52 try:
53 # Python 3 and sufficiently modern Python 2 versions.
54 from json import dumps
55 except ImportError:
56 from simplejson import dumps
57
58 try:
59 # Python 3.
60 from io import BytesIO
61 except ImportError:
62 from cStringIO import StringIO as BytesIO
6354
6455 try:
6556 # Python 3.
2121 __all__ = ['DatetimeJSONEncoder']
2222
2323 import datetime
24
25 try:
26 # Python 3 and sufficiently modern Python 2 versions.
27 from json import JSONEncoder
28 except ImportError:
29 from simplejson import JSONEncoder
24 from json import JSONEncoder
3025
3126
3227 class DatetimeJSONEncoder(JSONEncoder):
3030
3131 from oauthlib import oauth1
3232 import six
33 from six.moves.urllib.parse import (
34 parse_qs,
35 urlencode,
36 )
3337
3438 from lazr.restfulclient.authorize import HttpAuthorizer
3539 from lazr.restfulclient.errors import CredentialsFileError
7377 self.key = key
7478 self.secret = secret
7579 self.context = context
80
81 def to_string(self):
82 return urlencode([
83 ("oauth_token_secret", self.secret),
84 ("oauth_token", self.key),
85 ])
86
87 __str__ = to_string
88
89 @classmethod
90 def from_string(cls, s):
91 params = parse_qs(s, keep_blank_values=False)
92 key = params["oauth_token"][0]
93 secret = params["oauth_token_secret"][0]
94 return cls(key, secret)
7695
7796
7897 class TruthyString(six.text_type):
11 NEWS for lazr.restfulclient
22 ===========================
33
4 0.14.4
5 ======
6
7 - Drop support for Python < 2.6.
8
9 0.14.3 (2020-01-27)
10 ===================
11
12 - Restore from_string, to_string, and __str__ methods of
13 lazr.restfulclient.authorize.oauth.AccessToken, unintentionally removed
14 in 0.14.0.
15
416 0.14.2 (2018-11-17)
517 ===================
618
719 - Fix compatibility with httplib2 0.12.0 for Python 3. [bug=1803754]
820 - Really fix compatibility with httplib2 < 0.9.
921 - Fix compatibility with httplib2 0.9 for Python 3.
10 - Require httplib >= 0.7.7 for Python 3.
22 - Require httplib2 >= 0.7.7 for Python 3.
1123
1224 0.14.1 (2018-11-16)
1325 ===================
2222 https://dev.launchpad.net/Hacking for how to develop in this
2323 package.
2424
25 .. pypi description ends here
26
2527 .. toctree::
2628 :glob:
2729
2828 ]
2929
3030
31 try:
32 from email.message import Message
33 except ImportError:
34 from email.Message import Message
35
36 try:
37 # Python 3 and sufficiently modern Python 2 versions.
38 from json import dumps, loads
39 except ImportError:
40 from simplejson import dumps, loads
41
42 try:
43 # Python 3.
44 from io import BytesIO
45 except ImportError:
46 from cStringIO import StringIO as BytesIO
31 from email.message import Message
32 from io import BytesIO
33 from json import dumps, loads
4734
4835 try:
4936 # Python 3.
5050 # Application name defaults to None
5151 consumer = Consumer("key", "secret")
5252 self.assertEqual(consumer.application_name, None)
53
54
55 class TestAccessToken(TestCase):
56
57 def test_data_fields(self):
58 access_token = AccessToken("key", "secret", "context")
59 self.assertEqual(access_token.key, "key")
60 self.assertEqual(access_token.secret, "secret")
61 self.assertEqual(access_token.context, "context")
62
63 def test_default_context(self):
64 # Context defaults to None.
65 access_token = AccessToken("key", "secret")
66 self.assertIsNone(access_token.context)
67
68 def test___str__(self):
69 access_token = AccessToken("lock&key", "secret=password")
70 self.assertEqual(
71 "oauth_token_secret=secret%3Dpassword&oauth_token=lock%26key",
72 str(access_token))
73
74 def test_from_string(self):
75 access_token = AccessToken.from_string(
76 "oauth_token_secret=secret%3Dpassword&oauth_token=lock%26key")
77 self.assertEqual(access_token.key, "lock&key")
78 self.assertEqual(access_token.secret, "secret=password")
5379
5480
5581 class TestSystemWideConsumer(TestCase):
00 Metadata-Version: 2.1
11 Name: lazr.restfulclient
2 Version: 0.14.2
2 Version: 0.14.3
33 Summary: A programmable client library that takes advantage of the commonalities among
44 Home-page: https://launchpad.net/lazr.restfulclient
55 Maintainer: LAZR Developers
3131 https://dev.launchpad.net/Hacking for how to develop in this
3232 package.
3333
34 .. toctree::
35 :glob:
36
37 toplevel
38 collections
39 entries
40 operations
41 hosted-files
42 caching
43 authorizer.standalone
44 retry.standalone
45 NEWS
46
47 .. _Sphinx: http://sphinx.pocoo.org/
48 .. _Table of contents: http://sphinx.pocoo.org/concepts.html#the-toc-tree
49
50 Importable
51 ==========
52
53 The lazr.restfulclient package is importable, and has a version number.
54
55 >>> import lazr.restfulclient
56 >>> print 'VERSION:', lazr.restfulclient.__version__
57 VERSION: ...
5834
5935 ===========================
6036 NEWS for lazr.restfulclient
6137 ===========================
6238
39 0.14.4
40 ======
41
42 - Drop support for Python < 2.6.
43
44 0.14.3 (2020-01-27)
45 ===================
46
47 - Restore from_string, to_string, and __str__ methods of
48 lazr.restfulclient.authorize.oauth.AccessToken, unintentionally removed
49 in 0.14.0.
50
6351 0.14.2 (2018-11-17)
6452 ===================
6553
6654 - Fix compatibility with httplib2 0.12.0 for Python 3. [bug=1803754]
6755 - Really fix compatibility with httplib2 < 0.9.
6856 - Fix compatibility with httplib2 0.9 for Python 3.
69 - Require httplib >= 0.7.7 for Python 3.
57 - Require httplib2 >= 0.7.7 for Python 3.
7058
7159 0.14.1 (2018-11-16)
7260 ===================
00 COPYING.txt
11 HACKING.rst
2 NEWS.rst
23 README.rst
34 setup.py
45 src/lazr/__init__.py
78 src/lazr.restfulclient.egg-info/dependency_links.txt
89 src/lazr.restfulclient.egg-info/namespace_packages.txt
910 src/lazr.restfulclient.egg-info/not-zip-safe
10 src/lazr.restfulclient.egg-info/pbr.json
1111 src/lazr.restfulclient.egg-info/requires.txt
1212 src/lazr.restfulclient.egg-info/top_level.txt
1313 src/lazr/restfulclient/__init__.py
+0
-1
src/lazr.restfulclient.egg-info/pbr.json less more
0 {"is_release": false, "git_version": "b278e66"}