Skip to content

Upgrading starlette 0.46 to 0.47

Review needed0.46.2 β†’ 0.47.3Security1New2Changed2Fixed5

Review neededUpgrade verdict

2 changed defaults and a security fix.

  • Starlette has possible denial-of-service vector when parsing large files in multipart forms
1 item needs code or config changes
Security1
Starlette has possible denial-of-service vector when parsing large files in multipart forms
Medium Β· CVSS 5.3

Generated by DepDelta from published Python source. Not mixed with prose notes.

  • changed: constructor Starlette(debug: bool=…, routes: typing.Sequence[BaseRoute] | None=…, middleware: typing.Sequence[Middleware] | None=…, exception_handlers: typing.Mapping[typing.Any, ExceptionHandler] | None=…, on_startup: typing.Sequence[typing.Callable[[], typing.Any]] | None=…, on_shutdown: typing.Sequence[typing.Callable[[], typing.Any]] | None=…, lifespan: Lifespan[AppType] | None=…) -> None β†’ constructor Starlette(debug: bool=…, routes: Sequence[BaseRoute] | None=…, middleware: Sequence[Middleware] | None=…, exception_handlers: Mapping[Any, ExceptionHandler] | None=…, on_startup: Sequence[Callable[[], Any]] | None=…, on_shutdown: Sequence[Callable[[], Any]] | None=…, lifespan: Lifespan[AppType] | None=…) -> None
  • changed: method Starlette.add_event_handler(event_type: str, func: typing.Callable) -> None β†’ method Starlette.add_event_handler(event_type: str, func: Callable) -> None
  • changed: method Starlette.add_route(path: str, route: typing.Callable[[Request], typing.Awaitable[Response] | Response], methods: list[str] | None=…, name: str | None=…, include_in_schema: bool=…) -> None β†’ method Starlette.add_route(path: str, route: Callable[[Request], Awaitable[Response] | Response], methods: list[str] | None=…, name: str | None=…, include_in_schema: bool=…) -> None
  • changed: method Starlette.add_websocket_route(path: str, route: typing.Callable[[WebSocket], typing.Awaitable[None]], name: str | None=…) -> None β†’ method Starlette.add_websocket_route(path: str, route: Callable[[WebSocket], Awaitable[None]], name: str | None=…) -> None
  • changed: method Starlette.exception_handler(exc_class_or_status_code: int | type[Exception]) -> typing.Callable β†’ method Starlette.exception_handler(exc_class_or_status_code: int | type[Exception]) -> Callable
  • changed: method Starlette.middleware(middleware_type: str) -> typing.Callable β†’ method Starlette.middleware(middleware_type: str) -> Callable
  • changed: method Starlette.on_event(event_type: str) -> typing.Callable β†’ method Starlette.on_event(event_type: str) -> Callable
  • changed: method Starlette.route(path: str, methods: list[str] | None=…, name: str | None=…, include_in_schema: bool=…) -> typing.Callable β†’ method Starlette.route(path: str, methods: list[str] | None=…, name: str | None=…, include_in_schema: bool=…) -> Callable
  • changed: method Starlette.url_path_for(name: str, /, **path_params: typing.Any) -> URLPath β†’ method Starlette.url_path_for(name: str, /, **path_params: Any) -> URLPath
  • changed: method Starlette.websocket_route(path: str, name: str | None=…) -> typing.Callable β†’ method Starlette.websocket_route(path: str, name: str | None=…) -> Callable
  • changed: constructor AuthCredentials(scopes: typing.Sequence[str] | None=…) β†’ constructor AuthCredentials(scopes: Sequence[str] | None=…)
  • changed: function has_required_scope(conn: HTTPConnection, scopes: typing.Sequence[str]) -> bool β†’ function has_required_scope(conn: HTTPConnection, scopes: Sequence[str]) -> bool
  • changed: function requires(scopes: str | typing.Sequence[str], status_code: int=…, redirect: str | None=…) -> typing.Callable[[typing.Callable[_P, typing.Any]], typing.Callable[_P, typing.Any]] β†’ function requires(scopes: str | Sequence[str], status_code: int=…, redirect: str | None=…) -> Callable[[Callable[_P, Any]], Callable[_P, Any]]
  • changed: constructor BackgroundTask(func: typing.Callable[P, typing.Any], *args: P.args, **kwargs: P.kwargs) -> None β†’ constructor BackgroundTask(func: Callable[P, Any], *args: P.args, **kwargs: P.kwargs) -> None
  • changed: constructor BackgroundTasks(tasks: typing.Sequence[BackgroundTask] | None=…) β†’ constructor BackgroundTasks(tasks: Sequence[BackgroundTask] | None=…)
  • changed: method BackgroundTasks.add_task(func: typing.Callable[P, typing.Any], *args: P.args, **kwargs: P.kwargs) -> None β†’ method BackgroundTasks.add_task(func: Callable[P, Any], *args: P.args, **kwargs: P.kwargs) -> None
  • changed: async function iterate_in_threadpool(iterator: typing.Iterable[T]) -> typing.AsyncIterator[T] β†’ async function iterate_in_threadpool(iterator: Iterable[T]) -> AsyncIterator[T]
  • changed: async function run_in_threadpool(func: typing.Callable[P, T], *args: P.args, **kwargs: P.kwargs) -> T β†’ async function run_in_threadpool(func: Callable[P, T], *args: P.args, **kwargs: P.kwargs) -> T
  • changed: async function run_until_first_complete(*args: tuple[typing.Callable, dict]) -> None β†’ async function run_until_first_complete(*args: tuple[Callable, dict]) -> None
  • changed: class Environ(typing.MutableMapping[str, str]) β†’ class Environ(MutableMapping[str, str])
  • changed: constructor Config(env_file: str | Path | None=…, environ: typing.Mapping[str, str]=…, env_prefix: str=…) -> None β†’ constructor Config(env_file: str | Path | None=…, environ: Mapping[str, str]=…, env_prefix: str=…) -> None
  • changed: constructor Environ(environ: typing.MutableMapping[str, str]=…) β†’ constructor Environ(environ: MutableMapping[str, str]=…)
  • changed: method Config.get(key: str, cast: typing.Callable[[typing.Any], typing.Any] | None=…, default: typing.Any=…) -> typing.Any β†’ method Config.get(key: str, cast: Callable[[Any], Any] | None=…, default: Any=…) -> Any
  • changed: class Convertor(typing.Generic[T]) β†’ class Convertor(Generic[T])
  • changed: field Convertor.regex: typing.ClassVar[str] β†’ field Convertor.regex: ClassVar[str]
  • changed: function register_url_convertor(key: str, convertor: Convertor[typing.Any]) -> None β†’ function register_url_convertor(key: str, convertor: Convertor[Any]) -> None
  • changed: variable CONVERTOR_TYPES: dict[str, Convertor[typing.Any]] β†’ variable CONVERTOR_TYPES: dict[str, Convertor[Any]]
  • changed: class Address(typing.NamedTuple) β†’ class Address(NamedTuple)
  • changed: class CommaSeparatedStrings(typing.Sequence[str]) β†’ class CommaSeparatedStrings(Sequence[str])
  • changed: class FormData(ImmutableMultiDict[str, typing.Union[UploadFile, str]]) β†’ class FormData(ImmutableMultiDict[str, Union[UploadFile, str]])
  • changed: class Headers(typing.Mapping[str, str]) β†’ class Headers(Mapping[str, str])
  • changed: class ImmutableMultiDict(typing.Mapping[_KeyType, _CovariantValueType]) β†’ class ImmutableMultiDict(Mapping[_KeyType, _CovariantValueType])
  • changed: class MultiDict(ImmutableMultiDict[typing.Any, typing.Any]) β†’ class MultiDict(ImmutableMultiDict[Any, Any])
  • changed: constructor CommaSeparatedStrings(value: str | typing.Sequence[str]) β†’ constructor CommaSeparatedStrings(value: str | Sequence[str])
  • changed: constructor FormData(*args: FormData | typing.Mapping[str, str | UploadFile] | list[tuple[str, str | UploadFile]], **kwargs: str | UploadFile) -> None β†’ constructor FormData(*args: FormData | Mapping[str, str | UploadFile] | list[tuple[str, str | UploadFile]], **kwargs: str | UploadFile) -> None
  • changed: constructor Headers(headers: typing.Mapping[str, str] | None=…, raw: list[tuple[bytes, bytes]] | None=…, scope: typing.MutableMapping[str, typing.Any] | None=…) -> None β†’ constructor Headers(headers: Mapping[str, str] | None=…, raw: list[tuple[bytes, bytes]] | None=…, scope: MutableMapping[str, Any] | None=…) -> None
  • changed: constructor ImmutableMultiDict(*args: ImmutableMultiDict[_KeyType, _CovariantValueType] | typing.Mapping[_KeyType, _CovariantValueType] | typing.Iterable[tuple[_KeyType, _CovariantValueType]], **kwargs: typing.Any) -> None β†’ constructor ImmutableMultiDict(*args: ImmutableMultiDict[_KeyType, _CovariantValueType] | Mapping[_KeyType, _CovariantValueType] | Iterable[tuple[_KeyType, _CovariantValueType]], **kwargs: Any) -> None
  • changed: constructor QueryParams(*args: ImmutableMultiDict[typing.Any, typing.Any] | typing.Mapping[typing.Any, typing.Any] | list[tuple[typing.Any, typing.Any]] | str | bytes, **kwargs: typing.Any) -> None β†’ constructor QueryParams(*args: ImmutableMultiDict[Any, Any] | Mapping[Any, Any] | list[tuple[Any, Any]] | str | bytes, **kwargs: Any) -> None
  • changed: constructor State(state: dict[str, typing.Any] | None=…) β†’ constructor State(state: dict[str, Any] | None=…)
  • changed: constructor URL(url: str=…, scope: Scope | None=…, **components: typing.Any) -> None β†’ constructor URL(url: str=…, scope: Scope | None=…, **components: Any) -> None
  • changed: constructor UploadFile(file: typing.BinaryIO, *, size: int | None=…, filename: str | None=…, headers: Headers | None=…) -> None β†’ constructor UploadFile(file: BinaryIO, *, size: int | None=…, filename: str | None=…, headers: Headers | None=…) -> None
  • changed: method ImmutableMultiDict.getlist(key: typing.Any) -> list[_CovariantValueType] β†’ method ImmutableMultiDict.getlist(key: Any) -> list[_CovariantValueType]
  • changed: method ImmutableMultiDict.items() -> typing.ItemsView[_KeyType, _CovariantValueType] β†’ method ImmutableMultiDict.items() -> ItemsView[_KeyType, _CovariantValueType]
  • changed: method ImmutableMultiDict.keys() -> typing.KeysView[_KeyType] β†’ method ImmutableMultiDict.keys() -> KeysView[_KeyType]
  • changed: method ImmutableMultiDict.values() -> typing.ValuesView[_CovariantValueType] β†’ method ImmutableMultiDict.values() -> ValuesView[_CovariantValueType]
  • changed: method MultiDict.append(key: typing.Any, value: typing.Any) -> None β†’ method MultiDict.append(key: Any, value: Any) -> None
  • changed: method MultiDict.pop(key: typing.Any, default: typing.Any=…) -> typing.Any β†’ method MultiDict.pop(key: Any, default: Any=…) -> Any
  • changed: method MultiDict.popitem() -> tuple[typing.Any, typing.Any] β†’ method MultiDict.popitem() -> tuple[Any, Any]
  • changed: method MultiDict.poplist(key: typing.Any) -> list[typing.Any] β†’ method MultiDict.poplist(key: Any) -> list[Any]
  • changed: method MultiDict.setdefault(key: typing.Any, default: typing.Any=…) -> typing.Any β†’ method MultiDict.setdefault(key: Any, default: Any=…) -> Any
  • changed: method MultiDict.setlist(key: typing.Any, values: list[typing.Any]) -> None β†’ method MultiDict.setlist(key: Any, values: list[Any]) -> None
  • changed: method MultiDict.update(*args: MultiDict | typing.Mapping[typing.Any, typing.Any] | list[tuple[typing.Any, typing.Any]], **kwargs: typing.Any) -> None β†’ method MultiDict.update(*args: MultiDict | Mapping[Any, Any] | list[tuple[Any, Any]], **kwargs: Any) -> None
  • changed: method MutableHeaders.update(other: typing.Mapping[str, str]) -> None β†’ method MutableHeaders.update(other: Mapping[str, str]) -> None
  • changed: method URL.include_query_params(**kwargs: typing.Any) -> URL β†’ method URL.include_query_params(**kwargs: Any) -> URL
  • changed: method URL.remove_query_params(keys: str | typing.Sequence[str]) -> URL β†’ method URL.remove_query_params(keys: str | Sequence[str]) -> URL
  • changed: method URL.replace(**kwargs: typing.Any) -> URL β†’ method URL.replace(**kwargs: Any) -> URL
  • changed: method URL.replace_query_params(**kwargs: typing.Any) -> URL β†’ method URL.replace_query_params(**kwargs: Any) -> URL
  • changed: async method WebSocketEndpoint.decode(websocket: WebSocket, message: Message) -> typing.Any β†’ async method WebSocketEndpoint.decode(websocket: WebSocket, message: Message) -> Any
  • changed: async method WebSocketEndpoint.on_receive(websocket: WebSocket, data: typing.Any) -> None β†’ async method WebSocketEndpoint.on_receive(websocket: WebSocket, data: Any) -> None
  • changed: constructor FormParser(headers: Headers, stream: typing.AsyncGenerator[bytes, None]) -> None β†’ constructor FormParser(headers: Headers, stream: AsyncGenerator[bytes, None]) -> None
  • changed: constructor MultiPartParser(headers: Headers, stream: typing.AsyncGenerator[bytes, None], *, max_files: int | float=…, max_fields: int | float=…, max_part_size: int=…) -> None β†’ constructor MultiPartParser(headers: Headers, stream: AsyncGenerator[bytes, None], *, max_files: int | float=…, max_fields: int | float=…, max_part_size: int=…) -> None
  • changed: constructor AuthenticationMiddleware(app: ASGIApp, backend: AuthenticationBackend, on_error: typing.Callable[[HTTPConnection, AuthenticationError], Response] | None=…) -> None β†’ constructor AuthenticationMiddleware(app: ASGIApp, backend: AuthenticationBackend, on_error: Callable[[HTTPConnection, AuthenticationError], Response] | None=…) -> None
  • added: variable AsyncContentStream
  • added: variable BodyStreamGenerator
  • changed: constructor CORSMiddleware(app: ASGIApp, allow_origins: typing.Sequence[str]=…, allow_methods: typing.Sequence[str]=…, allow_headers: typing.Sequence[str]=…, allow_credentials: bool=…, allow_origin_regex: str | None=…, expose_headers: typing.Sequence[str]=…, max_age: int=…) -> None β†’ constructor CORSMiddleware(app: ASGIApp, allow_origins: Sequence[str]=…, allow_methods: Sequence[str]=…, allow_headers: Sequence[str]=…, allow_credentials: bool=…, allow_origin_regex: str | None=…, expose_headers: Sequence[str]=…, max_age: int=…) -> None
  • changed: constructor ServerErrorMiddleware(app: ASGIApp, handler: typing.Callable[[Request, Exception], typing.Any] | None=…, debug: bool=…) -> None β†’ constructor ServerErrorMiddleware(app: ASGIApp, handler: ExceptionHandler | None=…, debug: bool=…) -> None
  • changed: constructor ExceptionMiddleware(app: ASGIApp, handlers: typing.Mapping[typing.Any, typing.Callable[[Request, Exception], Response]] | None=…, debug: bool=…) -> None β†’ constructor ExceptionMiddleware(app: ASGIApp, handlers: Mapping[Any, ExceptionHandler] | None=…, debug: bool=…) -> None
  • changed: method ExceptionMiddleware.add_exception_handler(exc_class_or_status_code: int | type[Exception], handler: typing.Callable[[Request, Exception], Response]) -> None β†’ method ExceptionMiddleware.add_exception_handler(exc_class_or_status_code: int | type[Exception], handler: ExceptionHandler) -> None
  • changed: method ExceptionMiddleware.http_exception(request: Request, exc: Exception) -> Response β†’ async method ExceptionMiddleware.http_exception(request: Request, exc: Exception) -> Response
  • changed: async function unattached_send(message: Message) -> typing.NoReturn β†’ async function unattached_send(message: Message) -> NoReturn
  • changed: constructor SessionMiddleware(app: ASGIApp, secret_key: str | Secret, session_cookie: str=…, max_age: int | None=…, path: str=…, same_site: typing.Literal['lax', 'strict', 'none']=…, https_only: bool=…, domain: str | None=…) -> None β†’ constructor SessionMiddleware(app: ASGIApp, secret_key: str | Secret, session_cookie: str=…, max_age: int | None=…, path: str=…, same_site: Literal['lax', 'strict', 'none']=…, https_only: bool=…, domain: str | None=…) -> None
  • changed: constructor TrustedHostMiddleware(app: ASGIApp, allowed_hosts: typing.Sequence[str] | None=…, www_redirect: bool=…) -> None β†’ constructor TrustedHostMiddleware(app: ASGIApp, allowed_hosts: Sequence[str] | None=…, www_redirect: bool=…) -> None
  • changed: constructor WSGIMiddleware(app: typing.Callable[..., typing.Any]) -> None β†’ constructor WSGIMiddleware(app: Callable[..., Any]) -> None
  • changed: constructor WSGIResponder(app: typing.Callable[..., typing.Any], scope: Scope) -> None β†’ constructor WSGIResponder(app: Callable[..., Any], scope: Scope) -> None
  • changed: field WSGIResponder.stream_receive: ObjectReceiveStream[typing.MutableMapping[str, typing.Any]] β†’ field WSGIResponder.stream_receive: ObjectReceiveStream[MutableMapping[str, Any]]
  • changed: field WSGIResponder.stream_send: ObjectSendStream[typing.MutableMapping[str, typing.Any]] β†’ field WSGIResponder.stream_send: ObjectSendStream[MutableMapping[str, Any]]
  • changed: function build_environ(scope: Scope, body: bytes) -> dict[str, typing.Any] β†’ function build_environ(scope: Scope, body: bytes) -> dict[str, Any]
  • changed: method WSGIResponder.start_response(status: str, response_headers: list[tuple[str, str]], exc_info: typing.Any=…) -> None β†’ method WSGIResponder.start_response(status: str, response_headers: list[tuple[str, str]], exc_info: Any=…) -> None
  • changed: method WSGIResponder.wsgi(environ: dict[str, typing.Any], start_response: typing.Callable[..., typing.Any]) -> None β†’ method WSGIResponder.wsgi(environ: dict[str, Any], start_response: Callable[..., Any]) -> None
  • removed: property HTTPConnection.app -> typing.Any
  • removed: property HTTPConnection.auth -> typing.Any
  • removed: property HTTPConnection.path_params -> dict[str, typing.Any]
  • removed: property HTTPConnection.session -> dict[str, typing.Any]
  • removed: property HTTPConnection.user -> typing.Any
  • changed: async function empty_receive() -> typing.NoReturn β†’ async function empty_receive() -> NoReturn
  • changed: async function empty_send(message: Message) -> typing.NoReturn β†’ async function empty_send(message: Message) -> NoReturn
  • changed: async method Request.json() -> typing.Any β†’ async method Request.json() -> Any
  • changed: async method Request.stream() -> typing.AsyncGenerator[bytes, None] β†’ async method Request.stream() -> AsyncGenerator[bytes, None]
  • changed: class HTTPConnection(typing.Mapping[str, typing.Any]) β†’ class HTTPConnection(Mapping[str, Any])
  • changed: method HTTPConnection.url_for(name: str, /, **path_params: typing.Any) -> URL β†’ method HTTPConnection.url_for(name: str, /, **path_params: Any) -> URL
  • added: property HTTPConnection.app -> Any
  • added: property HTTPConnection.auth -> Any
  • added: property HTTPConnection.path_params -> dict[str, Any]
  • added: property HTTPConnection.session -> dict[str, Any]
  • added: property HTTPConnection.user -> Any
  • changed: constructor FileResponse(path: str | os.PathLike[str], status_code: int=…, headers: typing.Mapping[str, str] | None=…, media_type: str | None=…, background: BackgroundTask | None=…, filename: str | None=…, stat_result: os.stat_result | None=…, method: str | None=…, content_disposition_type: str=…) -> None β†’ constructor FileResponse(path: str | os.PathLike[str], status_code: int=…, headers: Mapping[str, str] | None=…, media_type: str | None=…, background: BackgroundTask | None=…, filename: str | None=…, stat_result: os.stat_result | None=…, method: str | None=…, content_disposition_type: str=…) -> None
  • changed: constructor JSONResponse(content: typing.Any, status_code: int=…, headers: typing.Mapping[str, str] | None=…, media_type: str | None=…, background: BackgroundTask | None=…) -> None β†’ constructor JSONResponse(content: Any, status_code: int=…, headers: Mapping[str, str] | None=…, media_type: str | None=…, background: BackgroundTask | None=…) -> None
  • changed: constructor RedirectResponse(url: str | URL, status_code: int=…, headers: typing.Mapping[str, str] | None=…, background: BackgroundTask | None=…) -> None β†’ constructor RedirectResponse(url: str | URL, status_code: int=…, headers: Mapping[str, str] | None=…, background: BackgroundTask | None=…) -> None
  • changed: constructor Response(content: typing.Any=…, status_code: int=…, headers: typing.Mapping[str, str] | None=…, media_type: str | None=…, background: BackgroundTask | None=…) -> None β†’ constructor Response(content: Any=…, status_code: int=…, headers: Mapping[str, str] | None=…, media_type: str | None=…, background: BackgroundTask | None=…) -> None
  • changed: constructor StreamingResponse(content: ContentStream, status_code: int=…, headers: typing.Mapping[str, str] | None=…, media_type: str | None=…, background: BackgroundTask | None=…) -> None β†’ constructor StreamingResponse(content: ContentStream, status_code: int=…, headers: Mapping[str, str] | None=…, media_type: str | None=…, background: BackgroundTask | None=…) -> None
  • changed: method FileResponse.generate_multipart(ranges: typing.Sequence[tuple[int, int]], boundary: str, max_size: int, content_type: str) -> tuple[int, typing.Callable[[int, int], bytes]] β†’ method FileResponse.generate_multipart(ranges: Sequence[tuple[int, int]], boundary: str, max_size: int, content_type: str) -> tuple[int, Callable[[int, int], bytes]]
  • changed: method JSONResponse.render(content: typing.Any) -> bytes β†’ method JSONResponse.render(content: Any) -> bytes
  • changed: method Response.delete_cookie(key: str, path: str=…, domain: str | None=…, secure: bool=…, httponly: bool=…, samesite: typing.Literal['lax', 'strict', 'none'] | None=…) -> None β†’ method Response.delete_cookie(key: str, path: str=…, domain: str | None=…, secure: bool=…, httponly: bool=…, samesite: Literal['lax', 'strict', 'none'] | None=…) -> None
  • changed: method Response.init_headers(headers: typing.Mapping[str, str] | None=…) -> None β†’ method Response.init_headers(headers: Mapping[str, str] | None=…) -> None
  • changed: method Response.render(content: typing.Any) -> bytes | memoryview β†’ method Response.render(content: Any) -> bytes | memoryview
  • changed: method Response.set_cookie(key: str, value: str=…, max_age: int | None=…, expires: datetime | str | int | None=…, path: str | None=…, domain: str | None=…, secure: bool=…, httponly: bool=…, samesite: typing.Literal['lax', 'strict', 'none'] | None=…) -> None β†’ method Response.set_cookie(key: str, value: str=…, max_age: int | None=…, expires: datetime | str | int | None=…, path: str | None=…, domain: str | None=…, secure: bool=…, httponly: bool=…, samesite: Literal['lax', 'strict', 'none'] | None=…, partitioned: bool=…) -> None
  • changed: constructor Mount(path: str, app: ASGIApp | None=…, routes: typing.Sequence[BaseRoute] | None=…, name: str | None=…, *, middleware: typing.Sequence[Middleware] | None=…) -> None β†’ constructor Mount(path: str, app: ASGIApp | None=…, routes: Sequence[BaseRoute] | None=…, name: str | None=…, *, middleware: Sequence[Middleware] | None=…) -> None
  • changed: constructor NoMatchFound(name: str, path_params: dict[str, typing.Any]) -> None β†’ constructor NoMatchFound(name: str, path_params: dict[str, Any]) -> None
  • changed: constructor Route(path: str, endpoint: typing.Callable[..., typing.Any], *, methods: list[str] | None=…, name: str | None=…, include_in_schema: bool=…, middleware: typing.Sequence[Middleware] | None=…) -> None β†’ constructor Route(path: str, endpoint: Callable[..., Any], *, methods: Collection[str] | None=…, name: str | None=…, include_in_schema: bool=…, middleware: Sequence[Middleware] | None=…) -> None
  • changed: constructor Router(routes: typing.Sequence[BaseRoute] | None=…, redirect_slashes: bool=…, default: ASGIApp | None=…, on_startup: typing.Sequence[typing.Callable[[], typing.Any]] | None=…, on_shutdown: typing.Sequence[typing.Callable[[], typing.Any]] | None=…, lifespan: Lifespan[typing.Any] | None=…, *, middleware: typing.Sequence[Middleware] | None=…) -> None β†’ constructor Router(routes: Sequence[BaseRoute] | None=…, redirect_slashes: bool=…, default: ASGIApp | None=…, on_startup: Sequence[Callable[[], Any]] | None=…, on_shutdown: Sequence[Callable[[], Any]] | None=…, lifespan: Lifespan[Any] | None=…, *, middleware: Sequence[Middleware] | None=…) -> None
  • changed: constructor WebSocketRoute(path: str, endpoint: typing.Callable[..., typing.Any], *, name: str | None=…, middleware: typing.Sequence[Middleware] | None=…) -> None β†’ constructor WebSocketRoute(path: str, endpoint: Callable[..., Any], *, name: str | None=…, middleware: Sequence[Middleware] | None=…) -> None
  • changed: function compile_path(path: str) -> tuple[typing.Pattern[str], str, dict[str, Convertor[typing.Any]]] β†’ function compile_path(path: str) -> tuple[Pattern[str], str, dict[str, Convertor[Any]]]
  • changed: function get_name(endpoint: typing.Callable[..., typing.Any]) -> str β†’ function get_name(endpoint: Callable[..., Any]) -> str
  • changed: function iscoroutinefunction_or_partial(obj: typing.Any) -> bool β†’ function iscoroutinefunction_or_partial(obj: Any) -> bool
  • changed: function replace_params(path: str, param_convertors: dict[str, Convertor[typing.Any]], path_params: dict[str, str]) -> tuple[str, dict[str, str]] β†’ function replace_params(path: str, param_convertors: dict[str, Convertor[Any]], path_params: dict[str, str]) -> tuple[str, dict[str, str]]
  • changed: function request_response(func: typing.Callable[[Request], typing.Awaitable[Response] | Response]) -> ASGIApp β†’ function request_response(func: Callable[[Request], Awaitable[Response] | Response]) -> ASGIApp
  • changed: function websocket_session(func: typing.Callable[[WebSocket], typing.Awaitable[None]]) -> ASGIApp β†’ function websocket_session(func: Callable[[WebSocket], Awaitable[None]]) -> ASGIApp
  • changed: method BaseRoute.url_path_for(name: str, /, **path_params: typing.Any) -> URLPath β†’ method BaseRoute.url_path_for(name: str, /, **path_params: Any) -> URLPath
  • changed: method Host.url_path_for(name: str, /, **path_params: typing.Any) -> URLPath β†’ method Host.url_path_for(name: str, /, **path_params: Any) -> URLPath
  • changed: method Mount.url_path_for(name: str, /, **path_params: typing.Any) -> URLPath β†’ method Mount.url_path_for(name: str, /, **path_params: Any) -> URLPath
  • changed: method Route.url_path_for(name: str, /, **path_params: typing.Any) -> URLPath β†’ method Route.url_path_for(name: str, /, **path_params: Any) -> URLPath
  • changed: method Router.add_event_handler(event_type: str, func: typing.Callable[[], typing.Any]) -> None β†’ method Router.add_event_handler(event_type: str, func: Callable[[], Any]) -> None
  • changed: method Router.add_route(path: str, endpoint: typing.Callable[[Request], typing.Awaitable[Response] | Response], methods: list[str] | None=…, name: str | None=…, include_in_schema: bool=…) -> None β†’ method Router.add_route(path: str, endpoint: Callable[[Request], Awaitable[Response] | Response], methods: Collection[str] | None=…, name: str | None=…, include_in_schema: bool=…) -> None
  • changed: method Router.add_websocket_route(path: str, endpoint: typing.Callable[[WebSocket], typing.Awaitable[None]], name: str | None=…) -> None β†’ method Router.add_websocket_route(path: str, endpoint: Callable[[WebSocket], Awaitable[None]], name: str | None=…) -> None
  • changed: method Router.on_event(event_type: str) -> typing.Callable β†’ method Router.on_event(event_type: str) -> Callable
  • changed: method Router.route(path: str, methods: list[str] | None=…, name: str | None=…, include_in_schema: bool=…) -> typing.Callable β†’ method Router.route(path: str, methods: Collection[str] | None=…, name: str | None=…, include_in_schema: bool=…) -> Callable
  • changed: method Router.url_path_for(name: str, /, **path_params: typing.Any) -> URLPath β†’ method Router.url_path_for(name: str, /, **path_params: Any) -> URLPath
  • changed: method Router.websocket_route(path: str, name: str | None=…) -> typing.Callable β†’ method Router.websocket_route(path: str, name: str | None=…) -> Callable
  • changed: method WebSocketRoute.url_path_for(name: str, /, **path_params: typing.Any) -> URLPath β†’ method WebSocketRoute.url_path_for(name: str, /, **path_params: Any) -> URLPath
  • changed: class EndpointInfo(typing.NamedTuple) β†’ class EndpointInfo(NamedTuple)
  • changed: constructor SchemaGenerator(base_schema: dict[str, typing.Any]) -> None β†’ constructor SchemaGenerator(base_schema: dict[str, Any]) -> None
  • changed: field EndpointInfo.func: typing.Callable[..., typing.Any] β†’ field EndpointInfo.func: Callable[..., Any]
  • changed: method BaseSchemaGenerator.get_schema(routes: list[BaseRoute]) -> dict[str, typing.Any] β†’ method BaseSchemaGenerator.get_schema(routes: list[BaseRoute]) -> dict[str, Any]
  • changed: method BaseSchemaGenerator.parse_docstring(func_or_method: typing.Callable[..., typing.Any]) -> dict[str, typing.Any] β†’ method BaseSchemaGenerator.parse_docstring(func_or_method: Callable[..., Any]) -> dict[str, Any]
  • changed: method OpenAPIResponse.render(content: typing.Any) -> bytes β†’ method OpenAPIResponse.render(content: Any) -> bytes
  • changed: method SchemaGenerator.get_schema(routes: list[BaseRoute]) -> dict[str, typing.Any] β†’ method SchemaGenerator.get_schema(routes: list[BaseRoute]) -> dict[str, Any]
  • changed: constructor Jinja2Templates(directory: str | PathLike[str] | typing.Sequence[str | PathLike[str]], *, context_processors: list[typing.Callable[[Request], dict[str, typing.Any]]] | None=…, **env_options: typing.Any) -> None | (*, env: jinja2.Environment, context_processors: list[typing.Callable[[Request], dict[str, typing.Any]]] | None=…) -> None β†’ constructor Jinja2Templates(directory: str | PathLike[str] | Sequence[str | PathLike[str]], *, context_processors: list[Callable[[Request], dict[str, Any]]] | None=…, **env_options: Any) -> None | (*, env: jinja2.Environment, context_processors: list[Callable[[Request], dict[str, Any]]] | None=…) -> None
  • changed: method Jinja2Templates.TemplateResponse(request: Request, name: str, context: dict[str, typing.Any] | None=…, status_code: int=…, headers: typing.Mapping[str, str] | None=…, media_type: str | None=…, background: BackgroundTask | None=…) -> _TemplateResponse | (name: str, context: dict[str, typing.Any] | None=…, status_code: int=…, headers: typing.Mapping[str, str] | None=…, media_type: str | None… β†’ method Jinja2Templates.TemplateResponse(request: Request, name: str, context: dict[str, Any] | None=…, status_code: int=…, headers: Mapping[str, str] | None=…, media_type: str | None=…, background: BackgroundTask | None=…) -> _TemplateResponse | (name: str, context: dict[str, Any] | None=…, status_code: int=…, headers: Mapping[str, str] | None=…, media_type: str | None=…, background: BackgroundTa…
  • changed: constructor TestClient(app: ASGIApp, base_url: str=…, raise_server_exceptions: bool=…, root_path: str=…, backend: typing.Literal['asyncio', 'trio']=…, backend_options: dict[str, typing.Any] | None=…, cookies: httpx._types.CookieTypes | None=…, headers: dict[str, str] | None=…, follow_redirects: bool=…, client: tuple[str, int]=…) -> None β†’ constructor TestClient(app: ASGIApp, base_url: str=…, raise_server_exceptions: bool=…, root_path: str=…, backend: Literal['asyncio', 'trio']=…, backend_options: dict[str, Any] | None=…, cookies: httpx._types.CookieTypes | None=…, headers: dict[str, str] | None=…, follow_redirects: bool=…, client: tuple[str, int]=…) -> None
  • changed: method TestClient.patch(url: httpx._types.URLTypes, *, content: httpx._types.RequestContent | None=…, data: _RequestData | None=…, files: httpx._types.RequestFiles | None=…, json: typing.Any=…, params: httpx._types.QueryParamTypes | None=…, headers: httpx._types.HeaderTypes | None=…, cookies: httpx._types.CookieTypes | None=…, auth: httpx._types.AuthTypes | httpx._client.UseClientDefault=…, follo… β†’ method TestClient.patch(url: httpx._types.URLTypes, *, content: httpx._types.RequestContent | None=…, data: _RequestData | None=…, files: httpx._types.RequestFiles | None=…, json: Any=…, params: httpx._types.QueryParamTypes | None=…, headers: httpx._types.HeaderTypes | None=…, cookies: httpx._types.CookieTypes | None=…, auth: httpx._types.AuthTypes | httpx._client.UseClientDefault=…, follow_redir…
  • changed: method TestClient.post(url: httpx._types.URLTypes, *, content: httpx._types.RequestContent | None=…, data: _RequestData | None=…, files: httpx._types.RequestFiles | None=…, json: typing.Any=…, params: httpx._types.QueryParamTypes | None=…, headers: httpx._types.HeaderTypes | None=…, cookies: httpx._types.CookieTypes | None=…, auth: httpx._types.AuthTypes | httpx._client.UseClientDefault=…, follow… β†’ method TestClient.post(url: httpx._types.URLTypes, *, content: httpx._types.RequestContent | None=…, data: _RequestData | None=…, files: httpx._types.RequestFiles | None=…, json: Any=…, params: httpx._types.QueryParamTypes | None=…, headers: httpx._types.HeaderTypes | None=…, cookies: httpx._types.CookieTypes | None=…, auth: httpx._types.AuthTypes | httpx._client.UseClientDefault=…, follow_redire…
  • changed: method TestClient.put(url: httpx._types.URLTypes, *, content: httpx._types.RequestContent | None=…, data: _RequestData | None=…, files: httpx._types.RequestFiles | None=…, json: typing.Any=…, params: httpx._types.QueryParamTypes | None=…, headers: httpx._types.HeaderTypes | None=…, cookies: httpx._types.CookieTypes | None=…, auth: httpx._types.AuthTypes | httpx._client.UseClientDefault=…, follow_… β†’ method TestClient.put(url: httpx._types.URLTypes, *, content: httpx._types.RequestContent | None=…, data: _RequestData | None=…, files: httpx._types.RequestFiles | None=…, json: Any=…, params: httpx._types.QueryParamTypes | None=…, headers: httpx._types.HeaderTypes | None=…, cookies: httpx._types.CookieTypes | None=…, auth: httpx._types.AuthTypes | httpx._client.UseClientDefault=…, follow_redirec…
  • changed: method TestClient.request(method: str, url: httpx._types.URLTypes, *, content: httpx._types.RequestContent | None=…, data: _RequestData | None=…, files: httpx._types.RequestFiles | None=…, json: typing.Any=…, params: httpx._types.QueryParamTypes | None=…, headers: httpx._types.HeaderTypes | None=…, cookies: httpx._types.CookieTypes | None=…, auth: httpx._types.AuthTypes | httpx._client.UseClientD… β†’ method TestClient.request(method: str, url: httpx._types.URLTypes, *, content: httpx._types.RequestContent | None=…, data: _RequestData | None=…, files: httpx._types.RequestFiles | None=…, json: Any=…, params: httpx._types.QueryParamTypes | None=…, headers: httpx._types.HeaderTypes | None=…, cookies: httpx._types.CookieTypes | None=…, auth: httpx._types.AuthTypes | httpx._client.UseClientDefault=…
  • changed: method TestClient.websocket_connect(url: str, subprotocols: typing.Sequence[str] | None=…, **kwargs: typing.Any) -> WebSocketTestSession β†’ method TestClient.websocket_connect(url: str, subprotocols: Sequence[str] | None=…, **kwargs: Any) -> WebSocketTestSession
  • changed: method WebSocketTestSession.receive_json(mode: typing.Literal['text', 'binary']=…) -> typing.Any β†’ method WebSocketTestSession.receive_json(mode: Literal['text', 'binary']=…) -> Any
  • changed: method WebSocketTestSession.send_json(data: typing.Any, mode: typing.Literal['text', 'binary']=…) -> None β†’ method WebSocketTestSession.send_json(data: Any, mode: Literal['text', 'binary']=…) -> None
  • changed: async method WebSocket.accept(subprotocol: str | None=…, headers: typing.Iterable[tuple[bytes, bytes]] | None=…) -> None β†’ async method WebSocket.accept(subprotocol: str | None=…, headers: Iterable[tuple[bytes, bytes]] | None=…) -> None
  • changed: async method WebSocket.iter_bytes() -> typing.AsyncIterator[bytes] β†’ async method WebSocket.iter_bytes() -> AsyncIterator[bytes]
  • changed: async method WebSocket.iter_json() -> typing.AsyncIterator[typing.Any] β†’ async method WebSocket.iter_json() -> AsyncIterator[Any]
  • changed: async method WebSocket.iter_text() -> typing.AsyncIterator[str] β†’ async method WebSocket.iter_text() -> AsyncIterator[str]
  • changed: async method WebSocket.receive_json(mode: str=…) -> typing.Any β†’ async method WebSocket.receive_json(mode: str=…) -> Any
  • changed: async method WebSocket.send_json(data: typing.Any, mode: str=…) -> None β†’ async method WebSocket.send_json(data: Any, mode: str=…) -> None