nacos-sdk-python
nacos-sdk-python copied to clipboard
fix deprecated warning
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.