Skip to content

Commit

Permalink
deprecate python 2.7 (#616)
Browse files Browse the repository at this point in the history
  • Loading branch information
reaperhulk committed Aug 14, 2020
1 parent fa6d813 commit 0e9a6c2
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 0 deletions.
3 changes: 3 additions & 0 deletions CHANGELOG.rst
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,9 @@ Changelog
1.5.0 (UNRELEASED)
------------------

* Deprecated support for Python 2.7. Support for this version will be removed
in the next release.

1.4.0 (2020-05-25)
------------------

Expand Down
13 changes: 13 additions & 0 deletions src/nacl/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,9 @@

from __future__ import absolute_import, division, print_function

import sys
import warnings

__all__ = [
"__title__",
"__summary__",
Expand All @@ -38,3 +41,13 @@

__license__ = "Apache License 2.0"
__copyright__ = "Copyright 2013-2018 {0}".format(__author__)


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 PyNaCl, and will be removed in the "
"next release.",
UserWarning,
stacklevel=2,
)

0 comments on commit 0e9a6c2

Please sign in to comment.