diff options
author | Alex Gaynor <alex.gaynor@gmail.com> | 2020-05-16 22:58:30 -0400 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-05-16 21:58:30 -0500 |
commit | eceea9d912994dbd84bfc7b27031c1254e675e28 (patch) | |
tree | 656c12da3aa786eb0a449931d1eccc81d88921fb /src | |
parent | 1fcd120c32114aa96f89e307255c7c07a87419f8 (diff) | |
download | cryptography-eceea9d912994dbd84bfc7b27031c1254e675e28.tar.gz cryptography-eceea9d912994dbd84bfc7b27031c1254e675e28.tar.bz2 cryptography-eceea9d912994dbd84bfc7b27031c1254e675e28.zip |
Deprecate support for Python 2 (#5251)
Diffstat (limited to 'src')
-rw-r--r-- | src/cryptography/__init__.py | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/src/cryptography/__init__.py b/src/cryptography/__init__.py index 6da0b383..bd2a8102 100644 --- a/src/cryptography/__init__.py +++ b/src/cryptography/__init__.py @@ -4,13 +4,25 @@ from __future__ import absolute_import, division, print_function +import sys +import warnings + from cryptography.__about__ import ( __author__, __copyright__, __email__, __license__, __summary__, __title__, __uri__, __version__ ) +from cryptography.utils import CryptographyDeprecationWarning __all__ = [ "__title__", "__summary__", "__uri__", "__version__", "__author__", "__email__", "__license__", "__copyright__", ] + +if sys.version_info[0] == 2: + warnings.warn( + "Python 2 is no longer supported by the Python core team. Support for " + "it is now deprecated in cryptography, and will be removed in a " + "future release.", + CryptographyDeprecationWarning + ) |