Bump pytest-asyncio from 1.3.0 to 1.4.0#363
Conversation
Bumps [pytest-asyncio](https://github.com/pytest-dev/pytest-asyncio) from 1.3.0 to 1.4.0. - [Release notes](https://github.com/pytest-dev/pytest-asyncio/releases) - [Commits](pytest-dev/pytest-asyncio@v1.3.0...v1.4.0) --- updated-dependencies: - dependency-name: pytest-asyncio dependency-version: 1.4.0 dependency-type: direct:development update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] <support@github.com>
AssigneesThe following users could not be added as assignees: Please fix the above issues or remove invalid values from |
| @pytest.fixture | ||
| def current_event_loop(): | ||
| """ | ||
| Provide a current event loop on the main thread for synchronous tests that |
There was a problem hiding this comment.
What does the "on the main thread" mean in this context? What other threads are used?
And what does it mean to "drive the loop"? Is that some standard vocabulary? Why is calling shark.start "driving" the loop?
There was a problem hiding this comment.
What does the "on the main thread" mean in this context? What other threads are used?
That was referencing the error message: RuntimeError: There is no current event loop in thread 'MainThread'. Updated the description to be more clear.
And what does it mean to "drive the loop"? Is that some standard vocabulary? Why is calling shark.start "driving" the loop?
This is some weird vocab claude used when I asked it to write the comment and description. I have rewritten the description to describe the exact issue without the strange terminology. What it meant was that start() calls asyncio.get_event_loop() and loop.run_until_complete().
Bumps pytest-asyncio from 1.3.0 to 1.4.0.
Had to make some changes to get the tests to pass as the newest version of
pytest-asynciocan no longer be relied upon to provide an implicit event loop for synchronous tests.What
Bumps
pytest-asyncio1.3.0 → 1.4.0 and adds a customcurrent_event_loopfixture to the synchronous tests intests/test_basic.py.Why we implemented our own event loop fixture
Several tests (
TestShark,TestWebsocket) contain synchronous test functions that need a running event loop in order to runBackend.start()as that method callsasyncio.get_event_loop().get_event_loop()creating its own loop throws aDeprecationWarningand not aRuntimeErrorin Python 3.12, however, since the loop was explicitly set toNoneby pytest-asyncio during previous test teardown, it DOES throw aRuntimeError.pytest-asyncio calls
set_event_loop(None)on test teardown. In v1.3.0 it would also call_set_event_loop()passing in the old loop to provide an event loop to each test. After this change, that is no longer the case.Result
All 49 tests pass; the previous "no current event loop" failures and the
test_shark_initwarning are resolved.Release notes
Sourced from pytest-asyncio's releases.
... (truncated)
Commits
6e14cd2chore: Prepare release of v1.4.0.4b900fbBuild(deps): Bump codecov/codecov-action from 6.0.0 to 6.0.1ab9f632Build(deps): Bump zipp from 3.23.1 to 4.1.0a56fc77Build(deps): Bump hypothesis from 6.152.6 to 6.152.8e8bae9bBuild(deps): Bump requests from 2.34.0 to 2.34.2fc43340Build(deps): Bump idna from 3.14 to 3.15762eaf5Build(deps): Bump jaraco-functools from 4.4.0 to 4.5.0b62e222Build(deps): Bump click from 8.3.3 to 8.4.09190447Build(deps): Bump pydantic from 2.13.3 to 2.13.482a393cci: Remove unnecessary debug output.Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting
@dependabot rebase.Dependabot commands and options
You can trigger Dependabot actions by commenting on this PR:
@dependabot rebasewill rebase this PR@dependabot recreatewill recreate this PR, overwriting any edits that have been made to it@dependabot show <dependency name> ignore conditionswill show all of the ignore conditions of the specified dependency@dependabot ignore this major versionwill close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself)@dependabot ignore this minor versionwill close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself)@dependabot ignore this dependencywill close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)