__init__.py 1.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748
  1. # This file is dual licensed under the terms of the Apache License, Version
  2. # 2.0, and the BSD License. See the LICENSE file in the root of this repository
  3. # for complete details.
  4. from __future__ import absolute_import, division, print_function
  5. import sys
  6. import warnings
  7. from cryptography.__about__ import (
  8. __author__,
  9. __copyright__,
  10. __email__,
  11. __license__,
  12. __summary__,
  13. __title__,
  14. __uri__,
  15. __version__,
  16. )
  17. from cryptography.utils import CryptographyDeprecationWarning
  18. __all__ = [
  19. "__title__",
  20. "__summary__",
  21. "__uri__",
  22. "__version__",
  23. "__author__",
  24. "__email__",
  25. "__license__",
  26. "__copyright__",
  27. ]
  28. if sys.version_info[0] == 2:
  29. warnings.warn(
  30. "Python 2 is no longer supported by the Python core team. Support for "
  31. "it is now deprecated in cryptography, and will be removed in a "
  32. "future release.",
  33. CryptographyDeprecationWarning,
  34. stacklevel=2,
  35. )
  36. if sys.version_info[:2] == (3, 5):
  37. warnings.warn(
  38. "Python 3.5 support will be dropped in the next release of "
  39. "cryptography. Please upgrade your Python.",
  40. CryptographyDeprecationWarning,
  41. stacklevel=2,
  42. )