Reviewed:  https://review.opendev.org/c/openstack/oslo.messaging/+/1007134
Committed: 
https://opendev.org/openstack/oslo.messaging/commit/0549588d89ceaf7e48616549a6ff7bb8ef2bec61
Submitter: "Zuul (22348)"
Branch:    master

commit 0549588d89ceaf7e48616549a6ff7bb8ef2bec61
Author: HervĂ© Beraud <[email protected]>
Date:   Thu Sep 24 13:29:58 2026 +0200

    Make SSL protocol constant loading resilient to deprecations
    
    The RabbitMQ driver referenced ssl.PROTOCOL_TLSv1 and
    ssl.PROTOCOL_SSLv23 directly at class load time. These protocol
    constants have been deprecated since Python 3.10 and are candidates
    for removal in a future CPython release. Hard-coding them at import
    time makes the driver brittle: once a constant is dropped, importing
    the driver fails with AttributeError regardless of whether the
    deprecated [oslo_messaging_rabbit] ssl_version option is in use. This
    is exactly what already happens for the long-removed PROTOCOL_SSLv2
    and PROTOCOL_SSLv3.
    
    Move the remaining hard-coded constants into the _OPTIONAL_PROTOCOLS
    dict, which resolves each value via getattr with a graceful
    try/except AttributeError fallback, consistent with how
    sslv2/sslv3/tlsv1_1/tlsv1_2 were already handled. Importing the
    driver now works on any Python version, independent of which
    deprecated protocol constants remain available.
    
    Note: on CPython 3.14 both constants are still present (only
    deprecated), so the AttributeError does not occur there today; this
    change guards against their eventual removal.
    
    Closes-Bug: #2167003
    Assisted-By: Claude Opus 4.8 <[email protected]>
    Change-Id: I83f3c9bcdf12300f00405d90516cbf795fc4804a
    Signed-off-by: HervĂ© Beraud <[email protected]>


** Changed in: oslo.messaging
       Status: In Progress => Fix Released

-- 
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to Ubuntu.
https://bugs.launchpad.net/bugs/2167003

Title:
  Import failure due to deprecated  SSL Protocols

To manage notifications about this bug go to:
https://bugs.launchpad.net/oslo.messaging/+bug/2167003/+subscriptions


-- 
ubuntu-bugs mailing list
[email protected]
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs

Reply via email to