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

prerelease_deps session with coroutine 'UnaryUnaryCall._invoke' was never awaited with pytest-asyncio>0.21.2 #954

Open
parthea opened this issue Aug 13, 2024 · 1 comment
Assignees
Labels
api: firestore Issues related to the googleapis/python-firestore API. priority: p3 Desirable enhancement or fix. May not be included in next release. type: cleanup An internal cleanup or hygiene concern.

Comments

@parthea
Copy link
Contributor

parthea commented Aug 13, 2024

See build log here where the presubmit Kokoro Prerelease Dependencies which runs the prerelease_deps nox session fails with RuntimeWarning: coroutine 'UnaryUnaryCall._invoke' was never awaited

The issue only appears when using pytest-asyncio>0.21.2

tests/system/test_system_async.py::test_or_query_in_transaction[None] ERROR                                                                                                                                                                        [ 49%]
tests/system/test_system.py::test_collections[system-tests-named-db] Exception ignored in: <coroutine object UnaryUnaryCall._invoke at 0x7f0eb26a5380>
Traceback (most recent call last):
  File "/usr/local/google/home/partheniou/.pyenv/versions/3.12.0/lib/python3.12/warnings.py", line 552, in _warn_unawaited_coroutine
    warn(msg, category=RuntimeWarning, stacklevel=2, source=coro)
RuntimeWarning: coroutine 'UnaryUnaryCall._invoke' was never awaited
FAILED
@parthea parthea added the type: cleanup An internal cleanup or hygiene concern. label Aug 13, 2024
@product-auto-label product-auto-label bot added the api: firestore Issues related to the googleapis/python-firestore API. label Aug 13, 2024
parthea added a commit that referenced this issue Aug 13, 2024
@daniel-sanche
Copy link
Contributor

This is related to https://github.com/pytest-dev/pytest-asyncio/releases/tag/v0.23.8

"As of v0.23, pytest-asyncio attaches an asyncio event loop to each item of the test suite (i.e. session, packages, modules, classes, functions) and allows tests to be run in those loops when marked accordingly. Pytest-asyncio currently assumes that async fixture scope is correlated with the new event loop scope. This prevents fixtures from being evaluated independently from the event loop scope and breaks some existing test suites"

It looks like 0.24.0 is changing how event loops are handled again, so maybe it will help

@daniel-sanche daniel-sanche added the priority: p3 Desirable enhancement or fix. May not be included in next release. label Aug 13, 2024
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. priority: p3 Desirable enhancement or fix. May not be included in next release. type: cleanup An internal cleanup or hygiene concern.
Projects
None yet
Development

No branches or pull requests

3 participants