Skip to content
This repository has been archived by the owner on Nov 5, 2019. It is now read-only.

Drop support for Python 2.6 #590

Merged
merged 7 commits into from
Aug 9, 2016
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
38 changes: 22 additions & 16 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -1,29 +1,35 @@
language: python
python: 2.7
sudo: false

This comment was marked as spam.

This comment was marked as spam.

# TODO(issue 532): Fix syntax when 3.5 is natively available upstream

matrix:
include:
- python: 3.5
env:
- TOX_ENV=py35
- python: 2.7
env: TOX_ENV=flake8
- python: 2.7
env: TOX_ENV=docs
- python: 2.7
env: TOX_ENV=gae
- python: 2.7
env: TOX_ENV=py27
- python: 3.3
env: TOX_ENV=py33
- python: 3.4
env: TOX_ENV=py34
- python: 3.5
env: TOX_ENV=py35
- python: pypy
env: TOX_ENV=pypy
- python: 2.7
env: TOX_ENV=system-tests
- python: 3.4
env: TOX_ENV=system-tests3

This comment was marked as spam.

This comment was marked as spam.

This comment was marked as spam.

env:
matrix:
- TOX_ENV=py26
- TOX_ENV=py27
- TOX_ENV=py33
- TOX_ENV=py34
- TOX_ENV=pypy
- TOX_ENV=docs
- TOX_ENV=system-tests
- TOX_ENV=system-tests3
- TOX_ENV=gae
- TOX_ENV=flake8
global:
- GAE_PYTHONPATH=${HOME}/.cache/google_appengine
cache:
directories:
- ${HOME}/.cache
- ${HOME}/.pyenv
install:
- ./scripts/install.sh
script:
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ agreement.
Supported Python Versions
=========================

We support Python 2.6, 2.7, 3.3+. More information [in the docs][2].
We support Python 2.7 and 3.3+. More information [in the docs][2].

[1]: https://github.com/google/oauth2client/blob/master/CONTRIBUTING.md
[2]: https://oauth2client.readthedocs.io/#supported-python-versions
2 changes: 1 addition & 1 deletion docs/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -107,7 +107,7 @@ contributor license agreement.
Supported Python Versions
-------------------------

We support Python 2.6, 2.7, 3.3+. (Whatever this file says, the truth is
We support Python 2.7 and 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
Expand Down
15 changes: 7 additions & 8 deletions scripts/install.sh
Original file line number Diff line number Diff line change
Expand Up @@ -17,15 +17,14 @@
set -ev

pip install tox
if [[ "${TOX_ENV}" == "pypy" ]]; then
git clone https://github.com/yyuu/pyenv.git ${HOME}/.pyenv
PYENV_ROOT="${HOME}/.pyenv"
PATH="${PYENV_ROOT}/bin:${PATH}"
eval "$(pyenv init -)"
pyenv install pypy-2.6.0
pyenv global pypy-2.6.0
fi

# App Engine tests require the App Engine SDK.
if [[ "${TOX_ENV}" == "gae" && ! -d ${GAE_PYTHONPATH} ]]; then
python scripts/fetch_gae_sdk.py `dirname ${GAE_PYTHONPATH}`
fi

# Travis ships with an old version of PyPy, so install at least version 2.6.
if [[ "${TOX_ENV}" == "pypy" ]]; then
git clone https://github.com/yyuu/pyenv.git ${HOME}/.pyenv
${HOME}/.pyenv/bin/pyenv install pypy-2.6.0
fi
9 changes: 5 additions & 4 deletions scripts/run.sh
Original file line number Diff line number Diff line change
Expand Up @@ -16,10 +16,11 @@

set -ev

# If in the pypy environment, activate the never version of pypy provided by
# pyenv.
if [[ "${TOX_ENV}" == "pypy" ]]; then
PYENV_ROOT="${HOME}/.pyenv"
PATH="${PYENV_ROOT}/bin:${PATH}"
eval "$(pyenv init -)"
pyenv global pypy-2.6.0
PATH="${HOME}/.pyenv/versions/pypy-2.6.0/bin:${PATH}"
export PATH
fi

tox -e ${TOX_ENV}
5 changes: 2 additions & 3 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -26,8 +26,8 @@

import oauth2client

if sys.version_info < (2, 6):
print('oauth2client requires python2 version >= 2.6.', file=sys.stderr)
if sys.version_info < (2, 7):
print('oauth2client requires python2 version >= 2.7.', file=sys.stderr)
sys.exit(1)
if (3, 1) <= sys.version_info < (3, 3):
print('oauth2client requires python3 version >= 3.3.', file=sys.stderr)
Expand Down Expand Up @@ -58,7 +58,6 @@
keywords="google oauth 2.0 http client",
classifiers=[
'Programming Language :: Python :: 2',
'Programming Language :: Python :: 2.6',
'Programming Language :: Python :: 2.7',
'Programming Language :: Python :: 3',
'Programming Language :: Python :: 3.3',
Expand Down
16 changes: 1 addition & 15 deletions tox.ini
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
[tox]
envlist = py26,py27,py33,py34,py35,pypy,gae,cover
envlist = py27,py33,py34,py35,pypy,gae,cover

[testenv]
basedeps = mock>=1.3.0
Expand Down Expand Up @@ -50,20 +50,6 @@ deps = {[testenv]deps}
coverage
nosegae

[testenv:py26]
basepython =
python2.6
commands =
nosetests \
--ignore-files=test_appengine\.py \
--ignore-files=test__appengine_ndb\.py \
--ignore-files=test_keyring_storage\.py \
--exclude-dir=oauth2client/contrib/django_util \
--exclude-dir=tests/contrib/django_util \
{posargs}
deps = {[testenv]basedeps}
nose-exclude

[testenv:py33]
basepython =
python3.3
Expand Down