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 deprecation warnings related to asyncio #364

Merged
merged 6 commits into from
Jan 12, 2023
Merged

Conversation

michael-k
Copy link
Contributor

Issue #, if available: n/a

Description of changes:

  • See individual commit messages; I tried to make small commits to ease the review :)
  • Some of those changes are necessary (but not sufficient) to run the tests against Python 3.10 and 3.11.
  • Once you drop support for Python <3.7 (3.6 reached its EOL in December 2021) the ext-aiohttp tests can use the fixture event_loop instead of loop as well.

By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.

Fixes

    DeprecationWarning: 'loop' fixture is deprecated and scheduled for
    removal, please use 'event_loop' instead

Except for `ext-aiohttp` because `pytest-aiohttp < 1.0.0` is too old
for that.
@michael-k michael-k requested a review from a team as a code owner November 4, 2022 23:44
Fixes

    The explicit passing of coroutine objects to asyncio.wait() is
    deprecated since Python 3.8, and scheduled for removal in Python
    3.11.

This has been “deprecated as it leads to confusing behavior”. See
https://docs.python.org/3.8/library/asyncio-task.html#asyncio-example-wait-coroutine
and
https://stackoverflow.com/questions/69889075/asyncio-wait-confusion-when-passed-a-coroutine
Use fixture `aiohttp_client` instead of `test_client`.  All the tests
back to Python 3.5 complained that `test_client` was deprecated.
@michael-k
Copy link
Contributor Author

Any change of getting that merged? I'd like to contribute more changes towards running the tests against Python 3.10 and 3.11.

@willarmiros willarmiros merged commit a028e0f into aws:master Jan 12, 2023
@michael-k michael-k deleted the async branch January 16, 2023 11:16
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