Skip to content

Typing docs: move the deprecated stuff below the non-deprecated stuff #105781

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

Merged
merged 1 commit into from
Jun 14, 2023

Conversation

AlexWaygood
Copy link
Member

@AlexWaygood AlexWaygood commented Jun 14, 2023

Nearly all of the items in the sections "Generic Concrete Collections" and "Abstract Base Classes" are deprecated. Let's move these very large sections further down the page, so that they come below sections that mostly contain stuff that isn't deprecated ("Protocols"; "Functions and decorators"; "introspection helpers", etc.).

To keep this easy to review, I have solely cut and pasted the deprecated sections from one place in the document to another place. There are other changes that I would like to make in followup PRs:

  • Move typing.IO, typing.TextIO and typing.BytesIO to their own section. They are (I think) the only items in the "Generic Concrete Collections" section that are not deprecated.
  • (Possibly, if we can do this without breaking links to the sections) change the titles of some of these sections.

📚 Documentation preview 📚: https://cpython-previews--105781.org.readthedocs.build/

@AlexWaygood
Copy link
Member Author

Copy link
Member

@JelleZijlstra JelleZijlstra left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The diff is impossible to read but I trust that you're just moving things around.

Somewhat relatedly, maybe we should move get_overloads and clear_overloads to the "Introspection helpers" section.

@AlexWaygood
Copy link
Member Author

Somewhat relatedly, maybe we should move get_overloads and clear_overloads to the "Introspection helpers" section.

Possibly, yeah. Also, the docs for clear_overloads currently talk about clearing "the internal registry" without ever explaining what the internal registry is :)

@AlexWaygood AlexWaygood merged commit 4a113e2 into python:main Jun 14, 2023
@AlexWaygood AlexWaygood deleted the typing-docs-restructure branch June 14, 2023 14:19
@miss-islington
Copy link
Contributor

Thanks @AlexWaygood for the PR 🌮🎉.. I'm working now to backport this PR to: 3.11, 3.12.
🐍🍒⛏🤖

@miss-islington
Copy link
Contributor

Sorry @AlexWaygood, I had trouble checking out the 3.12 backport branch.
Please retry by removing and re-adding the "needs backport to 3.12" label.
Alternatively, you can backport using cherry_picker on the command line.
cherry_picker 4a113e24a38e2537570e4d694f8e0c01354904c4 3.12

@miss-islington
Copy link
Contributor

Sorry, @AlexWaygood, I could not cleanly backport this to 3.11 due to a conflict.
Please backport using cherry_picker on command line.
cherry_picker 4a113e24a38e2537570e4d694f8e0c01354904c4 3.11

AlexWaygood added a commit to AlexWaygood/cpython that referenced this pull request Jun 14, 2023
@bedevere-bot
Copy link

GH-105783 is a backport of this pull request to the 3.12 branch.

@bedevere-bot bedevere-bot removed the needs backport to 3.12 only security fixes label Jun 14, 2023
AlexWaygood added a commit to AlexWaygood/cpython that referenced this pull request Jun 14, 2023
@bedevere-bot
Copy link

GH-105785 is a backport of this pull request to the 3.11 branch.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants