Skip to content

Conversation

AlexWaygood
Copy link
Member

@AlexWaygood AlexWaygood commented Jul 5, 2023

The API entry for Callable currently contains a lot of general information on annotating callables that also applies to collections.abc.Callable. But we also have a separate section at the top of the page specifically for that information.

  • Take the general information out of the API entry and merge it into the section at the top
  • Add some information on callback protocols into the section at the top (lifting some code examples from the mypy docs)
  • Move the shortened API entry to the "deprecated aliases" section, instead of the "special forms" section

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

@bedevere-bot bedevere-bot added awaiting core review docs Documentation in the Doc dir skip news labels Jul 5, 2023
@AlexWaygood AlexWaygood changed the title gh-106461: Consolidate docs on Callable gh-106461: typing: Consolidate docs on Callable Jul 5, 2023
@AlexWaygood AlexWaygood requested a review from hauntsaninja July 9, 2023 12:58
@AlexWaygood AlexWaygood merged commit ca8b55c into python:main Jul 9, 2023
@miss-islington
Copy link
Contributor

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

@AlexWaygood AlexWaygood deleted the callable-docs branch July 9, 2023 20:46
miss-islington pushed a commit to miss-islington/cpython that referenced this pull request Jul 9, 2023
)

(cherry picked from commit ca8b55c)

Co-authored-by: Alex Waygood <[email protected]>
@bedevere-bot
Copy link

GH-106574 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 Jul 9, 2023
@bedevere-bot
Copy link

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

@bedevere-bot bedevere-bot removed the needs backport to 3.11 only security fixes label Jul 9, 2023
miss-islington pushed a commit to miss-islington/cpython that referenced this pull request Jul 9, 2023
)

(cherry picked from commit ca8b55c)

Co-authored-by: Alex Waygood <[email protected]>
AlexWaygood added a commit that referenced this pull request Jul 9, 2023
…106574)

gh-106461: typing: Consolidate docs on `Callable` (GH-106462)
(cherry picked from commit ca8b55c)

Co-authored-by: Alex Waygood <[email protected]>
AlexWaygood added a commit that referenced this pull request Jul 9, 2023
…106575)

gh-106461: typing: Consolidate docs on `Callable` (GH-106462)
(cherry picked from commit ca8b55c)

Co-authored-by: Alex Waygood <[email protected]>
1proprogrammerchant added a commit to 1proprogrammerchant/cpython that referenced this pull request Jul 9, 2023
pythongh-106461: typing: Consolidate docs on `Callable` (python#106462)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
docs Documentation in the Doc dir skip news topic-typing
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants