[Python-checkins] bpo-35186: Remove "built with" comment in setup.py upload (GH-10414)

Petr Viktorin webhook-mailer at python.org
Mon Dec 17 02:59:13 EST 2018


https://github.com/python/cpython/commit/4e80f5cbeaee87a26e49bc9623c92a10e28dbbd9
commit: 4e80f5cbeaee87a26e49bc9623c92a10e28dbbd9
branch: master
author: Paul Ganssle <pganssle at users.noreply.github.com>
committer: Petr Viktorin <encukou at gmail.com>
date: 2018年12月17日T08:59:02+01:00
summary:
bpo-35186: Remove "built with" comment in setup.py upload (GH-10414)
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.
files:
A Misc/NEWS.d/next/Library/2018-11-08-14-22-29.bpo-35186.5m22Mj.rst
M Lib/distutils/command/upload.py
diff --git a/Lib/distutils/command/upload.py b/Lib/distutils/command/upload.py
index 32dda359badb..613ea711296c 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",
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 000000000000..2e8cff982907
--- /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``.


More information about the Python-checkins mailing list

AltStyle によって変換されたページ (->オリジナル) /