René's URL Explorer Experiment


Title: Return type of `asyncio.gather` with `*args` · Issue #11123 · python/typeshed · GitHub

Open Graph Title: Return type of `asyncio.gather` with `*args` · Issue #11123 · python/typeshed

X Title: Return type of `asyncio.gather` with `*args` · Issue #11123 · python/typeshed

Description: There are some related issues: #1550 #3243 #2652 And several questions on StackOverflow But the problem is still the same. When a generator is passed to asyncio.gather, the expected return type should be Future[list[_T]]. However, it cur...

Open Graph Description: There are some related issues: #1550 #3243 #2652 And several questions on StackOverflow But the problem is still the same. When a generator is passed to asyncio.gather, the expected return type sho...

X Description: There are some related issues: #1550 #3243 #2652 And several questions on StackOverflow But the problem is still the same. When a generator is passed to asyncio.gather, the expected return type sho...

Opengraph URL: https://github.com/python/typeshed/issues/11123

X: @github

direct link

Domain: github.com


Hey, it has json ld scripts:
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"Return type of `asyncio.gather` with `*args`","articleBody":"There are some related issues:\r\n* #1550\r\n* #3243\r\n* #2652\r\n* And several questions on StackOverflow\r\n\r\nBut the problem is still the same. When a generator is passed to `asyncio.gather`, the expected return type should be `Future[list[_T]]`. However, it currently returns `Future[tuple[_T1]]`, leading to type hinting warnings. This is a common pattern in asyncio code, and every time it cause unnecessary warnings in IDEs\r\n\r\nExample code snippet:\r\n```python\r\nasync def fetch(url: str) -> str:\r\n    pass  # fetch logic\r\n\r\n\r\ndef analyze(responses: list[str]) -> int:\r\n    pass  # analyze logic that need all responses, maybe external library\r\n\r\n\r\nasync def create_report(urls: list[str]):\r\n    responses = await asyncio.gather(*(\r\n        fetch(url)\r\n        for url in urls\r\n    ))\r\n    some_value = analyze(responses)\r\n    # create report\r\n```\r\n![gather](https://github.com/python/typeshed/assets/30019791/e903c562-f31b-45f1-818a-5341c96c54d2)\r\n\r\nI read tasks.pyi file, but a significant number of developers use `asyncio.gather(*[...])`. So this behavior should be reviewed\r\n\r\n> Although practicality beats purity\r\n> (c) [The Zen of Python](https://peps.python.org/pep-0020/#the-zen-of-python)\r\n","author":{"url":"https://github.com/abionics","@type":"Person","name":"abionics"},"datePublished":"2023-12-08T15:19:09Z","url":"https://github.com/python/typeshed/issues/11123"}

react-profiling0
react-import-mapreact,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-controllervoltron_issues_fragments
route-actionissue_layout
fetch-noncev2:5351f823-b51c-a3b6-3ea8-1d75255aa5b7
current-catalog-service-hash81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114
request-idA29E:23FDF9:1EBB6FE:29D0EE4:6B001B2B
html-safe-noncec81b73bb012c5792b95ef2c469edae21c0e7344ef169c2e71c401abbb55f4441
visitor-payloadeyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJBMjlFOjIzRkRGOToxRUJCNkZFOjI5RDBFRTQ6NkIwMDFCMkIiLCJ2aXNpdG9yX2lkIjoiNDQyNDUxNDc2NDI1Njg0NDU4NyIsInJlZ2lvbl9lZGdlIjoiaWFkIiwicmVnaW9uX3JlbmRlciI6ImlhZCJ9
visitor-hmac5d8b7658b4ba765fd5d7a35826a1b64b1ec7811699eda1a0e91f036a4dddde47
hovercard-subject-tagissue:2032846740
github-keyboard-shortcutsrepository,issues,copilot
google-site-verificationApib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I
octolytics-urlhttps://collector.github.com/github/collect
analytics-location///voltron/issues_fragments/issue_layout
fb:app_id1401488693436528
apple-itunes-appapp-id=1477376905, app-argument=https://github.com/_view_fragments/issues/show/python/typeshed/11123/issue_layout
twitter:imagehttps://opengraph.githubassets.com/35413b4fd80f089199d82559de5bdc76976a061cc458052a3433b2009446df23/python/typeshed/issues/11123
twitter:cardsummary_large_image
og:imagehttps://opengraph.githubassets.com/35413b4fd80f089199d82559de5bdc76976a061cc458052a3433b2009446df23/python/typeshed/issues/11123
og:image:altThere are some related issues: #1550 #3243 #2652 And several questions on StackOverflow But the problem is still the same. When a generator is passed to asyncio.gather, the expected return type sho...
og:image:width1200
og:image:height600
og:site_nameGitHub
og:typeobject
og:author:usernameabionics
hostnamegithub.com
expected-hostnamegithub.com
None4eb4cba0d69f045374ac15de9666d22b0961e1d555cc3824f36b7734c00c78e0
turbo-cache-controlno-preview
go-importgithub.com/python/typeshed git https://github.com/python/typeshed.git
octolytics-dimension-user_id1525981
octolytics-dimension-user_loginpython
octolytics-dimension-repository_id31696383
octolytics-dimension-repository_nwopython/typeshed
octolytics-dimension-repository_publictrue
octolytics-dimension-repository_is_forkfalse
octolytics-dimension-repository_network_root_id31696383
octolytics-dimension-repository_network_root_nwopython/typeshed
turbo-body-classeslogged-out env-production page-responsive
disable-turbofalse
browser-stats-urlhttps://api.github.com/_private/browser/stats
browser-errors-urlhttps://api.github.com/_private/browser/errors
release44c658b24abf00491fb7ae5f56d42c9f38cbeab2
ui-targetfull
theme-color#1e2327
color-schemelight dark
react-app-nameissues

Links:

Skip to contenthttps://github.com/python/typeshed/issues/11123#start-of-content
https://github.com/
Sign inhttps://github.com/login?return_to=https%3A%2F%2Fgithub.com%2Fpython%2Ftypeshed%2Fissues%2F11123
GitHubRepository hosting, code review, and collaborationhttps://github.com/platform
CopilotAI coding agent for tasks, projects, and automated workhttps://github.com/features/copilot
ActionsCI/CD and automationhttps://github.com/features/actions
Code QualityQuality analysis, fixes, and enforcementhttps://github.com/features/code-quality
CodespacesCloud development environmentshttps://github.com/features/codespaces
Code SecurityVulnerability detection and remediationhttps://github.com/security/advanced-security/code-security
Secret ProtectionSecret scanning and leak preventionhttps://github.com/security/advanced-security/secret-protection
All Featureshttps://github.com/features
Documentationhttps://docs.github.com/en
Traininghttps://learn.github.com/skills
Certificationshttps://learn.github.com/credentials
Build with Copilothttps://github.com/features/ai
Customize Copilothttps://docs.github.com/en/copilot/how-tos/copilot-on-github/customize-copilot/customize-copilot-overview
Integrationshttps://github.com/marketplace
Trending reposhttps://github.com/trending
GitHub Sponsorshttps://github.com/open-source/sponsors
Developer articleshttps://github.com/resources/articles
ChangelogYour source for the latest features, improvements, and fixes across GitHub products, all in one place.https://github.blog/changelog/
Enterpriseshttps://github.com/enterprise
Teamhttps://github.com/team
Startupshttps://github.com/enterprise/startups
Nonprofitshttps://github.com/solutions/industry/nonprofits
Healthcarehttps://github.com/solutions/industry/healthcare
Financial serviceshttps://github.com/solutions/industry/financial-services
Manufacturinghttps://github.com/solutions/industry/manufacturing
Governmenthttps://github.com/solutions/industry/government
See all industrieshttps://github.com/solutions/industry
Why GitHubhttps://github.com/why-github
Customer Storieshttps://github.com/customer-stories
Business insightshttps://github.com/solutions/executive-insights
Trust Centerhttps://github.com/trust-center
GitHub Advanced SecurityEnterprise-grade code securityhttps://github.com/security/advanced-security
Copilot for businessEnterprise-grade AI featureshttps://github.com/features/copilot/copilot-business
Premium SupportEnterprise-grade 24/7 supporthttps://github.com/enterprise/premium-support
Documentationhttps://docs.github.com/en
Resource centerhttps://github.com/resources
Bloghttps://github.blog/
Events & webinarshttps://github.com/resources/events
Community Forumhttps://github.com/orgs/community/discussions
Customer Storieshttps://github.com/customer-stories
Integrationshttps://github.com/marketplace
Customer supporthttps://help.github.com/
Traininghttps://learn.github.com/skills
GitHub Statushttps://www.githubstatus.com/
Abouthttps://github.com/about
Partnershttps://github.com/partners
Changeloghttps://github.blog/changelog/
GitHub UniverseThe event for developers, by developers — talks, workshops, and what’s next for GitHub.https://githubuniverse.com/
Pricinghttps://github.com/pricing
Sign inhttps://github.com/login?return_to=https%3A%2F%2Fgithub.com%2Fpython%2Ftypeshed%2Fissues%2F11123
Sign uphttps://github.com/signup?ref_cta=Sign+up&ref_loc=header+logged+out&ref_page=%2F%3Cuser-name%3E%2F%3Crepo-name%3E%2Fvoltron%2Fissues_fragments%2Fissue_layout&source=header-repo&source_repo=python%2Ftypeshed
Reloadhttps://github.com/python/typeshed/issues/11123
Reloadhttps://github.com/python/typeshed/issues/11123
Reloadhttps://github.com/python/typeshed/issues/11123
pythonhttps://github.com/python
typeshedhttps://github.com/python/typeshed
Codehttps://github.com/python/typeshed
Issues196 (196)https://github.com/python/typeshed/issues
Pull requests251 (251)https://github.com/python/typeshed/pulls
Actionshttps://github.com/python/typeshed/actions
Security and qualityhttps://github.com/python/typeshed/security
Insightshttps://github.com/python/typeshed/insights
https://github.com/python/typeshed
New issuehttps://github.com/login?return_to=https://github.com/python/typeshed/issues/11123
New issuehttps://github.com/login?return_to=https://github.com/python/typeshed/issues/11123
Return type of asyncio.gather with *argshttps://github.com/python/typeshed/issues/11123#top
https://github.com/abionics
abionicshttps://github.com/abionics
on Dec 8, 2023https://github.com/python/typeshed/issues/11123#issue-2032846740
More precisely typehint asyncio.gather up to 5 params #1550https://github.com/python/typeshed/pull/1550
Clarification: return type for asyncio.gather()? #3243https://github.com/python/typeshed/issues/3243
Incorrect return type for asyncio.gather? #2652https://github.com/python/typeshed/issues/2652
https://private-user-images.githubusercontent.com/30019791/289109105-e903c562-f31b-45f1-818a-5341c96c54d2.png?jwt=eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3OTUxNjkzNjcsIm5iZiI6MTc5NTE2OTA2NywicGF0aCI6Ii8zMDAxOTc5MS8yODkxMDkxMDUtZTkwM2M1NjItZjMxYi00NWYxLTgxOGEtNTM0MWM5NmM1NGQyLnBuZz9YLUFtei1BbGdvcml0aG09QVdTNC1ITUFDLVNIQTI1NiZYLUFtei1DcmVkZW50aWFsPUFLSUFWQ09EWUxTQTUzUFFLNFpBJTJGMjAyNjExMjAlMkZ1cy1lYXN0LTElMkZzMyUyRmF3czRfcmVxdWVzdCZYLUFtei1EYXRlPTIwMjYxMTIwVDEwMDQyN1omWC1BbXotRXhwaXJlcz0zMDAmWC1BbXotU2lnbmF0dXJlPTIyMmMxMTQ5YjcyZDk0NzdkNTQ4MjFjOTc1NmI0ZWEwZTgyZmZiYjc1ZTJmNTdkYjZiOWI4ZTkwM2UxNTI4MzMmWC1BbXotU2lnbmVkSGVhZGVycz1ob3N0JnJlc3BvbnNlLWNvbnRlbnQtdHlwZT1pbWFnZSUyRnBuZyJ9.eFBzG0H43j7hHLqJFFSZPkim6cwj-0drZ06-pqbX7Xk
The Zen of Pythonhttps://peps.python.org/pep-0020/#the-zen-of-python
https://github.com/JelleZijlstra
JelleZijlstrahttps://github.com/JelleZijlstra
on Dec 8, 2023https://github.com/python/typeshed/issues/11123#issuecomment-1847405242
typeshed/stdlib/asyncio/tasks.pyihttps://github.com/python/typeshed/blob/ad5ec921e0c0da471867996fc85b94a3e7d83ecf/stdlib/asyncio/tasks.pyi#L145
ad5ec92https://github.com/python/typeshed/commit/ad5ec921e0c0da471867996fc85b94a3e7d83ecf
JelleZijlstrahttps://github.com/JelleZijlstra
on Dec 8, 2023https://github.com/python/typeshed/issues/11123#event-11194961341
https://github.com/abionics
abionicshttps://github.com/abionics
on Dec 8, 2023https://github.com/python/typeshed/issues/11123#issuecomment-1847465374
@JelleZijlstrahttps://github.com/JelleZijlstra
JelleZijlstrahttps://github.com/JelleZijlstra
completedhttps://github.com/python/typeshed/issues?q=is%3Aissue%20state%3Aclosed%20archived%3Afalse%20reason%3Acompleted
on Dec 8, 2023https://github.com/python/typeshed/issues/11123#event-11195385811
Sign up for freehttps://github.com/signup?return_to=https://github.com/python/typeshed/issues/11123
Sign in to commenthttps://github.com/login?return_to=https://github.com/python/typeshed/issues/11123
https://github.com
Termshttps://docs.github.com/site-policy/github-terms/github-terms-of-service
Privacyhttps://docs.github.com/site-policy/privacy-policies/github-privacy-statement
Securityhttps://github.com/security
Statushttps://www.githubstatus.com/
Communityhttps://github.community/
Docshttps://docs.github.com/
Contacthttps://support.github.com?tags=dotcom-footer

Viewport: width=device-width


URLs of crawlers that visited me.