Title: Protocols can't inherit from AsyncIterator · Issue #126699 · python/cpython · GitHub
Open Graph Title: Protocols can't inherit from AsyncIterator · Issue #126699 · python/cpython
X Title: Protocols can't inherit from AsyncIterator · Issue #126699 · python/cpython
Description: Bug report Bug description: AsyncIterator was removed from _PROTO_ALLOWLIST by #15647, without any discussion. It looks like an accident to me. from typing import AsyncIterator, Protocol class MyProto(AsyncIterator, Protocol): ... result...
Open Graph Description: Bug report Bug description: AsyncIterator was removed from _PROTO_ALLOWLIST by #15647, without any discussion. It looks like an accident to me. from typing import AsyncIterator, Protocol class MyPr...
X Description: Bug report Bug description: AsyncIterator was removed from _PROTO_ALLOWLIST by #15647, without any discussion. It looks like an accident to me. from typing import AsyncIterator, Protocol class MyPr...
Opengraph URL: https://github.com/python/cpython/issues/126699
X: @github
Domain: github.com
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"Protocols can't inherit from AsyncIterator","articleBody":"# Bug report\n\n### Bug description:\n\nAsyncIterator was removed from `_PROTO_ALLOWLIST` by https://github.com/python/cpython/pull/15647, without any discussion. It looks like an accident to me.\n\n```python\nfrom typing import AsyncIterator, Protocol\nclass MyProto(AsyncIterator, Protocol): ...\n```\n\nresult:\n```\nTypeError: Protocols can only inherit from other protocols, got \u003cclass 'collections.abc.AsyncIterator'\u003e\n```\n\n### CPython versions tested on:\n\n3.12\n\n### Operating systems tested on:\n\nmacOS\n\n\u003c!-- gh-linked-prs --\u003e\n### Linked PRs\n* gh-126702\n* gh-126761\n* gh-126762\n\u003c!-- /gh-linked-prs --\u003e\n","author":{"url":"https://github.com/tungol","@type":"Person","name":"tungol"},"datePublished":"2024-11-11T21:15:13.000Z","interactionStatistic":{"@type":"InteractionCounter","interactionType":"https://schema.org/CommentAction","userInteractionCount":0},"url":"https://github.com/126699/cpython/issues/126699"}
| 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:c9efb6fa-9b7f-a252-b536-48ad22ecb652 |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | 8A9C:3A96BF:5258651:738713D:6A5511CF |
| html-safe-nonce | 23d7bd0cf61a0e9ca3e6e92c2d889c199d31690be25ef446cc6645265c8e83a6 |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiI4QTlDOjNBOTZCRjo1MjU4NjUxOjczODcxM0Q6NkE1NTExQ0YiLCJ2aXNpdG9yX2lkIjoiNjQwNDM4MzczNTgxMTQ3Nzk2NyIsInJlZ2lvbl9lZGdlIjoiaWFkIiwicmVnaW9uX3JlbmRlciI6ImlhZCJ9 |
| visitor-hmac | 231ad2e0bdeb32825bbdbbf412a5e3fdd4d65f6ebb12859aaffe64a7968751db |
| hovercard-subject-tag | issue:2650411211 |
| 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/126699/issue_layout |
| twitter:image | https://opengraph.githubassets.com/6fd78af29bc9728bb80b76f1c09cb6b0d26371dfe2e2e9f69202840daa1e0372/python/cpython/issues/126699 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/6fd78af29bc9728bb80b76f1c09cb6b0d26371dfe2e2e9f69202840daa1e0372/python/cpython/issues/126699 |
| og:image:alt | Bug report Bug description: AsyncIterator was removed from _PROTO_ALLOWLIST by #15647, without any discussion. It looks like an accident to me. from typing import AsyncIterator, Protocol class MyPr... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | tungol |
| hostname | github.com |
| expected-hostname | github.com |
| None | 682d273eacb2ac51680c6eb9c0b270f029f7ce74c32090f319083c34497e28a5 |
| 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 | 0f2adbaa4b43ea302b02981f637a782ae92ed6dc |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
Links:
Viewport: width=device-width