René's URL Explorer Experiment


Title: Cancelling a subscription consumer leaves its source running with an AbortSignal · Issue #322 · graphql-python/graphql-core · GitHub

Open Graph Title: Cancelling a subscription consumer leaves its source running with an AbortSignal · Issue #322 · graphql-python/graphql-core

X Title: Cancelling a subscription consumer leaves its source running with an AbortSignal · Issue #322 · graphql-python/graphql-core

Description: Cancelling a task awaiting the next subscription event leaves its source running when an idle AbortSignal is supplied. Without the signal, the same cancellation closes the source immediately. This can leave a subscription’s pending I/O a...

Open Graph Description: Cancelling a task awaiting the next subscription event leaves its source running when an idle AbortSignal is supplied. Without the signal, the same cancellation closes the source immediately. This ...

X Description: Cancelling a task awaiting the next subscription event leaves its source running when an idle AbortSignal is supplied. Without the signal, the same cancellation closes the source immediately. This ...

Opengraph URL: https://github.com/graphql-python/graphql-core/issues/322

X: @github

direct link

Domain: github.com


Hey, it has json ld scripts:
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"Cancelling a subscription consumer leaves its source running with an AbortSignal","articleBody":"Cancelling a task awaiting the next subscription event leaves its source running when an idle `AbortSignal` is supplied. Without the signal, the same cancellation closes the source immediately. This can leave a subscription’s pending I/O alive after a client disconnect or request timeout.\n\nReproduced on main `2bd255772890e0b32241d793b3ee10a067c20cfd` (GraphQL-core 3.3.2), Python 3.14.4.\n\n```python\n\"\"\"Public subscription cancellation with an idle AbortSignal, compared to no signal.\"\"\"\nimport asyncio\nimport contextlib\nimport json\nfrom graphql import build_schema, parse, subscribe\nfrom graphql.pyutils import AbortController\n\nasync def probe(with_signal):\n    started = asyncio.Event()\n    release = asyncio.Event()\n    closed = asyncio.Event()\n    delivered = []\n\n    async def events():\n        try:\n            started.set()\n            await release.wait()\n            delivered.append('event after request cancellation')\n            yield {'event': 'value'}\n        finally:\n            closed.set()\n\n    source = events()\n    controller = AbortController()\n    schema = build_schema('type Query { unused: String } type Subscription { event: String }')\n    kwargs = {'abort_signal': controller.signal} if with_signal else {}\n    stream = subscribe(schema, parse('subscription { event }'), root_value={'event': source}, **kwargs)\n    consumer = asyncio.create_task(anext(stream))\n    await asyncio.wait_for(started.wait(), 1)\n    consumer.cancel()\n    with contextlib.suppress(asyncio.CancelledError):\n        await consumer\n    snapshot = {'with_signal': with_signal, 'consumer_cancelled': consumer.cancelled(),\n                'source_closed_after_cancel': closed.is_set(), 'signal_aborted': controller.signal.aborted,\n                'pending_source_tasks': [t.get_coro().__class__.__name__ for t in asyncio.all_tasks()\n                                         if t is not asyncio.current_task() and not t.done()]}\n    release.set()\n    for _ in range(10):\n        await asyncio.sleep(0)\n    snapshot['events_after_cancel'] = delivered.copy()\n    # Explicitly close the retained source so this reproduction leaves no work behind.\n    await source.aclose()\n    await stream.aclose()\n    print(json.dumps(snapshot), flush=True)\n    return snapshot\n\nasync def main():\n    control = await probe(False)\n    affected = await probe(True)\n    assert control['source_closed_after_cancel']\n    assert control['events_after_cancel'] == []\n    assert affected['source_closed_after_cancel'], 'AbortSignal causes cancelled subscription source to remain active'\n\nasyncio.run(main())\n```\n\nThe no-signal case reports `source_closed_after_cancel=true` and no delivered events. With the idle signal, it reports `false`, retains an `async_generator_asend` task, and produces an event when released after cancellation. The reproduction closes the remaining source before its final assertion fails.\n\n`Executor.with_abort_signal` creates the source task and waits with `asyncio.wait`. Caller cancellation cleans up the abort-wait task, while the source task continues. I’d like to fix this by cancelling and settling the owned source task on `CancelledError`, with a focused regression. Does that fit the intended behavior?\n","author":{"url":"https://github.com/AryanRG","@type":"Person","name":"AryanRG"},"datePublished":"2026-11-17T15:34:13Z","url":"https://github.com/graphql-python/graphql-core/issues/322"}

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:1eaa54ca-be6c-24ed-ea61-db7a7353419e
current-catalog-service-hash81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114
request-idE0B8:2148FB:1905CE0:21AF44C:6AFFF4CF
html-safe-nonce08005d01de3eb2dd00adf6d083bbb86621359f244a39b8cff715ce3c3a5094b7
visitor-payloadeyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJFMEI4OjIxNDhGQjoxOTA1Q0UwOjIxQUY0NEM6NkFGRkY0Q0YiLCJ2aXNpdG9yX2lkIjoiMzg4NzE4OTMwMjk4Mjk5NzE5OSIsInJlZ2lvbl9lZGdlIjoiaWFkIiwicmVnaW9uX3JlbmRlciI6ImlhZCJ9
visitor-hmacd33e14f354a4c79c1d5fae1ffb416d7eaec09eb127d50c495e74cb62e015594e
hovercard-subject-tagissue:6448107665
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/graphql-python/graphql-core/322/issue_layout
twitter:imagehttps://opengraph.githubassets.com/fa7c12327511a8bd1a0e5831d2e957833f99ef5f07e8dd35daf2c1d895863739/graphql-python/graphql-core/issues/322
twitter:cardsummary_large_image
og:imagehttps://opengraph.githubassets.com/fa7c12327511a8bd1a0e5831d2e957833f99ef5f07e8dd35daf2c1d895863739/graphql-python/graphql-core/issues/322
og:image:altCancelling a task awaiting the next subscription event leaves its source running when an idle AbortSignal is supplied. Without the signal, the same cancellation closes the source immediately. This ...
og:image:width1200
og:image:height600
og:site_nameGitHub
og:typeobject
og:author:usernameAryanRG
hostnamegithub.com
expected-hostnamegithub.com
None0a0d8686a27478df474dd7415776a7a080cde8838b3cd92ea7601187572e5729
turbo-cache-controlno-preview
go-importgithub.com/graphql-python/graphql-core git https://github.com/graphql-python/graphql-core.git
octolytics-dimension-user_id15002022
octolytics-dimension-user_logingraphql-python
octolytics-dimension-repository_id143207933
octolytics-dimension-repository_nwographql-python/graphql-core
octolytics-dimension-repository_publictrue
octolytics-dimension-repository_is_forkfalse
octolytics-dimension-repository_network_root_id143207933
octolytics-dimension-repository_network_root_nwographql-python/graphql-core
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
release16a11879678aaf97e2a42c33ee70830aa084fa37
ui-targetcanary-2
theme-color#1e2327
color-schemelight dark
react-app-nameissues

Links:

Skip to contenthttps://github.com/graphql-python/graphql-core/issues/322#start-of-content
https://github.com/
Sign inhttps://github.com/login?return_to=https%3A%2F%2Fgithub.com%2Fgraphql-python%2Fgraphql-core%2Fissues%2F322
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%2Fgraphql-python%2Fgraphql-core%2Fissues%2F322
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=graphql-python%2Fgraphql-core
Reloadhttps://github.com/graphql-python/graphql-core/issues/322
Reloadhttps://github.com/graphql-python/graphql-core/issues/322
Reloadhttps://github.com/graphql-python/graphql-core/issues/322
graphql-pythonhttps://github.com/graphql-python
graphql-corehttps://github.com/graphql-python/graphql-core
Codehttps://github.com/graphql-python/graphql-core
Issues24 (24)https://github.com/graphql-python/graphql-core/issues
Pull requests3 (3)https://github.com/graphql-python/graphql-core/pulls
Actionshttps://github.com/graphql-python/graphql-core/actions
Projectshttps://github.com/graphql-python/graphql-core/projects
Security and quality3 (3)https://github.com/graphql-python/graphql-core/security
Insightshttps://github.com/graphql-python/graphql-core/insights
https://github.com/graphql-python/graphql-core
New issuehttps://github.com/login?return_to=https://github.com/graphql-python/graphql-core/issues/322
New issuehttps://github.com/login?return_to=https://github.com/graphql-python/graphql-core/issues/322
#323https://github.com/graphql-python/graphql-core/pull/323
Cancelling a subscription consumer leaves its source running with an AbortSignalhttps://github.com/graphql-python/graphql-core/issues/322#top
#323https://github.com/graphql-python/graphql-core/pull/323
https://github.com/Cito
https://github.com/AryanRG
AryanRGhttps://github.com/AryanRG
on Nov 17, 2026https://github.com/graphql-python/graphql-core/issues/322#issue-6448107665
https://github.com/Cito
Citohttps://github.com/Cito
on Nov 17, 2026https://github.com/graphql-python/graphql-core/issues/322#issuecomment-6954039877
@AryanRGhttps://github.com/AryanRG
Citohttps://github.com/Cito
on Nov 17, 2026https://github.com/graphql-python/graphql-core/issues/322#event-36428630564
https://github.com/AryanRG
AryanRGhttps://github.com/AryanRG
on Nov 17, 2026https://github.com/graphql-python/graphql-core/issues/322#issuecomment-6954245892
@Citohttps://github.com/Cito
https://github.com/AryanRG
AryanRGhttps://github.com/AryanRG
on Nov 17, 2026https://github.com/graphql-python/graphql-core/issues/322#issuecomment-6955067135
#323https://github.com/graphql-python/graphql-core/pull/323
@Citohttps://github.com/Cito
Citohttps://github.com/Cito
completedhttps://github.com/graphql-python/graphql-core/issues?q=is%3Aissue%20state%3Aclosed%20archived%3Afalse%20reason%3Acompleted
#323https://github.com/graphql-python/graphql-core/pull/323
on Nov 17, 2026https://github.com/graphql-python/graphql-core/issues/322#event-36459084122
Sign up for freehttps://github.com/signup?return_to=https://github.com/graphql-python/graphql-core/issues/322
Sign in to commenthttps://github.com/login?return_to=https://github.com/graphql-python/graphql-core/issues/322
Citohttps://github.com/Cito
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.