diff --git a/doc/changelog.rst b/doc/changelog.rst index 3c307564b1..b554e7ce66 100644 --- a/doc/changelog.rst +++ b/doc/changelog.rst @@ -6,16 +6,16 @@ Changes in Version 4.12.1 (XXXX/XX/XX) Version 4.12.1 is a bug fix release. +- Fixed a bug that could raise ``UnboundLocalError`` when creating asynchronous connections over SSL. - Fixed a bug causing SRV hostname validation to fail when resolver and resolved hostnames are identical with three domain levels. Issues Resolved ............... -See the `PyMongo 4.12 release notes in JIRA`_ for the list of resolved issues +See the `PyMongo 4.12.1 release notes in JIRA`_ for the list of resolved issues in this release. -.. _PyMongo 4.12 release notes in JIRA: https://jira.mongodb.org/secure/ReleaseNote.jspa?projectId=10004&version=41916 -.. _PYTHON-5288: https://jira.mongodb.org/browse/PYTHON-5288 +.. _PyMongo 4.12.1 release notes in JIRA: https://jira.mongodb.org/secure/ReleaseNote.jspa?projectId=10004&version=43094 Changes in Version 4.12.0 (2025/04/08) -------------------------------------- diff --git a/pymongo/pool_shared.py b/pymongo/pool_shared.py index a46a4d2300..be7c416dc5 100644 --- a/pymongo/pool_shared.py +++ b/pymongo/pool_shared.py @@ -346,12 +346,10 @@ async def _configured_protocol_interface( ssl=ssl_context, ) except _CertificateError: - transport.abort() # Raise _CertificateError directly like we do after match_hostname # below. raise except (OSError, SSLError) as exc: - transport.abort() # We raise AutoReconnect for transient and permanent SSL handshake # failures alike. Permanent handshake failures, like protocol # mismatch, will be turned into ServerSelectionTimeoutErrors later.