Replace PROTOCOL_TLS by PROTOCOL_TLS_CLIENT in the tls module
What does this PR do?
This PR replaces the deprecated PROTOCOL_TLS by TLS_PROTOCOL_CLIENT. The PROTOCOL_TLS has been deprecated since 3.10 and will eventually be removed:
https://docs.python.org/3/library/ssl.html#ssl.PROTOCOL_TLS
The code actually includes a comment to the PROTOCOL_TLS_CLIENT documentation which seems to imply this was a leftover.
Motivation
Keeping deprecated parts can cause issues when upgrading to new versions of python and generate lots of warnings when running logs that can obscure CI validation.
Review checklist (to be filled by reviewers)
- [ ] Feature or bugfix MUST have appropriate tests (unit, integration, e2e)
- [ ] Add the
qa/skip-qalabel if the PR doesn't need to be tested during QA. - [ ] If you need to backport this PR to another branch, you can add the
backport/<branch-name>label to the PR and it will automatically open a backport PR once this one is merged
Codecov Report
:white_check_mark: All modified and coverable lines are covered by tests.
:white_check_mark: Project coverage is 91.09%. Comparing base (7442ae8) to head (649529e).
:warning: Report is 1 commits behind head on master.
Additional details and impacted files
:rocket: New features to boost your workflow:
- :snowflake: Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
- :package: JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.
⚠️ Warnings
🧪 4 Tests failed
test_ssl_cafilefromtest_api.py(Datadog)assert <_SSLMethod.PROTOCOL_TLS_CLIENT: 16> == <_SSLMethod.PROTOCOL_TLS: 2> + where <_SSLMethod.PROTOCOL_TLS_CLIENT: 16> = <ssl.SSLContext object at 0x7f76084e25d0>.protocol + and <_SSLMethod.PROTOCOL_TLS: 2> = ssl.PROTOCOL_TLS
test_ssl_capathfromtest_api.py(Datadog)assert <_SSLMethod.PROTOCOL_TLS_CLIENT: 16> == <_SSLMethod.PROTOCOL_TLS: 2> + where <_SSLMethod.PROTOCOL_TLS_CLIENT: 16> = <ssl.SSLContext object at 0x7f76084e2f30>.protocol + and <_SSLMethod.PROTOCOL_TLS: 2> = ssl.PROTOCOL_TLS
test_ssl_certfromtest_api.py(Datadog)assert <_SSLMethod.PROTOCOL_TLS_CLIENT: 16> == <_SSLMethod.PROTOCOL_TLS: 2> + where <_SSLMethod.PROTOCOL_TLS_CLIENT: 16> = <ssl.SSLContext object at 0x7f76084e18b0>.protocol + and <_SSLMethod.PROTOCOL_TLS: 2> = ssl.PROTOCOL_TLSView all
test_ssl_verify_falsefromtest_api.py(Datadog)assert <_SSLMethod.PROTOCOL_TLS_CLIENT: 16> == <_SSLMethod.PROTOCOL_TLS: 2> + where <_SSLMethod.PROTOCOL_TLS_CLIENT: 16> = <ssl.SSLContext object at 0x7f75f4d7cd70>.protocol + and <_SSLMethod.PROTOCOL_TLS: 2> = ssl.PROTOCOL_TLS
ℹ️ Info
❄️ No new flaky tests detected
This comment will be updated automatically if new data arrives.🔗 Commit SHA: 649529e | Docs | Was this helpful? Give us feedback!