From 4cf6e785ca5608cffd8d92ad1e1a5073108a2a20 Mon Sep 17 00:00:00 2001 From: Paul Kehrer Date: Thu, 12 Oct 2017 06:06:01 +0800 Subject: 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 --- src/cryptography/__init__.py | 11 ----------- src/cryptography/utils.py | 8 ++------ 2 files changed, 2 insertions(+), 17 deletions(-) (limited to 'src') 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): -- cgit v1.2.3