Skip to content

fix(pandas-gbq): deprecate auth_local_webserver=False and auth_redirect_uri - #19284

Closed
sycai wants to merge 1 commit into
mainfrom
sycai_pandas_gbq_fix
Closed

sycai wants to merge 1 commit into
mainfrom
sycai_pandas_gbq_fix

Conversation

@sycai

@sycai sycai commented Dec 1, 2026

Copy link
Copy Markdown
Contributor
  • Emit FutureWarning in pandas_gbq.auth.get_credentials() when auth_local_webserver=False or auth_redirect_uri is provided, while keeping behavior non-breaking.
  • Switch pydata_google_auth.default() call from deprecated auth_local_webserver= to use_local_webserver=.
  • Raise minimum dependency versions to google-auth-oauthlib >=1.5.0 (default PKCE + ExclusiveWSGIServer loopback protections) and pydata-google-auth >=1.9.1 (native Colab auth) in setup.py and testing/constraints-3.11.txt.
  • Update read_gbq/to_gbq docstrings and authentication docs to deprecate auth_local_webserver=False and auth_redirect_uri and guide headless users to gcloud auth application-default login --no-browser, service accounts/WIF, or Colab auth.

BUG=581917075

Thank you for opening a Pull Request! Before submitting your PR, there are a few things you can do to make sure it goes smoothly:

  • Make sure to open an issue as a bug/issue before writing your code! That way we can discuss the change, evaluate designs, and agree on the general idea
  • Ensure the tests and linter pass
  • Code coverage does not decrease (if any source code was changed)
  • Appropriate docs were updated (if necessary)

…ct_uri

- Emit FutureWarning in pandas_gbq.auth.get_credentials() when auth_local_webserver=False or auth_redirect_uri is provided, while keeping behavior non-breaking.
- Switch pydata_google_auth.default() call from deprecated auth_local_webserver= to use_local_webserver=.
- Raise minimum dependency versions to google-auth-oauthlib >=1.5.0 (default PKCE + ExclusiveWSGIServer loopback protections) and pydata-google-auth >=1.9.1 (native Colab auth) in setup.py and testing/constraints-3.11.txt.
- Update read_gbq/to_gbq docstrings and authentication docs to deprecate auth_local_webserver=False and auth_redirect_uri and guide headless users to gcloud auth application-default login --no-browser, service accounts/WIF, or Colab auth.

BUG=581917075

@gemini-code-assist gemini-code-assist Bot 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.

Code Review

This pull request deprecates the auth_local_webserver=False and auth_redirect_uri workflows due to OAuth security risks. It adds deprecation warnings in get_credentials, read_gbq, and to_gbq, updates the documentation with recommended alternatives (such as Application Default Credentials), bumps minimum versions for pydata-google-auth and google-auth-oauthlib, and adds unit tests to verify the warnings. There are no review comments, so I have no feedback to provide.

@sycai sycai added the do not merge Indicates a pull request not ready for merge, due to either quality or timing. label Dec 1, 2026
@sycai

sycai commented Dec 1, 2026

Copy link
Copy Markdown
Contributor Author

We shouldn't disallow local webserver auth

@sycai sycai closed this Dec 1, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

do not merge Indicates a pull request not ready for merge, due to either quality or timing.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant