Skip to content

[Docs] remove distutils legacy ref when setuptools docs are complete #94249

Description

@jacalata

Documentation

https://docs.python.org/3.11/distutils/index.html has this disclaimer

This document is being retained solely until the setuptools documentation at https://setuptools.readthedocs.io/en/latest/setuptools.html independently covers all of the relevant information currently included here.

I couldn't find anywhere tracking progress towards having that coverage in setuptools docs, so that's the purpose of this issue. I'm not sure whether there needs to be a consensus, or how to make the decision to check off a chapter as fully replaced.

This issue can track work being done in the setuptools docs: pypa/setuptools#3401

Activity

  1. merwok commented on Jul 23, 2022

    @merwok
    Member

    Rather than pure deletion, I think the docs could be retained to avoid breaking all the external links, with a small explanation for the removal of the package and links to equivalent setutpools docs.

    I think there are existing tickets about removing distutils, could you search for them and add links between this ticket and those ones?

  2. CAM-Gerlach commented on Nov 3, 2022

    @CAM-Gerlach
    Member

    Rather than pure deletion, I think the docs could be retained to avoid breaking all the external links, with a small explanation for the removal of the package and links to equivalent setutpools docs.

    That's a good idea. distutils is removed completely from the stdlib in 3.12, what I will propose in a PR for 3.12 following your recommendations, is retaining the document and top-level sections headers to not break any links, add an admonition up top and messages to each section explaining distutils has been removed and linking to the up to date setuptools equivalents, but remove all the obsolete content, as it doesn't really belong here anymore and makes it much easier for users to miss or ignore the message (especially if deeplinked). And of course, users can always switch to an older Python version that includes distutils if they still actually need these docs (just like with any other removed module).

    For previous maintained versions (3.11 and 3.10), the content can be retained as-is, but the messages redirecting users could be added, to help direct users to the Setuptools equivalents now rather than only when Python 3.12 is released and it is fully removed. To make merging straightforward (and also not block it on a final decision), I can drop a PR with this first (as well as one with the other docs changes for distutils removal), which can be backported, and then a followup PR only for 3.12 to remove all the obsolete section content.

    A few sections don't have direct Setuptools equivalents, but this would give Setuptools a full year to decide whether they want to add the relevant section and link it here, move the existing section over to their docs and maintain it themselves, or leave it deliberately undocumented as internal implementation details. And of course, users could still switch to an older version to see them.

    I think there are existing tickets about removing distutils, could you search for them and add links between this ticket and those ones?

    #92584 (issue) and #99061 (PR)

  3. StanFromIreland commented on Aug 17, 2025

    @StanFromIreland
    Member

    These have been removed in all bugfix versions, is there anything left to do here?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    3.12only security fixesdocsDocumentation in the Doc dirpendingThe issue will be closed if no feedback is provided

    Projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions