From 242f7bd1b68428fc20a9d7f219f70a21372dd5c9 Mon Sep 17 00:00:00 2001 From: Jeremy Stanley Date: Sat, 19 Sep 2020 14:04:54 +0000 Subject: [PATCH] Remove use_2to3 backward compat for Setuptools Odds are this was never used by any PBR-based projects, but was included from the beginning to support a feature of Setuptools for a utility which has been long since discouraged. As of Setuptools 46.2.0 and Python 3.9 it's generating deprecation warnings, and is slated for removal from the Python 3.10 standard library. https://bugs.python.org/issue40360 https://github.com/pypa/setuptools/issues/2086 Change-Id: I6972984f29413d2534d802b142fa9323a7e4a4a3 --- pbr/util.py | 3 +-- .../notes/use_2to3-removal-ac48bf9fbfa049b1.yaml | 9 +++++++++ 2 files changed, 10 insertions(+), 2 deletions(-) create mode 100644 releasenotes/notes/use_2to3-removal-ac48bf9fbfa049b1.yaml diff --git a/pbr/util.py b/pbr/util.py index 89f5088b..6e8d2314 100644 --- a/pbr/util.py +++ b/pbr/util.py @@ -128,7 +128,6 @@ D1_D2_SETUP_ARGS = { "cmdclass": ("global", "commands"), # Not supported in distutils2, but provided for # backwards compatibility with setuptools - "use_2to3": ("backwards_compat", "use_2to3"), "zip_safe": ("backwards_compat", "zip_safe"), "tests_require": ("backwards_compat", "tests_require"), "dependency_links": ("backwards_compat",), @@ -158,7 +157,7 @@ MULTI_FIELDS = ("classifiers", MAP_FIELDS = ("project_urls",) # setup() arguments that contain boolean values -BOOL_FIELDS = ("use_2to3", "zip_safe", "include_package_data") +BOOL_FIELDS = ("zip_safe", "include_package_data") CSV_FIELDS = () diff --git a/releasenotes/notes/use_2to3-removal-ac48bf9fbfa049b1.yaml b/releasenotes/notes/use_2to3-removal-ac48bf9fbfa049b1.yaml new file mode 100644 index 00000000..e0e34ca4 --- /dev/null +++ b/releasenotes/notes/use_2to3-removal-ac48bf9fbfa049b1.yaml @@ -0,0 +1,9 @@ +--- +other: + - | + The 2to3 conversion utility has been long discouraged in favor of writing + multi-version-capable scripts. As of Setuptools 46.2.0 it's deprecated and + slated for removal from the Python 3.10 standard library. Projects which + still need it are encouraged to perform conversion prior to packaging. See + https://bugs.python.org/issue40360 and + https://github.com/pypa/setuptools/issues/2086 for more details.