main commit
All checks were successful
continuous-integration/drone/push Build is passing

This commit is contained in:
2025-10-16 16:30:25 +09:00
parent 91c7e04474
commit 537e7b363f
1146 changed files with 45926 additions and 77196 deletions

View File

@@ -1,5 +1,5 @@
# pool/events.py
# Copyright (C) 2005-2025 the SQLAlchemy authors and contributors
# sqlalchemy/pool/events.py
# Copyright (C) 2005-2023 the SQLAlchemy authors and contributors
# <see AUTHORS file>
#
# This module is part of SQLAlchemy and is released under
@@ -35,12 +35,10 @@ class PoolEvents(event.Events[Pool]):
from sqlalchemy import event
def my_on_checkout(dbapi_conn, connection_rec, connection_proxy):
"handle an on checkout event"
event.listen(Pool, "checkout", my_on_checkout)
event.listen(Pool, 'checkout', my_on_checkout)
In addition to accepting the :class:`_pool.Pool` class and
:class:`_pool.Pool` instances, :class:`_events.PoolEvents` also accepts
@@ -51,7 +49,7 @@ class PoolEvents(event.Events[Pool]):
engine = create_engine("postgresql+psycopg2://scott:tiger@localhost/test")
# will associate with engine.pool
event.listen(engine, "checkout", my_on_checkout)
event.listen(engine, 'checkout', my_on_checkout)
""" # noqa: E501
@@ -175,7 +173,7 @@ class PoolEvents(event.Events[Pool]):
def checkin(
self,
dbapi_connection: Optional[DBAPIConnection],
dbapi_connection: DBAPIConnection,
connection_record: ConnectionPoolEntry,
) -> None:
"""Called when a connection returns to the pool.