home / docs / sections

sections: upgrade-1.0a20:fixing-async-with-httpx-asyncclient-app-app

This data as json

id page ref title content breadcrumbs references
upgrade-1.0a20:fixing-async-with-httpx-asyncclient-app-app upgrade-1.0a20 fixing-async-with-httpx-asyncclient-app-app Fixing async with httpx.AsyncClient(app=app) Some older plugins may use the following pattern in their tests, which is no longer supported: app = Datasette([], memory=True).app() async with httpx.AsyncClient(app=app) as client: response = await client.get("http://localhost/path") The new pattern is to use ds.client like this: ds = Datasette([], memory=True) response = await ds.client.get("/path") ["Datasette 1.0a20 plugin upgrade guide"] []
Powered by Datasette · Queries took 3.216ms