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

Deprecate bdist_wininst: use bdist_wheel instead #81662

Closed
vstinner opened this issue Jul 2, 2019 · 6 comments
Closed

Deprecate bdist_wininst: use bdist_wheel instead #81662

vstinner opened this issue Jul 2, 2019 · 6 comments
Labels
3.8 only security fixes 3.9 only security fixes OS-windows stdlib Python modules in the Lib dir

Comments

@vstinner
Copy link
Member

vstinner commented Jul 2, 2019

BPO 37481
Nosy @pfmoore, @vstinner, @tjguk, @merwok, @zware, @zooba, @dstufft, @pganssle, @miss-islington
PRs
  • bpo-37481: Deprecate distutils bdist_wininst command #14553
  • [3.8] bpo-37481: Deprecate distutils bdist_wininst command (GH-14553) #14598
  • 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-07-05.10:26:46.331>
    created_at = <Date 2019-07-02.11:05:55.069>
    labels = ['3.8', 'library', '3.9', 'OS-windows']
    title = 'Deprecate bdist_wininst: use bdist_wheel instead'
    updated_at = <Date 2019-07-05.10:26:46.324>
    user = 'https://github.com/vstinner'

    bugs.python.org fields:

    activity = <Date 2019-07-05.10:26:46.324>
    actor = 'vstinner'
    assignee = 'none'
    closed = True
    closed_date = <Date 2019-07-05.10:26:46.331>
    closer = 'vstinner'
    components = ['Distutils', 'Windows']
    creation = <Date 2019-07-02.11:05:55.069>
    creator = 'vstinner'
    dependencies = []
    files = []
    hgrepos = []
    issue_num = 37481
    keywords = ['patch']
    message_count = 6.0
    messages = ['347131', '347153', '347288', '347312', '347317', '347331']
    nosy_count = 9.0
    nosy_names = ['paul.moore', 'vstinner', 'tim.golden', 'eric.araujo', 'zach.ware', 'steve.dower', 'dstufft', 'p-ganssle', 'miss-islington']
    pr_nums = ['14553', '14598']
    priority = 'normal'
    resolution = 'fixed'
    stage = 'resolved'
    status = 'closed'
    superseder = None
    type = None
    url = 'https://bugs.python.org/issue37481'
    versions = ['Python 3.8', 'Python 3.9']

    @vstinner
    Copy link
    Member Author

    vstinner commented Jul 2, 2019

    According to the following "Deprecate bdist_wininst" discussion, bdist_wininst can be deprecated:
    https://discuss.python.org/t/deprecate-bdist-wininst/1929

    bdist_wininst uses the mbcs encoding which is only available on Windows. There is bpo-10945 open for 8 years to suggest to use UTF-8 or use the Unicode (wide character) flavor of the Windows API to support running bdist_wininst on non-Windows platforms and to be able to distribute binaries which don’t depend on the ANSI code page.

    I propose to deprecate it in Python 3.9, because of bpo-10945 issue. I don't propose to plan bdist_wininst removal yet.

    As an user, it’s annoying to have to run a GUI to install something, whereas pip can install dependencies using wheel packages in a command line interface, transparently, without bugging the user with dialog boxes.

    When I look at numpy or Cython: they don’t distribute .exe installers, but binary wheel packages for Windows. I understood the wheel packages is the recommended way to distribute binaries on Windows, and so that bdist_wininst is kind of deprecated.

    Donald Stufft wrote:

    "For what it’s worth, PyPI doesn’t even allow you to upload bdist_wininst (See PEP-527 2) anymore, so if you’re looking at PyPI to determine usage, you’re going to get no usage whatsoever for anything recent.

    I don’t have any idea if other people are still using bdist_wininst and distributing them through some other mechanism."

    Paul Ganssle wrote:

    "From my perspective, nearly all direct invocations of setup.py are currently or are eventually heading for deprecation. PEP-517 doesn’t provide hooks to generate anything other than sdist or wheel, so basically all commands not actually triggered (directly or indirectly) by calling a PEP-517 front-end are suspect."

    Attached PR deprecates bdist_wininst.

    See also the related issue bpo-37468 "Don't install wininst*.exe on non-Windows platforms". bdist_wininst only works on Windows: see bpo-10945 and commit 72cd653.

    @vstinner vstinner added stdlib Python modules in the Lib dir 3.9 only security fixes labels Jul 2, 2019
    @vstinner vstinner changed the title Deprecate bdist_wininstr: use bdist_wheel instead Deprecate bdist_wininst: use bdist_wheel instead Jul 2, 2019
    @zooba
    Copy link
    Member

    zooba commented Jul 2, 2019

    For the record, I am 100% in favor of deprecating and removing bdist_wininst and bdist_msi from distutils as soon as possible, as they are maintenance burdens and bdist_wininst in particular often attracts AV false positives.

    setuptools is welcome to either do the same or restore the functionality, I don't have any preference if someone else is maintaining it (but I'd suggest removal there too until someone wants to maintain it).

    Some of our distributions of Python already exclude bdist_wininst, so it can't be blindly relied on. And I don't know that it was ever upgraded for PEP-514. So far I have heard zero complaints about this, though as Paul Ganssle pointed out on the PR they're not likely to be using the "newer" packages.

    So consider me +1 for deprecate in 3.8 (we can still do that, right? it's just docs and a warning on use) and remove in 3.9 or 3.10 as appropriate.

    @zooba zooba added stdlib Python modules in the Lib dir OS-windows and removed stdlib Python modules in the Lib dir labels Jul 2, 2019
    @vstinner
    Copy link
    Member Author

    vstinner commented Jul 4, 2019

    So consider me +1 for deprecate in 3.8 (we can still do that, right? it's just docs and a warning on use) and remove in 3.9 or 3.10 as appropriate.

    I modified my PR to deprecate the feature in Python 3.8. I'm not sure about scheduling the removal yet, since the Python 3.9 release schedule is under discussion:
    https://discuss.python.org/t/pep-596-python-3-9-release-schedule-doubling-the-release-cadence/1828

    I would prefer to give at least 2 years to projects to update their setup.py (how they are distributed). Even if bdist_wininst has issues, it's not too painful to maintain a few more years. The removal can be decided later.

    @vstinner
    Copy link
    Member Author

    vstinner commented Jul 5, 2019

    New changeset 1da4462 by Victor Stinner in branch 'master':
    bpo-37481: Deprecate distutils bdist_wininst command (GH-14553)
    1da4462

    @miss-islington
    Copy link
    Contributor

    New changeset b4cd6ba by Miss Islington (bot) in branch '3.8':
    bpo-37481: Deprecate distutils bdist_wininst command (GH-14553)
    b4cd6ba

    @vstinner
    Copy link
    Member Author

    vstinner commented Jul 5, 2019

    The initial issue has been fixed. Let's continue the discussion in the Packaging forum:
    https://discuss.python.org/t/deprecate-bdist-wininst/1929

    @vstinner vstinner added the 3.8 only security fixes label Jul 5, 2019
    @vstinner vstinner closed this as completed Jul 5, 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 only security fixes 3.9 only security fixes OS-windows stdlib Python modules in the Lib dir
    Projects
    None yet
    Development

    No branches or pull requests

    3 participants