Skip to content
This repository was archived by the owner on Aug 19, 2025. It is now read-only.

Commit c9e3464

Browse files
committed
fix: contextvar.get takes no keyword arguments
1 parent bea6629 commit c9e3464

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

databases/core.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -193,7 +193,7 @@ def connection(self) -> "Connection":
193193
if self._global_connection is not None:
194194
return self._global_connection
195195

196-
connection = self._connection_contextvar.get(default=None)
196+
connection = self._connection_contextvar.get(None)
197197
if connection is None:
198198
connection = Connection(self._backend)
199199
self._connection_contextvar.set(connection)
@@ -417,7 +417,7 @@ async def start(self) -> "Transaction":
417417

418418
async def commit(self) -> None:
419419
connection = self._connection_callable()
420-
transaction = self._transaction_contextvar.get(default=None)
420+
transaction = self._transaction_contextvar.get(None)
421421
assert transaction is not None, "Transaction not found in current task"
422422
async with connection._transaction_lock:
423423
assert connection._transaction_stack[-1] is self
@@ -429,7 +429,7 @@ async def commit(self) -> None:
429429

430430
async def rollback(self) -> None:
431431
connection = self._connection_callable()
432-
transaction = self._transaction_contextvar.get(default=None)
432+
transaction = self._transaction_contextvar.get(None)
433433
assert transaction is not None, "Transaction not found in current task"
434434
async with connection._transaction_lock:
435435
assert connection._transaction_stack[-1] is self

0 commit comments

Comments
 (0)