Upgrading starlette 0.9 to 0.10
Unknown0.9.11 → 0.10.7
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.
Requires Python >=3.6 from 0.10.3 (none stated before).
API changes
Generated by DepDelta from published Python source. Not mixed with prose notes.
- removed:
method Starlette.load_template_env(template_directory: str=…) -> typing.Any - changed:
constructor Starlette(debug: bool=…, template_directory: str=…) -> None → constructor Starlette(debug: bool=…, routes: typing.List[BaseRoute]=…, template_directory: str=…) -> None - added:
method Starlette.host(host: str, app: ASGIApp, name: str=…) -> None
- changed:
async method AuthenticationBackend.authenticate(request: Request) -> typing.Optional[typing.Tuple[AuthCredentials, BaseUser]] → async method AuthenticationBackend.authenticate(conn: HTTPConnection) -> typing.Optional[typing.Tuple[AuthCredentials, BaseUser]] - changed:
function has_required_scope(request: Request, scopes: typing.Sequence[str]) -> bool → function has_required_scope(conn: HTTPConnection, scopes: typing.Sequence[str]) -> bool
- removed:
export compile
- removed:
function compile(query: ClauseElement, dialect: Dialect) -> typing.Tuple[str, list] - removed:
variable logger
- added:
async method MysqlBackend.shutdown() -> None - added:
async method MysqlBackend.startup() -> None - added:
async method MysqlSession.acquire_connection() -> aiomysql.Connection - added:
async method MysqlSession.execute(query: ClauseElement) -> None - added:
async method MysqlSession.executemany(query: ClauseElement, values: list) -> None - added:
async method MysqlSession.fetchall(query: ClauseElement) -> typing.Any - added:
async method MysqlSession.fetchone(query: ClauseElement) -> typing.Any - added:
async method MysqlSession.release_connection() -> None - added:
async method MysqlTransaction.commit() -> None - added:
async method MysqlTransaction.rollback() -> None - added:
async method MysqlTransaction.start() -> None - added:
class MysqlBackend(DatabaseBackend) - added:
class MysqlSession(DatabaseSession) - added:
class MysqlTransaction(DatabaseTransaction) - added:
class Record - added:
constructor MysqlBackend(database_url: typing.Union[str, DatabaseURL]) -> None - added:
constructor MysqlSession(pool: aiomysql.pool.Pool, dialect: Dialect) - added:
constructor MysqlTransaction(session: MysqlSession) - added:
constructor Record(row: tuple, result_columns: tuple) -> None - added:
method MysqlBackend.get_dialect() -> Dialect - added:
method MysqlBackend.session() -> MysqlSession - added:
method MysqlSession.transaction() -> DatabaseTransaction - added:
variable logger
- added:
variable logger
- removed:
method FormData.get(key: typing.Any, default: typing.Any=…) -> typing.Any - removed:
method FormData.getlist(key: typing.Any) -> typing.List[FormValue] - removed:
method FormData.items() -> typing.List[typing.Tuple[str, FormValue]] - removed:
method FormData.keys() -> typing.List[str] - removed:
method FormData.multi_items() -> typing.List[typing.Tuple[str, FormValue]] - removed:
method FormData.values() -> typing.List[FormValue] - removed:
method QueryParams.get(key: typing.Any, default: typing.Any=…) -> typing.Any - removed:
method QueryParams.getlist(key: typing.Any) -> typing.List[str] - removed:
method QueryParams.items() -> typing.List[typing.Tuple[str, str]] - removed:
method QueryParams.keys() -> typing.List[str] - removed:
method QueryParams.multi_items() -> typing.List[typing.Tuple[str, str]] - removed:
method QueryParams.values() -> typing.List[str] - removed:
variable FormValue - changed:
class FormData(typing.Mapping[str, FormValue]) → class FormData(ImmutableMultiDict) - changed:
class QueryParams(typing.Mapping[str, str]) → class QueryParams(ImmutableMultiDict) - changed:
constructor FormData(form: typing.Union[FormData, typing.Mapping[str, FormValue]]=…, items: typing.List[typing.Tuple[str, FormValue]]=…) -> None → constructor FormData(*args: typing.Union[FormData, typing.Mapping[str, typing.Union[str, UploadFile]], typing.List[typing.Tuple[str, typing.Union[str, UploadFile]]]], **kwargs: typing.Union[str, UploadFile]) -> None - changed:
constructor QueryParams(params: typing.Union[QueryParams, typing.Mapping[str, str]]=…, items: typing.List[typing.Tuple[str, str]]=…, query_string: str=…, scope: Scope=…) -> None → constructor QueryParams(*args: typing.Union[ImmutableMultiDict, typing.Mapping, typing.List[typing.Tuple[typing.Any, typing.Any]], str, bytes], **kwargs: typing.Any) -> None - changed:
constructor URLPath(path: str, protocol: str) -> None → constructor URLPath(path: str, protocol: str=…, host: str=…) -> None - changed:
constructor UploadFile(filename: str, file: typing.IO=…) -> None → constructor UploadFile(filename: str, file: typing.IO=…, content_type: str=…) -> None - added:
async method FormData.close() -> None - added:
class ImmutableMultiDict(typing.Mapping) - added:
class MultiDict(ImmutableMultiDict) - added:
constructor DatabaseURL(url: typing.Union[str, URL]) - added:
constructor ImmutableMultiDict(*args: typing.Union[ImmutableMultiDict, typing.Mapping, typing.List[typing.Tuple[typing.Any, typing.Any]]], **kwargs: typing.Any) -> None - added:
method ImmutableMultiDict.get(key: typing.Any, default: typing.Any=…) -> typing.Any - added:
method ImmutableMultiDict.getlist(key: typing.Any) -> typing.List[str] - added:
method ImmutableMultiDict.items() -> typing.ItemsView - added:
method ImmutableMultiDict.keys() -> typing.KeysView - added:
method ImmutableMultiDict.multi_items() -> typing.List[typing.Tuple[str, str]] - added:
method ImmutableMultiDict.values() -> typing.ValuesView - added:
method MultiDict.append(key: typing.Any, value: typing.Any) -> None - added:
method MultiDict.clear() -> None - added:
method MultiDict.pop(key: typing.Any, default: typing.Any=…) -> typing.Any - added:
method MultiDict.popitem() -> typing.Tuple - added:
method MultiDict.poplist(key: typing.Any) -> typing.List - added:
method MultiDict.setdefault(key: typing.Any, default: typing.Any=…) -> typing.Any - added:
method MultiDict.setlist(key: typing.Any, values: typing.List) -> None - added:
method MultiDict.update(*args: typing.Union[MultiDict, typing.Mapping, typing.List[typing.Tuple[typing.Any, typing.Any]]], **kwargs: typing.Any) -> None
- changed:
constructor GraphQLApp(schema: graphene.Schema, executor: typing.Any=…) -> None → constructor GraphQLApp(schema: graphene.Schema, executor: typing.Any=…, executor_class: type=…) -> None
- changed:
constructor AuthenticationMiddleware(app: ASGIApp, backend: AuthenticationBackend, on_error: typing.Callable[[Request, AuthenticationError], Response]=…) -> None → constructor AuthenticationMiddleware(app: ASGIApp, backend: AuthenticationBackend, on_error: typing.Callable[[HTTPConnection, AuthenticationError], Response]=…) -> None - changed:
static method AuthenticationMiddleware.default_on_error(request: Request, exc: Exception) -> Response → static method AuthenticationMiddleware.default_on_error(conn: HTTPConnection, exc: Exception) -> Response
- changed:
constructor DatabaseMiddleware(app: ASGIApp, database_url: typing.Union[str, DatabaseURL], rollback_on_shutdown: bool) -> None → constructor DatabaseMiddleware(app: ASGIApp, database_url: typing.Union[str, DatabaseURL], rollback_on_shutdown: bool=…) -> None
- added:
property HTTPConnection.app -> typing.Any
- removed:
class TemplateResponse(Response) - removed:
constructor TemplateResponse(template: typing.Any, context: dict, status_code: int=…, headers: dict=…, media_type: str=…, background: BackgroundTask=…) - removed:
field TemplateResponse.media_type
- changed:
constructor Mount(path: str, app: ASGIApp, name: str=…) -> None → constructor Mount(path: str, app: ASGIApp=…, routes: typing.List[BaseRoute]=…, name: str=…) -> None - added:
async method Lifespan.asgi(receive: Receive, send: Send) -> None - added:
async method Lifespan.shutdown() -> None - added:
async method Lifespan.startup() -> None - added:
class Host(BaseRoute) - added:
class Lifespan(BaseRoute) - added:
constructor Host(host: str, app: ASGIApp, name: str=…) -> None - added:
constructor Lifespan(on_startup: typing.Callable=…, on_shutdown: typing.Callable=…) - added:
method Host.matches(scope: Scope) -> typing.Tuple[Match, Scope] - added:
method Host.url_path_for(name: str, **path_params: str) -> URLPath - added:
method Lifespan.add_event_handler(event_type: str, func: typing.Callable) -> None - added:
method Lifespan.matches(scope: Scope) -> typing.Tuple[Match, Scope] - added:
method Lifespan.on_event(event_type: str) -> typing.Callable - added:
method Router.host(host: str, app: ASGIApp, name: str=…) -> None - added:
property Host.routes -> typing.List[BaseRoute]
- added:
method BaseSchemaGenerator.OpenAPIResponse(request: Request) -> Response
- added:
class Jinja2Templates - added:
constructor Jinja2Templates(directory: str) -> None - added:
method Jinja2Templates.TemplateResponse(name: str, context: dict, status_code: int=…, headers: dict=…, media_type: str=…, background: BackgroundTask=…) -> _TemplateResponse - added:
method Jinja2Templates.get_env(directory: str) -> jinja2.Environment - added:
method Jinja2Templates.get_template(name: str) -> jinja2.Template - added:
variable jinja2
- changed:
method WebSocketTestSession.receive_json() -> typing.Any → method WebSocketTestSession.receive_json(mode: str=…) -> typing.Any - changed:
method WebSocketTestSession.send_json(data: typing.Any) -> None → method WebSocketTestSession.send_json(data: typing.Any, mode: str=…) -> None
- changed:
async method WebSocket.receive_json() -> typing.Any → async method WebSocket.receive_json(mode: str=…) -> typing.Any - changed:
async method WebSocket.send_json(data: typing.Any) -> None → async method WebSocket.send_json(data: typing.Any, mode: str=…) -> None