Upgrading fastapi 0.62 to 0.63
Breaking0.62.0 → 0.63.0Breaking1New8Fixed1Other9
BreakingUpgrade verdict
1 breaking change.
In plain terms
- Upgrade Uvicorn when installing fastapi[all] to the latest version including uvloop, the new range is uvicorn[standard] >=0.12.0,<0.14.0.
Must act 1 item needs code or config changes
What you must change
Breaking1
Upgrade Uvicorn when installing fastapi[all] to the latest version including uvloop, the new range is uvicorn[standard] >=0.12.0,<0.14.0.
fastapi[all]uvloopAPI changes
Generated by DepDelta from published Python source. Not mixed with prose notes.
- changed:
method FastAPI.add_api_route(path: str, endpoint: Callable, *, response_model: Optional[Type[Any]]=…, status_code: int=…, tags: Optional[List[str]]=…, dependencies: Optional[Sequence[Depends]]=…, summary: Optional[str]=…, description: Optional[str]=…, response_description: str=…, responses: Optional[Dict[Union[int, str], Dict[str, Any]]]=…, deprecated: Optional[bool]=…, methods: Optional[List[str… → method FastAPI.add_api_route(path: str, endpoint: Callable[..., Coroutine[Any, Any, Response]], *, response_model: Optional[Type[Any]]=…, status_code: int=…, tags: Optional[List[str]]=…, dependencies: Optional[Sequence[Depends]]=…, summary: Optional[str]=…, description: Optional[str]=…, response_description: str=…, responses: Optional[Dict[Union[int, str], Dict[str, Any]]]=…, deprecated: Optional… - changed:
method FastAPI.add_api_websocket_route(path: str, endpoint: Callable, name: Optional[str]=…) -> None → method FastAPI.add_api_websocket_route(path: str, endpoint: Callable[..., Any], name: Optional[str]=…) -> None - changed:
method FastAPI.include_router(router: routing.APIRouter, *, prefix: str=…, tags: Optional[List[str]]=…, dependencies: Optional[Sequence[Depends]]=…, responses: Optional[Dict[Union[int, str], Dict[str, Any]]]=…, deprecated: bool=…, include_in_schema: bool=…, default_response_class: Type[Response]=…, callbacks: Optional[List[routing.APIRoute]]=…) -> None → method FastAPI.include_router(router: routing.APIRouter, *, prefix: str=…, tags: Optional[List[str]]=…, dependencies: Optional[Sequence[Depends]]=…, responses: Optional[Dict[Union[int, str], Dict[str, Any]]]=…, deprecated: Optional[bool]=…, include_in_schema: bool=…, default_response_class: Type[Response]=…, callbacks: Optional[List[BaseRoute]]=…) -> None - changed:
method FastAPI.openapi() -> Dict → method FastAPI.openapi() -> Dict[str, Any] - changed:
method FastAPI.websocket(path: str, name: Optional[str]=…) -> Callable → method FastAPI.websocket(path: str, name: Optional[str]=…) -> Callable[[DecoratedCallable], DecoratedCallable]
- changed:
constructor Dependant(*, path_params: Optional[List[ModelField]]=…, query_params: Optional[List[ModelField]]=…, header_params: Optional[List[ModelField]]=…, cookie_params: Optional[List[ModelField]]=…, body_params: Optional[List[ModelField]]=…, dependencies: Optional[List[Dependant]]=…, security_schemes: Optional[List[SecurityRequirement]]=…, name: Optional[str]=…, call: Optional[Callable]=…, req… → constructor Dependant(*, path_params: Optional[List[ModelField]]=…, query_params: Optional[List[ModelField]]=…, header_params: Optional[List[ModelField]]=…, cookie_params: Optional[List[ModelField]]=…, body_params: Optional[List[ModelField]]=…, dependencies: Optional[List[Dependant]]=…, security_schemes: Optional[List[SecurityRequirement]]=…, name: Optional[str]=…, call: Optional[Callable[..., An…
- changed:
async function solve_dependencies(*, request: Union[Request, WebSocket], dependant: Dependant, body: Optional[Union[Dict[str, Any], FormData]]=…, background_tasks: Optional[BackgroundTasks]=…, response: Optional[Response]=…, dependency_overrides_provider: Optional[Any]=…, dependency_cache: Optional[Dict[Tuple[Callable, Tuple[str]], Any]]=…) -> Tuple[Dict[str, Any], List[ErrorWrapper], Optional[Ba… → async function solve_dependencies(*, request: Union[Request, WebSocket], dependant: Dependant, body: Optional[Union[Dict[str, Any], FormData]]=…, background_tasks: Optional[BackgroundTasks]=…, response: Optional[Response]=…, dependency_overrides_provider: Optional[Any]=…, dependency_cache: Optional[Dict[Tuple[Callable[..., Any], Tuple[str]], Any]]=…) -> Tuple[Dict[str, Any], List[ErrorWrapper], O… - changed:
async function solve_generator(*, call: Callable, stack: AsyncExitStack, sub_values: Dict[str, Any]) -> Any → async function solve_generator(*, call: Callable[..., Any], stack: AsyncExitStack, sub_values: Dict[str, Any]) -> Any - changed:
function get_dependant(*, path: str, call: Callable, name: Optional[str]=…, security_scopes: Optional[List[str]]=…, use_cache: bool=…) -> Dependant → function get_dependant(*, path: str, call: Callable[..., Any], name: Optional[str]=…, security_scopes: Optional[List[str]]=…, use_cache: bool=…) -> Dependant - changed:
function get_sub_dependant(*, depends: params.Depends, dependency: Callable, path: str, name: Optional[str]=…, security_scopes: Optional[List[str]]=…) -> Dependant → function get_sub_dependant(*, depends: params.Depends, dependency: Callable[..., Any], path: str, name: Optional[str]=…, security_scopes: Optional[List[str]]=…) -> Dependant - changed:
function get_typed_signature(call: Callable) -> inspect.Signature → function get_typed_signature(call: Callable[..., Any]) -> inspect.Signature - changed:
function is_async_gen_callable(call: Callable) -> bool → function is_async_gen_callable(call: Callable[..., Any]) -> bool - changed:
function is_coroutine_callable(call: Callable) -> bool → function is_coroutine_callable(call: Callable[..., Any]) -> bool - changed:
function is_gen_callable(call: Callable) -> bool → function is_gen_callable(call: Callable[..., Any]) -> bool
- changed:
function generate_encoders_by_class_tuples(type_encoder_map: Dict[Any, Callable]) -> Dict[Callable, Tuple] → function generate_encoders_by_class_tuples(type_encoder_map: Dict[Any, Callable[[Any], Any]]) -> Dict[Callable[[Any], Any], Tuple[Any, ...]] - changed:
function jsonable_encoder(obj: Any, include: Optional[Union[SetIntStr, DictIntStrAny]]=…, exclude: Optional[Union[SetIntStr, DictIntStrAny]]=…, by_alias: bool=…, exclude_unset: bool=…, exclude_defaults: bool=…, exclude_none: bool=…, custom_encoder: dict=…, sqlalchemy_safe: bool=…) -> Any → function jsonable_encoder(obj: Any, include: Optional[Union[SetIntStr, DictIntStrAny]]=…, exclude: Optional[Union[SetIntStr, DictIntStrAny]]=…, by_alias: bool=…, exclude_unset: bool=…, exclude_defaults: bool=…, exclude_none: bool=…, custom_encoder: Dict[Any, Callable[[Any], Any]]=…, sqlalchemy_safe: bool=…) -> Any
- changed:
function get_openapi(*, title: str, version: str, openapi_version: str=…, description: Optional[str]=…, routes: Sequence[BaseRoute], tags: Optional[List[Dict[str, Any]]]=…, servers: Optional[List[Dict[str, Union[str, Any]]]]=…) -> Dict → function get_openapi(*, title: str, version: str, openapi_version: str=…, description: Optional[str]=…, routes: Sequence[BaseRoute], tags: Optional[List[Dict[str, Any]]]=…, servers: Optional[List[Dict[str, Union[str, Any]]]]=…) -> Dict[str, Any] - changed:
function get_openapi_operation_metadata(*, route: routing.APIRoute, method: str) -> Dict → function get_openapi_operation_metadata(*, route: routing.APIRoute, method: str) -> Dict[str, Any] - changed:
function get_openapi_operation_request_body(*, body_field: Optional[ModelField], model_name_map: Dict[Union[Type[BaseModel], Type[Enum]], str]) -> Optional[Dict] → function get_openapi_operation_request_body(*, body_field: Optional[ModelField], model_name_map: Dict[Union[Type[BaseModel], Type[Enum]], str]) -> Optional[Dict[str, Any]] - changed:
function get_openapi_path(*, route: routing.APIRoute, model_name_map: Dict[Type, str]) -> Tuple[Dict, Dict, Dict] → function get_openapi_path(*, route: routing.APIRoute, model_name_map: Dict[type, str]) -> Tuple[Dict[str, Any], Dict[str, Any], Dict[str, Any]] - changed:
function get_openapi_security_definitions(flat_dependant: Dependant) -> Tuple[Dict, List] → function get_openapi_security_definitions(flat_dependant: Dependant) -> Tuple[Dict[str, Any], List[Dict[str, Any]]]
- changed:
function Depends(dependency: Optional[Callable]=…, *, use_cache: bool=…) -> Any → function Depends(dependency: Optional[Callable[..., Any]]=…, *, use_cache: bool=…) -> Any - changed:
function Security(dependency: Optional[Callable]=…, *, scopes: Optional[Sequence[str]]=…, use_cache: bool=…) -> Any → function Security(dependency: Optional[Callable[..., Any]]=…, *, scopes: Optional[Sequence[str]]=…, use_cache: bool=…) -> Any
- changed:
constructor Depends(dependency: Optional[Callable]=…, *, use_cache: bool=…) → constructor Depends(dependency: Optional[Callable[..., Any]]=…, *, use_cache: bool=…) - changed:
constructor Security(dependency: Optional[Callable]=…, *, scopes: Optional[Sequence[str]]=…, use_cache: bool=…) → constructor Security(dependency: Optional[Callable[..., Any]]=…, *, scopes: Optional[Sequence[str]]=…, use_cache: bool=…)
- changed:
constructor APIRoute(path: str, endpoint: Callable, *, response_model: Optional[Type[Any]]=…, status_code: int=…, tags: Optional[List[str]]=…, dependencies: Optional[Sequence[params.Depends]]=…, summary: Optional[str]=…, description: Optional[str]=…, response_description: str=…, responses: Optional[Dict[Union[int, str], Dict[str, Any]]]=…, deprecated: Optional[bool]=…, name: Optional[str]=…, meth… → constructor APIRoute(path: str, endpoint: Callable[..., Any], *, response_model: Optional[Type[Any]]=…, status_code: int=…, tags: Optional[List[str]]=…, dependencies: Optional[Sequence[params.Depends]]=…, summary: Optional[str]=…, description: Optional[str]=…, response_description: str=…, responses: Optional[Dict[Union[int, str], Dict[str, Any]]]=…, deprecated: Optional[bool]=…, name: Optional[st… - changed:
constructor APIRouter(*, prefix: str=…, tags: Optional[List[str]]=…, dependencies: Optional[Sequence[params.Depends]]=…, default_response_class: Type[Response]=…, responses: Optional[Dict[Union[int, str], Dict[str, Any]]]=…, callbacks: Optional[List[APIRoute]]=…, routes: Optional[List[routing.BaseRoute]]=…, redirect_slashes: bool=…, default: Optional[ASGIApp]=…, dependency_overrides_provider: Opt… → constructor APIRouter(*, prefix: str=…, tags: Optional[List[str]]=…, dependencies: Optional[Sequence[params.Depends]]=…, default_response_class: Type[Response]=…, responses: Optional[Dict[Union[int, str], Dict[str, Any]]]=…, callbacks: Optional[List[BaseRoute]]=…, routes: Optional[List[routing.BaseRoute]]=…, redirect_slashes: bool=…, default: Optional[ASGIApp]=…, dependency_overrides_provider: Op… - changed:
constructor APIWebSocketRoute(path: str, endpoint: Callable, *, name: Optional[str]=…, dependency_overrides_provider: Optional[Any]=…) -> None → constructor APIWebSocketRoute(path: str, endpoint: Callable[..., Any], *, name: Optional[str]=…, dependency_overrides_provider: Optional[Any]=…) -> None - changed:
function get_websocket_app(dependant: Dependant, dependency_overrides_provider: Optional[Any]=…) -> Callable → function get_websocket_app(dependant: Dependant, dependency_overrides_provider: Optional[Any]=…) -> Callable[[WebSocket], Coroutine[Any, Any, Any]] - changed:
method APIRoute.get_route_handler() -> Callable → method APIRoute.get_route_handler() -> Callable[[Request], Coroutine[Any, Any, Response]] - changed:
method APIRouter.add_api_route(path: str, endpoint: Callable, *, response_model: Optional[Type[Any]]=…, status_code: int=…, tags: Optional[List[str]]=…, dependencies: Optional[Sequence[params.Depends]]=…, summary: Optional[str]=…, description: Optional[str]=…, response_description: str=…, responses: Optional[Dict[Union[int, str], Dict[str, Any]]]=…, deprecated: Optional[bool]=…, methods: Optional… → method APIRouter.add_api_route(path: str, endpoint: Callable[..., Any], *, response_model: Optional[Type[Any]]=…, status_code: int=…, tags: Optional[List[str]]=…, dependencies: Optional[Sequence[params.Depends]]=…, summary: Optional[str]=…, description: Optional[str]=…, response_description: str=…, responses: Optional[Dict[Union[int, str], Dict[str, Any]]]=…, deprecated: Optional[bool]=…, methods… - changed:
method APIRouter.add_api_websocket_route(path: str, endpoint: Callable, name: Optional[str]=…) -> None → method APIRouter.add_api_websocket_route(path: str, endpoint: Callable[..., Any], name: Optional[str]=…) -> None - changed:
method APIRouter.include_router(router: APIRouter, *, prefix: str=…, tags: Optional[List[str]]=…, dependencies: Optional[Sequence[params.Depends]]=…, default_response_class: Type[Response]=…, responses: Optional[Dict[Union[int, str], Dict[str, Any]]]=…, callbacks: Optional[List[APIRoute]]=…, deprecated: bool=…, include_in_schema: bool=…) -> None → method APIRouter.include_router(router: APIRouter, *, prefix: str=…, tags: Optional[List[str]]=…, dependencies: Optional[Sequence[params.Depends]]=…, default_response_class: Type[Response]=…, responses: Optional[Dict[Union[int, str], Dict[str, Any]]]=…, callbacks: Optional[List[BaseRoute]]=…, deprecated: Optional[bool]=…, include_in_schema: bool=…) -> None - changed:
method APIRouter.websocket(path: str, name: Optional[str]=…) -> Callable → method APIRouter.websocket(path: str, name: Optional[str]=…) -> Callable[[DecoratedCallable], DecoratedCallable]
- changed:
constructor OAuth2(*, flows: OAuthFlowsModel=…, scheme_name: Optional[str]=…, auto_error: Optional[bool]=…) → constructor OAuth2(*, flows: Union[OAuthFlowsModel, Dict[str, Dict[str, Any]]]=…, scheme_name: Optional[str]=…, auto_error: Optional[bool]=…) - changed:
constructor OAuth2AuthorizationCodeBearer(authorizationUrl: str, tokenUrl: str, refreshUrl: Optional[str]=…, scheme_name: Optional[str]=…, scopes: Optional[dict]=…, auto_error: bool=…) → constructor OAuth2AuthorizationCodeBearer(authorizationUrl: str, tokenUrl: str, refreshUrl: Optional[str]=…, scheme_name: Optional[str]=…, scopes: Optional[Dict[str, str]]=…, auto_error: bool=…) - changed:
constructor OAuth2PasswordBearer(tokenUrl: str, scheme_name: Optional[str]=…, scopes: Optional[dict]=…, auto_error: bool=…) → constructor OAuth2PasswordBearer(tokenUrl: str, scheme_name: Optional[str]=…, scopes: Optional[Dict[str, str]]=…, auto_error: bool=…)
- added:
variable DecoratedCallable
- changed:
function deep_dict_update(main_dict: dict, update_dict: dict) -> None → function deep_dict_update(main_dict: Dict[Any, Any], update_dict: Dict[Any, Any]) -> None