Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

distutils.command.upload uses deprecated platform.dist with bdist_rpm #79367

Closed
pganssle opened this issue Nov 8, 2018 · 2 comments
Closed
Labels
3.8 (EOL) end of life stdlib Python modules in the Lib dir

Comments

@pganssle
Copy link
Member

pganssle commented Nov 8, 2018

BPO 35186
Nosy @merwok, @encukou, @dstufft, @pganssle
PRs
  • bpo-35186: Remove "built with" comment in setup.py upload #10414
  • Note: these values reflect the state of the issue at the time it was migrated and might not reflect the current state.

    Show more details

    GitHub fields:

    assignee = None
    closed_at = <Date 2019-02-18.18:19:14.357>
    created_at = <Date 2018-11-08.01:56:11.613>
    labels = ['3.8', 'library']
    title = 'distutils.command.upload uses deprecated platform.dist with bdist_rpm'
    updated_at = <Date 2019-02-18.18:19:14.357>
    user = 'https://github.com/pganssle'

    bugs.python.org fields:

    activity = <Date 2019-02-18.18:19:14.357>
    actor = 'p-ganssle'
    assignee = 'none'
    closed = True
    closed_date = <Date 2019-02-18.18:19:14.357>
    closer = 'p-ganssle'
    components = ['Distutils']
    creation = <Date 2018-11-08.01:56:11.613>
    creator = 'p-ganssle'
    dependencies = []
    files = []
    hgrepos = []
    issue_num = 35186
    keywords = ['patch']
    message_count = 2.0
    messages = ['329453', '331949']
    nosy_count = 4.0
    nosy_names = ['eric.araujo', 'petr.viktorin', 'dstufft', 'p-ganssle']
    pr_nums = ['10414']
    priority = 'normal'
    resolution = 'fixed'
    stage = 'resolved'
    status = 'closed'
    superseder = None
    type = None
    url = 'https://bugs.python.org/issue35186'
    versions = ['Python 3.8']

    @pganssle
    Copy link
    Member Author

    pganssle commented Nov 8, 2018

    It seems that in issue bpo-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:

    dist, version, id = platform.dist()

    As far as I can tell, this line is hit only when you run python setup.py 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: pypa/setuptools#1381

    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).

    @pganssle pganssle added 3.7 (EOL) end of life 3.8 (EOL) end of life stdlib Python modules in the Lib dir labels Nov 8, 2018
    @encukou
    Copy link
    Member

    encukou commented Dec 17, 2018

    New changeset 4e80f5c by Petr Viktorin (Paul Ganssle) in branch 'master':
    bpo-35186: Remove "built with" comment in setup.py upload (GH-10414)
    4e80f5c

    @pganssle pganssle removed the 3.7 (EOL) end of life label Feb 18, 2019
    @ezio-melotti ezio-melotti transferred this issue from another repository Apr 10, 2022
    Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
    Labels
    3.8 (EOL) end of life stdlib Python modules in the Lib dir
    Projects
    None yet
    Development

    No branches or pull requests

    2 participants