Title: Move typing-related usage of PEP585 generics from `typing` docs to `collections.abc` · Issue #123523 · python/cpython · GitHub
Open Graph Title: Move typing-related usage of PEP585 generics from `typing` docs to `collections.abc` · Issue #123523 · python/cpython
X Title: Move typing-related usage of PEP585 generics from `typing` docs to `collections.abc` · Issue #123523 · python/cpython
Description: Documentation As pointed out in #123521, currently we have typing-related usage of PEP585 generics (Generator, Callable, Coroutine, etc.) explained on typing page. However, those aliases are deprecated, and there's no backlink from their...
Open Graph Description: Documentation As pointed out in #123521, currently we have typing-related usage of PEP585 generics (Generator, Callable, Coroutine, etc.) explained on typing page. However, those aliases are deprec...
X Description: Documentation As pointed out in #123521, currently we have typing-related usage of PEP585 generics (Generator, Callable, Coroutine, etc.) explained on typing page. However, those aliases are deprec...
Opengraph URL: https://github.com/python/cpython/issues/123523
X: @github
Domain: github.com
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"Move typing-related usage of PEP585 generics from `typing` docs to `collections.abc`","articleBody":"# Documentation\r\n\r\nAs pointed out in #123521, currently we have typing-related usage of PEP585 generics (`Generator`, `Callable`, `Coroutine`, etc.) explained on [`typing`](https://docs.python.org/3/library/typing.html#typing.Generator) page. However, those aliases are deprecated, and there's no backlink from their `collections.abc` [counterparts](https://docs.python.org/3/library/collections.abc.html#collections.abc.Generator).\r\n\r\nSo, currently all users of the recommended modern option (`collections.abc` generics) have no documentation regarding their use in typing context at hand. Worse, classes there don't even have their generic arguments listed - only the name:\r\n\r\n\u003e `class collections.abc.Generator`\r\n\r\nThis clearly should be fixed. At minimum the following needs to hold:\r\n\r\n* `collections.abc` aliases have their generic arguments listed in the docs\r\n* All typing-related info from corresponding `typing` docs entries should be reachable from `collections.abc` docs.\r\n\r\nUpon some thinking I agree with @ZeroIntensity that moving all information to `collections.abc` and only retaining deprecation warning with a link in `typing` docs could be the most ergonomic option.\r\n\n\n\u003c!-- gh-linked-prs --\u003e\n### Linked PRs\n* gh-123544\n* gh-123790\n* gh-123792\n\u003c!-- /gh-linked-prs --\u003e\n","author":{"url":"https://github.com/sterliakov","@type":"Person","name":"sterliakov"},"datePublished":"2024-08-31T00:11:22.000Z","interactionStatistic":{"@type":"InteractionCounter","interactionType":"https://schema.org/CommentAction","userInteractionCount":3},"url":"https://github.com/123523/cpython/issues/123523"}
| route-pattern | /_view_fragments/issues/show/:user_id/:repository/:id/issue_layout(.:format) |
| route-controller | voltron_issues_fragments |
| route-action | issue_layout |
| fetch-nonce | v2:8e9312db-7e62-f251-88c3-480fffda6a39 |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | ED06:1672C1:19E5817:21D06E3:696B30F6 |
| html-safe-nonce | 940f26f0aaa1a8f8f8e10b557d352d09eacf394074b811a43d8c585092c07ae2 |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJFRDA2OjE2NzJDMToxOUU1ODE3OjIxRDA2RTM6Njk2QjMwRjYiLCJ2aXNpdG9yX2lkIjoiODQwNDU2NDE5MTgyMDMyOTIwNiIsInJlZ2lvbl9lZGdlIjoiaWFkIiwicmVnaW9uX3JlbmRlciI6ImlhZCJ9 |
| visitor-hmac | 053715a0db49ce4ad26d5dd554d095dc415830f07f7b91a9af0c9683559c2324 |
| hovercard-subject-tag | issue:2498454434 |
| github-keyboard-shortcuts | repository,issues,copilot |
| google-site-verification | Apib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I |
| octolytics-url | https://collector.github.com/github/collect |
| analytics-location | / |
| fb:app_id | 1401488693436528 |
| apple-itunes-app | app-id=1477376905, app-argument=https://github.com/_view_fragments/issues/show/python/cpython/123523/issue_layout |
| twitter:image | https://opengraph.githubassets.com/0e234ec7c1a54f9dca039d4539242e5d9e9276f17104da3688e954edb25a59d9/python/cpython/issues/123523 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/0e234ec7c1a54f9dca039d4539242e5d9e9276f17104da3688e954edb25a59d9/python/cpython/issues/123523 |
| og:image:alt | Documentation As pointed out in #123521, currently we have typing-related usage of PEP585 generics (Generator, Callable, Coroutine, etc.) explained on typing page. However, those aliases are deprec... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | sterliakov |
| hostname | github.com |
| expected-hostname | github.com |
| None | 5f99f7c1d70f01da5b93e5ca90303359738944d8ab470e396496262c66e60b8d |
| turbo-cache-control | no-preview |
| go-import | github.com/python/cpython git https://github.com/python/cpython.git |
| octolytics-dimension-user_id | 1525981 |
| octolytics-dimension-user_login | python |
| octolytics-dimension-repository_id | 81598961 |
| octolytics-dimension-repository_nwo | python/cpython |
| octolytics-dimension-repository_public | true |
| octolytics-dimension-repository_is_fork | false |
| octolytics-dimension-repository_network_root_id | 81598961 |
| octolytics-dimension-repository_network_root_nwo | python/cpython |
| turbo-body-classes | logged-out env-production page-responsive |
| disable-turbo | false |
| browser-stats-url | https://api.github.com/_private/browser/stats |
| browser-errors-url | https://api.github.com/_private/browser/errors |
| release | 82560a55c6b2054555076f46e683151ee28a19bc |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
Links:
Viewport: width=device-width