Skip to content

Expose the augmented callback request type - #818

Open
adamtheturtle wants to merge 2 commits into
getsentry:masterfrom
adamtheturtle:type-callback-request
Open

adamtheturtle wants to merge 2 commits into
getsentry:masterfrom
adamtheturtle:type-callback-request

Conversation

@adamtheturtle

@adamtheturtle adamtheturtle commented Sep 8, 2026

Copy link
Copy Markdown

Responses adds params and req_kwargs to callback requests, but types callbacks as PreparedRequest, forcing consumers to use getattr or suppressions.

This exposes CallbackRequest (plus its parameter types) and uses it for callback annotations. It remains a PreparedRequest alias at runtime because Responses augments existing requests rather than creating a subclass.

Verified with pre-commit, mypy, and all 233 tests on Python 3.8–3.14.

Comment thread responses/__init__.py Outdated
Co-authored-by: Mark Story <mark@mark-story.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants