Skip to content

Conversation

@parthea
Copy link
Contributor

@parthea parthea commented Nov 6, 2025

@product-auto-label product-auto-label bot added the size: l Pull request size is large. label Nov 6, 2025
@product-auto-label product-auto-label bot added size: xl Pull request size is extra large. and removed size: l Pull request size is large. labels Nov 11, 2025
daniel-sanche
daniel-sanche previously approved these changes Nov 12, 2025
@parthea parthea marked this pull request as ready for review November 12, 2025 19:57
@parthea parthea requested a review from a team as a code owner November 12, 2025 19:57

ParsedVersion = Tuple[int, ...]

def parse_version_to_tuple(version_string: str) -> ParsedVersion: # pragma: NO COVER
Copy link
Contributor

Choose a reason for hiding this comment

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

This is duplicated from https://github.com/googleapis/python-api-core/blob/main/google/api_core/_python_package_support.py. At the very least, add a TODO to remove this once the GAPICs can depend on an appropriate version of api_core, but ideally you can include this in a conditional to define this only if this symbol does not exist in the imported api_core.

Copy link
Contributor

Choose a reason for hiding this comment

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

Hmm good point, but I noticed it's not technically a public method in api_core. So I'm not sure if we really should be referencing it in here if we have to grab it from the internal google.api_core._python_package_support module. In hindsight, this probably should have been exported in the __init__ with the others.

But I also notice that this block of code could be moved within this conditional, which is already commented in the way you describe. Would that be sufficient?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

@daniel-sanche Your suggestion sounds good to me. Good catch!

Copy link
Contributor

@vchudnov-g vchudnov-g Nov 13, 2025

Choose a reason for hiding this comment

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

Yes, putting it in the conditional is what I had in mind.

And you're right that we should export the symbol in the __init__. I'll do that.

Copy link
Contributor

Choose a reason for hiding this comment

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

Copy link
Contributor

Choose a reason for hiding this comment

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

Ok, I made the change, let me know if that works

@parthea parthea requested a review from vchudnov-g November 13, 2025 15:30
@parthea parthea assigned vchudnov-g and unassigned chalmerlowe Nov 13, 2025
@gkevinzheng gkevinzheng merged commit b4824c5 into main Nov 14, 2025
139 checks passed
@gkevinzheng gkevinzheng deleted the drop-pkg-resources-packaging branch November 14, 2025 15:23
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

size: xl Pull request size is extra large.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Remove dependency on packaging and pkg_resources

6 participants