Skip to content

Comments

chore(migration): Migrate code from googleapis/google-auth-library-python-oauthlib into packages/google-auth-oauthlib#15593

Merged
parthea merged 222 commits intomainfrom
migration.google-auth-library-python-oauthlib.migration.2026-02-20_16-32-39.migrate
Feb 24, 2026
Merged

chore(migration): Migrate code from googleapis/google-auth-library-python-oauthlib into packages/google-auth-oauthlib#15593
parthea merged 222 commits intomainfrom
migration.google-auth-library-python-oauthlib.migration.2026-02-20_16-32-39.migrate

Conversation

@parthea
Copy link
Contributor

@parthea parthea commented Feb 20, 2026

See #14910.

This PR should be merged with a merge-commit, not a squash-commit, in order to preserve the git history.

Jon Wayne Parrott and others added 30 commits April 13, 2017 09:47
* add google-oauthlib-tool

Commandline tool to generate credentials using 3LO oauth2 flow.

See:
googleapis/google-auth-library-python#152
* Marks local web server test as a webtest

Once imported internally, we'll use this to control test execution.

* Update test_flow.py
After running this in a different CI environment, I had issues with the test being unable to open port 8080 as it was already in use. This doesn't fix the problem perfectly but is less likely to encounter a collision.
* Accept redirect_uri as arg to flow creating classmethods.

* Attend to lint complaints.

* Get the redirect_uri from kwargs.
* carry token expiry into Credentials object (#18)

* populate id_token into credentials (#9)
Fix links after repo move to googleapis.
…33)

* Use actual server port in redirect_uri. Allows setting port to 0 to request an unassigned ephemeral port

* Reformat to match linter rules
@gemini-code-assist
Copy link
Contributor

Summary of Changes

Hello @parthea, I'm Gemini Code Assist1! I'm currently reviewing this pull request and will post my feedback shortly. In the meantime, here's a summary to help you and other reviewers quickly get up to speed!

This pull request executes a significant architectural change by migrating the existing google-auth-library-python-oauthlib project into a new packages/google-auth-oauthlib directory. This move consolidates the library within a larger repository, streamlining development and maintenance. The migration encompasses all aspects of the project, from core source code and build configurations to documentation and testing infrastructure, ensuring the library remains fully functional and well-supported in its new location.

Highlights

  • Codebase Migration: The entire google-auth-library-python-oauthlib codebase has been migrated into a new packages/google-auth-oauthlib directory, establishing a monorepo structure.
  • Configuration Files Added: Numerous configuration files for build automation, linting, GitHub workflows, and repository metadata have been added to support the new package location.
  • Core Library and Utilities: All core library modules, including flow.py, helpers.py, interactive.py, and the command-line tool, have been moved and integrated into the new package structure.
  • Documentation and Testing: Comprehensive documentation files, including CHANGELOG.md, CONTRIBUTING.rst, README.rst, and Sphinx configuration, along with a full suite of unit tests and test data, have been added to the new package.
Changelog
  • packages/google-auth-oauthlib/CHANGELOG.md
    • Added the changelog for the google-auth-oauthlib library, detailing its version history and updates.
Activity
  • No specific human activity (comments, reviews) was provided in the context for this pull request.
Using Gemini Code Assist

The full guide for Gemini Code Assist can be found on our documentation page, here are some quick tips.

Invoking Gemini

You can request assistance from Gemini at any point by creating a comment using either /gemini <command> or @gemini-code-assist <command>. Below is a summary of the supported commands on the current page.

Feature Command Description
Code Review /gemini review Performs a code review for the current pull request in its current state.
Pull Request Summary /gemini summary Provides a summary of the current pull request in its current state.
Comment @gemini-code-assist Responds in comments when explicitly tagged, both in pull request comments and review comments.
Help /gemini help Displays a list of available commands.

Customization

To customize Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a .gemini/ folder in the base of the repository. Detailed instructions can be found here.

Limitations & Feedback

Gemini Code Assist may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counter productive. You can react with 👍 and 👎 on @gemini-code-assist comments. If you're interested in giving your feedback about your experience with Gemini Code Assist for Github and other Google products, sign up here.

You can also get AI-powered code generation, chat, as well as code reviews directly in the IDE at no cost with the Gemini Code Assist IDE Extension.

Footnotes

  1. Review the Privacy Notices, Generative AI Prohibited Use Policy, Terms of Service, and learn how to configure Gemini Code Assist in GitHub here. Gemini can make mistakes, so double check it and use code with caution.

Copy link
Contributor

@gemini-code-assist gemini-code-assist bot left a comment

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 migrates the google-auth-oauthlib library into this monorepo. The changes are extensive, involving the addition of source code, documentation, and CI/CD configuration. The migration seems mostly correct, but I've identified a few issues: a broken link in the changelog, a configuration issue in the documentation build that would lead to a missing version number, and a critical security vulnerability related to the use of an unsafe function in a helper script. My review comments provide details and suggestions for these points.

# See also: https://github.com/docascode/sphinx-docfx-yaml/issues/85
sys.path.insert(0, os.path.abspath("."))

__version__ = ""
Copy link
Contributor

Choose a reason for hiding this comment

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

medium

The __version__ variable is initialized to an empty string and is not updated. This will cause the version to be missing from the generated documentation. Please read the version dynamically from setup.py.

Suggested change
__version__ = ""
import re
with open(os.path.join(os.path.dirname(__file__), "..", "setup.py")) as f:
setup_contents = f.read()
version_match = re.search(r"version = \"(.*?)\"", setup_contents)
__version__ = version_match.group(1)

@google-cla
Copy link

google-cla bot commented Feb 20, 2026

Thanks for your pull request! It looks like this may be your first contribution to a Google open source project. Before we can look at your pull request, you'll need to sign a Contributor License Agreement (CLA).

View this failed invocation of the CLA check for more information.

For the most up to date status, view the checks section at the bottom of the pull request.

@parthea parthea added the do not merge Indicates a pull request not ready for merge, due to either quality or timing. label Feb 20, 2026
@parthea parthea assigned parthea and unassigned chalmerlowe Feb 23, 2026
@parthea parthea marked this pull request as ready for review February 24, 2026 16:17
@parthea parthea requested review from a team as code owners February 24, 2026 16:17
@parthea
Copy link
Contributor Author

parthea commented Feb 24, 2026

This PR is ready for review but not merge

Copy link
Contributor

@chalmerlowe chalmerlowe left a comment

Choose a reason for hiding this comment

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

LGTM

@parthea parthea removed the do not merge Indicates a pull request not ready for merge, due to either quality or timing. label Feb 24, 2026
@parthea parthea merged commit 2ebf92d into main Feb 24, 2026
28 checks passed
@parthea parthea deleted the migration.google-auth-library-python-oauthlib.migration.2026-02-20_16-32-39.migrate branch February 24, 2026 17:38
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.