Skip to content

Fix wrong typing.Callable import on docs#23694

Closed
drgarcia1986 wants to merge 1 commit intopython:masterfrom
drgarcia1986:patch-1
Closed

Fix wrong typing.Callable import on docs#23694
drgarcia1986 wants to merge 1 commit intopython:masterfrom
drgarcia1986:patch-1

Conversation

@drgarcia1986
Copy link
Copy Markdown

A simple wrong import on typing docs

@the-knights-who-say-ni
Copy link
Copy Markdown

Hello, and thanks for your contribution!

I'm a bot set up to make sure that the project can legally accept this contribution by verifying everyone involved has signed the PSF contributor agreement (CLA).

Recognized GitHub username

We couldn't find a bugs.python.org (b.p.o) account corresponding to the following GitHub usernames:

@drgarcia1986

This might be simply due to a missing "GitHub Name" entry in one's b.p.o account settings. This is necessary for legal reasons before we can look at this contribution. Please follow the steps outlined in the CPython devguide to rectify this issue.

You can check yourself to see if the CLA has been received.

Thanks again for the contribution, we look forward to reviewing it!

@bedevere-bot bedevere-bot added docs Documentation in the Doc dir awaiting review labels Dec 8, 2020
@Fidget-Spinner
Copy link
Copy Markdown
Member

Hi, thanks for this first PR! I'm not a core developer, so please take my 2 cents with some skepticism 😉

The change you suggested is correct for Python versions 3.8 and below, but has been deprecated in many of the typing types since Python 3.9. You can read more about the new type introduced in Python 3.9 here. The TLDR is that most container classes in the standard library can now be used for type annotations. As such, IMO collections.abc.Callable is correct. This was a deliberate change in commit d9ab95f.

If you want to read up the old docs, you can switch the Python version in the top left corner of the page: Python 3.8 imports Callable from typing , whilst Python 3.9 and onwards doesn't. There's a note about it in the 3.9 documentation here that it's deprecated.

Once again, thanks for taking the time to make this PR!

@drgarcia1986
Copy link
Copy Markdown
Author

Thanks a lot @Fidget-Spinner I didn't know

@drgarcia1986 drgarcia1986 deleted the patch-1 branch December 8, 2020 15:10
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

awaiting review docs Documentation in the Doc dir

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants