This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Title: distutils.command.upload uses deprecated platform.dist with bdist_rpm
Type: Stage: resolved
Components: Distutils Versions: Python 3.8
Status: closed Resolution: fixed
Dependencies: Superseder:
Assigned To: Nosy List: dstufft, eric.araujo, p-ganssle, petr.viktorin
Priority: normal Keywords: patch

Created on 2018-11-08 01:56 by p-ganssle, last changed 2022-04-11 14:59 by admin. This issue is now closed.

Pull Requests
URL Status Linked Edit
PR 10414 merged p-ganssle, 2018-11-08 14:43
Messages (2)
msg329453 - (view) Author: Paul Ganssle (p-ganssle) * (Python committer) Date: 2018-11-08 01:56
It seems that in issue #1322, `platform.dist` was deprecated, and is slated for removal in Python 3.8, but it is currently used in distutils.command.upload.upload_file:

As far as I can tell, this line is hit only when you run `python bdist_rpm upload`, as far as I can tell.

Using the `upload` command is *itself* very deprecated, and is dangerously broken in many ways. See, for example, this setuptools issue:

So I see three possible options (two realistic):

1. Remove the whole "comment" field from the upload, both for bdist_rpm and bdist_dumb. I'm not sure if PyPI uses this for anything, but I highly doubt it.

2. Have both bdist_rpm and bdist_dumb send a comment based on `platform.platform(terse=1)`

3. Remove the upload command functionality entirely for Python 3.8 with no deprecation warning.

Obviously #3 is the unrealistic one, but it's very tempting. That said, I think we should go with #1 and maybe open a separate issue to actually deprecate the `upload` command in distutils (though to be honest we'll probably monkey-patch it out of existence in setuptools within a year and everyone uses `setuptools` anyway, so maybe #3 is less unrealistic than it seems).
msg331949 - (view) Author: Petr Viktorin (petr.viktorin) * (Python committer) Date: 2018-12-17 07:59
New changeset 4e80f5cbeaee87a26e49bc9623c92a10e28dbbd9 by Petr Viktorin (Paul Ganssle) in branch 'master':
bpo-35186: Remove "built with" comment in upload (GH-10414)
Date User Action Args
2022-04-11 14:59:07adminsetgithub: 79367
2019-02-18 18:19:14p-gansslesetstatus: open -> closed
stage: patch review -> resolved
2019-02-18 18:18:18p-gansslesetversions: - Python 3.6, Python 3.7
2019-02-18 18:17:50p-gansslesetresolution: fixed
2018-12-17 07:59:12petr.viktorinsetnosy: + petr.viktorin
messages: + msg331949
2018-11-08 14:43:00p-gansslesetkeywords: + patch
stage: patch review
pull_requests: + pull_request9694
2018-11-08 01:56:11p-gansslecreate