Skip to content

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

Closed
sumitsharma01 wants to merge 1 commit into
sumup:mainfrom
sumitsharma01:feat/client-cleanup
Closed

sumitsharma01 wants to merge 1 commit into
sumup:mainfrom
sumitsharma01:feat/client-cleanup

Conversation

@sumitsharma01

Copy link
Copy Markdown
Contributor

The SDK creates an HTTPX client but has no public way to close it. This adds close() and aclose(), along with with and async with support, so applications can release connections after a job or during shutdown.

The generator template and README examples are updated too. Tests cover explicit and repeated closure, requests inside both context managers, and cleanup without suppressing exceptions.

Tested locally with Python 3.13.6 and the locked dependencies: all 115 Python tests, Ruff lint and formatting checks, ty, and the Go generator tests pass. The remaining Python versions will be covered by CI.

@matoous

matoous commented Oct 20, 2026

Copy link
Copy Markdown
Contributor

Thanks for the PR! Changes merged in #429 with a few small adjustments. I will prepare a release later today/tomorrow.

@matoous matoous closed this Oct 20, 2026
@matoous

matoous commented Oct 20, 2026

Copy link
Copy Markdown
Contributor

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