diff -Nru lazr.restfulclient-0.14.2/debian/changelog lazr.restfulclient-0.14.4/debian/changelog --- lazr.restfulclient-0.14.2/debian/changelog 2019-12-17 12:35:11.000000000 +0000 +++ lazr.restfulclient-0.14.4/debian/changelog 2021-09-17 21:19:49.000000000 +0000 @@ -1,8 +1,27 @@ -lazr.restfulclient (0.14.2-2build1) focal; urgency=medium +lazr.restfulclient (0.14.4-1) unstable; urgency=low - * No-change rebuild to generate dependencies on python2. + [ Debian Janitor ] + * Bump debhelper from deprecated 9 to 12. + * Set upstream metadata fields: Repository, Repository-Browse. - -- Matthias Klose Tue, 17 Dec 2019 12:35:11 +0000 + [ Ondřej Nový ] + * d/control: Update Vcs-* fields with new Debian Python Team Salsa + layout. + + [ Stefano Rivera ] + * New upstream release. + * Extend upstream metadata. + * d/control: Update Uploader field with new Debian Python Team contact + address. + * Bump Standards-Version to 4.6.0, no changes needed. + * Declare Rules-Requires-Root: no. + * Bump copyright years. + * Drop explicit Depends on python3-pkg-resources and python3-simplejson, no + longer needed. + * Bump watch file version to 4. + * Bump debhelper compat level to 13. + + -- Stefano Rivera Fri, 17 Sep 2021 14:19:49 -0700 lazr.restfulclient (0.14.2-2) unstable; urgency=medium diff -Nru lazr.restfulclient-0.14.2/debian/control lazr.restfulclient-0.14.4/debian/control --- lazr.restfulclient-0.14.2/debian/control 2019-10-09 09:55:48.000000000 +0000 +++ lazr.restfulclient-0.14.4/debian/control 2021-09-17 21:19:49.000000000 +0000 @@ -2,29 +2,27 @@ Section: python Priority: optional Maintainer: Stefano Rivera -Uploaders: - Debian Python Modules Team , +Uploaders: Debian Python Team Build-Depends: - debhelper-compat (= 9), + debhelper-compat (= 13), dh-python, python3-all, - python3-setuptools, -Standards-Version: 3.9.8 + python3-setuptools +Standards-Version: 4.6.0 Homepage: https://launchpad.net/lazr.restfulclient -Vcs-Git: https://salsa.debian.org/python-team/modules/lazr.restfulclient.git -Vcs-Browser: https://salsa.debian.org/python-team/modules/lazr.restfulclient +Vcs-Git: https://salsa.debian.org/python-team/packages/lazr.restfulclient.git +Vcs-Browser: https://salsa.debian.org/python-team/packages/lazr.restfulclient Testsuite: autopkgtest-pkg-python +Rules-Requires-Root: no Package: python3-lazr.restfulclient Architecture: all Depends: python3-httplib2 (>= 0.7.7), python3-lazr.uri, - python3-pkg-resources, - python3-simplejson, python3-wadllib (>= 1.1.4), ${misc:Depends}, - ${python3:Depends}, + ${python3:Depends} Description: client for lazr.restful-based web services (Python 3) A programmable client library that takes advantage of the commonalities among lazr.rest web services to provide added functionality on top diff -Nru lazr.restfulclient-0.14.2/debian/copyright lazr.restfulclient-0.14.4/debian/copyright --- lazr.restfulclient-0.14.2/debian/copyright 2019-10-09 09:55:48.000000000 +0000 +++ lazr.restfulclient-0.14.4/debian/copyright 2021-09-17 21:19:49.000000000 +0000 @@ -3,7 +3,7 @@ Source: https://launchpad.net/lazr.restfulclient Files: * -Copyright: 2008-2012, Canonical Ltd. +Copyright: 2008-2021, Canonical Ltd. License: LGPL-3.0 Files: @@ -13,14 +13,14 @@ src/lazr/restfulclient/authorize/oauth.py src/lazr/restfulclient/errors.py src/lazr/restfulclient/resource.py -Copyright: 2008-2012, Canonical Ltd. +Copyright: 2008-2021, Canonical Ltd. License: LGPL-3.0+ Files: debian/* Copyright: 2009, James Westby 2009-2011, Luca Falavigna - 2012, Stefano Rivera + 2012-2021, Stefano Rivera License: LGPL-3.0 License: LGPL-3.0 diff -Nru lazr.restfulclient-0.14.2/debian/rules lazr.restfulclient-0.14.4/debian/rules --- lazr.restfulclient-0.14.2/debian/rules 2019-10-09 09:55:48.000000000 +0000 +++ lazr.restfulclient-0.14.4/debian/rules 2021-09-17 21:19:49.000000000 +0000 @@ -10,8 +10,8 @@ # dh_python2's namespace feature is enough: find debian/python*-lazr.* -name '*.pth' -delete -# Do not run test-suite lazr.restful has broken imports -# triggered by the test-suite code +# Do not run test-suite, it requires lazr.authentication and lazr.restful which +# aren't packaged in Debian override_dh_auto_test: override_dh_installdocs: diff -Nru lazr.restfulclient-0.14.2/debian/upstream/metadata lazr.restfulclient-0.14.4/debian/upstream/metadata --- lazr.restfulclient-0.14.2/debian/upstream/metadata 1970-01-01 00:00:00.000000000 +0000 +++ lazr.restfulclient-0.14.4/debian/upstream/metadata 2021-09-17 21:19:49.000000000 +0000 @@ -0,0 +1,9 @@ +--- +Bug-Database: https://bugs.launchpad.net/lazr.restfulclient +Bug-Submit: https://bugs.launchpad.net/lazr.restfulclient/+filebug +Changelog: https://bazaar.launchpad.net/~lazr-developers/lazr.restfulclient/trunk/view/head:/NEWS.rst +Registry: + - Name: PyPI + Entry: lazr.restfulclient +Repository: https://code.launchpad.net/lazr.restfulclient +Repository-Browse: https://code.launchpad.net/lazr.restfulclient diff -Nru lazr.restfulclient-0.14.2/debian/watch lazr.restfulclient-0.14.4/debian/watch --- lazr.restfulclient-0.14.2/debian/watch 2019-10-09 09:55:48.000000000 +0000 +++ lazr.restfulclient-0.14.4/debian/watch 2021-09-17 21:19:49.000000000 +0000 @@ -1,2 +1,2 @@ -version=3 +version=4 opts=pgpsigurlmangle=s/$/.asc/ https://launchpad.net/lazr.restfulclient/+download .*/@PACKAGE@@ANY_VERSION@@ARCHIVE_EXT@ diff -Nru lazr.restfulclient-0.14.2/NEWS.rst lazr.restfulclient-0.14.4/NEWS.rst --- lazr.restfulclient-0.14.2/NEWS.rst 1970-01-01 00:00:00.000000000 +0000 +++ lazr.restfulclient-0.14.4/NEWS.rst 2021-09-13 15:26:42.000000000 +0000 @@ -0,0 +1,328 @@ +=========================== +NEWS for lazr.restfulclient +=========================== + +0.14.4 (2021-09-13) +=================== + + - Drop support for Python < 2.6. + - Adjust versioning strategy to avoid importing pkg_resources, which is + slow in large environments. + +0.14.3 (2020-01-27) +=================== + + - Restore from_string, to_string, and __str__ methods of + lazr.restfulclient.authorize.oauth.AccessToken, unintentionally removed + in 0.14.0. + +0.14.2 (2018-11-17) +=================== + + - Fix compatibility with httplib2 0.12.0 for Python 3. [bug=1803754] + - Really fix compatibility with httplib2 < 0.9. + - Fix compatibility with httplib2 0.9 for Python 3. + - Require httplib2 >= 0.7.7 for Python 3. + +0.14.1 (2018-11-16) +=================== + + - Add compatibility with httplib2 0.12.0. [bug=1803558] + +0.14.0 (2018-05-08) +=================== + + - Switch from buildout to tox. + - Port from oauth to oauthlib. Some tests still need to use oauth until + lazr.authentication is ported. [bug=1672458] + - Use the distro module rather than platform.linux_distribution, since the + latter is deprecated in Python 3.5 and will be removed in 3.7. + [bug=1473577] + +0.13.5 (2017-09-04) +=================== + + - Fix bytes vs. unicode in json.loads calls. [bug=1403524] + - Decode header before comparison. [bug=1414075] + - Fix urllib unquote imports. [bug=1414055] + - Fix urllib urlencode imports. [bug=1425609] + - Tolerate httplib2 versions earlier than 0.9 again. + - Fix handling of 304 responses with an empty body on Python 3. + [bug=1714960] + +0.13.4 (2014-12-05) +=================== + + - Port to python3. + - Support proxy settings from environment by default. + +0.13.3 (2013-03-22) +=================== + + - Fall back to httplib2's default certificate path if the + Debian/Ubuntu one doesn't exist. The default bundle might work, + but a path that doesn't exist is never going to. New httplib2 + bundles contain the required CA certs. + +0.13.2 (2012-12-06) +=================== + + - lazr.restfulclient is almost exclusively used with launchpad.net, + but httplib2's cert bundle doesn't include launchpad's CA. Therefore + with the default setup launchpadlib doesn't work unless cert checking + is disabled. This is mitigated by the fact that Ubuntu carries a patch + to httplib2 to make it use the system CA certs. This release makes that + the default approach in lazr.restfulclient so that launchpad.net can be + used by anyone with the Debian/Ubuntu CA certs path + (/etc/ssl/certs/ca-certificates.crt), regardless of whether they are + using Ubuntu's patched version of httplib2. Any platforms that don't have + that path remain broken. + +0.13.1 (2012-09-26) +=================== + + - Named POST operations may result in a resource moving to a new location. + Detect the redirect and reload the resource from its new URL. + +0.13.0 (2012-06-19) +=================== + + - Add environment variable, LP_DISABLE_SSL_CERTIFICATE_VALIDATION, to + disable SSL certificate checks. Most useful when testing against + development servers. + +0.12.3 (2012-05-17) +=================== + + - Implement the mocked out authorizeRequest for the BasicHttpAuthorizer + object. + +0.12.2 (2012-04-16) +=================== + + - Fix ServiceRoot.load() so that it properly handles relative URLs + in a way that doesn't break subsequent API calls (bug 681767). + +0.12.1 (2012-03-28) +=================== + + - Made the cache safe for use by concurrent threads and processes. + +0.12.0 (2011-06-30) +=================== + + - Give a more useful AttributeError + +0.11.2 (2011-02-03) +=================== + + - The 'web_link' parameter now shows up in lp_attributes, not + lp_entries. + +0.11.1 (2010-11-04) +=================== + + - Restored compatibility with Python 2.4. + +0.11.0 (2010-10-28) +=================== + + - Make it possibly to specify an "application name" separate from the + OAuth consumer key. If present, the application name is used in the + User-Agent header; otherwise, the OAuth consumer key is used. + + - Add a "system-wide consumer" which can be used to authorize a + user's entire account to use a web service, rather than doing it + one application at a time. + +0.10.0 (2010-08-12) +=================== + + - Add compatibility with lazr.restful 0.11.0 + +0.9.21 (2010-07-19) +=================== + + - Ensure that all JSON representations are converted to Unicode. + + - Restore the old behavior of CollectionWithKeyBasedLookup, which is + less efficient but easier to understand. That is, the following + code will work as it did in 0.9.17, performing the lookup + immediately and raising a KeyError if the object doesn't exist on + the server side. + + service.collection['key'] + + The more efficient behavior (which doesn't perform the lookup until + you actually need the object) is still available, but you have to + write this code instead: + + service.collection('key') + + - Exceptional conditions will now raise an appropriate subclass of + HTTPError instead of always raising HTTPError. + + - Credential files are now created as being user-readable only. (In + launchpadlib, they were created using the default umask and then + made user-readable with chmod.) + +0.9.20 (2010-06-25) +=================== + + - It's now possible to pass a relative URL (relative to the versioned + service root) into load(). + +0.9.19 (2010-06-21) +=================== + + - When the representation of a resource, as retrieved from the + server, is of a different type than expected, the server value now + takes precedence. This means that, in rare situations, a resource + may start out presumed to be of one type, and change its + capabilities once its representation is fetched from the server. + +0.9.18 (2010-06-16) +=================== + + - Made it possible to avoid fetching a representation of every single + object looked up from a CollectionWithKeyBasedLookup (by defining + .collection_of on the class), potentially improving script + performance. + +0.9.17 (2010-05-10) +=================== + + - Switched back to asking for compression using the standard + Accept-Encoding header. Using the TE header has never worked in a + real situation due to HTTP intermediaries. + +0.9.16 (2010-05-03) +=================== + + - If a server returns a 502 or 503 error code, lazr.restfulclient + will retry its request a configurable number of times in hopes that + the error is transient. + + - It's now possible to invoke lazr.restful destructor methods, with + the lp_delete() method. + +0.9.15 (2010-04-27) +==================== + + - Clients will no longer fetch a representation of a collection + before invoking a named operation on the collection. + +0.9.14 (2010-04-15) +=================== + + - Clients now send a useful and somewhat customizable User-Agent + string. + + - Added a workaround for a bug in httplib2. + + - Removed the software dependency on lazr.restful except when running + the full test suite. (The standalone_test test suite tests basic + functionality of lazr.restfulclient to make sure the code base + doesn't fundamentally depend on lazr.restful.) + +0.9.13 (2010-03-24) +=================== + +- Removed some no-longer-needed compatibility code for buggy + servers, and fixed the tests to work with the new release of simplejson. + +- The fix in 0.9.11 to avoid errors on eCryptfs filesystems wasn't + strict enough. The maximum filename length is now 143 characters. + +0.9.12 (2010-03-09) +=================== + +- Fixed a bug that prevented a unicode string from being used as a + cache filename. + +0.9.11 (2010-02-11) +=================== + +- If a lazr.restful web service publishes multiple versions, you can + now specify which version to use in a separate constructor argument, + rather than sticking it on to the end of the service root. +- Filenames in the cache will never be longer than 150 characters, + to avoid errors on eCryptfs filesystems. +- Added a proof-of-concept test for OAuth-signed anonymous access. +- Fixed comparisons of entries and hosted files with None. + +0.9.10 (2009-10-23) +=================== + +- lazr.restfulclient now requests the correct WADL media type. +- Made HTTPError strings more verbose. +- Implemented the equality operator for entry and hosted-file resources. +- Resume setting the 'credentials' attribute on ServerRoot to avoid + breaking compatibility with launchpadlib. + +0.9.9 (2009-10-07) +================== + +- The WSGI authentication middleware has been moved from lazr.restful + to the new lazr.authentication library, and lazr.restfulclient now + uses the new library. + +0.9.8 (2009-10-06) +================== + +- Added support for OAuth. + +0.9.7 (2009-09-30) +================== + +- Added support for HTTP Basic Auth. + +0.9.6 (2009-09-16) +================== + +- Made compatible with lazr.restful 0.9.6. + +0.9.5 (2009-08-28) +================== + +- Removed debugging code. + +0.9.4 (2009-08-26) +================== + +- Removed unnecessary build dependencies. + +- Updated tests for newer version of simplejson. + +- Made tests less fragile by cleaning up lazr.restful example filemanager + between tests. + +- normalized output of simplejson to unicode. + +0.9.3 (2009-08-05) +================== + +Removed a sys.path hack from setup.py. + +0.9.2 (2009-07-16) +================== + +- Fields that can contain binary data are no longer run through + simplejson.dumps(). + +- For fields that can take on a limited set of values, you can now get + a list of possible values. + +0.9.1 (2009-07-13) +================== + +- The client now knows to look for multipart/form-data representations + and will create them as appropriate. The upshot of this is that you + can now send binary data when invoking named operations that will + accept binary data. + + +0.9 (2009-04-29) +================ + +- Initial public release diff -Nru lazr.restfulclient-0.14.2/PKG-INFO lazr.restfulclient-0.14.4/PKG-INFO --- lazr.restfulclient-0.14.2/PKG-INFO 2018-11-17 17:09:31.000000000 +0000 +++ lazr.restfulclient-0.14.4/PKG-INFO 2021-09-13 15:27:45.658421300 +0000 @@ -1,6 +1,6 @@ Metadata-Version: 2.1 Name: lazr.restfulclient -Version: 0.14.2 +Version: 0.14.4 Summary: A programmable client library that takes advantage of the commonalities among Home-page: https://launchpad.net/lazr.restfulclient Maintainer: LAZR Developers @@ -32,42 +32,32 @@ https://dev.launchpad.net/Hacking for how to develop in this package. - .. toctree:: - :glob: - - toplevel - collections - entries - operations - hosted-files - caching - authorizer.standalone - retry.standalone - NEWS - - .. _Sphinx: http://sphinx.pocoo.org/ - .. _Table of contents: http://sphinx.pocoo.org/concepts.html#the-toc-tree - - Importable - ========== - - The lazr.restfulclient package is importable, and has a version number. - - >>> import lazr.restfulclient - >>> print 'VERSION:', lazr.restfulclient.__version__ - VERSION: ... =========================== NEWS for lazr.restfulclient =========================== + 0.14.4 (2021-09-13) + =================== + + - Drop support for Python < 2.6. + - Adjust versioning strategy to avoid importing pkg_resources, which is + slow in large environments. + + 0.14.3 (2020-01-27) + =================== + + - Restore from_string, to_string, and __str__ methods of + lazr.restfulclient.authorize.oauth.AccessToken, unintentionally removed + in 0.14.0. + 0.14.2 (2018-11-17) =================== - Fix compatibility with httplib2 0.12.0 for Python 3. [bug=1803754] - Really fix compatibility with httplib2 < 0.9. - Fix compatibility with httplib2 0.9 for Python 3. - - Require httplib >= 0.7.7 for Python 3. + - Require httplib2 >= 0.7.7 for Python 3. 0.14.1 (2018-11-16) =================== diff -Nru lazr.restfulclient-0.14.2/setup.py lazr.restfulclient-0.14.4/setup.py --- lazr.restfulclient-0.14.2/setup.py 2018-11-17 17:05:58.000000000 +0000 +++ lazr.restfulclient-0.14.4/setup.py 2021-09-13 15:26:16.000000000 +0000 @@ -20,12 +20,15 @@ # generic helpers primarily for the long_description def generate(*docname_or_string): + marker = '.. pypi description ends here' res = [] for value in docname_or_string: if value.endswith('.rst'): - f = open(value) - value = f.read() - f.close() + with open(value) as f: + value = f.read() + idx = value.find(marker) + if idx >= 0: + value = value[:idx] res.append(value) if not value.endswith('\n'): res.append('') @@ -33,8 +36,6 @@ # end generic helpers -__version__ = open("src/lazr/restfulclient/version.txt").read().strip() - tests_require = [ 'fixtures>=1.3.0', 'lazr.authentication', @@ -48,11 +49,10 @@ setup( name='lazr.restfulclient', - version=__version__, + version='0.14.4', namespace_packages=['lazr'], packages=find_packages('src'), package_dir={'':'src'}, - package_data={'lazr.restfulclient': ['version.txt']}, include_package_data=True, zip_safe=False, maintainer='LAZR Developers', @@ -60,12 +60,13 @@ description=open('README.rst').readline().strip(), long_description=generate( 'src/lazr/restfulclient/docs/index.rst', - 'src/lazr/restfulclient/docs/NEWS.rst'), + 'NEWS.rst'), license='LGPL v3', install_requires=[ 'distro', 'httplib2; python_version < "3"', 'httplib2>=0.7.7; python_version >= "3"', + 'importlib-metadata; python_version < "3.8"', 'oauthlib', 'setuptools', 'six', diff -Nru lazr.restfulclient-0.14.2/src/lazr/restfulclient/authorize/oauth.py lazr.restfulclient-0.14.4/src/lazr/restfulclient/authorize/oauth.py --- lazr.restfulclient-0.14.2/src/lazr/restfulclient/authorize/oauth.py 2018-11-17 14:16:51.000000000 +0000 +++ lazr.restfulclient-0.14.4/src/lazr/restfulclient/authorize/oauth.py 2020-01-27 13:25:30.000000000 +0000 @@ -31,6 +31,10 @@ from oauthlib import oauth1 import six +from six.moves.urllib.parse import ( + parse_qs, + urlencode, + ) from lazr.restfulclient.authorize import HttpAuthorizer from lazr.restfulclient.errors import CredentialsFileError @@ -75,6 +79,21 @@ self.secret = secret self.context = context + def to_string(self): + return urlencode([ + ("oauth_token_secret", self.secret), + ("oauth_token", self.key), + ]) + + __str__ = to_string + + @classmethod + def from_string(cls, s): + params = parse_qs(s, keep_blank_values=False) + key = params["oauth_token"][0] + secret = params["oauth_token_secret"][0] + return cls(key, secret) + class TruthyString(six.text_type): """A Unicode string which is always true.""" diff -Nru lazr.restfulclient-0.14.2/src/lazr/restfulclient/_browser.py lazr.restfulclient-0.14.4/src/lazr/restfulclient/_browser.py --- lazr.restfulclient-0.14.2/src/lazr/restfulclient/_browser.py 2018-11-17 13:11:35.000000000 +0000 +++ lazr.restfulclient-0.14.4/src/lazr/restfulclient/_browser.py 2021-01-20 11:27:07.000000000 +0000 @@ -33,6 +33,8 @@ import atexit import errno from hashlib import md5 +from io import BytesIO +from json import dumps import os import re import shutil @@ -50,17 +52,6 @@ except ImportError: from httplib2 import ProxyInfo proxy_info_from_environment = ProxyInfo.from_environment -try: - # Python 3 and sufficiently modern Python 2 versions. - from json import dumps -except ImportError: - from simplejson import dumps - -try: - # Python 3. - from io import BytesIO -except ImportError: - from cStringIO import StringIO as BytesIO try: # Python 3. diff -Nru lazr.restfulclient-0.14.2/src/lazr/restfulclient/docs/index.rst lazr.restfulclient-0.14.4/src/lazr/restfulclient/docs/index.rst --- lazr.restfulclient-0.14.2/src/lazr/restfulclient/docs/index.rst 2018-05-08 07:41:13.000000000 +0000 +++ lazr.restfulclient-0.14.4/src/lazr/restfulclient/docs/index.rst 2019-11-04 12:34:56.000000000 +0000 @@ -23,6 +23,8 @@ https://dev.launchpad.net/Hacking for how to develop in this package. +.. pypi description ends here + .. toctree:: :glob: diff -Nru lazr.restfulclient-0.14.2/src/lazr/restfulclient/docs/NEWS.rst lazr.restfulclient-0.14.4/src/lazr/restfulclient/docs/NEWS.rst --- lazr.restfulclient-0.14.2/src/lazr/restfulclient/docs/NEWS.rst 2018-11-17 17:09:18.000000000 +0000 +++ lazr.restfulclient-0.14.4/src/lazr/restfulclient/docs/NEWS.rst 2021-09-13 15:26:42.000000000 +0000 @@ -2,13 +2,27 @@ NEWS for lazr.restfulclient =========================== +0.14.4 (2021-09-13) +=================== + + - Drop support for Python < 2.6. + - Adjust versioning strategy to avoid importing pkg_resources, which is + slow in large environments. + +0.14.3 (2020-01-27) +=================== + + - Restore from_string, to_string, and __str__ methods of + lazr.restfulclient.authorize.oauth.AccessToken, unintentionally removed + in 0.14.0. + 0.14.2 (2018-11-17) =================== - Fix compatibility with httplib2 0.12.0 for Python 3. [bug=1803754] - Really fix compatibility with httplib2 < 0.9. - Fix compatibility with httplib2 0.9 for Python 3. - - Require httplib >= 0.7.7 for Python 3. + - Require httplib2 >= 0.7.7 for Python 3. 0.14.1 (2018-11-16) =================== diff -Nru lazr.restfulclient-0.14.2/src/lazr/restfulclient/__init__.py lazr.restfulclient-0.14.4/src/lazr/restfulclient/__init__.py --- lazr.restfulclient-0.14.2/src/lazr/restfulclient/__init__.py 2018-05-08 07:42:12.000000000 +0000 +++ lazr.restfulclient-0.14.4/src/lazr/restfulclient/__init__.py 2021-09-13 15:26:16.000000000 +0000 @@ -16,8 +16,9 @@ # License along with lazr.restfulclient. If not, see # . -import pkg_resources -__version__ = pkg_resources.resource_string( - "lazr.restfulclient", "version.txt").strip() -if not isinstance(__version__, str): - __version__ = __version__.decode('ASCII') +try: + import importlib.metadata as importlib_metadata +except ImportError: + import importlib_metadata + +__version__ = importlib_metadata.version("lazr.restfulclient") diff -Nru lazr.restfulclient-0.14.2/src/lazr/restfulclient/_json.py lazr.restfulclient-0.14.4/src/lazr/restfulclient/_json.py --- lazr.restfulclient-0.14.2/src/lazr/restfulclient/_json.py 2014-12-11 14:01:25.000000000 +0000 +++ lazr.restfulclient-0.14.4/src/lazr/restfulclient/_json.py 2021-01-20 11:27:07.000000000 +0000 @@ -22,12 +22,7 @@ __all__ = ['DatetimeJSONEncoder'] import datetime - -try: - # Python 3 and sufficiently modern Python 2 versions. - from json import JSONEncoder -except ImportError: - from simplejson import JSONEncoder +from json import JSONEncoder class DatetimeJSONEncoder(JSONEncoder): diff -Nru lazr.restfulclient-0.14.2/src/lazr/restfulclient/resource.py lazr.restfulclient-0.14.4/src/lazr/restfulclient/resource.py --- lazr.restfulclient-0.14.2/src/lazr/restfulclient/resource.py 2015-07-08 00:30:28.000000000 +0000 +++ lazr.restfulclient-0.14.4/src/lazr/restfulclient/resource.py 2021-01-20 11:27:07.000000000 +0000 @@ -29,22 +29,9 @@ ] -try: - from email.message import Message -except ImportError: - from email.Message import Message - -try: - # Python 3 and sufficiently modern Python 2 versions. - from json import dumps, loads -except ImportError: - from simplejson import dumps, loads - -try: - # Python 3. - from io import BytesIO -except ImportError: - from cStringIO import StringIO as BytesIO +from email.message import Message +from io import BytesIO +from json import dumps, loads try: # Python 3. diff -Nru lazr.restfulclient-0.14.2/src/lazr/restfulclient/tests/test_oauth.py lazr.restfulclient-0.14.4/src/lazr/restfulclient/tests/test_oauth.py --- lazr.restfulclient-0.14.2/src/lazr/restfulclient/tests/test_oauth.py 2018-05-08 07:43:04.000000000 +0000 +++ lazr.restfulclient-0.14.4/src/lazr/restfulclient/tests/test_oauth.py 2020-01-27 13:25:30.000000000 +0000 @@ -53,6 +53,32 @@ self.assertEqual(consumer.application_name, None) +class TestAccessToken(TestCase): + + def test_data_fields(self): + access_token = AccessToken("key", "secret", "context") + self.assertEqual(access_token.key, "key") + self.assertEqual(access_token.secret, "secret") + self.assertEqual(access_token.context, "context") + + def test_default_context(self): + # Context defaults to None. + access_token = AccessToken("key", "secret") + self.assertIsNone(access_token.context) + + def test___str__(self): + access_token = AccessToken("lock&key", "secret=password") + self.assertEqual( + "oauth_token_secret=secret%3Dpassword&oauth_token=lock%26key", + str(access_token)) + + def test_from_string(self): + access_token = AccessToken.from_string( + "oauth_token_secret=secret%3Dpassword&oauth_token=lock%26key") + self.assertEqual(access_token.key, "lock&key") + self.assertEqual(access_token.secret, "secret=password") + + class TestSystemWideConsumer(TestCase): def test_useful_distro_name(self): diff -Nru lazr.restfulclient-0.14.2/src/lazr/restfulclient/version.txt lazr.restfulclient-0.14.4/src/lazr/restfulclient/version.txt --- lazr.restfulclient-0.14.2/src/lazr/restfulclient/version.txt 2018-11-17 17:09:20.000000000 +0000 +++ lazr.restfulclient-0.14.4/src/lazr/restfulclient/version.txt 1970-01-01 00:00:00.000000000 +0000 @@ -1 +0,0 @@ -0.14.2 diff -Nru lazr.restfulclient-0.14.2/src/lazr.restfulclient.egg-info/PKG-INFO lazr.restfulclient-0.14.4/src/lazr.restfulclient.egg-info/PKG-INFO --- lazr.restfulclient-0.14.2/src/lazr.restfulclient.egg-info/PKG-INFO 2018-11-17 17:09:31.000000000 +0000 +++ lazr.restfulclient-0.14.4/src/lazr.restfulclient.egg-info/PKG-INFO 2021-09-13 15:27:45.000000000 +0000 @@ -1,6 +1,6 @@ Metadata-Version: 2.1 Name: lazr.restfulclient -Version: 0.14.2 +Version: 0.14.4 Summary: A programmable client library that takes advantage of the commonalities among Home-page: https://launchpad.net/lazr.restfulclient Maintainer: LAZR Developers @@ -32,42 +32,32 @@ https://dev.launchpad.net/Hacking for how to develop in this package. - .. toctree:: - :glob: - - toplevel - collections - entries - operations - hosted-files - caching - authorizer.standalone - retry.standalone - NEWS - - .. _Sphinx: http://sphinx.pocoo.org/ - .. _Table of contents: http://sphinx.pocoo.org/concepts.html#the-toc-tree - - Importable - ========== - - The lazr.restfulclient package is importable, and has a version number. - - >>> import lazr.restfulclient - >>> print 'VERSION:', lazr.restfulclient.__version__ - VERSION: ... =========================== NEWS for lazr.restfulclient =========================== + 0.14.4 (2021-09-13) + =================== + + - Drop support for Python < 2.6. + - Adjust versioning strategy to avoid importing pkg_resources, which is + slow in large environments. + + 0.14.3 (2020-01-27) + =================== + + - Restore from_string, to_string, and __str__ methods of + lazr.restfulclient.authorize.oauth.AccessToken, unintentionally removed + in 0.14.0. + 0.14.2 (2018-11-17) =================== - Fix compatibility with httplib2 0.12.0 for Python 3. [bug=1803754] - Really fix compatibility with httplib2 < 0.9. - Fix compatibility with httplib2 0.9 for Python 3. - - Require httplib >= 0.7.7 for Python 3. + - Require httplib2 >= 0.7.7 for Python 3. 0.14.1 (2018-11-16) =================== diff -Nru lazr.restfulclient-0.14.2/src/lazr.restfulclient.egg-info/requires.txt lazr.restfulclient-0.14.4/src/lazr.restfulclient.egg-info/requires.txt --- lazr.restfulclient-0.14.2/src/lazr.restfulclient.egg-info/requires.txt 2018-11-17 17:09:31.000000000 +0000 +++ lazr.restfulclient-0.14.4/src/lazr.restfulclient.egg-info/requires.txt 2021-09-13 15:27:45.000000000 +0000 @@ -7,6 +7,9 @@ [:python_version < "3"] httplib2 +[:python_version < "3.8"] +importlib-metadata + [:python_version >= "3"] httplib2>=0.7.7 diff -Nru lazr.restfulclient-0.14.2/src/lazr.restfulclient.egg-info/SOURCES.txt lazr.restfulclient-0.14.4/src/lazr.restfulclient.egg-info/SOURCES.txt --- lazr.restfulclient-0.14.2/src/lazr.restfulclient.egg-info/SOURCES.txt 2018-11-17 17:09:31.000000000 +0000 +++ lazr.restfulclient-0.14.4/src/lazr.restfulclient.egg-info/SOURCES.txt 2021-09-13 15:27:45.000000000 +0000 @@ -1,5 +1,6 @@ COPYING.txt HACKING.rst +NEWS.rst README.rst setup.py src/lazr/__init__.py @@ -16,7 +17,6 @@ src/lazr/restfulclient/_json.py src/lazr/restfulclient/errors.py src/lazr/restfulclient/resource.py -src/lazr/restfulclient/version.txt src/lazr/restfulclient/authorize/__init__.py src/lazr/restfulclient/authorize/oauth.py src/lazr/restfulclient/docs/Makefile