Skip to content

feat: add client cleanup and context manager support - #429

Merged
matoous merged 3 commits into
mainfrom
md/client-cleanup
Oct 20, 2026
Merged

matoous merged 3 commits into
mainfrom
md/client-cleanup

Conversation

@matoous

@matoous matoous commented Oct 20, 2026 •

Copy link
Copy Markdown
Contributor

The SDK owns an HTTPX client but provides no public cleanup API. Add close() and aclose(), plus synchronous and asynchronous context managers, so scripts and applications can release connections reliably.

Update the generator template, lifecycle documentation, and Flask/FastAPI examples. Tests cover transport cleanup, repeated closure, exception propagation, and rejection of requests after closure.

Supersedes #428 by @sumitsharma01. The original commit is preserved 265ce4b, followed by the example, documentation, and test improvements in 369282c.

Supersedes: #428

@matoous matoous self-assigned this Oct 20, 2026
@matoous
matoous marked this pull request as ready for review October 20, 2026 16:31
@matoous
matoous merged commit fa016c1 into main Oct 20, 2026
17 checks passed
@matoous
matoous deleted the md/client-cleanup branch October 20, 2026 16:31
@sumup-release-bot sumup-release-bot Bot mentioned this pull request Oct 19, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants