René's URL Explorer Experiment


Title: Fix stateless HTTP task accumulation causing memory leak by wiggzz · Pull Request #2145 · modelcontextprotocol/python-sdk · GitHub

Open Graph Title: Fix stateless HTTP task accumulation causing memory leak by wiggzz · Pull Request #2145 · modelcontextprotocol/python-sdk

X Title: Fix stateless HTTP task accumulation causing memory leak by wiggzz · Pull Request #2145 · modelcontextprotocol/python-sdk

Description: The official Python SDK for Model Context Protocol servers and clients - Fix stateless HTTP task accumulation causing memory leak by wiggzz · Pull Request #2145 · modelcontextprotocol/python-sdk

Open Graph Description: Summary Fix memory leak where run_stateless_server tasks accumulate indefinitely in the manager's global task group after client disconnects Use request-scoped task groups instead of the globa...

X Description: Summary Fix memory leak where run_stateless_server tasks accumulate indefinitely in the manager's global task group after client disconnects Use request-scoped task groups instead of the g...

Opengraph URL: https://github.com/modelcontextprotocol/python-sdk/pull/2145

X: @github

direct link

Domain: github.com

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/:user_id/:repository/pull/:id/commits(.:format)
route-controllerpull_requests
route-actioncommits
fetch-noncev2:d7d2f28a-0873-a2c4-d32b-613a14f278a8
current-catalog-service-hashae870bc5e265a340912cde392f23dad3671a0a881730ffdadd82f2f57d81641b
request-idC2A8:1FDBC6:1B44F6:24646D:6AFD11F9
html-safe-nonceca713029bb80f2d4d05385a556f387a49110448730d4e6cb745795c7535328f2
visitor-payloadeyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJDMkE4OjFGREJDNjoxQjQ0RjY6MjQ2NDZEOjZBRkQxMUY5IiwidmlzaXRvcl9pZCI6IjE5ODkxMzIzMDI5OTAyNTA0ODkiLCJyZWdpb25fZWRnZSI6ImlhZCIsInJlZ2lvbl9yZW5kZXIiOiJpYWQifQ==
visitor-hmacf834615d5332de4ce65f1a1bf669d51d03aa343b95ee28b39dbc9e3439efea29
hovercard-subject-tagpull_request:3326408465
github-keyboard-shortcutsrepository,pull-request-list,pull-request-conversation,pull-request-files-changed,copilot
google-site-verificationApib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I
octolytics-urlhttps://collector.github.com/github/collect
analytics-location///pull_requests/show/commits
fb:app_id1401488693436528
apple-itunes-appapp-id=1477376905, app-argument=https://github.com/modelcontextprotocol/python-sdk/pull/2145/commits
twitter:imagehttps://opengraph.githubassets.com/1380fe5a88310dafb7006e5a258cd871f826c7f366a675a71219d7259b071ffd/modelcontextprotocol/python-sdk/pull/2145
twitter:cardsummary_large_image
og:imagehttps://opengraph.githubassets.com/1380fe5a88310dafb7006e5a258cd871f826c7f366a675a71219d7259b071ffd/modelcontextprotocol/python-sdk/pull/2145
og:image:altSummary Fix memory leak where run_stateless_server tasks accumulate indefinitely in the manager's global task group after client disconnects Use request-scoped task groups instead of the globa...
og:image:width1200
og:image:height600
og:site_nameGitHub
og:typeobject
og:author:usernamewiggzz
hostnamegithub.com
expected-hostnamegithub.com
None7c34e25df4e46e972c8f0225e63410231bdeb9ea5634597c712796bbcdb2e627
turbo-cache-controlno-cache
go-importgithub.com/modelcontextprotocol/python-sdk git https://github.com/modelcontextprotocol/python-sdk.git
octolytics-dimension-user_id182288589
octolytics-dimension-user_loginmodelcontextprotocol
octolytics-dimension-repository_id862584018
octolytics-dimension-repository_nwomodelcontextprotocol/python-sdk
octolytics-dimension-repository_publictrue
octolytics-dimension-repository_is_forkfalse
octolytics-dimension-repository_network_root_id862584018
octolytics-dimension-repository_network_root_nwomodelcontextprotocol/python-sdk
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
release8fa571ebaa95e4e6bf872197c0e84b7dc48e6785
ui-targetfull
theme-color#1e2327
color-schemelight dark
react-app-namepull-requests

Links:

Skip to contenthttps://github.com/modelcontextprotocol/python-sdk/pull/2145/commits#start-of-content
https://github.com/
Sign inhttps://github.com/login?return_to=https%3A%2F%2Fgithub.com%2Fmodelcontextprotocol%2Fpython-sdk%2Fpull%2F2145%2Fcommits
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%2Fmodelcontextprotocol%2Fpython-sdk%2Fpull%2F2145%2Fcommits
Sign uphttps://github.com/signup?ref_cta=Sign+up&ref_loc=header+logged+out&ref_page=%2F%3Cuser-name%3E%2F%3Crepo-name%3E%2Fpull_requests%2Fshow%2Fcommits&source=header-repo&source_repo=modelcontextprotocol%2Fpython-sdk
Reloadhttps://github.com/modelcontextprotocol/python-sdk/pull/2145/commits
Reloadhttps://github.com/modelcontextprotocol/python-sdk/pull/2145/commits
Reloadhttps://github.com/modelcontextprotocol/python-sdk/pull/2145/commits
modelcontextprotocolhttps://github.com/modelcontextprotocol
python-sdkhttps://github.com/modelcontextprotocol/python-sdk
Codehttps://github.com/modelcontextprotocol/python-sdk
Issues306 (306)https://github.com/modelcontextprotocol/python-sdk/issues
Pull requests112 (112)https://github.com/modelcontextprotocol/python-sdk/pulls
Actionshttps://github.com/modelcontextprotocol/python-sdk/actions
Projectshttps://github.com/modelcontextprotocol/python-sdk/projects
Security and quality12 (12)https://github.com/modelcontextprotocol/python-sdk/security
Insightshttps://github.com/modelcontextprotocol/python-sdk/insights
https://github.com/modelcontextprotocol/python-sdk
wiggzzhttps://github.com/wiggzz
modelcontextprotocol:mainhttps://github.com/modelcontextprotocol/python-sdk/tree/main
wiggzz:fix/stateless-task-group-leakhttps://github.com/wiggzz/python-sdk/tree/fix/stateless-task-group-leak
Conversationhttps://github.com/modelcontextprotocol/python-sdk/pull/2145
Commits17 (17)https://github.com/modelcontextprotocol/python-sdk/pull/2145/commits
Checkshttps://github.com/modelcontextprotocol/python-sdk/pull/2145/checks
Files changedhttps://github.com/modelcontextprotocol/python-sdk/pull/2145/files
Fix stateless HTTP task accumulation causing memory leakhttps://github.com/modelcontextprotocol/python-sdk/pull/2145/commits#top
wiggzzhttps://github.com/wiggzz
modelcontextprotocol:mainhttps://github.com/modelcontextprotocol/python-sdk/tree/main
wiggzz:fix/stateless-task-group-leakhttps://github.com/wiggzz/python-sdk/tree/fix/stateless-task-group-leak
Fix stateless HTTP task accumulation causing memory leak (#756)https://github.com/modelcontextprotocol/python-sdk/pull/2145/commits/6bd4531c7b387279d1e6919d82c7bc0985693fa4
wiggzzhttps://github.com/modelcontextprotocol/python-sdk/commits?author=wiggzz
claudehttps://github.com/modelcontextprotocol/python-sdk/commits?author=claude
6bd4531https://github.com/modelcontextprotocol/python-sdk/pull/2145/commits/6bd4531c7b387279d1e6919d82c7bc0985693fa4
https://github.com/modelcontextprotocol/python-sdk/tree/6bd4531c7b387279d1e6919d82c7bc0985693fa4
Fix issue reference from #756 (closed) to #1764 (open)https://github.com/modelcontextprotocol/python-sdk/pull/2145/commits/8bfcca2fbc5cf35601e4d06163d87f01ffcbef20
wiggzzhttps://github.com/modelcontextprotocol/python-sdk/commits?author=wiggzz
claudehttps://github.com/modelcontextprotocol/python-sdk/commits?author=claude
8bfcca2https://github.com/modelcontextprotocol/python-sdk/pull/2145/commits/8bfcca2fbc5cf35601e4d06163d87f01ffcbef20
https://github.com/modelcontextprotocol/python-sdk/tree/8bfcca2fbc5cf35601e4d06163d87f01ffcbef20
Fix CI: coverage, ruff format, and remove unused handle_list_toolshttps://github.com/modelcontextprotocol/python-sdk/pull/2145/commits/bc590325188df7f80450d87a4262be6c197a6cec
wiggzzhttps://github.com/modelcontextprotocol/python-sdk/commits?author=wiggzz
claudehttps://github.com/modelcontextprotocol/python-sdk/commits?author=claude
bc59032https://github.com/modelcontextprotocol/python-sdk/pull/2145/commits/bc590325188df7f80450d87a4262be6c197a6cec
https://github.com/modelcontextprotocol/python-sdk/tree/bc590325188df7f80450d87a4262be6c197a6cec
Remove over-conservative pragma: no cover annotationshttps://github.com/modelcontextprotocol/python-sdk/pull/2145/commits/4116e0294e2a74872819ab13d64e84b9a5b57849
wiggzzhttps://github.com/modelcontextprotocol/python-sdk/commits?author=wiggzz
claudehttps://github.com/modelcontextprotocol/python-sdk/commits?author=claude
4116e02https://github.com/modelcontextprotocol/python-sdk/pull/2145/commits/4116e0294e2a74872819ab13d64e84b9a5b57849
https://github.com/modelcontextprotocol/python-sdk/tree/4116e0294e2a74872819ab13d64e84b9a5b57849
Revert sleep(0) approach — coverage was racyhttps://github.com/modelcontextprotocol/python-sdk/pull/2145/commits/10957676eaef87722193c2fab468692265e67eb9
wiggzzhttps://github.com/modelcontextprotocol/python-sdk/commits?author=wiggzz
claudehttps://github.com/modelcontextprotocol/python-sdk/commits?author=claude
1095767https://github.com/modelcontextprotocol/python-sdk/pull/2145/commits/10957676eaef87722193c2fab468692265e67eb9
https://github.com/modelcontextprotocol/python-sdk/tree/10957676eaef87722193c2fab468692265e67eb9
Move pragma: no cover to logger.debug (the unreachable line)https://github.com/modelcontextprotocol/python-sdk/pull/2145/commits/f6909a10b29ea50bb31c05792eef5f6e63defb94
wiggzzhttps://github.com/modelcontextprotocol/python-sdk/commits?author=wiggzz
claudehttps://github.com/modelcontextprotocol/python-sdk/commits?author=claude
f6909a1https://github.com/modelcontextprotocol/python-sdk/pull/2145/commits/f6909a10b29ea50bb31c05792eef5f6e63defb94
https://github.com/modelcontextprotocol/python-sdk/tree/f6909a10b29ea50bb31c05792eef5f6e63defb94
Move terminate() after task group exit for deterministic cancellationhttps://github.com/modelcontextprotocol/python-sdk/pull/2145/commits/2e0e00b1f926f7e21ece29dfa15be3760db46255
wiggzzhttps://github.com/modelcontextprotocol/python-sdk/commits?author=wiggzz
claudehttps://github.com/modelcontextprotocol/python-sdk/commits?author=claude
2e0e00bhttps://github.com/modelcontextprotocol/python-sdk/pull/2145/commits/2e0e00b1f926f7e21ece29dfa15be3760db46255
https://github.com/modelcontextprotocol/python-sdk/tree/2e0e00b1f926f7e21ece29dfa15be3760db46255
Use lax no cover for timing-dependent exception paths; fix ruff formathttps://github.com/modelcontextprotocol/python-sdk/pull/2145/commits/1af03f876b090d189512b40a13be53be34d51d34
wiggzzhttps://github.com/modelcontextprotocol/python-sdk/commits?author=wiggzz
claudehttps://github.com/modelcontextprotocol/python-sdk/commits?author=claude
1af03f8https://github.com/modelcontextprotocol/python-sdk/pull/2145/commits/1af03f876b090d189512b40a13be53be34d51d34
https://github.com/modelcontextprotocol/python-sdk/tree/1af03f876b090d189512b40a13be53be34d51d34
Fix ruff format and Python 3.11 coverage false negatives in testhttps://github.com/modelcontextprotocol/python-sdk/pull/2145/commits/bf8cf4326642207609b01d2c1f7fe0601cc15f79
wiggzzhttps://github.com/modelcontextprotocol/python-sdk/commits?author=wiggzz
claudehttps://github.com/modelcontextprotocol/python-sdk/commits?author=claude
bf8cf43https://github.com/modelcontextprotocol/python-sdk/pull/2145/commits/bf8cf4326642207609b01d2c1f7fe0601cc15f79
https://github.com/modelcontextprotocol/python-sdk/tree/bf8cf4326642207609b01d2c1f7fe0601cc15f79
Remove unused Tool import flagged by ruffhttps://github.com/modelcontextprotocol/python-sdk/pull/2145/commits/24da35a945c84b52d7151a0d17c31d0e76c72e42
wiggzzhttps://github.com/modelcontextprotocol/python-sdk/commits?author=wiggzz
claudehttps://github.com/modelcontextprotocol/python-sdk/commits?author=claude
24da35ahttps://github.com/modelcontextprotocol/python-sdk/pull/2145/commits/24da35a945c84b52d7151a0d17c31d0e76c72e42
https://github.com/modelcontextprotocol/python-sdk/tree/24da35a945c84b52d7151a0d17c31d0e76c72e42
Fix pyright errors for private task group access in testhttps://github.com/modelcontextprotocol/python-sdk/pull/2145/commits/35f08c78570d46a54e49480ca5cc3c00b5689778
wiggzzhttps://github.com/modelcontextprotocol/python-sdk/commits?author=wiggzz
claudehttps://github.com/modelcontextprotocol/python-sdk/commits?author=claude
35f08c7https://github.com/modelcontextprotocol/python-sdk/pull/2145/commits/35f08c78570d46a54e49480ca5cc3c00b5689778
https://github.com/modelcontextprotocol/python-sdk/tree/35f08c78570d46a54e49480ca5cc3c00b5689778
Add assertion for session_manager not None (pyright)https://github.com/modelcontextprotocol/python-sdk/pull/2145/commits/a7907d069343b98f9edbb51cc8f5fd21fd95a751
wiggzzhttps://github.com/modelcontextprotocol/python-sdk/commits?author=wiggzz
claudehttps://github.com/modelcontextprotocol/python-sdk/commits?author=claude
a7907d0https://github.com/modelcontextprotocol/python-sdk/pull/2145/commits/a7907d069343b98f9edbb51cc8f5fd21fd95a751
https://github.com/modelcontextprotocol/python-sdk/tree/a7907d069343b98f9edbb51cc8f5fd21fd95a751
Run handle_request in caller context, not as child taskhttps://github.com/modelcontextprotocol/python-sdk/pull/2145/commits/02547cbc146aef4989925a3cb8a6b26bd22e87ce
wiggzzhttps://github.com/modelcontextprotocol/python-sdk/commits?author=wiggzz
claudehttps://github.com/modelcontextprotocol/python-sdk/commits?author=claude
02547cbhttps://github.com/modelcontextprotocol/python-sdk/pull/2145/commits/02547cbc146aef4989925a3cb8a6b26bd22e87ce
https://github.com/modelcontextprotocol/python-sdk/tree/02547cbc146aef4989925a3cb8a6b26bd22e87ce
Add graceful SSE drain on session manager shutdownhttps://github.com/modelcontextprotocol/python-sdk/pull/2145/commits/3179143b9ef2bb243dcaf93b2e31e797f7c793e4
https://github.com/wiggzz
wiggzzhttps://github.com/modelcontextprotocol/python-sdk/commits?author=wiggzz
3179143https://github.com/modelcontextprotocol/python-sdk/pull/2145/commits/3179143b9ef2bb243dcaf93b2e31e797f7c793e4
https://github.com/modelcontextprotocol/python-sdk/tree/3179143b9ef2bb243dcaf93b2e31e797f7c793e4
Fix CI: pyright type errors in test and strict-no-cover false positivehttps://github.com/modelcontextprotocol/python-sdk/pull/2145/commits/0d513a699e297b4ab11118aa163293a96af5c558
https://github.com/wiggzz
wiggzzhttps://github.com/modelcontextprotocol/python-sdk/commits?author=wiggzz
0d513a6https://github.com/modelcontextprotocol/python-sdk/pull/2145/commits/0d513a699e297b4ab11118aa163293a96af5c558
https://github.com/modelcontextprotocol/python-sdk/tree/0d513a699e297b4ab11118aa163293a96af5c558
Merge branch 'main' into fix/stateless-task-group-leakhttps://github.com/modelcontextprotocol/python-sdk/pull/2145/commits/bb1a2184674ef7cfcfdd661bf24878af12c53d66
https://github.com/wiggzz
wiggzzhttps://github.com/modelcontextprotocol/python-sdk/commits?author=wiggzz
bb1a218https://github.com/modelcontextprotocol/python-sdk/pull/2145/commits/bb1a2184674ef7cfcfdd661bf24878af12c53d66
https://github.com/modelcontextprotocol/python-sdk/tree/bb1a2184674ef7cfcfdd661bf24878af12c53d66
Merge branch 'main' into fix/stateless-task-group-leakhttps://github.com/modelcontextprotocol/python-sdk/pull/2145/commits/6237bc3fcee581c456f1281a88173c591c10ae81
https://github.com/wiggzz
wiggzzhttps://github.com/modelcontextprotocol/python-sdk/commits?author=wiggzz
6237bc3https://github.com/modelcontextprotocol/python-sdk/pull/2145/commits/6237bc3fcee581c456f1281a88173c591c10ae81
https://github.com/modelcontextprotocol/python-sdk/tree/6237bc3fcee581c456f1281a88173c591c10ae81
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.