aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPaul Kehrer <paul.l.kehrer@gmail.com>2015-03-30 00:00:51 -0500
committerPaul Kehrer <paul.l.kehrer@gmail.com>2015-03-30 00:00:51 -0500
commitdc257deba145ed0a1f109730e989113cc4ad6d65 (patch)
tree4ea0c8b8a5001b18d63d8d29405d38b69243bc2e
parentd0f74e1aabdbabd7a31cc2b11a7496d0f501fc4c (diff)
parent6e7f622d781c57486f3e44d043df7f845ea75513 (diff)
downloadcryptography-dc257deba145ed0a1f109730e989113cc4ad6d65.tar.gz
cryptography-dc257deba145ed0a1f109730e989113cc4ad6d65.tar.bz2
cryptography-dc257deba145ed0a1f109730e989113cc4ad6d65.zip
Merge pull request #1798 from alex/py26-warn
Emit a warning on Python 2.6
-rw-r--r--CHANGELOG.rst4
-rw-r--r--src/cryptography/__init__.py10
2 files changed, 14 insertions, 0 deletions
diff --git a/CHANGELOG.rst b/CHANGELOG.rst
index 6f02f951..2d705b18 100644
--- a/CHANGELOG.rst
+++ b/CHANGELOG.rst
@@ -6,6 +6,10 @@ Changelog
.. note:: This version is not yet released and is under active development.
+* Deprecated support for Python 2.6. At the time there is no time table for
+ actually dropping support, however we strongly encourage all users to upgrade
+ their Python, as Python 2.6 no longer receives support from the Python core
+ team.
* Support :attr:`~cryptography.hazmat.primitives.serialization.Encoding.DER`
serialization of public keys using the ``public_bytes`` method of
:class:`~cryptography.hazmat.primitives.asymmetric.rsa.RSAPublicKeyWithSerialization`,
diff --git a/src/cryptography/__init__.py b/src/cryptography/__init__.py
index 6da0b383..985ebd6f 100644
--- a/src/cryptography/__init__.py
+++ b/src/cryptography/__init__.py
@@ -4,6 +4,9 @@
from __future__ import absolute_import, division, print_function
+import sys
+import warnings
+
from cryptography.__about__ import (
__author__, __copyright__, __email__, __license__, __summary__, __title__,
__uri__, __version__
@@ -14,3 +17,10 @@ __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.",
+ DeprecationWarning
+ )