Fix wrong typing.Callable import on docs#23694
Fix wrong typing.Callable import on docs#23694drgarcia1986 wants to merge 1 commit intopython:masterfrom
typing.Callable import on docs#23694Conversation
|
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 usernameWe couldn't find a bugs.python.org (b.p.o) account corresponding to the following GitHub usernames: 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! |
|
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 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! |
|
Thanks a lot @Fidget-Spinner I didn't know |
A simple wrong import on
typingdocs