This file is part of lazr.restfulclient.
lazr.restfulclient is free software: you can redistribute it and/or modify it
under the terms of the GNU Lesser General Public License as published by
the Free Software Foundation, version 3 of the License.
lazr.restfulclient is distributed in the hope that it will be useful, but
WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public
License for more details.
You should have received a copy of the GNU Lesser General Public License
along with lazr.restfulclient. If not, see <http://www.gnu.org/licenses/>.
This is a pure template for new lazr namespace packages.
Please see https://dev.launchpad.net/LazrStyleGuide and
https://dev.launchpad.net/Hacking for how to develop in this
This is an example Sphinx_ `Table of contents`_. If you add files to the docs
directory, you should probably improve it.
.. _Sphinx: http://sphinx.pocoo.org/
.. _Table of contents: http://sphinx.pocoo.org/concepts.html#the-toc-tree
The lazr.restfulclient package is importable, and has a version number.
>>> import lazr.restfulclient
>>> print 'VERSION:', lazr.restfulclient.__version__
NEWS for lazr.restfulclient
- 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.
- 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.
- Named POST operations may result in a resource moving to a new location.
Detect the redirect and reload the resource from its new URL.
- Add environment variable, LP_DISABLE_SSL_CERTIFICATE_VALIDATION, to
disable SSL certificate checks. Most useful when testing against
- Implement the mocked out authorizeRequest for the BasicHttpAuthorizer
- Fix ServiceRoot.load() so that it properly handles relative URLs
in a way that doesn't break subsequent API calls (bug 681767).
- Made the cache safe for use by concurrent threads and processes.
- Give a more useful AttributeError
- The 'web_link' parameter now shows up in lp_attributes, not
- Restored compatibility with Python 2.4.
- 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.
- Add compatibility with lazr.restful 0.11.0
- 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.
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:
- 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.)
- It's now possible to pass a relative URL (relative to the versioned
service root) into load().
- 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.
- 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
- 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.
- 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.
- Clients will no longer fetch a representation of a collection
before invoking a named operation on the collection.
- Clients now send a useful and somewhat customizable User-Agent
- 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.)
- 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.
- Fixed a bug that prevented a unicode string from being used as a
- 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.
- 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.
- The WSGI authentication middleware has been moved from lazr.restful
to the new lazr.authentication library, and lazr.restfulclient now
uses the new library.
- Added support for OAuth.
- Added support for HTTP Basic Auth.
- Made compatible with lazr.restful 0.9.6.
- Removed debugging code.
- Removed unnecessary build dependencies.
- Updated tests for newer version of simplejson.
- Made tests less fragile by cleaning up lazr.restful example filemanager
- normalized output of simplejson to unicode.
Removed a sys.path hack from setup.py.
- Fields that can contain binary data are no longer run through
- For fields that can take on a limited set of values, you can now get
a list of possible values.
- 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.
- Initial public release