expunge python 2.6 (#3962)
* expunge python 2.6
* how did THAT happen
* remove another unsupported python from the tox envlist
* hypothesis can now be unconditionally imported
diff --git a/.jenkins/Jenkinsfile-cryptography-wheel-builder b/.jenkins/Jenkinsfile-cryptography-wheel-builder
index ae749cc..a8f0980 100644
--- a/.jenkins/Jenkinsfile-cryptography-wheel-builder
+++ b/.jenkins/Jenkinsfile-cryptography-wheel-builder
@@ -22,18 +22,16 @@
label: 'docker',
imageName: 'pyca/cryptography-manylinux1:i686',
versions: [
- 'cp26-cp26m', 'cp26-cp26mu', 'cp27-cp27m',
- 'cp27-cp27mu', 'cp34-cp34m', 'cp35-cp35m',
- 'cp36-cp36m'
+ 'cp27-cp27m', 'cp27-cp27mu', 'cp34-cp34m',
+ 'cp35-cp35m', 'cp36-cp36m'
],
],
[
label: 'docker',
imageName: 'pyca/cryptography-manylinux1:x86_64',
versions: [
- 'cp26-cp26m', 'cp26-cp26mu', 'cp27-cp27m',
- 'cp27-cp27mu', 'cp34-cp34m', 'cp35-cp35m',
- 'cp36-cp36m'
+ 'cp27-cp27m', 'cp27-cp27mu', 'cp34-cp34m',
+ 'cp35-cp35m', 'cp36-cp36m'
],
],
]
diff --git a/.travis.yml b/.travis.yml
index a2cafef..4679753 100644
--- a/.travis.yml
+++ b/.travis.yml
@@ -19,8 +19,6 @@
matrix:
include:
# these are just to make travis's UI a bit prettier
- - python: 2.6
- env: TOXENV=py26
- python: 2.7
env: TOXENV=py27
- python: 3.4
diff --git a/CHANGELOG.rst b/CHANGELOG.rst
index a8a48a6..b4ca5ac 100644
--- a/CHANGELOG.rst
+++ b/CHANGELOG.rst
@@ -8,6 +8,7 @@
.. note:: This version is not yet released and is under active development.
+* **BACKWARDS INCOMPATIBLE:** Support for Python 2.6 has been dropped.
.. _v2-1:
diff --git a/Jenkinsfile b/Jenkinsfile
index bac0067..0e4c60c 100644
--- a/Jenkinsfile
+++ b/Jenkinsfile
@@ -5,11 +5,11 @@
def configs = [
[
label: 'windows',
- toxenvs: ['py26', 'py27', 'py34', 'py35', 'py36'],
+ toxenvs: ['py27', 'py34', 'py35', 'py36'],
],
[
label: 'windows64',
- toxenvs: ['py26', 'py27', 'py34', 'py35', 'py36'],
+ toxenvs: ['py27', 'py34', 'py35', 'py36'],
],
[
label: 'freebsd11',
@@ -206,7 +206,6 @@
withEnv(["LABEL=$label", "TOXENV=$toxenv", "IMAGE_NAME=$imageName"]) {
if (label.contains("windows")) {
def pythonPath = [
- py26: "C:\\Python26\\python.exe",
py27: "C:\\Python27\\python.exe",
py34: "C:\\Python34\\python.exe",
py35: "C:\\Python35\\python.exe",
diff --git a/README.rst b/README.rst
index 350dc72..1557666 100644
--- a/README.rst
+++ b/README.rst
@@ -18,7 +18,7 @@
``cryptography`` is a package which provides cryptographic recipes and
primitives to Python developers. Our goal is for it to be your "cryptographic
-standard library". It supports Python 2.6-2.7, Python 3.4+, and PyPy 5.3+.
+standard library". It supports Python 2.7, Python 3.4+, and PyPy 5.3+.
``cryptography`` includes both high level recipes and low level interfaces to
common cryptographic algorithms such as symmetric ciphers, message digests, and
diff --git a/docs/development/getting-started.rst b/docs/development/getting-started.rst
index 0d7c91e..55dfd6c 100644
--- a/docs/development/getting-started.rst
+++ b/docs/development/getting-started.rst
@@ -75,10 +75,9 @@
$ tox
...
- ERROR: py26: InterpreterNotFound: python2.6
py27: commands succeeded
ERROR: pypy: InterpreterNotFound: pypy
- py33: commands succeeded
+ py34: commands succeeded
docs: commands succeeded
pep8: commands succeeded
diff --git a/docs/installation.rst b/docs/installation.rst
index 7066865..35bfbba 100644
--- a/docs/installation.rst
+++ b/docs/installation.rst
@@ -10,7 +10,7 @@
Supported platforms
-------------------
-Currently we test ``cryptography`` on Python 2.6, 2.7, 3.4, 3.5, 3.6, and
+Currently we test ``cryptography`` on Python 2.7, 3.4, 3.5, 3.6, and
PyPy 5.3+ on these operating systems.
* x86-64 CentOS 7.x
@@ -21,10 +21,6 @@
* x86-64 Alpine (latest)
* 32-bit and 64-bit Python on 64-bit Windows Server 2012
-.. warning::
- Python 2.6 is no longer supported by the Python core team. The next release
- of ``cryptography`` will drop support for Python 2.6.
-
We test compiling with ``clang`` as well as ``gcc`` and use the following
OpenSSL releases:
@@ -49,7 +45,7 @@
If you prefer to compile it yourself you'll need to have OpenSSL installed.
You can compile OpenSSL yourself as well or use the binaries we build for our
release infrastructure (`openssl-release`_). Be sure to download the proper
-version for your architecture and Python (2010 works for Python 2.6, 2.7, 3.3,
+version for your architecture and Python (2010 works for Python 2.7, 3.3,
and 3.4 while 2015 is required for 3.5 and above). Wherever you place your copy
of OpenSSL you'll need to set the ``LIB`` and ``INCLUDE`` environment variables
to include the proper locations. For example:
diff --git a/setup.py b/setup.py
index c5a42b2..cf79b66 100644
--- a/setup.py
+++ b/setup.py
@@ -49,9 +49,8 @@
"pretend",
"iso8601",
"pytz",
+ "hypothesis>=1.11.4",
]
-if sys.version_info[:2] > (2, 6):
- test_requirements.append("hypothesis>=1.11.4")
# If there's no vectors locally that probably means we are in a tarball and
@@ -260,7 +259,6 @@
"Operating System :: Microsoft :: Windows",
"Programming Language :: Python",
"Programming Language :: Python :: 2",
- "Programming Language :: Python :: 2.6",
"Programming Language :: Python :: 2.7",
"Programming Language :: Python :: 3",
"Programming Language :: Python :: 3.4",
diff --git a/src/cryptography/__init__.py b/src/cryptography/__init__.py
index e5c34a2..6da0b38 100644
--- a/src/cryptography/__init__.py
+++ b/src/cryptography/__init__.py
@@ -4,9 +4,6 @@
from __future__ import absolute_import, division, print_function
-import sys
-import warnings
-
from cryptography.__about__ import (
__author__, __copyright__, __email__, __license__, __summary__, __title__,
__uri__, __version__
@@ -17,11 +14,3 @@
"__title__", "__summary__", "__uri__", "__version__", "__author__",
"__email__", "__license__", "__copyright__",
]
-
-if sys.version_info[:2] == (2, 6):
- warnings.warn(
- "Python 2.6 is no longer supported by the Python core team, please "
- "upgrade your Python. The next version of cryptography will drop "
- "support for Python 2.6",
- DeprecationWarning
- )
diff --git a/src/cryptography/utils.py b/src/cryptography/utils.py
index 986b504..02eec20 100644
--- a/src/cryptography/utils.py
+++ b/src/cryptography/utils.py
@@ -100,12 +100,8 @@
)
-if sys.version_info >= (2, 7):
- def bit_length(x):
- return x.bit_length()
-else:
- def bit_length(x):
- return len(bin(x)) - (2 + (x <= 0))
+def bit_length(x):
+ return x.bit_length()
class _DeprecatedValue(object):
diff --git a/tests/hypothesis/__init__.py b/tests/hypothesis/__init__.py
index 0b34406..4b54088 100644
--- a/tests/hypothesis/__init__.py
+++ b/tests/hypothesis/__init__.py
@@ -3,7 +3,3 @@
# for complete details.
from __future__ import absolute_import, division, print_function
-
-import pytest
-# hypothesis no longer supports Python 2.6 so we simply skip it there
-pytest.importorskip("hypothesis")
diff --git a/tox.ini b/tox.ini
index b8def74..03c4c07 100644
--- a/tox.ini
+++ b/tox.ini
@@ -1,6 +1,6 @@
[tox]
minversion = 2.4
-envlist = py26,py27,pypy,py33,py34,py35,py36,docs,pep8,py3pep8
+envlist = py27,pypy,py34,py35,py36,docs,pep8,py3pep8
[testenv]
extras =