diff options
author | Paul Kehrer <paul.l.kehrer@gmail.com> | 2017-10-12 06:06:01 +0800 |
---|---|---|
committer | Alex Gaynor <alex.gaynor@gmail.com> | 2017-10-11 18:06:01 -0400 |
commit | 4cf6e785ca5608cffd8d92ad1e1a5073108a2a20 (patch) | |
tree | eca2e7ce6043f94cbb8034ee3ad95aaf45bdcf41 | |
parent | 38fe038522651fd18eeae60d5e96dc81aa07e863 (diff) | |
download | cryptography-4cf6e785ca5608cffd8d92ad1e1a5073108a2a20.tar.gz cryptography-4cf6e785ca5608cffd8d92ad1e1a5073108a2a20.tar.bz2 cryptography-4cf6e785ca5608cffd8d92ad1e1a5073108a2a20.zip |
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
-rw-r--r-- | .jenkins/Jenkinsfile-cryptography-wheel-builder | 10 | ||||
-rw-r--r-- | .travis.yml | 2 | ||||
-rw-r--r-- | CHANGELOG.rst | 1 | ||||
-rw-r--r-- | Jenkinsfile | 5 | ||||
-rw-r--r-- | README.rst | 2 | ||||
-rw-r--r-- | docs/development/getting-started.rst | 3 | ||||
-rw-r--r-- | docs/installation.rst | 8 | ||||
-rw-r--r-- | setup.py | 4 | ||||
-rw-r--r-- | src/cryptography/__init__.py | 11 | ||||
-rw-r--r-- | src/cryptography/utils.py | 8 | ||||
-rw-r--r-- | tests/hypothesis/__init__.py | 4 | ||||
-rw-r--r-- | tox.ini | 2 |
12 files changed, 15 insertions, 45 deletions
diff --git a/.jenkins/Jenkinsfile-cryptography-wheel-builder b/.jenkins/Jenkinsfile-cryptography-wheel-builder index ae749cc6..a8f0980e 100644 --- a/.jenkins/Jenkinsfile-cryptography-wheel-builder +++ b/.jenkins/Jenkinsfile-cryptography-wheel-builder @@ -22,18 +22,16 @@ def configs = [ 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 a2cafef2..46797537 100644 --- a/.travis.yml +++ b/.travis.yml @@ -19,8 +19,6 @@ branches: 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 a8a48a6e..b4ca5acd 100644 --- a/CHANGELOG.rst +++ b/CHANGELOG.rst @@ -8,6 +8,7 @@ Changelog .. 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 bac0067a..0e4c60ce 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -5,11 +5,11 @@ if (env.BRANCH_NAME == "master") { 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 @@ def build(toxenv, label, imageName, artifacts, artifactExcludes) { 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", @@ -18,7 +18,7 @@ pyca/cryptography ``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 0d7c91ea..55dfd6cb 100644 --- a/docs/development/getting-started.rst +++ b/docs/development/getting-started.rst @@ -75,10 +75,9 @@ each supported Python version and run the tests. For example: $ 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 70668656..35bfbbaf 100644 --- a/docs/installation.rst +++ b/docs/installation.rst @@ -10,7 +10,7 @@ You can install ``cryptography`` with ``pip``: 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 @@ PyPy 5.3+ on these operating systems. * 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 @@ just run 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: @@ -49,9 +49,8 @@ test_requirements = [ "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 @@ setup( "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 e5c34a27..6da0b383 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 @@ __all__ = [ "__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 986b504f..02eec209 100644 --- a/src/cryptography/utils.py +++ b/src/cryptography/utils.py @@ -100,12 +100,8 @@ def verify_interface(iface, klass): ) -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 0b344066..4b540884 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") @@ -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 = |