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 /src | |
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
Diffstat (limited to 'src')
-rw-r--r-- | src/cryptography/__init__.py | 11 | ||||
-rw-r--r-- | src/cryptography/utils.py | 8 |
2 files changed, 2 insertions, 17 deletions
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): |