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

remove pytest_asyncio lib #403

Merged

Conversation

EdwardLi-coder
Copy link
Contributor

When I use Python 3.12, I receive many warnings about the following issue:

/Users/lifei/PycharmProjects/datachain/.nox/tests-3-12/lib/python3.12/site-packages/pytest_asyncio/plugin.py:208: PytestDeprecationWarning: The configuration option "asyncio_default_fixture_loop_scope" is unset.
The event loop scope for asynchronous fixtures will default to the fixture caching scope. Future versions of pytest-asyncio will default the loop scope for asynchronous fixtures to function scope. Set the default fixture loop scope explicitly in order to avoid unexpected behavior in the future. Valid fixture loop scopes are: "function", "class", "module", "package", "session"

  warnings.warn(PytestDeprecationWarning(_DEFAULT_FIXTURE_LOOP_SCOPE_UNSET))

The reason is that the asyncio_default_fixture_loop_scope needs to be explicitly defined. I have added it in this PR.

@EdwardLi-coder EdwardLi-coder force-pushed the add_asyncio_default_fixture_loop_sope branch from d04be2c to e1df74a Compare September 7, 2024 03:45
Copy link

codecov bot commented Sep 7, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 87.28%. Comparing base (ae493e7) to head (f0d20e2).
Report is 2 commits behind head on main.

Additional details and impacted files
@@           Coverage Diff           @@
##             main     #403   +/-   ##
=======================================
  Coverage   87.28%   87.28%           
=======================================
  Files          92       92           
  Lines        9960     9960           
  Branches     2033     2031    -2     
=======================================
  Hits         8694     8694           
  Misses        912      912           
  Partials      354      354           
Flag Coverage Δ
datachain 87.23% <ø> (ø)

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@skshetry
Copy link
Member

skshetry commented Sep 7, 2024

I don't think we have any async tests. So, most likely, we can get rid of it from tests dependency and remove this config.

asyncio_mode = "auto"

(cc @rlamy).

@EdwardLi-coder
Copy link
Contributor Author

I don't think we have any async tests. So, most likely, we can get rid of it from tests dependency and remove this config.

asyncio_mode = "auto"

(cc @rlamy).

I agree with this.And I will update it.Thank you.

Copy link
Member

@shcheklein shcheklein left a comment

Choose a reason for hiding this comment

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

thanks !

Copy link
Member

@skshetry skshetry left a comment

Choose a reason for hiding this comment

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

Please adjust the title. Otherwise lgtm. Thank you.

@EdwardLi-coder EdwardLi-coder changed the title add asyncio_default_fixture_loop_scope remove pytest_asyncio lib Sep 9, 2024
@skshetry skshetry merged commit d36d06f into iterative:main Sep 9, 2024
31 of 32 checks passed
@EdwardLi-coder EdwardLi-coder deleted the add_asyncio_default_fixture_loop_sope branch September 9, 2024 07:22
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants