Skip to content

feat(python): support proto-only APIs#4075

Open
jskeet wants to merge 1 commit intogoogleapis:mainfrom
jskeet:python-proto-only-apis
Open

feat(python): support proto-only APIs#4075
jskeet wants to merge 1 commit intogoogleapis:mainfrom
jskeet:python-proto-only-apis

Conversation

@jskeet
Copy link
Contributor

@jskeet jskeet commented Feb 16, 2026

Adds handling for "proto-only" APIs (by which we mean APIs without a GAPIC library configured). These APIs:

  • Use the python and pyi protoc plugins, not gapic
  • Generate to a slightly different staging directory
  • Copy the .proto files as well as the generated code

This change configures these APIs during migration.

Fixes #3204.

@jskeet jskeet requested a review from a team as a code owner February 16, 2026 16:45
@codecov
Copy link

codecov bot commented Feb 16, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 81.90%. Comparing base (e323d45) to head (8bfd87f).

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #4075      +/-   ##
==========================================
- Coverage   81.93%   81.90%   -0.04%     
==========================================
  Files          78       78              
  Lines        6516     6516              
==========================================
- Hits         5339     5337       -2     
- Misses        832      833       +1     
- Partials      345      346       +1     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

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 introduces support for 'proto-only' Python APIs, which are APIs that do not have a GAPIC client. The changes are well-structured and include comprehensive tests for the new functionality and error handling. A detailed security audit found no high-severity or critical vulnerabilities, specifically noting safe handling of command execution with exec.CommandContext for protoc and python3, secure path construction for .proto files using filepath.Join and filepath.Base, and robust data handling. My feedback includes a minor suggestion to improve error wrapping for better diagnostics.

@jskeet jskeet force-pushed the python-proto-only-apis branch 2 times, most recently from 7b65ab7 to 6af22c0 Compare February 16, 2026 16:58
Adds handling for "proto-only" APIs (by which we mean APIs without a
GAPIC library configured). These APIs:

- Use the python and pyi protoc plugins, not gapic
- Generate to a slightly different staging directory
- Copy the .proto files as well as the generated code

Fixes googleapis#3204.
@jskeet jskeet force-pushed the python-proto-only-apis branch from 6af22c0 to 8bfd87f Compare February 16, 2026 16:59
@jskeet jskeet requested a review from JoeWang1127 February 16, 2026 17:32
@jskeet
Copy link
Contributor Author

jskeet commented Feb 16, 2026

@JoeWang1127 I can separate this out into the generation code and then the migration code if necessary, but I thought it made sense to do all in one go.

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.

python: support proto-only libraries

1 participant