Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

chore(deps): update dependency pytest-asyncio to v1#13389

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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.

Already on GitHub?Sign in to your account

Open
renovate-bot wants to merge1 commit intoGoogleCloudPlatform:main
base:main
Choose a base branch
Loading
fromrenovate-bot:renovate/pytest-asyncio-1.x

Conversation

renovate-bot
Copy link
Contributor

This PR contains the following updates:

PackageChangeAgeAdoptionPassingConfidence
pytest-asyncio (changelog)==0.23.6 ->==1.0.0ageadoptionpassingconfidence
pytest-asyncio (changelog)==0.25.3 ->==1.0.0ageadoptionpassingconfidence
pytest-asyncio (changelog)==0.16.0 ->==1.0.0ageadoptionpassingconfidence
pytest-asyncio (changelog)==0.21.0 ->==1.0.0ageadoptionpassingconfidence
pytest-asyncio (changelog)==0.21.1 ->==1.0.0ageadoptionpassingconfidence
pytest-asyncio (changelog)==0.24.0 ->==1.0.0ageadoptionpassingconfidence

Release Notes

pytest-dev/pytest-asyncio (pytest-asyncio)

v1.0.0

Compare Source

v0.26.0: pytest-asyncio 0.26.0

Compare Source

  • Adds configuration option that sets default event loop scope for all tests#​793
  • Improved type annotations forpytest_asyncio.fixture#​1045
  • Addedtyping-extensions as additional dependency for Python<3.10#​1045

v0.25.3: pytest-asyncio 0.25.3

Compare Source

  • Avoid errors in cleanup of async generators when event loop is already closed#​1040

v0.25.2: pytest-asyncio 0.25.2

Compare Source

  • Callloop.shutdown_asyncgens() before closing the event loop to ensure async generators are closed in the same manner asasyncio.run does#​1034

v0.25.1: pytest-asyncio 0.25.1

Compare Source

  • Fixes an issue that caused a broken event loop when a function-scoped test was executed in between two tests with wider loop scope#​950
  • Improves test collection speed in auto mode#​1020
  • Corrects the warning that is emitted upon redefining the event_loop fixture

v0.25.0: pytest-asyncio 0.25.0

Compare Source

0.25.0 (2024-12-13)

  • Deprecated: Added warning when asyncio test requests async@pytest.fixture in strict mode. This will become an error in a future version of flake8-asyncio.#​979
  • Updates the error message aboutpytest.mark.asyncio'sscope keyword argument to sayloop_scope instead.#​1004
  • Verbose log displays correct parameter name: asyncio_default_fixture_loop_scope#​990
  • Propagatescontextvars set in async fixtures to other fixtures and tests on Python 3.11 and above.#​1008

v0.24.0: pytest-asyncio 0.24.0

Compare Source

0.24.0 (2024-08-22)

  • BREAKING: Updated minimum supported pytest version to v8.2.0
  • Adds an optionalloop_scope keyword argument topytest.mark.asyncio. This argument controls which event loop is used to run the marked async test.#​706,#​871
  • Deprecates the optionalscope keyword argument topytest.mark.asyncio for API consistency withpytest_asyncio.fixture. Users are encouraged to use theloop_scope keyword argument, which does exactly the same.
  • Raises an error when passingscope orloop_scope as a positional argument to@pytest.mark.asyncio.#​812
  • Fixes a bug that caused module-scoped async fixtures to fail when reused in other modules#​862#​668

v0.23.8: pytest-asyncio 0.23.8

Compare Source

0.23.8 (2024-07-17)

  • Fixes a bug that caused duplicate markers in async tests#​813

Known issues

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 (see#​706). For example, a test suite may require all fixtures and tests to run in the same event loop, but have async fixtures that are set up and torn down for each module. If you're affected by this issue, please continue using the v0.21 release, until it is resolved.

v0.23.7: pytest-asyncio 0.23.7

Compare Source

0.23.7 (2024-05-19)

  • Silence deprecation warnings about unclosed event loops that occurred with certain CPython patch releases#​817

Known issues

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 (see#​706). For example, a test suite may require all fixtures and tests to run in the same event loop, but have async fixtures that are set up and torn down for each module. If you're affected by this issue, please continue using the v0.21 release, until it is resolved.


Configuration

📅Schedule: Branch creation - At any time (no schedule defined), Automerge - At any time (no schedule defined).

🚦Automerge: Disabled by config. Please merge this manually once you are satisfied.

Rebasing: Never, or you tick the rebase/retry checkbox.

🔕Ignore: Close this PR and you won't be reminded about these updates again.


  • If you want to rebase/retry this PR, check this box

This PR was generated byMend Renovate. View therepository job log.

@renovate-botrenovate-bot requested review froma team ascode ownersMay 26, 2025 05:19
@trusted-contributions-gcftrusted-contributions-gcfbot added kokoro:force-runAdd this label to force Kokoro to re-run the tests. owlbot:runAdd this label to trigger the Owlbot post processor. labelsMay 26, 2025
@product-auto-labelproduct-auto-labelbot added samplesIssues that are directly related to samples. api: firestoreIssues related to the Firestore API. api: notebooksIssues related to the Vertex AI Workbench API. labelsMay 26, 2025
@kokoro-teamkokoro-team removed the kokoro:force-runAdd this label to force Kokoro to re-run the tests. labelMay 26, 2025
Copy link
Contributor

@gemini-code-assistgemini-code-assistbot left a comment

Choose a reason for hiding this comment

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

Hello@renovate-bot, I'm Gemini Code Assist1! I'm currently reviewing this pull request and will post my feedback shortly. In the meantime, here's a summary to help you and other reviewers quickly get up to speed!

Summary of Changes

Hello team, gemini-code-assist here to provide a summary of this pull request. This PR, authored by renovate-bot, focuses on updating thepytest-asyncio dependency across various test requirement files within the repository. The update targets version1.0.0, which is a major version bump from the previously pinned versions (ranging from0.16.0 to0.25.3). This upgrade is a standard dependency maintenance task to ensure we are using the latest stable version of the library, incorporating its newest features, bug fixes, and performance improvements. Reviewers should pay attention to potential breaking changes introduced in the1.0.0 release ofpytest-asyncio and verify that our test suites remain compatible.

Highlights

  • Dependency Update: The primary change is the upgrade of thepytest-asyncio library to version1.0.0 in multiplerequirements-test.txt files.
  • Major Version Bump: This is a major version update forpytest-asyncio, indicating potentially significant changes or breaking API modifications compared to the previous0.x versions used.
  • Widespread Impact: The update affects test dependencies in several different sample directories, includingalloydb,dialogflow-cx,firestore,genai,generative_ai, andmodel_garden.

Changelog

Click here to see the changelog
  • alloydb/notebooks/requirements-test.txt
    • Updatedpytest-asyncio from0.24.0 to1.0.0.
  • dialogflow-cx/requirements-test.txt
    • Updatedpytest-asyncio from0.21.1 to1.0.0.
  • firestore/cloud-async-client/requirements-test.txt
    • Updatedpytest-asyncio from0.21.0 (for Python > 3.6) and0.16.0 (for Python < 3.7) to1.0.0.
  • genai/controlled_generation/requirements-test.txt
    • Updatedpytest-asyncio from0.23.6 to1.0.0.
  • genai/count_tokens/requirements-test.txt
    • Updatedpytest-asyncio from0.23.6 to1.0.0.
  • genai/live/requirements-test.txt
    • Updatedpytest-asyncio from0.25.3 to1.0.0.
  • genai/model_optimizer/requirements-test.txt
    • Updatedpytest-asyncio from0.23.6 to1.0.0.
  • genai/template_folder/requirements-test.txt
    • Updatedpytest-asyncio from0.23.6 to1.0.0.
  • genai/thinking/requirements-test.txt
    • Updatedpytest-asyncio from0.23.6 to1.0.0.
  • genai/tools/requirements-test.txt
    • Updatedpytest-asyncio from0.23.6 to1.0.0.
  • generative_ai/chat_completions/requirements-test.txt
    • Updatedpytest-asyncio from0.23.6 to1.0.0.
  • generative_ai/embeddings/requirements-test.txt
    • Updatedpytest-asyncio from0.23.6 to1.0.0.
  • generative_ai/evaluation/requirements-test.txt
    • Updatedpytest-asyncio from0.23.6 to1.0.0.
  • generative_ai/extensions/requirements-test.txt
    • Updatedpytest-asyncio from0.23.6 to1.0.0.
  • generative_ai/function_calling/requirements-test.txt
    • Updatedpytest-asyncio from0.23.6 to1.0.0.
  • generative_ai/image_generation/requirements-test.txt
    • Updatedpytest-asyncio from0.23.6 to1.0.0.
  • generative_ai/model_garden/requirements-test.txt
    • Updatedpytest-asyncio from0.23.6 to1.0.0.
  • generative_ai/model_tuning/requirements-test.txt
    • Updatedpytest-asyncio from0.23.6 to1.0.0.
  • generative_ai/prompts/requirements-test.txt
    • Updatedpytest-asyncio from0.23.6 to1.0.0.
  • generative_ai/provisioned_throughput/requirements-test.txt
    • Updatedpytest-asyncio from0.23.6 to1.0.0.
  • generative_ai/rag/requirements-test.txt
    • Updatedpytest-asyncio from0.23.6 to1.0.0.
  • generative_ai/reasoning_engine/requirements-test.txt
    • Updatedpytest-asyncio from0.23.6 to1.0.0.
  • model_garden/gemma/requirements-test.txt
    • Updatedpytest-asyncio from0.23.6 to1.0.0.
Using Gemini Code Assist

The full guide for Gemini Code Assist can be found on ourdocumentation page, here are some quick tips.

Invoking Gemini

You can request assistance from Gemini at any point in your pull request via creating an issue comment (i.e. comment on the pull request page) using either/gemini <command> or@gemini-code-assist <command>. Below is a summary of the supported commands.

FeatureCommandDescription
Code Review/gemini reviewPerforms a code review for the current pull request in its current state.
Pull Request Summary/gemini summaryProvides a summary of the current pull request in its current state.
Comment@gemini-code-assistResponds in comments when explicitly tagged, both in issue comments and review comments.
Help/gemini helpDisplays a list of available commands.

Customization

To customize Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a.gemini/ folder in the base of the repository. Detailed instructions can be foundhere.

Limitations & Feedback

Gemini Code Assist is currently in preview and may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counter productive. You can react with 👍 and 👎 on@gemini-code-assist comments to provide feedback.

You can also get AI-powered code generation, chat, as well as code reviews directly in the IDE at no cost with theGemini Code Assist IDE Extension.


Async tests run fast,
Pytest helps them all pass,
New version is here.

Footnotes

  1. Review thePrivacy Notices,Generative AI Prohibited Use Policy,Terms of Service, and learn how to configure Gemini Code Assist in GitHubhere. Gemini can make mistakes, so double check it anduse code with caution.

Copy link
Contributor

@gemini-code-assistgemini-code-assistbot left a comment

Choose a reason for hiding this comment

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

Code Review

This pull request updatespytest-asyncio tov1.0.0 across multiplerequirements-test.txt files. This is a significant major version upgrade from0.x series, which can introduce breaking changes.

While many of the updates are fromv0.23.x orv0.25.x and might be lower risk (especially where async tests are not heavily used), a few files are jumping fromv0.21.x, which requires more careful consideration due to historical known issues withpytest-asyncio versions post-0.21.x concerning event loop and fixture scopes.

One critical issue has been identified regarding Python version compatibility forpytest-asyncio 1.0.0 infirestore/cloud-async-client/requirements-test.txt.

It's crucial that all corresponding test suites pass in CI environments after these updates. Please pay special attention to the test results fordialogflow-cx andfirestore/cloud-async-client.

Summary of Findings

  • Python Version Incompatibility: Infirestore/cloud-async-client/requirements-test.txt, the Python version markers forpytest-asyncio==1.0.0 are incorrect, as this version requires Python 3.8+. This is a critical issue that could lead to installation failures.
  • Risk of Breaking Changes from Large Version Jump: Fordialogflow-cx/requirements-test.txt andfirestore/cloud-async-client/requirements-test.txt, the update frompytest-asyncio v0.21.x tov1.0.0 is a large leap. Past versions between these releases had known issues that could break test suites. Thorough testing is essential to ensure compatibility.
  • Dependency Update Verification: This PR updatespytest-asyncio to a new major version (1.0.0). It's important to ensure all tests pass in CI across all affected samples to confirm compatibility and catch any regressions introduced by this update.

Merge Readiness

This pull request updatespytest-asyncio tov1.0.0. There is a critical issue infirestore/cloud-async-client/requirements-test.txt concerning Python version compatibility that must be addressed. Additionally, there are high-risk updates fordialogflow-cx andfirestore/cloud-async-client due to the significant version jump from0.21.x, which had different behavior regarding asyncio event loops and fixtures compared to later versions.

I recommend that the identified critical issue be fixed and that the high-risk updates be carefully validated through CI testing before this PR is merged. As I am an AI, I am not authorized to approve pull requests; please ensure this PR is reviewed and approved by a human maintainer after addressing the feedback.

Comment on lines +2 to +3
pytest-asyncio==1.0.0; python_version > '3.6'
pytest-asyncio==1.0.0; python_version < '3.7'
Copy link
Contributor

Choose a reason for hiding this comment

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

critical

The updatedpytest-asyncio==1.0.0 requires Python 3.8 or newer. The current version markers seem to be a carry-over from olderpytest-asyncio versions and are now incompatible or misleading.

Specifically:

  1. pytest-asyncio==1.0.0; python_version > '3.6': This would attempt to installpytest-asyncio 1.0.0 on Python 3.7, where it's not supported.
  2. pytest-asyncio==1.0.0; python_version < '3.7': This line attempts to installpytest-asyncio 1.0.0 on Python versions older than 3.7 (e.g., 3.6), where it's also not supported. This will likely lead to installation errors in such environments.

Given thatpytest==8.2.0 (also in this file) requires Python 3.8+, it's likely that Python versions older than 3.8 are no longer targeted for these tests.

Could we update these lines to accurately reflect the Python version compatibility ofpytest-asyncio==1.0.0? A single line specifyingpython_version >= '3.8' would be appropriate.

pytest-asyncio==1.0.0; python_version >= '3.8'

pytest-asyncio==1.0.0
Copy link
Contributor

Choose a reason for hiding this comment

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

high

This is a significant jump frompytest-asyncio==0.21.1 to1.0.0. Versions ofpytest-asyncio after0.21.x (specifically around0.23.x) had known issues regarding changes in event loop and fixture scope management that could break test suites previously working with0.21.x. The release notes forv0.23.7 andv0.23.8 (included in this PR's description) explicitly warned about this and recommended staying onv0.21 if affected.

While these specific warnings are not present in the release notes forv0.25.0 onwards, indicating the issue might be resolved or mitigated, the large version leap warrants careful testing.

Could you please ensure that the tests indialogflow-cx/, particularlystreaming_detect_intent_infinite_test.py which uses@pytest.mark.asyncio, are thoroughly checked and pass with this new version? This is important to confirm that the test suite is not affected by the past behavior changes.

@@ -1,4 +1,4 @@
pytest==8.2.0
pytest-asyncio==0.21.0; python_version > '3.6'
pytest-asyncio==0.16.0; python_version < '3.7'
pytest-asyncio==1.0.0; python_version > '3.6'
Copy link
Contributor

Choose a reason for hiding this comment

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

high

Similar to the concern raised fordialogflow-cx, this update involves a significant jump frompytest-asyncio==0.21.0 to1.0.0 (for Python > 3.6).

As mentioned,pytest-asyncio versions post-0.21.x (around0.23.x) introduced changes to event loop and fixture scope handling that could potentially break existing test suites. Thefirestore/cloud-async-client/ directory contains extensive use of async tests (snippets_test.py,distributed_counters_test.py).

Given the substantial changes between0.21.0 and1.0.0, it's crucial to verify that these tests continue to function correctly. Please ensure thorough CI validation for this package.

Sign up for freeto join this conversation on GitHub. Already have an account?Sign in to comment
Reviewers

@gemini-code-assistgemini-code-assist[bot]gemini-code-assist[bot] requested changes

At least 1 approving review is required to merge this pull request.

Assignees

@hongalexhongalex

Labels
api: firestoreIssues related to the Firestore API.api: notebooksIssues related to the Vertex AI Workbench API.owlbot:runAdd this label to trigger the Owlbot post processor.samplesIssues that are directly related to samples.
Projects
None yet
Milestone
No milestone
Development

Successfully merging this pull request may close these issues.

3 participants
@renovate-bot@hongalex@kokoro-team

[8]ページ先頭

©2009-2025 Movatter.jp