commit | 26178fc3acc0ab8b86023e8a8a815bbd4b384174 | [log] [tgz] |
---|---|---|
author | Phil Ruffwind <rf@rufflewind.com> | Tue Oct 13 19:00:33 2015 -0400 |
committer | Phil Ruffwind <rf@rufflewind.com> | Wed Oct 14 20:06:08 2015 -0400 |
tree | 12e5ade7e6b272c0b7e5b1e985f863e8515c4984 | |
parent | 7f85278b5efe8c12d097c788ca086aa1e23e1355 [diff] |
Fix non-resumable binary uploads on Python 3 1. Generator and StringIO are replaced by BytesGenerator and BytesIO. If BytesGenerator doesn't exist (as is the case in Python 2), fall back to Generator. 2. BytesGenerator is buggy [1] [2] and corrupts '\r' into '\n'. To work around this, we implement a patched version of BytesGenerator that replaces ._write_lines with just .write. The test_multipart_media_good_upload has been updated to reflect the change. It is also stricter now, as it matches the entire request body against the expected form. Note: BytesGenerator was introduced in Python 3.2. This is OK since the library already demands 3.3+. Fixes #145. [1]: https://bugs.python.org/issue18886 [2]: https://bugs.python.org/issue19003
This is the Python client library for Google's discovery based APIs. To get started, please see the full documentation for this library. Additionally, dynamically generated documentation is available for all of the APIs supported by this library.
To install, simply use pip
or easy_install
:
$ pip install --upgrade google-api-python-client
or
$ easy_install --upgrade google-api-python-client
See the Developers Guide for more detailed instructions and additional documentation.
Python 2.6 or 2.7 are fully supported.
Python 3.3+ is also now supported! However, this library has not yet been used as thoroughly with Python 3, so we'd recommend testing before deploying with Python 3 in production.
The following libraries will be installed when you install the client library:
For development you will also need the following libraries:
Please see the contributing page for more information. In particular, we love pull requests - but please make sure to sign the contributor license agreement.