FazBrowse GitHub Viewer | Trending |
URL:
| Home
Tools: [Download Repo ZIP]   [Original HTTPS Page]

fix: drop usage of distutils by parthea · Pull Request #541 · googleapis/python-api-core · GitHub

This repository was archived by the owner on Feb 23, 2026. It is now read-only.
/ python-api-core Public archive

fix: drop usage of distutils - #541

Merged
parthea merged 9 commits into
mainfrom
drop-usage-of-distutils
Nov 2, 2023
Merged

fix: drop usage of distutils#541
parthea merged 9 commits into
mainfrom
drop-usage-of-distutils

Conversation

parthea commented Oct 21, 2023

Copy link
Copy Markdown
Contributor

Fixes #507 🦕

  • Raises ValueError if the format of the GOOGLE_API_USE_CLIENT_CERTIFICATE is not as defined below
    (2) If GOOGLE_API_USE_CLIENT_CERTIFICATE environment variable
    is "true", then the ``client_cert_source`` property can be used
    to provide client certificate for mutual TLS transport. If
    not provided, the default SSL client certificate will be used if
    present. If GOOGLE_API_USE_CLIENT_CERTIFICATE is "false" or not
    set, no client certificate will be used.

This is the same behaviour that exists in gapic-generator-python here https://github.com/googleapis/gapic-generator-python/blob/45f18a69454bcff68c0f98535c68fbdb4e09db1d/gapic/templates/%25namespace/%25name_%25version/%25sub/services/%25service/client.py.j2#L253-L256

parthea requested review from a team October 21, 2023 13:24
product-auto-label Bot added the size: s Pull request size is small. label Oct 21, 2023

vchudnov-g left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Choose a reason Spam Abuse Off Topic Outdated Duplicate Resolved Low Quality

Only a minor, non-blocking comment.

util.strtobool(os.getenv("GOOGLE_API_USE_CLIENT_CERTIFICATE", "false"))
)

use_client_cert = os.getenv("GOOGLE_API_USE_CLIENT_CERTIFICATE", "false")

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Choose a reason Spam Abuse Off Topic Outdated Duplicate Resolved Low Quality

Might as well us lower() in this assignment so you don't have to repeat it below

(It would be great to cast this to a bool like the previous code was doing, but it seems like too much overhead for the very limited use in a very compact LOC range. The string comparison is OK.)

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Choose a reason Spam Abuse Off Topic Outdated Duplicate Resolved Low Quality

Fixed in 614150d

parthea merged commit 4bd9e10 into main Nov 2, 2023
parthea deleted the drop-usage-of-distutils branch November 2, 2023 20:51
This was referenced May 30, 2025
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode characters
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

size: s Pull request size is small.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Remove dependency on deprecated distutils

4 participants


Back | FazBrowse Home | New Git URL