Title: mypy 0.750 regression with asyncio.wait · Issue #8051 · python/mypy · GitHub
Open Graph Title: mypy 0.750 regression with asyncio.wait · Issue #8051 · python/mypy
X Title: mypy 0.750 regression with asyncio.wait · Issue #8051 · python/mypy
Description: Please consider the following: from asyncio import Future, wait from typing import List async def foo() -> None: f: List[Future[None]] = [] await wait(f) Checking this with mypy 0.740 (Python 3.8.0) without options succeeds. Checking it ...
Open Graph Description: Please consider the following: from asyncio import Future, wait from typing import List async def foo() -> None: f: List[Future[None]] = [] await wait(f) Checking this with mypy 0.740 (Python 3.8.0...
X Description: Please consider the following: from asyncio import Future, wait from typing import List async def foo() -> None: f: List[Future[None]] = [] await wait(f) Checking this with mypy 0.740 (Python 3....
Opengraph URL: https://github.com/python/mypy/issues/8051
X: @github
Domain: github.com
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"mypy 0.750 regression with asyncio.wait","articleBody":"Please consider the following:\r\n\r\n```python\r\nfrom asyncio import Future, wait\r\nfrom typing import List\r\n\r\nasync def foo() -> None:\r\n f: List[Future[None]] = []\r\n await wait(f)\r\n```\r\n\r\nChecking this with mypy 0.740 (Python 3.8.0) without options succeeds. Checking it with mypy 0.750 (also Python 3.8.0, no options) prints the following error:\r\n\r\n```\r\nfoo.py:6: error: Argument 1 to \"wait\" has incompatible type \"List[Future[None]]\"; expected \"Iterable[Union[Future[\u003cnothing>], Generator[Any, None, \u003cnothing>], Awaitable[\u003cnothing>]]]\"\r\nFound 1 error in 1 file (checked 1 source file)\r\n```\r\n\r\nThe annotation of `asyncio.wait()` from typeshed has not changed between mypy versions:\r\n\r\n```python\r\n_T = TypeVar('_T')\r\n...\r\n_FutureT = Union[Future[_T], Generator[Any, None, _T], Awaitable[_T]]\r\n...\r\ndef wait(fs: Iterable[_FutureT[_T]], *, loop: Optional[AbstractEventLoop] = ..., timeout: Optional[float] = ...,\r\n return_when: str = ...) -> Future[Tuple[Set[Future[_T]], Set[Future[_T]]]]: ...\r\n```","author":{"url":"https://github.com/srittau","@type":"Person","name":"srittau"},"datePublished":"2019-12-02T12:37:09Z","url":"https://github.com/python/mypy/issues/8051"}
| react-profiling | 0 |
| react-import-map | react,react-dom,react-dom/client,react-dom/profiling,react-is,react/compiler-runtime,react/jsx-dev-runtime,react/jsx-runtime,scheduler@b8488ee2c322 |
| 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:3ce9fa31-d3c4-0595-c9d5-4b3c75e0ecf8 |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | ACD8:1AEC58:C09930:1018E9D:6B004E66 |
| html-safe-nonce | 3edfc52e44979fac6e77af7da3f5ed4e163f8e062053280e94933c472cbb227f |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJBQ0Q4OjFBRUM1ODpDMDk5MzA6MTAxOEU5RDo2QjAwNEU2NiIsInZpc2l0b3JfaWQiOiIxOTYxNDc0NTgxOTE0OTk2MzI2IiwicmVnaW9uX2VkZ2UiOiJpYWQiLCJyZWdpb25fcmVuZGVyIjoiaWFkIn0= |
| visitor-hmac | e22b1ce28782fce0e8bef34001662e00818adb4bd544a717bb14da6c51b10496 |
| hovercard-subject-tag | issue:531100699 |
| 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/mypy/8051/issue_layout |
| twitter:image | https://opengraph.githubassets.com/c04ea69d1c2364b47fb653c31b005ac26fbfa055c94bb2f62a9c6a16f14b66a5/python/mypy/issues/8051 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/c04ea69d1c2364b47fb653c31b005ac26fbfa055c94bb2f62a9c6a16f14b66a5/python/mypy/issues/8051 |
| og:image:alt | Please consider the following: from asyncio import Future, wait from typing import List async def foo() -> None: f: List[Future[None]] = [] await wait(f) Checking this with mypy 0.740 (Python 3.8.0... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | srittau |
| hostname | github.com |
| expected-hostname | github.com |
| None | f9517bf360d46638a1e5e7daee7158842fe5ef43c9000afa0e127564a7c2f39b |
| turbo-cache-control | no-preview |
| go-import | github.com/python/mypy git https://github.com/python/mypy.git |
| octolytics-dimension-user_id | 1525981 |
| octolytics-dimension-user_login | python |
| octolytics-dimension-repository_id | 7053637 |
| octolytics-dimension-repository_nwo | python/mypy |
| octolytics-dimension-repository_public | true |
| octolytics-dimension-repository_is_fork | false |
| octolytics-dimension-repository_network_root_id | 7053637 |
| octolytics-dimension-repository_network_root_nwo | python/mypy |
| 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 | b27c5dde30676028abd5c5fc53ce5c9b625f8281 |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
| react-app-name | issues |
Links:
Viewport: width=device-width