nacos-sdk-python icon indicating copy to clipboard operation
nacos-sdk-python copied to clipboard

fix deprecated warning

Open nightosong opened this issue 3 months ago • 1 comments

Title: Fix deprecated ssl.SSLContext() usage

Description: This PR replaces the deprecated ssl.SSLContext() initialization (which defaults to ssl.PROTOCOL_TLS) with an explicit protocol argument.

  • Updated ctx = ssl.SSLContext()ctx = ssl.SSLContext(ssl.PROTOCOL_TLS_CLIENT)

  • This resolves the following deprecation warnings in Python 3.11+:

    DeprecationWarning: ssl.SSLContext() without protocol argument is deprecated.
    DeprecationWarning: ssl.PROTOCOL_TLS is deprecated.
    

Using ssl.PROTOCOL_TLS_CLIENT ensures compatibility with current Python versions and aligns with the recommended usage of the ssl module.

nightosong avatar Sep 15 '25 08:09 nightosong