Skip to content

Commit c4305a6

Browse files
committed
Drop support for EOL Python
1 parent b7b9fc3 commit c4305a6

File tree

9 files changed

+14
-62
lines changed

9 files changed

+14
-62
lines changed

.travis.yml

Lines changed: 3 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,6 @@ language: python
22
sudo: false
33
cache: pip
44
python:
5-
- '2.6'
65
- '2.7'
76
- '3.4'
87
- '3.5'
@@ -12,19 +11,16 @@ before_install:
1211
- pip install pycodestyle
1312
install:
1413
- pip install codecov
15-
- if [[ "$TRAVIS_PYTHON_VERSION" == 2.6* ]]; then travis_retry pip install unittest2; fi
16-
- if [[ "$TRAVIS_PYTHON_VERSION" == 2.6* ]]; then travis_retry pip uninstall -y pbr; fi
17-
- if [[ "$TRAVIS_PYTHON_VERSION" == "3.2" ]]; then travis_retry pip install coverage==3.7.1; fi
18-
- if [[ "$TRAVIS_PYTHON_VERSION" != "3.2" ]]; then travis_retry pip install coverage; fi
14+
- travis_retry pip install coverage
1915
- python setup.py install
2016
- pip install codecov
2117
script:
22-
- if [[ $TRAVIS_PYTHON_VERSION == '2.6' ]]; then coverage run -m unittest2 discover; else coverage run -m unittest discover; fi
18+
- coverage run -m unittest discover
2319
after_script:
2420
- codecov
2521
# Run pycodestyle
2622
- pycodestyle
27-
- if [[ $TRAVIS_PYTHON_VERSION == '2.6' ]]; then unit2 discover; else python -m unittest discover; fi
23+
- python -m unittest discover
2824
- coverage run tests/test_unit.py
2925
notifications:
3026
hipchat:

CONTRIBUTING.md

Lines changed: 2 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,7 @@ We welcome direct contributions to the python-http-client code base. Thank you!
6666

6767
##### Prerequisites #####
6868

69-
- Python 2.6 through 3.6
69+
- Python 2.7 and 3.4+
7070
- There are no external dependencies
7171

7272
##### Initial setup: #####
@@ -112,14 +112,6 @@ All test files are in the [`tests`](https://github.com/sendgrid/python-http-clie
112112

113113
For the purposes of contributing to this repo, please update the [`test_unit.py`](https://github.com/sendgrid/python-http-client/blob/master/test/test_unit.py) file with unit tests as you modify the code.
114114

115-
For Python 2.6.*:
116-
117-
```bash
118-
unit2 discover -v
119-
```
120-
121-
For Python 2.7.* and up:
122-
123115
```bash
124116
python -m unittest discover -v
125117
```
@@ -141,13 +133,12 @@ The above local "Initial setup" is complete
141133
Add `eval "$(pyenv init -)"` to your shell environment (.profile, .bashrc, etc) after installing tox, you only need to do this once.
142134

143135
```bash
144-
pyenv install 2.6.9
145136
pyenv install 2.7.11
146137
pyenv install 3.4.3
147138
pyenv install 3.5.2
148139
pyenv install 3.6.0
149140
python setup.py install
150-
pyenv local 3.6.0 3.5.2 3.4.3 2.7.8 2.6.9
141+
pyenv local 3.6.0 3.5.2 3.4.3 2.7.8
151142
pyenv rehash
152143
```
153144

Dockerfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
FROM ubuntu:xenial
2-
ENV PYTHON_VERSIONS='python2.6 python2.7 python3.4 python3.5 python3.6' \
2+
ENV PYTHON_VERSIONS='python2.7 python3.4 python3.5 python3.6' \
33
OAI_SPEC_URL="https://raw.githubusercontent.com/sendgrid/sendgrid-oai/master/oai_stoplight.json"
44

55
# install testing versions of python, including old versions, from deadsnakes

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ If you are looking for the SendGrid API client library, please see [this repo](h
3131

3232
## Prerequisites
3333

34-
- Python version 2.6, 2.7, 3.4, 3.5 or 3.6
34+
- Python version 2.7 or 3.4+
3535

3636
## Install Package
3737

setup.py

Lines changed: 2 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
import sys
21
import os
32
from setuptools import setup
43

@@ -8,13 +7,6 @@
87
long_description = open('README.txt').read()
98

109

11-
def get_requires():
12-
deps = []
13-
if (2, 6) <= sys.version_info < (2, 7):
14-
deps.append('unittest2')
15-
return deps
16-
17-
1810
base_url = 'https://github.com/sendgrid/'
1911
version = '3.1.0'
2012
setup(
@@ -28,16 +20,14 @@ def get_requires():
2820
license='MIT',
2921
description='HTTP REST client, simplified for Python',
3022
long_description=long_description,
31-
install_requires=get_requires(),
3223
keywords=[
3324
'REST',
3425
'HTTP',
3526
'API'],
3627
classifiers=[
37-
'Programming Language :: Python :: 2.6',
28+
'Programming Language :: Python :: 2',
3829
'Programming Language :: Python :: 2.7',
39-
'Programming Language :: Python :: 3.2',
40-
'Programming Language :: Python :: 3.3',
30+
'Programming Language :: Python :: 3',
4131
'Programming Language :: Python :: 3.4',
4232
'Programming Language :: Python :: 3.5',
4333
'Programming Language :: Python :: 3.6'

tests/test_daterange.py

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,6 @@
11
import os
22
import time
3-
4-
try:
5-
import unittest2 as unittest
6-
except ImportError:
7-
import unittest
3+
import unittest
84

95

106
class DateRangeTest(unittest.TestCase):

tests/test_repofiles.py

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,5 @@
1+
import unittest
12
from os import path
2-
try:
3-
import unittest2 as unittest
4-
except ImportError:
5-
import unittest
63

74

85
class RepoFiles(unittest.TestCase):

tests/test_unit.py

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,6 @@
11
import pickle
2+
import unittest
23

3-
try:
4-
import unittest2 as unittest
5-
except ImportError:
6-
import unittest
74
from python_http_client.client import Client
85
from python_http_client.exceptions import (
96
handle_error,

tox.ini

Lines changed: 2 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -4,32 +4,17 @@
44
# and then run "tox" from this directory.
55

66
[tox]
7-
envlist = py26, py27, py32, py33, py34, py35, py36
7+
envlist = py27, py34, py35, py36
88

99
[testenv]
1010
commands = {envbindir}/python -m unittest discover -v []
1111
deps =
1212

13-
[testenv:py26]
14-
commands = {envbindir}/unit2 discover -v []
15-
deps =
16-
basepython = python2.6
17-
1813
[testenv:py27]
1914
commands = {envbindir}/python -m unittest discover -v []
2015
deps =
2116
basepython = python2.7
2217

23-
[testenv:py32]
24-
commands = {envbindir}/python -m unittest discover -v []
25-
deps =
26-
basepython = python3.2
27-
28-
[testenv:py33]
29-
commands = {envbindir}/python -m unittest discover -v []
30-
deps =
31-
basepython = python3.3
32-
3318
[testenv:py34]
3419
commands = {envbindir}/python -m unittest discover -v []
3520
deps =
@@ -43,4 +28,4 @@ basepython = python3.5
4328
[testenv:py36]
4429
commands = {envbindir}/python -m unittest discover -v []
4530
deps =
46-
basepython = python3.6
31+
basepython = python3.6

0 commit comments

Comments
 (0)