googleapis / googleapis/google-cloud-python

google-auth: Fix Python 3.13 deprecation warnings for ssl.SSLContext in test suite

Open Beginner friendly
#17,760 0 comments 0 reactions 0 assignees View on GitHub
auth effort: low priority: p4 testing type: cleanup
Dominant language
Python
Stars
5.4k
Forks
1.8k
Avg merge
2d 23h
Merged PRs (30d)
123

Description

Running the test suite on Python 3.13 surfaces `DeprecationWarning`s due to initializing `ssl.SSLContext()` without a protocol argument.

This occurs in multiple places in `tests/transport/test__custom_tls_signer.py`. To resolve these warnings and ensure compatibility with future Python releases, we should update these calls to explicitly pass a protocol, such as `ssl.PROTOCOL_TLS_CLIENT`.

Contributor guide

Open the contributing guide

Research direction

Open tests/transport/test__custom_tls_signer.py and locate the ssl.SSLContext() calls that trigger warnings under Python 3.13. Update those initializations to pass an explicit protocol, then run the relevant test suite and confirm the deprecation warnings no longer appear.

Written by the indexing model from the issue text.

Assessment

Tech stack
python
Domain
testing
Issue type
Bug
Difficulty
2/5
Estimated time
1-3 hours
Activity status
Quiet
Clarity
Clearly specified
Newbie friendliness
85/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.