aboutsummaryrefslogtreecommitdiffstats
path: root/setuptools/lib2to3_ex.py
diff options
context:
space:
mode:
authorJason R. Coombs <jaraco@jaraco.com>2020-05-10 13:19:52 -0400
committerJason R. Coombs <jaraco@jaraco.com>2020-05-10 13:19:52 -0400
commit2d607a9e59aa854b387f22d79301acb8739b133a (patch)
tree21d3ef4c3c933ddf280d5df4ca4f6d6f1a9f5754 /setuptools/lib2to3_ex.py
parent40f81af021b899b76b96eef52bf020c2348e1aea (diff)
downloadexternal_python_setuptools-2d607a9e59aa854b387f22d79301acb8739b133a.tar.gz
external_python_setuptools-2d607a9e59aa854b387f22d79301acb8739b133a.tar.bz2
external_python_setuptools-2d607a9e59aa854b387f22d79301acb8739b133a.zip
Emit deprecation warning when 2to3 is used. Ref #2086.
Diffstat (limited to 'setuptools/lib2to3_ex.py')
-rw-r--r--setuptools/lib2to3_ex.py7
1 files changed, 7 insertions, 0 deletions
diff --git a/setuptools/lib2to3_ex.py b/setuptools/lib2to3_ex.py
index 4b1a73fe..817dce40 100644
--- a/setuptools/lib2to3_ex.py
+++ b/setuptools/lib2to3_ex.py
@@ -7,6 +7,7 @@ Customized Mixin2to3 support:
This module raises an ImportError on Python 2.
"""
+import warnings
from distutils.util import Mixin2to3 as _Mixin2to3
from distutils import log
from lib2to3.refactor import RefactoringTool, get_fixers_from_package
@@ -33,6 +34,12 @@ class Mixin2to3(_Mixin2to3):
return
if not files:
return
+
+ warnings.warn(
+ "2to3 support is deprecated. Please migrate to "
+ "a single-codebase solution or roll your own "
+ "conversion process.",
+ DeprecationWarning)
log.info("Fixing " + " ".join(files))
self.__build_fixer_names()
self.__exclude_fixers()