summaryrefslogtreecommitdiff
path: root/lib/sqlalchemy
diff options
context:
space:
mode:
authorMike Bayer <mike_mp@zzzcomputing.com>2023-03-05 19:54:30 -0500
committerMike Bayer <mike_mp@zzzcomputing.com>2023-03-05 19:54:30 -0500
commit49f8ec4bcbaf7b1fa65eb69073d15dba76562cc9 (patch)
treea5fa4df93956b4848c01b5372799018dbad6ca7e /lib/sqlalchemy
parente1d62bd531960ec5b31ef23058b3cd32e9a5730f (diff)
downloadsqlalchemy-49f8ec4bcbaf7b1fa65eb69073d15dba76562cc9.tar.gz
(lots of) changelog updates for 2.0.5
Change-Id: Iea2ca2cd1eb44b4e9139f2bb6c3d6239f67aeb56
Diffstat (limited to 'lib/sqlalchemy')
-rw-r--r--lib/sqlalchemy/engine/events.py19
1 files changed, 19 insertions, 0 deletions
diff --git a/lib/sqlalchemy/engine/events.py b/lib/sqlalchemy/engine/events.py
index b906389a9..9028c8c33 100644
--- a/lib/sqlalchemy/engine/events.py
+++ b/lib/sqlalchemy/engine/events.py
@@ -744,6 +744,25 @@ class DialectEvents(event.Events[Dialect]):
make use of a native ``ping()`` method supplied by the DBAPI which does
not make use of disconnect codes.
+ .. versionchanged:: 2.0.0 The :meth:`.DialectEvents.handle_error`
+ event hook participates in connection pool "pre-ping" operations.
+ Within this usage, the :attr:`.ExceptionContext.engine` attribute
+ will be ``None``, however the :class:`.Dialect` in use is always
+ available via the :attr:`.ExceptionContext.dialect` attribute.
+
+ .. versionchanged:: 2.0.5 Added :attr:`.ExceptionContext.is_pre_ping`
+ attribute which will be set to ``True`` when the
+ :meth:`.DialectEvents.handle_error` event hook is triggered within
+ a connection pool pre-ping operation.
+
+ .. versionchanged:: 2.0.5 An issue was repaired that allows for the
+ PostgreSQL ``psycopg`` and ``psycopg2`` drivers, as well as all
+ MySQL drivers, to properly participate in the
+ :meth:`.DialectEvents.handle_error` event hook during
+ connection pool "pre-ping" operations; previously, the
+ implementation was non-working for these drivers.
+
+
A handler function has two options for replacing
the SQLAlchemy-constructed exception into one that is user
defined. It can either raise this new exception directly, in