Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

spanner/dbapi: pass user_agent+python_version in ClientInfo #140

Merged
merged 1 commit into from
Dec 8, 2019

Conversation

odeke-em
Copy link
Contributor

@odeke-em odeke-em commented Dec 8, 2019

user_agent being passed directly a spanner.Client(**) has
been deprecated in favor of passing in a field client_info
of type

google.api_core.gapic_v1.client_info.ClientInfo

in which we can specify:

  • user_agent
  • python_version

and that results in the following header being sent over the wire:

'x-goog-api-client': 'spanner-django/0.0.1 gl-python/3.7.3 grpc/1.21.1 gax/1.14.3'

Fixes #139

`user_agent` being passed directly a spanner.Client(**) has
been deprecated in favor of passing in a field `client_info`
of type

    google.api_core.gapic_v1.client_info.ClientInfo

in which we can specify:
* user_agent
* python_version

and that results in the following header being sent over the wire:

    'x-goog-api-client': 'spanner-django/0.0.1 gl-python/3.7.3 grpc/1.21.1 gax/1.14.3'

Fixes #139
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

dbapi: conform user_agent to be passed into client as google.api_core.gapic_v1.client_info.ClientInfo
1 participant