mirror of https://github.com/tiangolo/fastapi.git
✏️ Fix typos in comments on internal code in `fastapi/concurrency.py` and `fastapi/routing.py` (#9590)
Co-authored-by: Marcelo Trylesinski <marcelotryle@gmail.com>
This commit is contained in:
parent
bb7bbafb5f
commit
5e59acd35b
|
|
@ -19,7 +19,7 @@ async def contextmanager_in_threadpool(
|
|||
) -> AsyncGenerator[_T, None]:
|
||||
# blocking __exit__ from running waiting on a free thread
|
||||
# can create race conditions/deadlocks if the context manager itself
|
||||
# has it's own internal pool (e.g. a database connection pool)
|
||||
# has its own internal pool (e.g. a database connection pool)
|
||||
# to avoid this we let __exit__ run without a capacity limit
|
||||
# since we're creating a new limiter for each call, any non-zero limit
|
||||
# works (1 is arbitrary)
|
||||
|
|
|
|||
|
|
@ -83,7 +83,7 @@ def _prepare_response_content(
|
|||
if read_with_orm_mode:
|
||||
# Let from_orm extract the data from this model instead of converting
|
||||
# it now to a dict.
|
||||
# Otherwise there's no way to extract lazy data that requires attribute
|
||||
# Otherwise, there's no way to extract lazy data that requires attribute
|
||||
# access instead of dict iteration, e.g. lazy relationships.
|
||||
return res
|
||||
return _model_dump(
|
||||
|
|
@ -456,7 +456,7 @@ class APIRoute(routing.Route):
|
|||
# that doesn't have the hashed_password. But because it's a subclass, it
|
||||
# would pass the validation and be returned as is.
|
||||
# By being a new field, no inheritance will be passed as is. A new model
|
||||
# will be always created.
|
||||
# will always be created.
|
||||
# TODO: remove when deprecating Pydantic v1
|
||||
self.secure_cloned_response_field: Optional[
|
||||
ModelField
|
||||
|
|
|
|||
Loading…
Reference in New Issue