-
Notifications
You must be signed in to change notification settings - Fork 122
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
feat: adds the capability to include custom user agent string #819
Conversation
🤖 I detect that the PR title and the commit message differ and there's only one commit. To use the PR title for the commit history, you can use Github's automerge feature with squashing, or use -- conventional-commit-lint bot |
Follow-up: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm fine with this but left one small comment
pandas_gbq/gbq.py
Outdated
@@ -337,11 +341,17 @@ def log_elapsed_seconds(self, prefix="Elapsed", postfix="s.", overlong=6): | |||
|
|||
def get_client(self): | |||
import google.api_core.client_info | |||
import pandas | |||
|
|||
# import pandas # noqa: F401 # TODO is this line needed here? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
just adding this comment about addressing the TODO
is the concern that the import is redundant? was it in here for region tag reasons? (I don't see a region tag 🤷🏻♀️ )
Adds the ability to include a custom prefix in the user agent string.
Also includes a feature that allows the hyphen in the legacy user agent string to be replaced by a slash to be more in line with RFC9110.
Current default user agent (product + delimiter + version):
Legacy:
pandas-2.0.1
RFC9110:
pandas/2.0.1
With a prefix:
Legacy:
<your_custom_string> pandas-2.0.1
RFC9110:
<your_custom_string> pandas/2.0.1
Fixes #807 🦕