From 2579651f5773faee42fd6340f60c31b08e7a401e Mon Sep 17 00:00:00 2001 From: Paul Ganssle Date: Thu, 8 Nov 2018 09:28:35 -0500 Subject: [PATCH 1/2] Remove "built with" comment in setup.py upload platform.dist() is deprecated and slated for removal in Python 3.8. The upload command itself should also not be used to upload to PyPI, but while it continues to exist it should not use deprecated functions. Fixes bpo-35186 --- Lib/distutils/command/upload.py | 10 ++-------- 1 file changed, 2 insertions(+), 8 deletions(-) diff --git a/Lib/distutils/command/upload.py b/Lib/distutils/command/upload.py index 32dda359badb32..613ea711296cb2 100644 --- a/Lib/distutils/command/upload.py +++ b/Lib/distutils/command/upload.py @@ -121,14 +121,8 @@ def upload_file(self, command, pyversion, filename): 'requires': meta.get_requires(), 'obsoletes': meta.get_obsoletes(), } - comment = '' - if command == 'bdist_rpm': - dist, version, id = platform.dist() - if dist: - comment = 'built for %s %s' % (dist, version) - elif command == 'bdist_dumb': - comment = 'built for %s' % platform.platform(terse=1) - data['comment'] = comment + + data['comment'] = '' if self.sign: data['gpg_signature'] = (os.path.basename(filename) + ".asc", From 27153b8cf8cdd3bcffc14602c631e43b10957a45 Mon Sep 17 00:00:00 2001 From: Paul Ganssle Date: Thu, 8 Nov 2018 14:22:46 -0500 Subject: [PATCH 2/2] Add news entry --- .../next/Library/2018-11-08-14-22-29.bpo-35186.5m22Mj.rst | 2 ++ 1 file changed, 2 insertions(+) create mode 100644 Misc/NEWS.d/next/Library/2018-11-08-14-22-29.bpo-35186.5m22Mj.rst diff --git a/Misc/NEWS.d/next/Library/2018-11-08-14-22-29.bpo-35186.5m22Mj.rst b/Misc/NEWS.d/next/Library/2018-11-08-14-22-29.bpo-35186.5m22Mj.rst new file mode 100644 index 00000000000000..2e8cff9829071f --- /dev/null +++ b/Misc/NEWS.d/next/Library/2018-11-08-14-22-29.bpo-35186.5m22Mj.rst @@ -0,0 +1,2 @@ +Removed the "built with" comment added when ``setup.py upload`` is used with +either ``bdist_rpm`` or ``bdist_dumb``.