Fail on python3 versions before 3.3, and add docs.

Updates `README.md` and `docs/index.rst` with a note about supported
versions. (Also drops a really stale note about dependencies.)
This commit is contained in:
Craig Citro
2015-01-07 00:32:24 -08:00
parent 25384e2584
commit 85b06e15ea
3 changed files with 30 additions and 10 deletions

View File

@@ -13,14 +13,6 @@ To install, simply say
$ pip install --upgrade oauth2client
Third Party Libraries
=====================
These libraries will be installed when you install the client library:
* https://github.com/jcgregorio/httplib2
Contributing
============
@@ -28,3 +20,9 @@ Please see the
[contributing page](http://google.github.io/oauth2client/contributing.html)
for more information. In particular, we love pull requests -- but please make
sure to sign the contributor license agreement.
Supported Python Versions
=========================
We support Python 2.6, 2.7, 3.3+. More information
[in the docs](http://google.github.io/oauth2client/#supported-python-versions).

View File

@@ -50,3 +50,22 @@ contributor license agreement.
source/modules
contributing
Supported Python Versions
-------------------------
We support Python 2.6, 2.7, 3.3+. (Whatever this file says, the truth is
always represented by our `tox.ini`_).
.. _tox.ini: https://github.com/google/oauth2client/blob/master/tox.ini
We explicitly decided to support Python 3 beginning with version
3.3. Reasons for this include:
* Encouraging use of newest versions of Python 3
* Following the lead of prominent `open-source projects`_
* Unicode literal support which
allows for a cleaner codebase that works in both Python 2 and Python 3
.. _open-source projects: http://docs.python-requests.org/en/latest/
.. _Unicode literal support: https://www.python.org/dev/peps/pep-0414/

View File

@@ -21,8 +21,11 @@ from __future__ import print_function
import sys
if sys.version_info <= (2, 6):
print('oauth2client requires python version >= 2.6.', file=sys.stderr)
if sys.version_info < (2, 6):
print('oauth2client requires python2 version >= 2.6.', file=sys.stderr)
sys.exit(1)
if (3, 1) <= sys.version_info < (3, 3):
print('oauth2client requires python3 version >= 3.3.', file=sys.stderr)
sys.exit(1)
from setuptools import setup