From b28b6cd2fe97f7e193a235877abeec2c8eb0a821 Mon Sep 17 00:00:00 2001 From: Simon Willison Date: Sun, 12 Sep 2021 13:13:52 -0700 Subject: [PATCH] Warn that execute_write_fn(fn) should be a non-async function --- docs/internals.rst | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/docs/internals.rst b/docs/internals.rst index d5db7ffa..910f2c71 100644 --- a/docs/internals.rst +++ b/docs/internals.rst @@ -664,6 +664,10 @@ This method works like ``.execute_write()``, but instead of a SQL statement you The function can then perform multiple actions, safe in the knowledge that it has exclusive access to the single writable connection as long as it is executing. +.. warning:: + + ``fn`` needs to be a regular function, not an ``async def`` function. + For example: .. code-block:: python