Upgrading fastapi 0.43 to 0.44
Review needed0.43.0 → 0.44.1New7Changed2Fixed6
Review neededUpgrade verdict
2 changed defaults.
In plain terms
- Nothing in this range needs changes to your code. It adds features and fixes.
Must act Nothing to change
No breaking, platform, security or deprecated items in this range.
Installs 3 packages in all (was 2).
Nothing in this upgrade needs a code or configuration change.
API changes
Generated by DepDelta from published Python source. Not mixed with prose notes.
- changed:
constructor Dependant(*, path_params: List[Field]=…, query_params: List[Field]=…, header_params: List[Field]=…, cookie_params: List[Field]=…, body_params: List[Field]=…, dependencies: List[Dependant]=…, security_schemes: List[SecurityRequirement]=…, name: str=…, call: Callable=…, request_param_name: str=…, websocket_param_name: str=…, response_param_name: str=…, background_tasks_param_name: str=…… → constructor Dependant(*, path_params: List[ModelField]=…, query_params: List[ModelField]=…, header_params: List[ModelField]=…, cookie_params: List[ModelField]=…, body_params: List[ModelField]=…, dependencies: List[Dependant]=…, security_schemes: List[SecurityRequirement]=…, name: str=…, call: Callable=…, request_param_name: str=…, websocket_param_name: str=…, response_param_name: str=…, backgroun…
- changed:
async function request_body_to_args(required_params: List[Field], received_body: Optional[Union[Dict[str, Any], FormData]]) -> Tuple[Dict[str, Any], List[ErrorWrapper]] → async function request_body_to_args(required_params: List[ModelField], received_body: Optional[Union[Dict[str, Any], FormData]]) -> Tuple[Dict[str, Any], List[ErrorWrapper]] - changed:
function add_param_to_fields(*, field: Field, dependant: Dependant) -> None → function add_param_to_fields(*, field: ModelField, dependant: Dependant) -> None - changed:
function get_body_field(*, dependant: Dependant, name: str) -> Optional[Field] → function get_body_field(*, dependant: Dependant, name: str) -> Optional[ModelField] - changed:
function get_param_field(*, param: inspect.Parameter, default_schema: Type[params.Param]=…, force_type: params.ParamTypes=…, ignore_default: bool=…) -> Field → function get_param_field(*, param: inspect.Parameter, param_name: str, default_field_info: Type[params.Param]=…, force_type: params.ParamTypes=…, ignore_default: bool=…) -> ModelField - changed:
function get_schema_compatible_field(*, field: Field) -> Field → function get_schema_compatible_field(*, field: ModelField) -> ModelField - changed:
function is_scalar_field(field: Field) -> bool → function is_scalar_field(field: ModelField) -> bool - changed:
function is_scalar_sequence_field(field: Field) -> bool → function is_scalar_sequence_field(field: ModelField) -> bool - changed:
function request_params_to_args(required_params: Sequence[Field], received_params: Union[Mapping[str, Any], QueryParams, Headers]) -> Tuple[Dict[str, Any], List[ErrorWrapper]] → function request_params_to_args(required_params: Sequence[ModelField], received_params: Union[Mapping[str, Any], QueryParams, Headers]) -> Tuple[Dict[str, Any], List[ErrorWrapper]] - added:
function get_annotation_from_field_info(annotation: Any, field_info: FieldInfo, field_name: str) -> Type[Any] - added:
variable SHAPE_LIST - added:
variable SHAPE_SEQUENCE - added:
variable SHAPE_SET - added:
variable SHAPE_SINGLETON - added:
variable SHAPE_TUPLE - added:
variable SHAPE_TUPLE_ELLIPSIS
- changed:
function jsonable_encoder(obj: Any, include: Union[SetIntStr, DictIntStrAny]=…, exclude: Union[SetIntStr, DictIntStrAny]=…, by_alias: bool=…, skip_defaults: bool=…, include_none: bool=…, custom_encoder: dict=…, sqlalchemy_safe: bool=…) -> Any → function jsonable_encoder(obj: Any, include: Union[SetIntStr, DictIntStrAny]=…, exclude: Union[SetIntStr, DictIntStrAny]=…, by_alias: bool=…, skip_defaults: bool=…, exclude_unset: bool=…, include_none: bool=…, custom_encoder: dict=…, sqlalchemy_safe: bool=…) -> Any
- added:
variable RequestErrorModel - added:
variable WebSocketErrorModel
- removed:
variable logger - changed:
field Contact.url: Optional[UrlStr] → field Contact.url: Optional[AnyUrl] - changed:
field Example.externalValue: Optional[UrlStr] → field Example.externalValue: Optional[AnyUrl] - changed:
field ExternalDocumentation.url: UrlStr → field ExternalDocumentation.url: AnyUrl - changed:
field License.url: Optional[UrlStr] → field License.url: Optional[AnyUrl] - changed:
field Schema.additionalProperties: Optional[Union[SchemaBase, bool]] → field Schema.additionalProperties: Optional[Union[Dict[str, Any], bool]] - changed:
field Server.url: UrlStr → field Server.url: AnyUrl
- changed:
function get_openapi_operation_parameters(all_route_params: Sequence[Field]) -> List[Dict[str, Any]] → function get_openapi_operation_parameters(all_route_params: Sequence[ModelField]) -> List[Dict[str, Any]] - changed:
function get_openapi_operation_request_body(*, body_field: Optional[Field], model_name_map: Dict[Type, str]) -> Optional[Dict] → function get_openapi_operation_request_body(*, body_field: Optional[ModelField], model_name_map: Dict[Type[BaseModel], str]) -> Optional[Dict] - changed:
function get_openapi_params(dependant: Dependant) -> List[Field] → function get_openapi_params(dependant: Dependant) -> List[ModelField]
- changed:
class Body(Schema) → class Body(FieldInfo) - changed:
class Param(Schema) → class Param(FieldInfo)
- changed:
function get_request_handler(dependant: Dependant, body_field: Field=…, status_code: int=…, response_class: Type[Response]=…, response_field: Field=…, response_model_include: Union[SetIntStr, DictIntStrAny]=…, response_model_exclude: Union[SetIntStr, DictIntStrAny]=…, response_model_by_alias: bool=…, response_model_skip_defaults: bool=…, dependency_overrides_provider: Any=…) -> Callable → function get_request_handler(dependant: Dependant, body_field: ModelField=…, status_code: int=…, response_class: Type[Response]=…, response_field: ModelField=…, response_model_include: Union[SetIntStr, DictIntStrAny]=…, response_model_exclude: Union[SetIntStr, DictIntStrAny]=…, response_model_by_alias: bool=…, response_model_exclude_unset: bool=…, dependency_overrides_provider: Any=…) -> Callable - changed:
function serialize_response(*, field: Field=…, response: Response, include: Union[SetIntStr, DictIntStrAny]=…, exclude: Union[SetIntStr, DictIntStrAny]=…, by_alias: bool=…, skip_defaults: bool=…) -> Any → function serialize_response(*, field: ModelField=…, response: Response, include: Union[SetIntStr, DictIntStrAny]=…, exclude: Union[SetIntStr, DictIntStrAny]=…, by_alias: bool=…, exclude_unset: bool=…) -> Any
- changed:
function create_cloned_field(field: Field) -> Field → function create_cloned_field(field: ModelField) -> ModelField - added:
function get_field_info(field: ModelField) -> FieldInfo - added:
function warning_response_model_skip_defaults_deprecated() -> None - added:
variable PYDANTIC_1 - added:
variable logger