summaryrefslogtreecommitdiff
path: root/setuptools/lib2to3_ex.py
diff options
context:
space:
mode:
authorJason R. Coombs <jaraco@jaraco.com>2020-09-04 10:22:54 -0400
committerJason R. Coombs <jaraco@jaraco.com>2020-09-04 10:22:54 -0400
commitfc4d9828768ceebd2f9337481450c88376c013e9 (patch)
tree6dff622c50739ca19fdfbecf1008a42589d37b57 /setuptools/lib2to3_ex.py
parent7bb73a477de24069002516eb6eb1d755bed9d65b (diff)
parent03d36b9edb53e266a0b4b836e1e3178f989a0781 (diff)
downloadpython-setuptools-git-feature/implicit-bootstrap.tar.gz
Merge branch 'master' into feature/implicit-bootstrapfeature/implicit-bootstrap
Diffstat (limited to 'setuptools/lib2to3_ex.py')
-rw-r--r--setuptools/lib2to3_ex.py12
1 files changed, 9 insertions, 3 deletions
diff --git a/setuptools/lib2to3_ex.py b/setuptools/lib2to3_ex.py
index 4b1a73fe..c176abf6 100644
--- a/setuptools/lib2to3_ex.py
+++ b/setuptools/lib2to3_ex.py
@@ -2,16 +2,15 @@
Customized Mixin2to3 support:
- adds support for converting doctests
-
-
-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
import setuptools
+from ._deprecation_warning import SetuptoolsDeprecationWarning
class DistutilsRefactoringTool(RefactoringTool):
@@ -33,6 +32,13 @@ class Mixin2to3(_Mixin2to3):
return
if not files:
return
+
+ warnings.warn(
+ "2to3 support is deprecated. If the project still "
+ "requires Python 2 support, please migrate to "
+ "a single-codebase solution or employ an "
+ "independent conversion process.",
+ SetuptoolsDeprecationWarning)
log.info("Fixing " + " ".join(files))
self.__build_fixer_names()
self.__exclude_fixers()