aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/cryptography/__init__.py11
-rw-r--r--src/cryptography/utils.py8
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):