Upgrading starlette 0.4 to 0.5
Unknown0.4.2 โ 0.5.5
UnknownUpgrade verdict
DepDelta hasn't looked for this range's notes yet, so breaking changes can't be ruled out.
In plain terms
- DepDelta hasn't finished looking for the notes in this range, so it can't rule out breaking changes yet.
- Their commits are listed with this comparison.
Must act Unknown for releases without notes
Releases without notes may still need changes. Check their commits before upgrading.
API changes
Generated by DepDelta from published Python source. Not mixed with prose notes.
- changed:
constructor Starlette(debug=โฆ) -> None โ constructor Starlette(debug: bool=โฆ) -> None - changed:
function request_response(func) โ function request_response(func: typing.Callable) -> ASGIApp - changed:
function websocket_session(func) โ function websocket_session(func: typing.Callable) -> ASGIApp - changed:
method Starlette.add_exception_handler(exc_class: type, handler) -> None โ method Starlette.add_exception_handler(exc_class: type, handler: typing.Callable) -> None - changed:
method Starlette.add_route(path: str, route, methods=โฆ) -> None โ method Starlette.add_route(path: str, route: typing.Callable, methods: typing.Sequence[str]=โฆ) -> None - changed:
method Starlette.add_websocket_route(path: str, route) -> None โ method Starlette.add_websocket_route(path: str, route: typing.Callable) -> None - changed:
method Starlette.exception_handler(exc_class: type) โ method Starlette.exception_handler(exc_class: type) -> typing.Callable - changed:
method Starlette.mount(path: str, app: ASGIApp, methods=โฆ) -> None โ method Starlette.mount(path: str, app: ASGIApp, methods: typing.Sequence[str]=โฆ) -> None - changed:
method Starlette.on_event(event_type: str) โ method Starlette.on_event(event_type: str) -> typing.Callable - changed:
method Starlette.route(path: str, methods=โฆ) โ method Starlette.route(path: str, methods: typing.Sequence[str]=โฆ) -> typing.Callable - changed:
method Starlette.websocket_route(path: str) โ method Starlette.websocket_route(path: str) -> typing.Callable - added:
method Starlette.add_event_handler(event_type: str, func: typing.Callable) -> None - added:
method Starlette.add_graphql_route(path: str, schema: typing.Any, executor: typing.Any=โฆ) -> None
- changed:
constructor BackgroundTask(func, *args, **kwargs) โ constructor BackgroundTask(func: typing.Callable, *args: typing.Any, **kwargs: typing.Any) -> None
- removed:
variable BytesPairs - removed:
variable StrDict - removed:
variable StrPairs - changed:
class QueryParams(StrDict) โ class QueryParams(typing.Mapping[str, str]) - changed:
constructor Headers(raw_headers: typing.Optional[BytesPairs]=โฆ) -> None โ constructor Headers(headers: typing.Mapping[str, str]=โฆ, raw: typing.List[typing.Tuple[bytes, bytes]]=โฆ, scope: Scope=โฆ) -> None - changed:
constructor QueryParams(value: typing.Union[str, typing.Union[StrDict, StrPairs]]=โฆ) -> None โ constructor QueryParams(params: typing.Mapping[str, str]=โฆ, items: typing.List[typing.Tuple[str, str]]=โฆ, query_string: str=โฆ, scope: Scope=โฆ) -> None - changed:
method Headers.items() -> StrPairs โ method Headers.items() -> typing.List[typing.Tuple[str, str]] - changed:
method MutableHeaders.add_vary_header(vary) โ method MutableHeaders.add_vary_header(vary: str) -> None - changed:
method MutableHeaders.update(other: dict) โ method MutableHeaders.update(other: dict) -> None - changed:
method QueryParams.items() -> StrPairs โ method QueryParams.items() -> typing.List[typing.Tuple[str, str]] - added:
property Headers.raw -> typing.List[typing.Tuple[bytes, bytes]] - added:
property MutableHeaders.raw -> typing.List[typing.Tuple[bytes, bytes]]
- changed:
async method WebSocketEndpoint.decode(websocket, message) โ async method WebSocketEndpoint.decode(websocket: WebSocket, message: Message) -> typing.Any - changed:
async method WebSocketEndpoint.on_connect(websocket, **kwargs) โ async method WebSocketEndpoint.on_connect(websocket: WebSocket, **kwargs: typing.Any) -> None - changed:
async method WebSocketEndpoint.on_disconnect(websocket, close_code) โ async method WebSocketEndpoint.on_disconnect(websocket: WebSocket, close_code: int) -> None - changed:
async method WebSocketEndpoint.on_receive(websocket, data) โ async method WebSocketEndpoint.on_receive(websocket: WebSocket, data: typing.Any) -> None
- changed:
constructor ExceptionMiddleware(app, debug=โฆ) โ constructor ExceptionMiddleware(app: ASGIApp, debug: bool=โฆ) -> None - changed:
method ExceptionMiddleware.add_exception_handler(exc_class, handler) โ method ExceptionMiddleware.add_exception_handler(exc_class: typing.Type[Exception], handler: typing.Callable) -> None
- added:
async method GraphQLApp.asgi(receive: Receive, send: Send, scope: Scope) -> None - added:
async method GraphQLApp.execute(query, variables=โฆ, operation_name=โฆ) - added:
async method GraphQLApp.handle_graphiql(request: Request) -> Response - added:
async method GraphQLApp.handle_graphql(request: Request) -> Response - added:
class GraphQLApp - added:
constructor GraphQLApp(schema: graphene.Schema, executor: typing.Any=โฆ) -> None - added:
variable AsyncioExecutor - added:
variable GRAPHIQL - added:
variable GraphQLError - added:
variable format_graphql_error - added:
variable graphene
- removed:
async method LifespanContext.wait_cleanup() - changed:
async method LifespanContext.receive() โ async method LifespanContext.receive() -> Message - changed:
async method LifespanContext.run_lifespan() โ async method LifespanContext.run_lifespan() -> None - changed:
async method LifespanContext.send(message) โ async method LifespanContext.send(message: Message) -> None - changed:
async method LifespanContext.wait_startup() โ async method LifespanContext.wait_startup() -> None - changed:
async method LifespanHandler.run_lifespan(receive, send) โ async method LifespanHandler.run_lifespan(receive: Receive, send: Send) -> None - changed:
constructor LifespanContext(app, startup_timeout=โฆ, cleanup_timeout=โฆ) โ constructor LifespanContext(app: ASGIApp, startup_timeout: int=โฆ, shutdown_timeout: int=โฆ) -> None - changed:
constructor LifespanHandler() โ constructor LifespanHandler() -> None - changed:
method LifespanHandler.on_event(event_type: str) โ method LifespanHandler.on_event(event_type: str) -> typing.Callable - added:
async method LifespanContext.wait_shutdown() -> None - added:
method LifespanHandler.add_event_handler(event_type: str, func: typing.Callable) -> None
- changed:
async method CORSMiddleware.send(message, send=โฆ, request_headers=โฆ) โ async method CORSMiddleware.send(message: Message, send: Send, request_headers: Headers) -> None - changed:
async method CORSMiddleware.simple_response(receive, send, scope=โฆ, request_headers=โฆ) โ async method CORSMiddleware.simple_response(receive: Receive, send: Send, scope: Scope, request_headers: Headers) -> None - changed:
method CORSMiddleware.is_allowed_origin(origin) โ method CORSMiddleware.is_allowed_origin(origin: str) -> bool - changed:
method CORSMiddleware.preflight_response(request_headers) โ method CORSMiddleware.preflight_response(request_headers: Headers) -> ASGIInstance
- changed:
async function unattached_send(message: Message) โ async function unattached_send(message: Message) -> None
- added:
async method WSGIResponder.sender(send: Send) -> None - added:
class WSGIMiddleware - added:
class WSGIResponder - added:
constructor WSGIMiddleware(app: typing.Callable, workers: int=โฆ) -> None - added:
constructor WSGIResponder(app: typing.Callable, executor: ThreadPoolExecutor, scope: Scope) -> None - added:
function build_environ(scope: Scope, body: bytes) -> dict - added:
method WSGIResponder.start_response(status: str, response_headers: typing.List[typing.Tuple[str, str]], exc_info: typing.Any=โฆ) -> None - added:
method WSGIResponder.wsgi(environ: dict, start_response: typing.Callable) -> None
- changed:
async method Request.close() โ async method Request.close() -> None - changed:
async method Request.form() โ async method Request.form() -> dict
- changed:
method FileResponse.set_stat_headers(stat_result) โ method FileResponse.set_stat_headers(stat_result: os.stat_result) -> None - changed:
method Response.init_headers(headers) -> None โ method Response.init_headers(headers: typing.Mapping[str, str]=โฆ) -> None
- added:
variable HTTP_100_CONTINUE - added:
variable HTTP_101_SWITCHING_PROTOCOLS - added:
variable HTTP_200_OK - added:
variable HTTP_201_CREATED - added:
variable HTTP_202_ACCEPTED - added:
variable HTTP_203_NON_AUTHORITATIVE_INFORMATION - added:
variable HTTP_204_NO_CONTENT - added:
variable HTTP_205_RESET_CONTENT - added:
variable HTTP_206_PARTIAL_CONTENT - added:
variable HTTP_207_MULTI_STATUS - added:
variable HTTP_300_MULTIPLE_CHOICES - added:
variable HTTP_301_MOVED_PERMANENTLY - added:
variable HTTP_302_FOUND - added:
variable HTTP_303_SEE_OTHER - added:
variable HTTP_304_NOT_MODIFIED - added:
variable HTTP_305_USE_PROXY - added:
variable HTTP_306_RESERVED - added:
variable HTTP_307_TEMPORARY_REDIRECT - added:
variable HTTP_400_BAD_REQUEST - added:
variable HTTP_401_UNAUTHORIZED - added:
variable HTTP_402_PAYMENT_REQUIRED - added:
variable HTTP_403_FORBIDDEN - added:
variable HTTP_404_NOT_FOUND - added:
variable HTTP_405_METHOD_NOT_ALLOWED - added:
variable HTTP_406_NOT_ACCEPTABLE - added:
variable HTTP_407_PROXY_AUTHENTICATION_REQUIRED - added:
variable HTTP_408_REQUEST_TIMEOUT - added:
variable HTTP_409_CONFLICT - added:
variable HTTP_410_GONE - added:
variable HTTP_411_LENGTH_REQUIRED - added:
variable HTTP_412_PRECONDITION_FAILED - added:
variable HTTP_413_REQUEST_ENTITY_TOO_LARGE - added:
variable HTTP_414_REQUEST_URI_TOO_LONG - added:
variable HTTP_415_UNSUPPORTED_MEDIA_TYPE - added:
variable HTTP_416_REQUESTED_RANGE_NOT_SATISFIABLE - added:
variable HTTP_417_EXPECTATION_FAILED - added:
variable HTTP_422_UNPROCESSABLE_ENTITY - added:
variable HTTP_423_LOCKED - added:
variable HTTP_424_FAILED_DEPENDENCY - added:
variable HTTP_428_PRECONDITION_REQUIRED - added:
variable HTTP_429_TOO_MANY_REQUESTS - added:
variable HTTP_431_REQUEST_HEADER_FIELDS_TOO_LARGE - added:
variable HTTP_451_UNAVAILABLE_FOR_LEGAL_REASONS - added:
variable HTTP_500_INTERNAL_SERVER_ERROR - added:
variable HTTP_501_NOT_IMPLEMENTED - added:
variable HTTP_502_BAD_GATEWAY - added:
variable HTTP_503_SERVICE_UNAVAILABLE - added:
variable HTTP_504_GATEWAY_TIMEOUT - added:
variable HTTP_505_HTTP_VERSION_NOT_SUPPORTED - added:
variable HTTP_507_INSUFFICIENT_STORAGE - added:
variable HTTP_511_NETWORK_AUTHENTICATION_REQUIRED - added:
variable WS_1000_NORMAL_CLOSURE - added:
variable WS_1001_GOING_AWAY - added:
variable WS_1002_PROTOCOL_ERROR - added:
variable WS_1003_UNSUPPORTED_DATA - added:
variable WS_1004_NO_STATUS_RCVD - added:
variable WS_1005_ABNORMAL_CLOSURE - added:
variable WS_1007_INVALID_FRAME_PAYLOAD_DATA - added:
variable WS_1008_POLICY_VIOLATION - added:
variable WS_1009_MESSAGE_TOO_BIG - added:
variable WS_1010_MANDATORY_EXT - added:
variable WS_1011_INTERNAL_ERROR - added:
variable WS_1012_SERVICE_RESTART - added:
variable WS_1013_TRY_AGAIN_LATER - added:
variable WS_1014_BAD_GATEWAY - added:
variable WS_1015_TLS_HANDSHAKE
- changed:
constructor WebSocketTestSession(app, scope) โ constructor WebSocketTestSession(app: ASGIApp, scope: Scope) -> None - changed:
function TestClient(app: typing.Callable, base_url: str=โฆ, raise_server_exceptions=โฆ) -> _TestClient โ function TestClient(app: ASGIApp, base_url: str=โฆ, raise_server_exceptions: bool=โฆ) -> _TestClient - changed:
method WebSocketTestSession.close(code=โฆ) โ method WebSocketTestSession.close(code: int=โฆ) -> None - changed:
method WebSocketTestSession.receive() โ method WebSocketTestSession.receive() -> Message - changed:
method WebSocketTestSession.receive_bytes() โ method WebSocketTestSession.receive_bytes() -> bytes - changed:
method WebSocketTestSession.receive_json() โ method WebSocketTestSession.receive_json() -> typing.Any - changed:
method WebSocketTestSession.receive_text() โ method WebSocketTestSession.receive_text() -> str - changed:
method WebSocketTestSession.send(message) โ method WebSocketTestSession.send(message: Message) -> None - changed:
method WebSocketTestSession.send_bytes(data) โ method WebSocketTestSession.send_bytes(data: bytes) -> None - changed:
method WebSocketTestSession.send_json(data) โ method WebSocketTestSession.send_json(data: typing.Any) -> None - changed:
method WebSocketTestSession.send_text(data) โ method WebSocketTestSession.send_text(data: str) -> None - added:
variable AuthType - added:
variable Cookies - added:
variable DataType - added:
variable FileType - added:
variable Params - added:
variable TimeOut