-
Notifications
You must be signed in to change notification settings - Fork 74
fix: drop packaging and pkg_resources #2477
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
Merged
Merged
Changes from 6 commits
Commits
Show all changes
11 commits
Select commit
Hold shift + click to select a range
976d8a5
fix: drop packaging and pkg_resources
parthea 36d928d
moved imports
daniel-sanche 6f052c8
added no covers
daniel-sanche a02daf0
updated goldens
daniel-sanche d33ae4d
Merge branch 'main' into drop-pkg-resources-packaging
daniel-sanche 356d178
added additional no cover
daniel-sanche 0311b27
moved parse_version_to_tuple into else block
daniel-sanche f7f67ab
fixed indent
daniel-sanche a188534
removed ParsedVersion
daniel-sanche e148d63
removed extra ParsedVersion
daniel-sanche 0f89297
removed unneeded import
daniel-sanche File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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.
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.
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.
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_supportmodule. 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?
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.
@daniel-sanche Your suggestion sounds good to me. Good catch!
Uh oh!
There was an error while loading. Please reload this page.
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.
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.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.
googleapis/python-api-core#864
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.
Ok, I made the change, let me know if that works