-
Couldn't load subscription status.
- Fork 83
fix: update the async transactional types to not require extra awaits #1045
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
Closed
jekozyra
wants to merge
5
commits into
googleapis:main
from
poggiolabs:jillian/update-types-for-async-transactions
Closed
Changes from 1 commit
Commits
Show all changes
5 commits
Select commit
Hold shift + click to select a range
ca23405
fix: update the async transactional types to not require extra awaits
jekozyra c0e1446
add typing extensions
jekozyra a630701
python <3.10 compat
jekozyra 576a8a8
use a protocol
jekozyra 68118b7
Merge branch 'main' into jillian/update-types-for-async-transactions
jekozyra 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
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.
It looks like ParamSpec was added in python 3.10, and we need to support 3.8
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.
I added
typing_extensionsto support expanded type hinting for older python versions. Let me know if that works, otherwise I'll come up with something more hacky for the signatures.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.
Sorry, adding an extra dependency to setup.py isn't an option unfortunately
Let me know if you're able to experiment with getting this working, or I can try to take it from here if you don't have the capacity
Thanks!
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.
I updated it to use a protocol instead. The type checking still looks to achieve the intended result on my end.
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.
Sorry, it looks like I was wrong when I said we support 3.8+. We actually still support 3.7 here, which doesn't support Protocol either.
If we can keep some of this confined to the TYPE_CHECKING block, that could be a solution, since we our mypy checks run against a more recent version of Python (Maybe ParamSpec could work that way?). Or maybe there's another way to accomplish the same thing
If you're interested in running some of these tests locally, there's a short section in the CONTRIBUTING file on using nox. It works well with pyenv. Or you can let me know if you want me to take more of this on
I'll take another look at this next week, thanks!
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.
I'm not going to have time to continue looking at this for the forseeable future.