diff --git a/changelog.d/1017.deprecation.rst b/changelog.d/1017.deprecation.rst new file mode 100644 index 000000000..3cef161c7 --- /dev/null +++ b/changelog.d/1017.deprecation.rst @@ -0,0 +1,2 @@ +Python 3.6 is now deprecated and is slated for removal in the next release. +If that would affect you, please `let us know `_. diff --git a/changelog.d/988.breaking.rst b/changelog.d/988.breaking.rst index b804658f6..58c1dbde3 100644 --- a/changelog.d/988.breaking.rst +++ b/changelog.d/988.breaking.rst @@ -1,4 +1 @@ Python 3.5 is not supported anymore. - -We're considering to drop 3.6 soon too. -If that would affect you, please `let us know `_. diff --git a/src/attr/__init__.py b/src/attr/__init__.py index 92e8920b5..c3f0937e7 100644 --- a/src/attr/__init__.py +++ b/src/attr/__init__.py @@ -1,5 +1,8 @@ # SPDX-License-Identifier: MIT +import sys +import warnings + from functools import partial from . import converters, exceptions, filters, setters, validators @@ -21,6 +24,14 @@ from ._version_info import VersionInfo +if sys.version_info < (3, 7): # pragma: no cover + warnings.warn( + "Running attrs on Python 3.6 is deprecated & we intend to drop " + "support soon. If that's a problem for you, please let us know why & " + "we MAY re-evaluate: ", + DeprecationWarning, + ) + __version__ = "22.2.0.dev0" __version_info__ = VersionInfo._from_version_string(__version__)