René's URL Explorer Experiment


Title: Cleanup: WebhookSender.__aenter__ eagerly constructs unused httpx.AsyncClient on owned-client path · Issue #300 · adcontextprotocol/adcp-client-python · GitHub

Open Graph Title: Cleanup: WebhookSender.__aenter__ eagerly constructs unused httpx.AsyncClient on owned-client path · Issue #300 · adcontextprotocol/adcp-client-python

X Title: Cleanup: WebhookSender.__aenter__ eagerly constructs unused httpx.AsyncClient on owned-client path · Issue #300 · adcontextprotocol/adcp-client-python

Description: Summary WebhookSender.__aenter__ calls _get_client() which constructs self._client = httpx.AsyncClient(timeout=...) even when self._owns_client=True. The owned-client path in _send_bytes ignores self._client entirely — it builds a fresh ...

Open Graph Description: Summary WebhookSender.__aenter__ calls _get_client() which constructs self._client = httpx.AsyncClient(timeout=...) even when self._owns_client=True. The owned-client path in _send_bytes ignores se...

X Description: Summary WebhookSender.__aenter__ calls _get_client() which constructs self._client = httpx.AsyncClient(timeout=...) even when self._owns_client=True. The owned-client path in _send_bytes ignores se...

Opengraph URL: https://github.com/adcontextprotocol/adcp-client-python/issues/300

X: @github

direct link

Domain: github.com


Hey, it has json ld scripts:
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"Cleanup: WebhookSender.__aenter__ eagerly constructs unused httpx.AsyncClient on owned-client path","articleBody":"## Summary\n\n`WebhookSender.__aenter__` calls `_get_client()` which constructs `self._client = httpx.AsyncClient(timeout=...)` even when `self._owns_client=True`. The owned-client path in `_send_bytes` ignores `self._client` entirely — it builds a fresh transport-pinned client per request. The eagerly-constructed `self._client` then sits idle until `__aexit__ → aclose()` closes it.\n\n## Cost\n\nPer `async with sender:` block: one unused `httpx.AsyncClient` allocation (a few hundred bytes + an `httpcore.AsyncConnectionPool` instance). No socket opened (httpx is lazy on first request), so no resource leak.\n\n**Not a correctness bug** — flagged as cosmetic by python-expert in PR #297 review.\n\n## Proposed fix\n\nSkip `await self._get_client()` in `__aenter__` when `self._owns_client=True`:\n\n```python\nasync def __aenter__(self) -> WebhookSender:\n    if not self._owns_client:\n        await self._get_client()  # operator-supplied path still expects this\n    return self\n```\n\n`aclose()` already guards on `self._client is not None` so the no-op case works.\n\n## References\n\n- Surfaced by python-expert review on PR #297 (deferred)\n- Code: `src/adcp/webhook_sender.py:262-285` (`__aenter__` + `_get_client`)","author":{"url":"https://github.com/bokelley","@type":"Person","name":"bokelley"},"datePublished":"2026-04-29T17:24:12Z","url":"https://github.com/adcontextprotocol/adcp-client-python/issues/300"}

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:d7d2e2c7-6e65-3446-8c92-3aaf6d30523c
current-catalog-service-hash81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114
request-idE27E:6DC60:DE4E0:116D92:6B00F721
html-safe-nonce263c262d0471126cf1bbe8682d385623aea16aa9d6ad8ad1abce854fe220111a
visitor-payloadeyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJFMjdFOjZEQzYwOkRFNEUwOjExNkQ5Mjo2QjAwRjcyMSIsInZpc2l0b3JfaWQiOiI2Njc0ODUzMzQ0MTY4NzAzNzc3IiwicmVnaW9uX2VkZ2UiOiJpYWQiLCJyZWdpb25fcmVuZGVyIjoiaWFkIn0=
visitor-hmacf781d13de772f6a9e2fb59412092c49e8c19b9484b4b174a41b6eb3656085a96
hovercard-subject-tagissue:4352420810
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/adcontextprotocol/adcp-client-python/300/issue_layout
twitter:imagehttps://opengraph.githubassets.com/cde6537c9a5d7b5ccf2a68e4a0296673e761b302de1f8eda72f4c56bfb8915cc/adcontextprotocol/adcp-client-python/issues/300
twitter:cardsummary_large_image
og:imagehttps://opengraph.githubassets.com/cde6537c9a5d7b5ccf2a68e4a0296673e761b302de1f8eda72f4c56bfb8915cc/adcontextprotocol/adcp-client-python/issues/300
og:image:altSummary WebhookSender.__aenter__ calls _get_client() which constructs self._client = httpx.AsyncClient(timeout=...) even when self._owns_client=True. The owned-client path in _send_bytes ignores se...
og:image:width1200
og:image:height600
og:site_nameGitHub
og:typeobject
og:author:usernamebokelley
hostnamegithub.com
expected-hostnamegithub.com
None4ef498cbabcbe3c50befc7a5b743e7072ee770b4daf0e15e54801180d1fa91fc
turbo-cache-controlno-preview
go-importgithub.com/adcontextprotocol/adcp-client-python git https://github.com/adcontextprotocol/adcp-client-python.git
octolytics-dimension-user_id221690821
octolytics-dimension-user_loginadcontextprotocol
octolytics-dimension-repository_id1090305973
octolytics-dimension-repository_nwoadcontextprotocol/adcp-client-python
octolytics-dimension-repository_publictrue
octolytics-dimension-repository_is_forkfalse
octolytics-dimension-repository_network_root_id1090305973
octolytics-dimension-repository_network_root_nwoadcontextprotocol/adcp-client-python
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
release9983dd5da06943f833c971dd5b6bc988e2858be5
ui-targetfull
theme-color#1e2327
color-schemelight dark
react-app-nameissues

Links:

Skip to contenthttps://github.com/adcontextprotocol/adcp-client-python/issues/300#start-of-content
https://github.com/
Sign inhttps://github.com/login?return_to=https%3A%2F%2Fgithub.com%2Fadcontextprotocol%2Fadcp-client-python%2Fissues%2F300
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%2Fadcontextprotocol%2Fadcp-client-python%2Fissues%2F300
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=adcontextprotocol%2Fadcp-client-python
Reloadhttps://github.com/adcontextprotocol/adcp-client-python/issues/300
Reloadhttps://github.com/adcontextprotocol/adcp-client-python/issues/300
Reloadhttps://github.com/adcontextprotocol/adcp-client-python/issues/300
adcontextprotocolhttps://github.com/adcontextprotocol
adcp-client-pythonhttps://github.com/adcontextprotocol/adcp-client-python
Codehttps://github.com/adcontextprotocol/adcp-client-python
Issues44 (44)https://github.com/adcontextprotocol/adcp-client-python/issues
Pull requests13 (13)https://github.com/adcontextprotocol/adcp-client-python/pulls
Actionshttps://github.com/adcontextprotocol/adcp-client-python/actions
Projectshttps://github.com/adcontextprotocol/adcp-client-python/projects
Security and qualityhttps://github.com/adcontextprotocol/adcp-client-python/security
Insightshttps://github.com/adcontextprotocol/adcp-client-python/insights
https://github.com/adcontextprotocol/adcp-client-python
New issuehttps://github.com/login?return_to=https://github.com/adcontextprotocol/adcp-client-python/issues/300
New issuehttps://github.com/login?return_to=https://github.com/adcontextprotocol/adcp-client-python/issues/300
Cleanup: WebhookSender.__aenter__ eagerly constructs unused httpx.AsyncClient on owned-client pathhttps://github.com/adcontextprotocol/adcp-client-python/issues/300#top
#257https://github.com/adcontextprotocol/adcp-client-python/pull/257
bugSomething isn't workinghttps://github.com/adcontextprotocol/adcp-client-python/issues?q=state%3Aopen%20label%3A%22bug%22
claude-triagedhttps://github.com/adcontextprotocol/adcp-client-python/issues?q=state%3Aopen%20label%3A%22claude-triaged%22
https://github.com/bokelley
bokelleyhttps://github.com/bokelley
on Apr 29, 2026https://github.com/adcontextprotocol/adcp-client-python/issues/300#issue-4352420810
#297https://github.com/adcontextprotocol/adcp-client-python/pull/297
feat(signing): close 4 SSRF gaps and add opt-in port hardening (foundation audit) #297https://github.com/adcontextprotocol/adcp-client-python/pull/297
bokelleyhttps://github.com/bokelley
claude-triagingTriage routine is actively working on this issue (1-3 min)https://github.com/adcontextprotocol/adcp-client-python/issues?q=state%3Aopen%20label%3A%22claude-triaging%22
on Apr 29, 2026https://github.com/adcontextprotocol/adcp-client-python/issues/300#event-25001456063
https://github.com/bokelley
bokelleyhttps://github.com/bokelley
on Apr 29, 2026https://github.com/adcontextprotocol/adcp-client-python/issues/300#issuecomment-4346015130
#297https://github.com/adcontextprotocol/adcp-client-python/pull/297
#297https://github.com/adcontextprotocol/adcp-client-python/pull/297
#297https://github.com/adcontextprotocol/adcp-client-python/pull/297
https://claude.ai/code/${CLAUDE_CODE_REMOTE_SESSION_ID}https://claude.ai/code/$%7BCLAUDE_CODE_REMOTE_SESSION_ID%7D
Claude Codehttps://claude.ai/code
bokelleyhttps://github.com/bokelley
claude-triagedhttps://github.com/adcontextprotocol/adcp-client-python/issues?q=state%3Aopen%20label%3A%22claude-triaged%22
bugSomething isn't workinghttps://github.com/adcontextprotocol/adcp-client-python/issues?q=state%3Aopen%20label%3A%22bug%22
claude-triagingTriage routine is actively working on this issue (1-3 min)https://github.com/adcontextprotocol/adcp-client-python/issues?q=state%3Aopen%20label%3A%22claude-triaging%22
on Apr 29, 2026https://github.com/adcontextprotocol/adcp-client-python/issues/300#event-25001506254
https://github.com/bokelley
bokelleyhttps://github.com/bokelley
on Apr 29, 2026https://github.com/adcontextprotocol/adcp-client-python/issues/300#issuecomment-4346061984
#301https://github.com/adcontextprotocol/adcp-client-python/pull/301
https://claude.ai/code/${CLAUDE_CODE_REMOTE_SESSION_ID}https://claude.ai/code/$%7BCLAUDE_CODE_REMOTE_SESSION_ID%7D
Claude Codehttps://claude.ai/code
bokelleyhttps://github.com/bokelley
completedhttps://github.com/adcontextprotocol/adcp-client-python/issues?q=is%3Aissue%20state%3Aclosed%20archived%3Afalse%20reason%3Acompleted
#301https://github.com/adcontextprotocol/adcp-client-python/pull/301
on Apr 29, 2026https://github.com/adcontextprotocol/adcp-client-python/issues/300#event-25012500945
bokelleyhttps://github.com/bokelley
on Apr 29, 2026https://github.com/adcontextprotocol/adcp-client-python/issues/300#event-25013019922
feat(signing): drain three foundation-audit deferreds (#298, #299, #300)https://github.com/adcontextprotocol/adcp-client-python/commit/072998a8fd7b33097b7e6ab0496c2ecadf33a691
#298https://github.com/adcontextprotocol/adcp-client-python/issues/298
#299https://github.com/adcontextprotocol/adcp-client-python/issues/299
#300https://github.com/adcontextprotocol/adcp-client-python/issues/300
072998ahttps://github.com/adcontextprotocol/adcp-client-python/commit/072998a8fd7b33097b7e6ab0496c2ecadf33a691
KonstantinMirinhttps://github.com/KonstantinMirin
on May 13, 2026https://github.com/adcontextprotocol/adcp-client-python/issues/300#event-25486658597
fix(adcp): skip eager httpx.AsyncClient alloc in WebhookSender.__aent…https://github.com/KonstantinMirin/adcp-client-python/commit/4bd45d1c059ceeddfd184793a3f477f915c98446
https://docs.github.com/articles/closing-issues-via-commit-messages
4bd45d1https://github.com/KonstantinMirin/adcp-client-python/commit/4bd45d1c059ceeddfd184793a3f477f915c98446
Sign up for freehttps://github.com/signup?return_to=https://github.com/adcontextprotocol/adcp-client-python/issues/300
Sign in to commenthttps://github.com/login?return_to=https://github.com/adcontextprotocol/adcp-client-python/issues/300
bugSomething isn't workinghttps://github.com/adcontextprotocol/adcp-client-python/issues?q=state%3Aopen%20label%3A%22bug%22
claude-triagedhttps://github.com/adcontextprotocol/adcp-client-python/issues?q=state%3Aopen%20label%3A%22claude-triaged%22
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.