From d08be22bc0dbbe86e52af02490365880f9a2054d Mon Sep 17 00:00:00 2001 From: Hugo Date: Sat, 20 Oct 2018 15:26:31 +0300 Subject: [PATCH 1/2] Drop support for EOL Python 2.6 --- .travis.yml | 1 - CONTRIBUTING.md | 2 +- Dockerfile | 2 +- README.rst | 2 +- setup.py | 4 +++- 5 files changed, 6 insertions(+), 5 deletions(-) diff --git a/.travis.yml b/.travis.yml index 2d337f9..1cd39e4 100644 --- a/.travis.yml +++ b/.travis.yml @@ -1,6 +1,5 @@ language: python python: - - '2.6' - '2.7' - '3.4' - '3.5' diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 8d41b42..b28b0aa 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -64,7 +64,7 @@ We welcome direct contributions to the smtpapi-python code base. Thank you! ##### Prerequisites ##### -- Python 2.6, 2.7, 3.4 and 3.5 +- Python 2.7, 3.4 and 3.5 ##### Initial setup: ##### diff --git a/Dockerfile b/Dockerfile index 8f5a44f..8ada074 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,5 +1,5 @@ FROM ubuntu:xenial -ENV PYTHON_VERSIONS='python2.6 python2.7 python3.4 python3.5 python3.6' \ +ENV PYTHON_VERSIONS='python2.7 python3.4 python3.5 python3.6' \ OAI_SPEC_URL="https://raw.githubusercontent.com/sendgrid/sendgrid-oai/master/oai_stoplight.json" # install testing versions of python, including old versions, from deadsnakes diff --git a/README.rst b/README.rst index 4d5df8d..99b50a1 100644 --- a/README.rst +++ b/README.rst @@ -31,7 +31,7 @@ Installation Prerequisites ------------- -- Python version 2.6, 2.7, 3.4 or 3.5 +- Python version 2.7, 3.4 or 3.5 - The SendGrid service, starting at the `free level`_ Install Package diff --git a/setup.py b/setup.py index a6e11d0..8761722 100644 --- a/setup.py +++ b/setup.py @@ -21,9 +21,11 @@ license='MIT License', description='Simple wrapper to use SendGrid SMTP API', long_description=readme, + python_requires='>=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*', classifiers=[ - 'Programming Language :: Python :: 2.6', + 'Programming Language :: Python :: 2', 'Programming Language :: Python :: 2.7', + 'Programming Language :: Python :: 3', 'Programming Language :: Python :: 3.4', 'Programming Language :: Python :: 3.5', ], From 9cbf808916fe16e45f902a8ab45905176c8b4e21 Mon Sep 17 00:00:00 2001 From: Hugo Date: Sat, 20 Oct 2018 15:31:13 +0300 Subject: [PATCH 2/2] Backported unittest2 no longer needed --- test/test_lisence.py | 5 +---- test/test_project.py | 6 +----- 2 files changed, 2 insertions(+), 9 deletions(-) diff --git a/test/test_lisence.py b/test/test_lisence.py index d47c309..54b290a 100644 --- a/test/test_lisence.py +++ b/test/test_lisence.py @@ -1,10 +1,7 @@ import sendgrid from sendgrid.helpers.mail import * from sendgrid.version import __version__ -try: - import unittest2 as unittest -except ImportError: - import unittest +import unittest import os import subprocess import sys diff --git a/test/test_project.py b/test/test_project.py index daf7d85..33dbdda 100644 --- a/test/test_project.py +++ b/test/test_project.py @@ -1,9 +1,5 @@ import os - -try: - import unittest2 as unittest -except ImportError: - import unittest +import unittest class ProjectTests(unittest.TestCase):