From 356421134230818f5c1a70812a9913cb4e0abe9c Mon Sep 17 00:00:00 2001 From: Daniel Townsend Date: Wed, 1 Mar 2023 15:24:21 +0000 Subject: [PATCH] fix typos in changelog --- CHANGES.rst | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/CHANGES.rst b/CHANGES.rst index 4a1733a39..9121e2f2c 100644 --- a/CHANGES.rst +++ b/CHANGES.rst @@ -8,7 +8,7 @@ Added support for savepoints within transactions. .. code-block:: python - await DB.transaction() as transaction: + async with DB.transaction() as transaction: await Manager.objects().create(name="Great manager") savepoint = await transaction.savepoint() await Manager.objects().create(name="Great manager") @@ -19,8 +19,8 @@ The behaviour of nested context managers has also been changed slightly. .. code-block:: python - await DB.transaction() as transaction: - await DB.transaction() as transaction: + async with DB.transaction(): + async with DB.transaction(): # This used to raise an exception We no longer raise an exception if there are nested transaction context @@ -30,8 +30,8 @@ If you want the existing behaviour: .. code-block:: python - await DB.transaction() as transaction: - await DB.transactiona(allow_nested=False) as transaction: + async with DB.transaction(): + async with DB.transactiona(allow_nested=False): # TransactionError! -------------------------------------------------------------------------------