Repository navigation
Conversation
…quest An API method or an exception handler may still return an object of the response types of the adapter's framework, such as a Django response, which reaches the adapter untouched. The adapter gives those types to handle_request with each request instead of registering them in a process-global, so register_native_response_type and the Django adapter's process initialisation are gone. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Stacked on #349.
What
handle_requesttakesnative_response_types: an API method or an exception handler may return an object of these types, which reaches the adapter untouched instead of being encoded as JSON. The Django adapter passes(HttpResponseBase,), so endpoints returning a Django response keep working.register_native_response_typeis gone, and with it the Django adapter's_initialize_process, whose last entry it was.winter.webkeeps no behavioural registry of its own any more.winter.web.Responseno longer mentions output processing, a leftover of feat(web)!: remove output processors, encode Page as JSON by its type #347.docs/architecture.md: the deviations name only the OpenAPI inspectors and global exceptions as process-global, to be given togenerate_openapi.Why
Native response types belong to an adapter, not to the process or to an application: an application may be served by more than one adapter.
handle_requesthas one caller, the Django adapter, so the parameter is visible only to adapters. Oncewinter.web.Responsecovers files, streaming and severalSet-Cookieheaders, whichwinter.wsgiwill need, Django responses in endpoints and this parameter can go.winter.openapistill knowsHttpResponseBaseas a return type without a schema, until its inspectors become parameters ofgenerate_openapi.🤖 Generated with Claude Code