Skip to content
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

fix: Correct AsyncTransaction Return Types #751

Draft
wants to merge 4 commits into
base: main
Choose a base branch
from

Conversation

TimPansino
Copy link

@TimPansino TimPansino commented Aug 8, 2023

Thank you for opening a Pull Request! Before submitting your PR, there are a few things you can do to make sure it goes smoothly:

  • Make sure to open an issue as a bug/issue before writing your code! That way we can discuss the change, evaluate designs, and agree on the general idea
  • Ensure the tests and linter pass
  • Code coverage does not decrease (if any source code was changed)
  • Appropriate docs were updated (if necessary)

Fixes #750

@TimPansino TimPansino requested review from a team as code owners August 8, 2023 19:19
@google-cla
Copy link

google-cla bot commented Aug 8, 2023

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.

@conventional-commit-lint-gcf
Copy link

conventional-commit-lint-gcf bot commented Aug 8, 2023

🤖 I detect that the PR title and the commit message differ and there's only one commit. To use the PR title for the commit history, you can use Github's automerge feature with squashing, or use automerge label. Good luck human!

-- conventional-commit-lint bot
https://conventionalcommits.org/

@product-auto-label product-auto-label bot added size: m Pull request size is medium. api: firestore Issues related to the googleapis/python-firestore API. labels Aug 8, 2023
@TimPansino TimPansino force-pushed the fix-async-transaction branch 2 times, most recently from f8c8446 to a255665 Compare August 8, 2023 19:27
@TimPansino
Copy link
Author

Completely unrelated to this PR, it looks like your repo doesn't have unit (3.11) set as a required check. Might want to change that setting.

@TimPansino TimPansino changed the title Fix Async Transaction Return Types fix: Correct AsyncTransaction Return Types Aug 8, 2023
@daniel-sanche daniel-sanche added kokoro:run Add this label to force Kokoro to re-run the tests. owlbot:run Add this label to trigger the Owlbot post processor. labels Oct 23, 2023
@gcf-owl-bot gcf-owl-bot bot removed the owlbot:run Add this label to trigger the Owlbot post processor. label Oct 23, 2023
@yoshi-kokoro yoshi-kokoro removed the kokoro:run Add this label to force Kokoro to re-run the tests. label Oct 23, 2023
@daniel-sanche
Copy link
Contributor

So it looks like there's a mismatch between what is returned and what is declared in the type hints. I agree with this fix to align with the type hints in principle, but I am worried that it could break existing users who are used to the "wrong" return value

You mention that you see errors whether you treat the result as a coroutine or an async generator. Is there really no way to access the generator?

Right now, I'm thinking this would make sense to address in a future breaking change, along with other type fixes needed as part of #773. But we can probably get this in sooner if it really is completely broken as-is

@parthea parthea marked this pull request as draft January 26, 2024 16:06
@parthea
Copy link
Contributor

parthea commented Jan 26, 2024

Converting to draft as there has been no recent activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
api: firestore Issues related to the googleapis/python-firestore API. size: m Pull request size is medium.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

AsyncTransaction APIs do not conform to documented return types
4 participants