Skip to content

Upgrading starlette 0.7 to 0.8

Unknown0.7.4 → 0.8.8

UnknownUpgrade verdict

DepDelta hasn't looked for this range's notes yet, so breaking changes can't be ruled out.

  • 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.
Unknown for releases without notes

Releases without notes may still need changes. Check their commits before upgrading.

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

  • changed: constructor Starlette(debug: bool=…) -> None → constructor Starlette(debug: bool=…, template_directory: str=…) -> None
  • changed: method Starlette.add_exception_handler(exc_class: type, handler: typing.Callable) -> None → method Starlette.add_exception_handler(exc_class_or_status_code: typing.Union[int, typing.Type[Exception]], handler: typing.Callable) -> None
  • changed: method Starlette.add_route(path: str, route: typing.Callable, methods: typing.List[str]=…, include_in_schema: bool=…) -> None → method Starlette.add_route(path: str, route: typing.Callable, methods: typing.List[str]=…, name: str=…, include_in_schema: bool=…) -> None
  • changed: method Starlette.add_websocket_route(path: str, route: typing.Callable) -> None → method Starlette.add_websocket_route(path: str, route: typing.Callable, name: str=…) -> None
  • changed: method Starlette.exception_handler(exc_class: type) -> typing.Callable → method Starlette.exception_handler(exc_class_or_status_code: typing.Union[int, typing.Type[Exception]]) -> typing.Callable
  • changed: method Starlette.route(path: str, methods: typing.List[str]=…, include_in_schema: bool=…) -> typing.Callable → method Starlette.route(path: str, methods: typing.List[str]=…, name: str=…, include_in_schema: bool=…) -> typing.Callable
  • changed: method Starlette.websocket_route(path: str) -> typing.Callable → method Starlette.websocket_route(path: str, name: str=…) -> typing.Callable
  • added: method Starlette.get_template(name: str) -> typing.Any
  • added: method Starlette.load_template_env(template_directory: str=…) -> typing.Any
  • added: class Convertor
  • added: class FloatConvertor(Convertor)
  • added: class IntegerConvertor(Convertor)
  • added: class PathConvertor(Convertor)
  • added: class StringConvertor(Convertor)
  • added: field Convertor.regex
  • added: field FloatConvertor.regex
  • added: field IntegerConvertor.regex
  • added: field PathConvertor.regex
  • added: field StringConvertor.regex
  • added: method Convertor.convert(value: str) -> typing.Any
  • added: method Convertor.to_string(value: typing.Any) -> str
  • added: method FloatConvertor.convert(value: str) -> typing.Any
  • added: method FloatConvertor.to_string(value: typing.Any) -> str
  • added: method IntegerConvertor.convert(value: str) -> typing.Any
  • added: method IntegerConvertor.to_string(value: typing.Any) -> str
  • added: method PathConvertor.convert(value: str) -> typing.Any
  • added: method PathConvertor.to_string(value: typing.Any) -> str
  • added: method StringConvertor.convert(value: str) -> typing.Any
  • added: method StringConvertor.to_string(value: typing.Any) -> str
  • added: variable CONVERTOR_TYPES
  • removed: class DebugGenerator
  • removed: class DebugMiddleware
  • removed: constructor DebugGenerator(exc: Exception) -> None
  • removed: constructor DebugMiddleware(app: ASGIApp) -> None
  • removed: function get_debug_response(request: Request, exc: Exception) -> Response
  • removed: method DebugGenerator.generate_html() -> str
  • removed: method DebugGenerator.generate_plain_text() -> str
  • removed: static method DebugGenerator.gen_frame_html(frame: traceback.FrameSummary) -> str
  • removed: variable FRAME_TEMPLATE
  • removed: variable STYLES
  • removed: variable TEMPLATE
  • removed: method ExceptionMiddleware.server_error(request: Request, exc: HTTPException) -> Response
  • changed: method ExceptionMiddleware.add_exception_handler(exc_class: typing.Type[Exception], handler: typing.Callable) -> None → method ExceptionMiddleware.add_exception_handler(exc_class_or_status_code: typing.Union[int, typing.Type[Exception]], handler: typing.Callable) -> None
  • added: async method ServerErrorMiddleware.asgi(receive: Receive, send: Send, scope: Scope) -> None
  • added: class DebugGenerator
  • added: class ServerErrorMiddleware
  • added: constructor DebugGenerator(exc: Exception) -> None
  • added: constructor ServerErrorMiddleware(app: ASGIApp, handler: typing.Callable=…, debug: bool=…) -> None
  • added: method DebugGenerator.generate_html() -> str
  • added: method DebugGenerator.generate_plain_text() -> str
  • added: method ServerErrorMiddleware.debug_response(request: Request, exc: Exception) -> Response
  • added: method ServerErrorMiddleware.error_response(request: Request, exc: Exception) -> Response
  • added: static method DebugGenerator.gen_frame_html(frame: traceback.FrameSummary) -> str
  • added: variable FRAME_TEMPLATE
  • added: variable STYLES
  • added: variable TEMPLATE
  • changed: constructor SessionMiddleware(app: ASGIApp, secret_key: str, session_cookie: str=…) -> None → constructor SessionMiddleware(app: ASGIApp, secret_key: str, session_cookie: str=…, max_age: int=…) -> None
  • changed: constructor FileResponse(path: str, headers: dict=…, media_type: str=…, background: BackgroundTask=…, filename: str=…, stat_result: os.stat_result=…) -> None → constructor FileResponse(path: str, headers: dict=…, media_type: str=…, background: BackgroundTask=…, filename: str=…, stat_result: os.stat_result=…, method: str=…) -> None
  • changed: constructor Response(content: typing.Any, status_code: int=…, headers: dict=…, media_type: str=…, background: BackgroundTask=…) -> None → constructor Response(content: typing.Any=…, status_code: int=…, headers: dict=…, media_type: str=…, background: BackgroundTask=…) -> None
  • added: static method FileResponse.get_stat_headers(stat_result: os.stat_result) -> typing.Dict[str, str]
  • changed: function replace_params(path: str, path_params: typing.Dict[str, str]) -> typing.Tuple[str, dict] → function replace_params(path: str, param_convertors: typing.Dict[str, Convertor], path_params: typing.Dict[str, str]) -> typing.Tuple[str, dict]
  • changed: method Router.add_route(path: str, endpoint: typing.Callable, methods: typing.List[str]=…, include_in_schema: bool=…) -> None → method Router.add_route(path: str, endpoint: typing.Callable, methods: typing.List[str]=…, name: str=…, include_in_schema: bool=…) -> None
  • changed: method Router.add_websocket_route(path: str, endpoint: typing.Callable) -> None → method Router.add_websocket_route(path: str, endpoint: typing.Callable, name: str=…) -> None
  • changed: method Router.route(path: str, methods: typing.List[str]=…, include_in_schema: bool=…) -> typing.Callable → method Router.route(path: str, methods: typing.List[str]=…, name: str=…, include_in_schema: bool=…) -> typing.Callable
  • changed: method Router.websocket_route(path: str) -> typing.Callable → method Router.websocket_route(path: str, name: str=…) -> typing.Callable
  • added: method BaseRoute.compile_path(path: str) -> typing.Tuple[typing.Pattern, str, typing.Dict[str, Convertor]]
  • added: variable PARAM_REGEX
  • added: class EndpointInfo(typing.NamedTuple)
  • added: field EndpointInfo.func: typing.Callable
  • added: field EndpointInfo.http_method: str
  • added: field EndpointInfo.path: str
  • added: method BaseSchemaGenerator.get_endpoints(routes: typing.List[BaseRoute]) -> typing.List[EndpointInfo]
  • added: method BaseSchemaGenerator.parse_docstring(func_or_method: typing.Callable) -> dict
  • changed: constructor StaticFiles(*, directory: str) -> None → constructor StaticFiles(*, directory: str, check_dir: bool=…) -> None
  • added: variable NOT_MODIFIED_HEADERS