Jan Vollmer
3 months ago
No known key found for this signature in database
GPG Key ID: 19473D3A5AB433DA
2 changed files with
2 additions and
4 deletions
-
fastapi/routing.py
-
tests/test_route_deferred_init.py
|
|
|
@ -979,9 +979,7 @@ class APIRoute(routing.Route): |
|
|
|
|
|
|
|
@property |
|
|
|
def is_json_stream(self) -> bool: |
|
|
|
return self.is_generator and isinstance( |
|
|
|
self.response_class, DefaultPlaceholder |
|
|
|
) |
|
|
|
return self.is_generator and isinstance(self.response_class, DefaultPlaceholder) |
|
|
|
|
|
|
|
@cached_property |
|
|
|
def _flat_dependant(self) -> Dependant: |
|
|
|
@ -1013,7 +1011,6 @@ class APIRoute(routing.Route): |
|
|
|
_ = self.response_fields |
|
|
|
_ = self.stream_item_field |
|
|
|
|
|
|
|
|
|
|
|
def get_route_handler(self) -> Callable[[Request], Coroutine[Any, Any, Response]]: |
|
|
|
return get_request_handler( |
|
|
|
dependant=self.dependant, |
|
|
|
|
|
|
|
@ -11,6 +11,7 @@ deferred_keys = [ |
|
|
|
"response_fields", |
|
|
|
"body_field", |
|
|
|
"response_field", |
|
|
|
"stream_item_field", |
|
|
|
"dependant", |
|
|
|
"_flat_dependant", |
|
|
|
"_embed_body_fields", |
|
|
|
|