Skip to content

Commit

Permalink
Remove use_2to3 backward compat for Setuptools
Browse files Browse the repository at this point in the history
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
pypa/setuptools#2086

Change-Id: I6972984f29413d2534d802b142fa9323a7e4a4a3
  • Loading branch information
fungi committed Sep 19, 2020
1 parent 16f1960 commit 242f7bd
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 2 deletions.
3 changes: 1 addition & 2 deletions pbr/util.py
Original file line number Diff line number Diff line change
Expand Up @@ -128,7 +128,6 @@
"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",),
Expand Down Expand Up @@ -158,7 +157,7 @@
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 = ()

Expand Down
9 changes: 9 additions & 0 deletions releasenotes/notes/use_2to3-removal-ac48bf9fbfa049b1.yaml
Original file line number Diff line number Diff line change
@@ -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.

0 comments on commit 242f7bd

Please sign in to comment.