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

Event loop shutdown failures on 0.17 #257

Closed
zanieb opened this issue Jan 13, 2022 · 11 comments · Fixed by #261
Closed

Event loop shutdown failures on 0.17 #257

zanieb opened this issue Jan 13, 2022 · 11 comments · Fixed by #261
Assignees

Comments

@zanieb
Copy link

zanieb commented Jan 13, 2022

We use the following to define a session scoped event loop (per #68)

@pytest.fixture(scope="session")
def event_loop(request):
    """
    Redefine the event loop to support session/module-scoped fixtures;
    see https://github.com/pytest-dev/pytest-asyncio/issues/68
    """
    policy = asyncio.get_event_loop_policy()
    loop = policy.new_event_loop()

    try:
        yield loop
    finally:
        loop.close()

After upgrading to 0.17, our test suite fails with

_______________________________________________________________________________________ ERROR at teardown of test_XXXX_______________________________________________________________________________________

fixturedef = <FixtureDef argname='event_loop' scope='session' baseid='tests'>, request = <SubRequest 'event_loop' for <Function test_secret_settings_are_not_serialized>>

    @pytest.hookimpl(trylast=True)
    def pytest_fixture_post_finalizer(fixturedef, request):
        """Called after fixture teardown"""
        if fixturedef.argname == "event_loop":
            policy = asyncio.get_event_loop_policy()
            # Clean up existing loop to avoid ResourceWarnings
>           policy.get_event_loop().close()

/opt/homebrew/Caskroom/miniconda/base/envs/orion-dev-38/lib/python3.8/site-packages/pytest_asyncio/plugin.py:163: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

self = <asyncio.unix_events._UnixDefaultEventLoopPolicy object at 0x7ff8eaa8f8b0>

    def get_event_loop(self):
        """Get the event loop for the current context.
    
        Returns an instance of EventLoop or raises an exception.
        """
        if (self._local._loop is None and
                not self._local._set_called and
                isinstance(threading.current_thread(), threading._MainThread)):
            self.set_event_loop(self.new_event_loop())
    
        if self._local._loop is None:
>           raise RuntimeError('There is no current event loop in thread %r.'
                               % threading.current_thread().name)
E           RuntimeError: There is no current event loop in thread 'MainThread'.

/opt/homebrew/Caskroom/miniconda/base/envs/orion-dev-38/lib/python3.8/asyncio/events.py:639: RuntimeError

Modifying the fixture to set the loop with the policy at the end resolves the error

    try:
        yield loop
    finally:
        loop.close()

    policy.set_event_loop(loop)

Leaving the loop open or setting the loop with the policy before yielding does not resolve the error.

I'm not sure why this is happening now, not sure if it needs a fix here.

We're using asyncio_mode = auto.

@seifertm seifertm self-assigned this Jan 13, 2022
@seifertm
Copy link
Contributor

@madkinsz Sorry to hear the new release is causing issues. The offending line was introduced in v0.17.0.

Your fixture setup looks correct to me and I cannot reproduce the issue. What's the output when adding --setup-show to the pytest call? Could you provide a reproducible example for the error you're getting?

@zanieb
Copy link
Author

zanieb commented Jan 13, 2022

Thanks for the quick reply.

Here's a repository with a MRE: https://github.com/madkinsz/pytest-asyncio-257

It looks like the issue is calling asyncio.run(...) in one of the tests.

e.g.

import asyncio


async def test_an_async_test_is_required():
    """Without an async test, the error will not be raised"""
    pass


def test_run_async_in_new_loop():
    async def foo():
        pass
    asyncio.run(foo())
❯ pytest . --setup-show
============================================================================================================================ test session starts =============================================================================================================================
platform darwin -- Python 3.8.12, pytest-6.2.5, py-1.11.0, pluggy-1.0.0
rootdir: /Users/mz/dev/contrib/pytest-asyncio-257, configfile: setup.cfg
plugins: env-0.6.2, flaky-3.7.0, anyio-3.4.0, xdist-2.4.0, asyncio-0.17.0, forked-1.3.0
collected 2 items                                                                                                                                                                                                                                                            

test_bug.py 
SETUP    S event_loop
        test_bug.py::test_an_async_test_is_required (fixtures used: event_loop).
        test_bug.py::test_run_async_in_new_loop.
TEARDOWN S event_loopE

=================================================================================================================================== ERRORS ===================================================================================================================================
______________________________________________________________________________________________________________ ERROR at teardown of test_run_async_in_new_loop _______________________________________________________________________________________________________________

fixturedef = <FixtureDef argname='event_loop' scope='session' baseid=''>, request = <SubRequest 'event_loop' for <Function test_an_async_test_is_required>>

    @pytest.hookimpl(trylast=True)
    def pytest_fixture_post_finalizer(fixturedef, request):
        """Called after fixture teardown"""
        if fixturedef.argname == "event_loop":
            policy = asyncio.get_event_loop_policy()
            # Clean up existing loop to avoid ResourceWarnings
>           policy.get_event_loop().close()

/opt/homebrew/Caskroom/miniconda/base/envs/orion-dev-38/lib/python3.8/site-packages/pytest_asyncio/plugin.py:163: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

self = <asyncio.unix_events._UnixDefaultEventLoopPolicy object at 0x7f934806a8b0>

    def get_event_loop(self):
        """Get the event loop for the current context.
    
        Returns an instance of EventLoop or raises an exception.
        """
        if (self._local._loop is None and
                not self._local._set_called and
                isinstance(threading.current_thread(), threading._MainThread)):
            self.set_event_loop(self.new_event_loop())
    
        if self._local._loop is None:
>           raise RuntimeError('There is no current event loop in thread %r.'
                               % threading.current_thread().name)
E           RuntimeError: There is no current event loop in thread 'MainThread'.

/opt/homebrew/Caskroom/miniconda/base/envs/orion-dev-38/lib/python3.8/asyncio/events.py:639: RuntimeError
========================================================================================================================== short test summary info ===========================================================================================================================
ERROR test_bug.py::test_run_async_in_new_loop - RuntimeError: There is no current event loop in thread 'MainThread'.
========================================================================================================================= 2 passed, 1 error in 0.10s =========================================================================================================================
 

zanieb added a commit to PrefectHQ/prefect that referenced this issue Jan 13, 2022
* Use a more realistic mock version

* Add debug print on failed assertion

* build with types

* Fix test

* Ensure version is correct during test runs by doing a deep fetch

* Remove unused threading lock

* Fixup comment

* Types working with a little hacking

* Return failed exit codes correctly

* Update vue-compositions

* Edits to installation and first steps tutorial, including updated UI image.

* Flow and task configuration edits and examples.

* Bundle everything in the components folder

* Task dependencies edits and examples.

* Orchestration components edits.

* FAQ edits.

* Fix some type errors

* Export radar nodes

* Remove name filter

* Add flow_id and task_id sorting options

* WIP on filters for read logs API

* Use flow run and task run IDs for logs

* Use flow_run_id, task_run_id in Log schema

* Use task run and flow run IDs for logs API

* format with black

* Add offset, empty case log API tests

* Update src/prefect/orion/database/interface.py

Co-authored-by: Mariia Kerimova <mashun4ek@gmail.com>

* Add LogFilter tests

* Remove unused imports

* Use `schema.dict()` for comparisons so pytest reports accurate diffs

* Add check for `minItems` and `maxItems` for Pydantic 1.9.0+

* fix docs bug

* Use array response for logs, bulk insert

* WIP

* Update `State.__str__` to only include type if meaningful and drop "message="

* Remove some experimental code

* Cleanup

* Allow kwargs to be passed to `run_logger`

* Update `run_logger` docstring

* Use `send_to_orion`; drop `Flow/Task` loggers

* Update docs/getting-started/installation.md

Co-authored-by: Chris White <chris@prefect.io>

* Drop extraneous stuff from logging config

* Update context tests

* Update docs/tutorials/orion.md

* Fixup more tests

* Fix logging for crashes

* Positional-only parameters is py3.8+ only

* Restore simple log format

* Simplify retrieval of parent logger

* Fixup context test

* Fixup output tests

* Test sorting logs API

* Fix log schema field descriptions

* Remove now-unused Logs schema

* Format with black

* Update docs/index.md

Co-authored-by: Michael Adkins <madkinszane@gmail.com>

* Add tests for run logger retrieval

* Review feedback

* Remove now-unused test helper

* Fix bundle error with vite

Not 100% sure why this is happening but using `any` here makes it stop erroring

* Implement `OrionHandler`

* Add `create_logs` to `OrionClient` and pass `dicts` around instead of `Log`

We cannot use `Log` because we need `LogCreate` objects to be passed to the API. Using `LogCreate` outside of the `Client` feels weird

* Fix note in handler

* Fix bare except

* Switch back to `LogCreate` for better error handling

* Fix `getsizeof` call

* Add error handlers

* Minor fixups

* Deployments overview and UI image.

* Add handling when `pending_logs` is empty

* Deployment specification

* Deployment registration

* Running deployments

* Deployment example

* Make inject_db async-aware

* Add log models tests

* Remove unnecessary uses of inject_db

* Misc formatting

* Use exc_info

* Do not emit records if `send_to_orion` is `False

* Fix context loading; add tests for `OrionHandler`

* Update miter to latest version

* Move `prefect flow-run create` to `prefect deployment run`

* Add 3.9+ workaround; add `OrionHandler.flush`

* Expand on regression test description

* Clean up stale docs

* Privatize `OrionLogWorker`

* Use a le, ge filter for log level

* Fix tests

* Fix bug where envion could be left modified if settings failed validation

* Set log interval to float so it can be fast in tests

* Add single log max size setting

* Add `read_logs` support to `OrionClient`

* Pass serialized logs to the `OrionLogWorker` for easier size checking

* Add test for single log size max

* Fixup comment

* Add rudimentary docstrings to client

* Update references to engine logger

* Rename to `get_run_logger()`

* Use a worker fixture to ensure shutdown

* Flush logs when a root flow run completes

* Remove unused imports

* Remove some more unused imports

* Rewriting based on review feedback.

* Reset the OrionHandler as a global fixture; add flow and task run integration tests

* Add logging fixtures file

* Further revsions and reorganizing topics.

* Refactor `OrionHandler` logging settings and add global toggle

* Disable OrionHandler by default during tests and allow enable with a mark

* Add docstring

* Fix mispelling of "Cancelled" state in UI

* Implement OrionAdapter for preserving extra fields

* Update src/prefect/utilities/logging.py

Co-authored-by: Michael Adkins <madkinszane@gmail.com>

* Update docs/concepts/deployments.md

Co-authored-by: Bill Palombi <bill@prefect.io>

* Update docs/concepts/deployments.md

Co-authored-by: Bill Palombi <bill@prefect.io>

* Update docs/concepts/deployments.md

Co-authored-by: Bill Palombi <bill@prefect.io>

* Rename to `PrefectLogAdapter` because it is not Orion specific

* Link to Python issue

* Move `logging.yml` to new logging module

* Move logging into separate modules at 'prefect.logging'

* Remove deferred imports

* Move logging tests up a level

* Update manfiest and docs for move

* Remove old logging module

* Add `JsonFormatter` docstring

* Add more docstrings

* Move `AsyncMock` from compat to testing utility module

This allows us to drop the try/except import which felt weird. Things that are only used for testing belong in the testing utils module.

* Update miter to latest version

* Use an event instead instead of sleep to reduce brittleness

* Update docs/concepts/deployments.md

Co-authored-by: Michael Adkins <madkinszane@gmail.com>

* Update docs/concepts/deployments.md

Co-authored-by: Michael Adkins <madkinszane@gmail.com>

* Update docs/concepts/deployments.md

Co-authored-by: Michael Adkins <madkinszane@gmail.com>

* Update docs/concepts/deployments.md

Co-authored-by: Michael Adkins <madkinszane@gmail.com>

* Update docs/concepts/deployments.md

Co-authored-by: Michael Adkins <madkinszane@gmail.com>

* Revised description of ways to create deployment specs.

* Enable services by default with `prefect orion start`

* Revise options for deployment creation.

* Add flow runner concepts

* Add blurb for `FlowRunnerSettings`

* Fix universal flow runner import

* Add tutorial

* Fix `prefect deployment run` command

This command was not updated when the client interface changed

* Add note about custom image requirement

* Add `FROM` recommendation

* Whitespace changes

* Fix `prefect deployment run` command

This command was not updated when the client interface changed

* Add virtual environments tutorial

* Add venv tutorial to flow-runners concepts

* Update header

* Flow runner doc edits.

* Add flow run docs to nav.

* Only schedule with the scheduler

* Change router watchers to better reflect component lifecycle

* Update docs/concepts/flow-runners.md

Co-authored-by: Chris White <chris@prefect.io>

* Update docs/concepts/flow-runners.md

Co-authored-by: Chris White <chris@prefect.io>

* Update docs/tutorials/docker-flow-runner.md

Co-authored-by: Chris White <chris@prefect.io>

* Update docs/tutorials/docker-flow-runner.md

Co-authored-by: Chris White <chris@prefect.io>

* Feedback from review

* Minor edits based on feedback.

* Update bash examples, removing prompts.

* Revise explanation of flow runner operation.

* Additional revisions based on feedback.

* Additional revision based on feedback.

* Minor code revisions.

* Revise using a flow runner.

* Only retain python test docker images for 1 day

The default retention of 90 days is expensive if we build 3 images for every PR commit

* Use consistent casing for "task"

* Rename file name for clarity

* Add CODEOWNERS

* Add Dustin

* Add Zach and Andrew as Orion server owners

* Remove unecesssary conditional

It does the same evaluation as the while loop check, oops.

* Remove `=`, allows logs to be too big

* Disable caching for date_add

* Fix release PR to the public repository by resolving merge conflicts automatically

* Pull docker image before we create a container

* Add release notes for 2.0a8

* Add image pull policy to Docker flow runner

* Improve mocking hygiene

* Update release notes for implementation in #810

* Add log on image pull

* Use the string repr

* Use `AutoEnum` and move from orion to prefect utilities

* Fixup autoenum usage

* Update docs

* Update discussion of flow runner types and default flow runners.

* Restore circleci config

* Drop welcome orb

* Minimal circle config?

* Remove filter

* Fixup job name

* Set the asyncio mode to auto

* Fix pytest-asyncio failures; increase lower bound since we rely on auto now

See pytest-dev/pytest-asyncio#257

Co-authored-by: Craig Harshbarger <pleek91@gmail.com>
Co-authored-by: Terrence Dorsey <terrence@prefect.io>
Co-authored-by: Andrew Brookins <andrew.b@prefect.io>
Co-authored-by: Zach Angell <42625717+zangell44@users.noreply.github.com>
Co-authored-by: Chris White <chris@prefect.io>
Co-authored-by: Andrew Brookins <a.m.brookins@gmail.com>
Co-authored-by: Mariia Kerimova <mashun4ek@gmail.com>
Co-authored-by: Anna Geller <anna.m.geller@gmail.com>
Co-authored-by: Terrence Dorsey <terrend@mishu.com>
Co-authored-by: Zach Angell <zachary.james.angell@gmail.com>
Co-authored-by: Bill Palombi <bill@prefect.io>
Co-authored-by: nicholas <znicholasbrown@gmail.com>
Co-authored-by: Nicholas Brown <nicholas@prefect.io>
@seifertm
Copy link
Contributor

Great example, thanks! It seems that asyncio.run replaces the event loop from the fixture. When asyncio.run finishes, it sets the current event loop to None. This causes the fixture teardown to fail.

@asvetlov
Copy link
Contributor

Correct. Session-scoped event_loop fixture doesn't work well with asyncio.run(). I can imagine other use-cases when session-scoped loop can cause problems.
Should pytest-asyncio solve them? This is the question.
Dark grey zone is dangerous by the definition, dragons live here.

@zanieb
Copy link
Author

zanieb commented Jan 13, 2022

Of course asyncio clobbers the event loop 😮‍💨

Interestingly though, this worked fine in the previous version and all of our tests are working as intended. Perhaps if there's not an event loop pytest-asyncio should just pass during teardown?

@zanieb
Copy link
Author

zanieb commented Jan 13, 2022

In https://github.com/madkinsz/pytest-asyncio-257/blob/main/test_event_loop.py I show that the session scoped loop is not actually clobbered during the test run and async tests share the same loop correctly. I'm definitely not familiar with the implementation details of pytest, but it seems like the behavior is correct and the only issue is that the loop is not present when fixture teardown occurs.

@eirikur-grid
Copy link

I am seeing something similar with 0.17.2. This happens after the last test has been run.

____________________________________________________ ERROR at teardown of test_get_mimetype_from_filename_raises_error[empty string] _____________________________________________________
.venv/lib/python3.9/site-packages/pytest_asyncio/plugin.py:362: in finalizer
    loop.run_until_complete(async_finalizer())
../../.pyenv/versions/3.9.1/lib/python3.9/asyncio/base_events.py:617: in run_until_complete
    self._check_closed()
../../.pyenv/versions/3.9.1/lib/python3.9/asyncio/base_events.py:510: in _check_closed
    raise RuntimeError('Event loop is closed')
E   RuntimeError: Event loop is closed

We also override the event_loop fixture like so:

# Override the pytest-asyncio event_loop fixture to make it session scoped. This is required in order to enable
# async test fixtures with a session scope. More info: https://github.com/pytest-dev/pytest-asyncio/issues/68
@pytest.fixture(scope="session")
def event_loop(request):
    loop = asyncio.get_event_loop_policy().new_event_loop()
    yield loop
    loop.close()

@eirikur-grid
Copy link

OK, so I found out how to fix this. A our folder structure for the tests is as follows

/tests
  /integration
    conftest.py
    ...
  /unit
    conftest.py
    ...
  conftest.py

Our def event_loop fixture was located under /tests/integration/conftest.py. Moving it to /tests/conftest.py solved the issue.

@MetRonnie
Copy link

MetRonnie commented Jan 20, 2022

I have a similar issue - getting RuntimeError: There is no current event loop in thread 'MainThread'. But in my case it seems to be caused by a conflict with pytest-tornasync. Not sure why considering the project I'm running the tests in doesn't use it. But it happened after I removed @pytest.mark.asyncio decorators when using asyncio_mode = auto

eukaryote/pytest-tornasync#13

@seifertm
Copy link
Contributor

@MetRonnie After a brief look at pytest-tornasync it seems the plugin has a similar behaviour to pytest-asyncio with async_mode=auto: It tries to run all tests that are coroutines in a tornado.IoLoop. When both plugins try to do the same thing, unexpected things happen.

If your project is using both pytest-asyncio and pytest-tornasync, you should stick with asyncio_mode=strict.

@MetRonnie
Copy link

MetRonnie commented Jan 20, 2022

@seifertm Thanks, in the end seeing as the project does not have pytest-tornasync as a dependency, we were instead able to do

[pytest]
addopts =
    -p no:tornado

in pytest.ini

bors bot added a commit to microsoft/Qcodes that referenced this issue Oct 24, 2022
4754: Update pytest-asyncio requirement from ~=0.19.0 to ~=0.20.1 r=jenshnielsen a=dependabot[bot]

Updates the requirements on [pytest-asyncio](https://github.com/pytest-dev/pytest-asyncio) to permit the latest version.
<details>
<summary>Release notes</summary>
<p><em>Sourced from <a href="https://github.com/pytest-dev/pytest-asyncio/releases">pytest-asyncio's releases</a>.</em></p>
<blockquote>
<h2>pytest-asyncio 0.20.1</h2>
<hr />
<h2>title: 'pytest-asyncio: pytest support for asyncio'</h2>
<p><a href="https://pypi.python.org/pypi/pytest-asyncio"><img src="https://img.shields.io/pypi/v/pytest-asyncio.svg" alt="image" /></a></p>
<p><a href="https://github.com/pytest-dev/pytest-asyncio/actions?workflow=CI"><img src="https://github.com/pytest-dev/pytest-asyncio/workflows/CI/badge.svg" alt="image" /></a></p>
<p><a href="https://codecov.io/gh/pytest-dev/pytest-asyncio"><img src="https://codecov.io/gh/pytest-dev/pytest-asyncio/branch/master/graph/badge.svg" alt="image" /></a></p>
<p><a href="https://github.com/pytest-dev/pytest-asyncio"><img src="https://img.shields.io/pypi/pyversions/pytest-asyncio.svg" alt="Supported Python versions" /></a></p>
<p><a href="https://github.com/ambv/black"><img src="https://img.shields.io/badge/code%20style-black-000000.svg" alt="image" /></a></p>
<p>pytest-asyncio is an Apache2 licensed library, written in Python, for
testing asyncio code with pytest.</p>
<p>asyncio code is usually written in the form of coroutines, which makes
it slightly more difficult to test using normal testing tools.
pytest-asyncio provides useful fixtures and markers to make testing
easier.</p>
<pre lang="{.sourceCode" data-meta=".python}"><code>`@pytest.mark.asyncio`
async def test_some_asyncio_code():
    res = await library.do_something()
    assert b&quot;expected result&quot; == res
</code></pre>
<p>pytest-asyncio has been strongly influenced by
<a href="https://github.com/eugeniy/pytest-tornado">pytest-tornado</a>.</p>
<h1>Features</h1>
<ul>
<li>fixtures for creating and injecting versions of the asyncio event
loop</li>
<li>fixtures for injecting unused tcp/udp ports</li>
<li>pytest markers for treating tests as asyncio coroutines</li>
<li>easy testing with non-default event loops</li>
<li>support for [async def]{.title-ref} fixtures and async generator
fixtures</li>
<li>support <em>auto</em> mode to handle all async fixtures and tests
automatically by asyncio; provide <em>strict</em> mode if a test suite
should work with different async frameworks simultaneously, e.g.
<code>asyncio</code> and <code>trio</code>.</li>
</ul>
<h1>Installation</h1>
<!-- raw HTML omitted -->
</blockquote>
<p>... (truncated)</p>
</details>
<details>
<summary>Changelog</summary>
<p><em>Sourced from <a href="https://github.com/pytest-dev/pytest-asyncio/blob/master/CHANGELOG.rst">pytest-asyncio's changelog</a>.</em></p>
<blockquote>
<h1>0.20.1 (22-10-21)</h1>
<ul>
<li>Fixes an issue that warned about using an old version of pytest, even though the most recent version was installed. <code>[#430](pytest-dev/pytest-asyncio#430) &lt;https://github.com/pytest-dev/pytest-asyncio/issues/430&gt;</code>_</li>
</ul>
<h1>0.20.0 (22-10-21)</h1>
<ul>
<li>BREAKING: Removed <em>legacy</em> mode. If you're upgrading from v0.19 and you haven't configured <code>asyncio_mode = legacy</code>, you can upgrade without taking any additional action. If you're upgrading from an earlier version or you have explicitly enabled <em>legacy</em> mode, you need to switch to <em>auto</em> or <em>strict</em> mode before upgrading to this version.</li>
<li>Deprecate use of pytest v6.</li>
<li>Fixed an issue which prevented fixture setup from being cached. <code>[#404](pytest-dev/pytest-asyncio#404) &lt;https://github.com/pytest-dev/pytest-asyncio/pull/404&gt;</code>_</li>
</ul>
<h1>0.19.0 (22-07-13)</h1>
<ul>
<li>BREAKING: The default <code>asyncio_mode</code> is now <em>strict</em>. <code>[#293](pytest-dev/pytest-asyncio#293) &lt;https://github.com/pytest-dev/pytest-asyncio/issues/293&gt;</code>_</li>
<li>Removes <code>setup.py</code> since all relevant configuration is present <code>setup.cfg</code>. Users requiring an editable installation of pytest-asyncio need to use pip v21.1 or newer. <code>[#283](pytest-dev/pytest-asyncio#283) &lt;https://github.com/pytest-dev/pytest-asyncio/issues/283&gt;</code>_</li>
<li>Declare support for Python 3.11.</li>
</ul>
<h1>0.18.3 (22-03-25)</h1>
<ul>
<li>Adds <code>pytest-trio &lt;https://pypi.org/project/pytest-trio/&gt;</code>_ to the test dependencies</li>
<li>Fixes a bug that caused pytest-asyncio to try to set up async pytest_trio fixtures in strict mode. <code>[#298](pytest-dev/pytest-asyncio#298) &lt;https://github.com/pytest-dev/pytest-asyncio/issues/298&gt;</code>_</li>
</ul>
<h1>0.18.2 (22-03-03)</h1>
<ul>
<li>Fix asyncio auto mode not marking static methods. <code>[#295](pytest-dev/pytest-asyncio#295) &lt;https://github.com/pytest-dev/pytest-asyncio/issues/295&gt;</code>_</li>
<li>Fix a compatibility issue with Hypothesis 6.39.0. <code>[#302](pytest-dev/pytest-asyncio#302) &lt;https://github.com/pytest-dev/pytest-asyncio/issues/302&gt;</code>_</li>
</ul>
<h1>0.18.1 (22-02-10)</h1>
<ul>
<li>Fixes a regression that prevented async fixtures from working in synchronous tests. <code>[#286](pytest-dev/pytest-asyncio#286) &lt;https://github.com/pytest-dev/pytest-asyncio/issues/286&gt;</code>_</li>
</ul>
<h1>0.18.0 (22-02-07)</h1>
<ul>
<li>Raise a warning if <a href="https://github.com/pytest"><code>`@​pytest</code></a>.mark.asyncio` is applied to non-async function. <code>[#275](pytest-dev/pytest-asyncio#275) &lt;https://github.com/pytest-dev/pytest-asyncio/issues/275&gt;</code>_</li>
<li>Support parametrized <code>event_loop</code> fixture. <code>[#278](pytest-dev/pytest-asyncio#278) &lt;https://github.com/pytest-dev/pytest-asyncio/issues/278&gt;</code>_</li>
</ul>
<h1>0.17.2 (22-01-17)</h1>
<ul>
<li>Require <code>typing-extensions</code> on Python<!-- raw HTML omitted -->`_</li>
<li>Fix a regression in tests collection introduced by 0.17.1, the plugin works fine with non-python tests again. <code>[#267](pytest-dev/pytest-asyncio#267) &lt;https://github.com/pytest-dev/pytest-asyncio/issues/267&gt;</code>_</li>
</ul>
<h1>0.17.1 (22-01-16)</h1>
<ul>
<li>Fixes a bug that prevents async Hypothesis tests from working without explicit <code>asyncio</code> marker when <code>--asyncio-mode=auto</code> is set. <code>[#258](pytest-dev/pytest-asyncio#258) &lt;https://github.com/pytest-dev/pytest-asyncio/issues/258&gt;</code>_</li>
<li>Fixed a bug that closes the default event loop if the loop doesn't exist <code>[#257](pytest-dev/pytest-asyncio#257) &lt;https://github.com/pytest-dev/pytest-asyncio/issues/257&gt;</code>_</li>
<li>Added type annotations. <code>[#198](pytest-dev/pytest-asyncio#198) &lt;https://github.com/pytest-dev/pytest-asyncio/issues/198&gt;</code>_</li>
<li>Show asyncio mode in pytest report headers. <code>[#266](pytest-dev/pytest-asyncio#266) &lt;https://github.com/pytest-dev/pytest-asyncio/issues/266&gt;</code>_</li>
<li>Relax <code>asyncio_mode</code> type definition; it allows to support pytest 6.1+. <code>[#262](pytest-dev/pytest-asyncio#262) &lt;https://github.com/pytest-dev/pytest-asyncio/issues/262&gt;</code>_</li>
</ul>
<!-- raw HTML omitted -->
</blockquote>
<p>... (truncated)</p>
</details>
<details>
<summary>Commits</summary>
<ul>
<li><a href="https://github.com/pytest-dev/pytest-asyncio/commit/c8d017407d39dd81d6864fa9a58ba1240d54be9f"><code>c8d0174</code></a> fix: Do not warn about outdated pytest version when pytest&gt;=7 is installed. (...</li>
<li><a href="https://github.com/pytest-dev/pytest-asyncio/commit/6450ddbe974f5359d56317ba8bdda8b2ab48655a"><code>6450ddb</code></a> Prepare release of v0.20.0. (<a href="https://github-redirect.dependabot.com/pytest-dev/pytest-asyncio/issues/428">#428</a>)</li>
<li><a href="https://github.com/pytest-dev/pytest-asyncio/commit/150f29c107fbd76641de47e040d43840769ef92c"><code>150f29c</code></a> Build(deps): Bump hypothesis in /dependencies/default (<a href="https://github-redirect.dependabot.com/pytest-dev/pytest-asyncio/issues/427">#427</a>)</li>
<li><a href="https://github.com/pytest-dev/pytest-asyncio/commit/adc88090f341d9872e9e9b4d22a94cdadf60b3bc"><code>adc8809</code></a> Build(deps): Bump typing-extensions in /dependencies/default (<a href="https://github-redirect.dependabot.com/pytest-dev/pytest-asyncio/issues/425">#425</a>)</li>
<li><a href="https://github.com/pytest-dev/pytest-asyncio/commit/4abf9d1df228ed8b083721d7affa73e4a08d13c3"><code>4abf9d1</code></a> Build(deps): Bump zipp from 3.8.1 to 3.9.0 in /dependencies/default (<a href="https://github-redirect.dependabot.com/pytest-dev/pytest-asyncio/issues/424">#424</a>)</li>
<li><a href="https://github.com/pytest-dev/pytest-asyncio/commit/eb487bcb076f44dedcdb33e74972bf06c37027ee"><code>eb487bc</code></a> Build(deps): Bump hypothesis in /dependencies/default (<a href="https://github-redirect.dependabot.com/pytest-dev/pytest-asyncio/issues/423">#423</a>)</li>
<li><a href="https://github.com/pytest-dev/pytest-asyncio/commit/907c461f172e52159a595e2592176c7feac04a43"><code>907c461</code></a> Refactor pytest_pycollect_makeitems (<a href="https://github-redirect.dependabot.com/pytest-dev/pytest-asyncio/issues/421">#421</a>)</li>
<li><a href="https://github.com/pytest-dev/pytest-asyncio/commit/d45ab217c80117854b510edc6c9fdd457b6b07fc"><code>d45ab21</code></a> feat: Add deprecation warning for pytest &lt; 7. (<a href="https://github-redirect.dependabot.com/pytest-dev/pytest-asyncio/issues/420">#420</a>)</li>
<li><a href="https://github.com/pytest-dev/pytest-asyncio/commit/cab20f4d346e9e52e5ffc93854de3ec881e7d342"><code>cab20f4</code></a> Build(deps): Bump importlib-metadata in /dependencies/default (<a href="https://github-redirect.dependabot.com/pytest-dev/pytest-asyncio/issues/415">#415</a>)</li>
<li><a href="https://github.com/pytest-dev/pytest-asyncio/commit/d9f77567189c96536b39b43520f4b40895b34fb9"><code>d9f7756</code></a> Build(deps): Bump hypothesis in /dependencies/default (<a href="https://github-redirect.dependabot.com/pytest-dev/pytest-asyncio/issues/416">#416</a>)</li>
<li>Additional commits viewable in <a href="https://github.com/pytest-dev/pytest-asyncio/compare/v0.19.0...v0.20.1">compare view</a></li>
</ul>
</details>
<br />


You can trigger a rebase of this PR by commenting ``@dependabot` rebase`.

[//]: # (dependabot-automerge-start)
[//]: # (dependabot-automerge-end)

---

<details>
<summary>Dependabot commands and options</summary>
<br />

You can trigger Dependabot actions by commenting on this PR:
- ``@dependabot` rebase` will rebase this PR
- ``@dependabot` recreate` will recreate this PR, overwriting any edits that have been made to it
- ``@dependabot` merge` will merge this PR after your CI passes on it
- ``@dependabot` squash and merge` will squash and merge this PR after your CI passes on it
- ``@dependabot` cancel merge` will cancel a previously requested merge and block automerging
- ``@dependabot` reopen` will reopen this PR if it is closed
- ``@dependabot` close` will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually
- ``@dependabot` ignore this major version` will 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 version` will 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 dependency` will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)


</details>

4755: Bump actions/upload-artifact from 3.1.0 to 3.1.1 r=jenshnielsen a=dependabot[bot]

Bumps [actions/upload-artifact](https://github.com/actions/upload-artifact) from 3.1.0 to 3.1.1.
<details>
<summary>Release notes</summary>
<p><em>Sourced from <a href="https://github.com/actions/upload-artifact/releases">actions/upload-artifact's releases</a>.</em></p>
<blockquote>
<h2>v3.1.1</h2>
<ul>
<li>Update actions/core package to latest version to remove <code>set-output</code> deprecation warning <a href="https://github-redirect.dependabot.com/actions/upload-artifact/issues/351">#351</a></li>
</ul>
</blockquote>
</details>
<details>
<summary>Commits</summary>
<ul>
<li><a href="https://github.com/actions/upload-artifact/commit/83fd05a356d7e2593de66fc9913b3002723633cb"><code>83fd05a</code></a> Bump actions-core to v1.10.0 (<a href="https://github-redirect.dependabot.com/actions/upload-artifact/issues/356">#356</a>)</li>
<li>See full diff in <a href="https://github.com/actions/upload-artifact/compare/v3.1.0...v3.1.1">compare view</a></li>
</ul>
</details>
<br />


[![Dependabot compatibility score](https://dependabot-badges.githubapp.com/badges/compatibility_score?dependency-name=actions/upload-artifact&package-manager=github_actions&previous-version=3.1.0&new-version=3.1.1)](https://docs.github.com/en/github/managing-security-vulnerabilities/about-dependabot-security-updates#about-compatibility-scores)

You can trigger a rebase of this PR by commenting ``@dependabot` rebase`.

[//]: # (dependabot-automerge-start)
[//]: # (dependabot-automerge-end)

---

<details>
<summary>Dependabot commands and options</summary>
<br />

You can trigger Dependabot actions by commenting on this PR:
- ``@dependabot` rebase` will rebase this PR
- ``@dependabot` recreate` will recreate this PR, overwriting any edits that have been made to it
- ``@dependabot` merge` will merge this PR after your CI passes on it
- ``@dependabot` squash and merge` will squash and merge this PR after your CI passes on it
- ``@dependabot` cancel merge` will cancel a previously requested merge and block automerging
- ``@dependabot` reopen` will reopen this PR if it is closed
- ``@dependabot` close` will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually
- ``@dependabot` ignore this major version` will 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 version` will 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 dependency` will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)


</details>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
bors bot added a commit to microsoft/Qcodes that referenced this issue Oct 24, 2022
4754: Update pytest-asyncio requirement from ~=0.19.0 to ~=0.20.1 r=jenshnielsen a=dependabot[bot]

Updates the requirements on [pytest-asyncio](https://github.com/pytest-dev/pytest-asyncio) to permit the latest version.
<details>
<summary>Release notes</summary>
<p><em>Sourced from <a href="https://github.com/pytest-dev/pytest-asyncio/releases">pytest-asyncio's releases</a>.</em></p>
<blockquote>
<h2>pytest-asyncio 0.20.1</h2>
<hr />
<h2>title: 'pytest-asyncio: pytest support for asyncio'</h2>
<p><a href="https://pypi.python.org/pypi/pytest-asyncio"><img src="https://img.shields.io/pypi/v/pytest-asyncio.svg" alt="image" /></a></p>
<p><a href="https://github.com/pytest-dev/pytest-asyncio/actions?workflow=CI"><img src="https://github.com/pytest-dev/pytest-asyncio/workflows/CI/badge.svg" alt="image" /></a></p>
<p><a href="https://codecov.io/gh/pytest-dev/pytest-asyncio"><img src="https://codecov.io/gh/pytest-dev/pytest-asyncio/branch/master/graph/badge.svg" alt="image" /></a></p>
<p><a href="https://github.com/pytest-dev/pytest-asyncio"><img src="https://img.shields.io/pypi/pyversions/pytest-asyncio.svg" alt="Supported Python versions" /></a></p>
<p><a href="https://github.com/ambv/black"><img src="https://img.shields.io/badge/code%20style-black-000000.svg" alt="image" /></a></p>
<p>pytest-asyncio is an Apache2 licensed library, written in Python, for
testing asyncio code with pytest.</p>
<p>asyncio code is usually written in the form of coroutines, which makes
it slightly more difficult to test using normal testing tools.
pytest-asyncio provides useful fixtures and markers to make testing
easier.</p>
<pre lang="{.sourceCode" data-meta=".python}"><code>`@pytest.mark.asyncio`
async def test_some_asyncio_code():
    res = await library.do_something()
    assert b&quot;expected result&quot; == res
</code></pre>
<p>pytest-asyncio has been strongly influenced by
<a href="https://github.com/eugeniy/pytest-tornado">pytest-tornado</a>.</p>
<h1>Features</h1>
<ul>
<li>fixtures for creating and injecting versions of the asyncio event
loop</li>
<li>fixtures for injecting unused tcp/udp ports</li>
<li>pytest markers for treating tests as asyncio coroutines</li>
<li>easy testing with non-default event loops</li>
<li>support for [async def]{.title-ref} fixtures and async generator
fixtures</li>
<li>support <em>auto</em> mode to handle all async fixtures and tests
automatically by asyncio; provide <em>strict</em> mode if a test suite
should work with different async frameworks simultaneously, e.g.
<code>asyncio</code> and <code>trio</code>.</li>
</ul>
<h1>Installation</h1>
<!-- raw HTML omitted -->
</blockquote>
<p>... (truncated)</p>
</details>
<details>
<summary>Changelog</summary>
<p><em>Sourced from <a href="https://github.com/pytest-dev/pytest-asyncio/blob/master/CHANGELOG.rst">pytest-asyncio's changelog</a>.</em></p>
<blockquote>
<h1>0.20.1 (22-10-21)</h1>
<ul>
<li>Fixes an issue that warned about using an old version of pytest, even though the most recent version was installed. <code>[#430](pytest-dev/pytest-asyncio#430) &lt;https://github.com/pytest-dev/pytest-asyncio/issues/430&gt;</code>_</li>
</ul>
<h1>0.20.0 (22-10-21)</h1>
<ul>
<li>BREAKING: Removed <em>legacy</em> mode. If you're upgrading from v0.19 and you haven't configured <code>asyncio_mode = legacy</code>, you can upgrade without taking any additional action. If you're upgrading from an earlier version or you have explicitly enabled <em>legacy</em> mode, you need to switch to <em>auto</em> or <em>strict</em> mode before upgrading to this version.</li>
<li>Deprecate use of pytest v6.</li>
<li>Fixed an issue which prevented fixture setup from being cached. <code>[#404](pytest-dev/pytest-asyncio#404) &lt;https://github.com/pytest-dev/pytest-asyncio/pull/404&gt;</code>_</li>
</ul>
<h1>0.19.0 (22-07-13)</h1>
<ul>
<li>BREAKING: The default <code>asyncio_mode</code> is now <em>strict</em>. <code>[#293](pytest-dev/pytest-asyncio#293) &lt;https://github.com/pytest-dev/pytest-asyncio/issues/293&gt;</code>_</li>
<li>Removes <code>setup.py</code> since all relevant configuration is present <code>setup.cfg</code>. Users requiring an editable installation of pytest-asyncio need to use pip v21.1 or newer. <code>[#283](pytest-dev/pytest-asyncio#283) &lt;https://github.com/pytest-dev/pytest-asyncio/issues/283&gt;</code>_</li>
<li>Declare support for Python 3.11.</li>
</ul>
<h1>0.18.3 (22-03-25)</h1>
<ul>
<li>Adds <code>pytest-trio &lt;https://pypi.org/project/pytest-trio/&gt;</code>_ to the test dependencies</li>
<li>Fixes a bug that caused pytest-asyncio to try to set up async pytest_trio fixtures in strict mode. <code>[#298](pytest-dev/pytest-asyncio#298) &lt;https://github.com/pytest-dev/pytest-asyncio/issues/298&gt;</code>_</li>
</ul>
<h1>0.18.2 (22-03-03)</h1>
<ul>
<li>Fix asyncio auto mode not marking static methods. <code>[#295](pytest-dev/pytest-asyncio#295) &lt;https://github.com/pytest-dev/pytest-asyncio/issues/295&gt;</code>_</li>
<li>Fix a compatibility issue with Hypothesis 6.39.0. <code>[#302](pytest-dev/pytest-asyncio#302) &lt;https://github.com/pytest-dev/pytest-asyncio/issues/302&gt;</code>_</li>
</ul>
<h1>0.18.1 (22-02-10)</h1>
<ul>
<li>Fixes a regression that prevented async fixtures from working in synchronous tests. <code>[#286](pytest-dev/pytest-asyncio#286) &lt;https://github.com/pytest-dev/pytest-asyncio/issues/286&gt;</code>_</li>
</ul>
<h1>0.18.0 (22-02-07)</h1>
<ul>
<li>Raise a warning if <a href="https://github.com/pytest"><code>`@​pytest</code></a>.mark.asyncio` is applied to non-async function. <code>[#275](pytest-dev/pytest-asyncio#275) &lt;https://github.com/pytest-dev/pytest-asyncio/issues/275&gt;</code>_</li>
<li>Support parametrized <code>event_loop</code> fixture. <code>[#278](pytest-dev/pytest-asyncio#278) &lt;https://github.com/pytest-dev/pytest-asyncio/issues/278&gt;</code>_</li>
</ul>
<h1>0.17.2 (22-01-17)</h1>
<ul>
<li>Require <code>typing-extensions</code> on Python<!-- raw HTML omitted -->`_</li>
<li>Fix a regression in tests collection introduced by 0.17.1, the plugin works fine with non-python tests again. <code>[#267](pytest-dev/pytest-asyncio#267) &lt;https://github.com/pytest-dev/pytest-asyncio/issues/267&gt;</code>_</li>
</ul>
<h1>0.17.1 (22-01-16)</h1>
<ul>
<li>Fixes a bug that prevents async Hypothesis tests from working without explicit <code>asyncio</code> marker when <code>--asyncio-mode=auto</code> is set. <code>[#258](pytest-dev/pytest-asyncio#258) &lt;https://github.com/pytest-dev/pytest-asyncio/issues/258&gt;</code>_</li>
<li>Fixed a bug that closes the default event loop if the loop doesn't exist <code>[#257](pytest-dev/pytest-asyncio#257) &lt;https://github.com/pytest-dev/pytest-asyncio/issues/257&gt;</code>_</li>
<li>Added type annotations. <code>[#198](pytest-dev/pytest-asyncio#198) &lt;https://github.com/pytest-dev/pytest-asyncio/issues/198&gt;</code>_</li>
<li>Show asyncio mode in pytest report headers. <code>[#266](pytest-dev/pytest-asyncio#266) &lt;https://github.com/pytest-dev/pytest-asyncio/issues/266&gt;</code>_</li>
<li>Relax <code>asyncio_mode</code> type definition; it allows to support pytest 6.1+. <code>[#262](pytest-dev/pytest-asyncio#262) &lt;https://github.com/pytest-dev/pytest-asyncio/issues/262&gt;</code>_</li>
</ul>
<!-- raw HTML omitted -->
</blockquote>
<p>... (truncated)</p>
</details>
<details>
<summary>Commits</summary>
<ul>
<li><a href="https://github.com/pytest-dev/pytest-asyncio/commit/c8d017407d39dd81d6864fa9a58ba1240d54be9f"><code>c8d0174</code></a> fix: Do not warn about outdated pytest version when pytest&gt;=7 is installed. (...</li>
<li><a href="https://github.com/pytest-dev/pytest-asyncio/commit/6450ddbe974f5359d56317ba8bdda8b2ab48655a"><code>6450ddb</code></a> Prepare release of v0.20.0. (<a href="https://github-redirect.dependabot.com/pytest-dev/pytest-asyncio/issues/428">#428</a>)</li>
<li><a href="https://github.com/pytest-dev/pytest-asyncio/commit/150f29c107fbd76641de47e040d43840769ef92c"><code>150f29c</code></a> Build(deps): Bump hypothesis in /dependencies/default (<a href="https://github-redirect.dependabot.com/pytest-dev/pytest-asyncio/issues/427">#427</a>)</li>
<li><a href="https://github.com/pytest-dev/pytest-asyncio/commit/adc88090f341d9872e9e9b4d22a94cdadf60b3bc"><code>adc8809</code></a> Build(deps): Bump typing-extensions in /dependencies/default (<a href="https://github-redirect.dependabot.com/pytest-dev/pytest-asyncio/issues/425">#425</a>)</li>
<li><a href="https://github.com/pytest-dev/pytest-asyncio/commit/4abf9d1df228ed8b083721d7affa73e4a08d13c3"><code>4abf9d1</code></a> Build(deps): Bump zipp from 3.8.1 to 3.9.0 in /dependencies/default (<a href="https://github-redirect.dependabot.com/pytest-dev/pytest-asyncio/issues/424">#424</a>)</li>
<li><a href="https://github.com/pytest-dev/pytest-asyncio/commit/eb487bcb076f44dedcdb33e74972bf06c37027ee"><code>eb487bc</code></a> Build(deps): Bump hypothesis in /dependencies/default (<a href="https://github-redirect.dependabot.com/pytest-dev/pytest-asyncio/issues/423">#423</a>)</li>
<li><a href="https://github.com/pytest-dev/pytest-asyncio/commit/907c461f172e52159a595e2592176c7feac04a43"><code>907c461</code></a> Refactor pytest_pycollect_makeitems (<a href="https://github-redirect.dependabot.com/pytest-dev/pytest-asyncio/issues/421">#421</a>)</li>
<li><a href="https://github.com/pytest-dev/pytest-asyncio/commit/d45ab217c80117854b510edc6c9fdd457b6b07fc"><code>d45ab21</code></a> feat: Add deprecation warning for pytest &lt; 7. (<a href="https://github-redirect.dependabot.com/pytest-dev/pytest-asyncio/issues/420">#420</a>)</li>
<li><a href="https://github.com/pytest-dev/pytest-asyncio/commit/cab20f4d346e9e52e5ffc93854de3ec881e7d342"><code>cab20f4</code></a> Build(deps): Bump importlib-metadata in /dependencies/default (<a href="https://github-redirect.dependabot.com/pytest-dev/pytest-asyncio/issues/415">#415</a>)</li>
<li><a href="https://github.com/pytest-dev/pytest-asyncio/commit/d9f77567189c96536b39b43520f4b40895b34fb9"><code>d9f7756</code></a> Build(deps): Bump hypothesis in /dependencies/default (<a href="https://github-redirect.dependabot.com/pytest-dev/pytest-asyncio/issues/416">#416</a>)</li>
<li>Additional commits viewable in <a href="https://github.com/pytest-dev/pytest-asyncio/compare/v0.19.0...v0.20.1">compare view</a></li>
</ul>
</details>
<br />


You can trigger a rebase of this PR by commenting ``@dependabot` rebase`.

[//]: # (dependabot-automerge-start)
[//]: # (dependabot-automerge-end)

---

<details>
<summary>Dependabot commands and options</summary>
<br />

You can trigger Dependabot actions by commenting on this PR:
- ``@dependabot` rebase` will rebase this PR
- ``@dependabot` recreate` will recreate this PR, overwriting any edits that have been made to it
- ``@dependabot` merge` will merge this PR after your CI passes on it
- ``@dependabot` squash and merge` will squash and merge this PR after your CI passes on it
- ``@dependabot` cancel merge` will cancel a previously requested merge and block automerging
- ``@dependabot` reopen` will reopen this PR if it is closed
- ``@dependabot` close` will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually
- ``@dependabot` ignore this major version` will 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 version` will 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 dependency` will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)


</details>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
jevonyeoh added a commit to featurebyte/featurebyte that referenced this issue Mar 3, 2023
There's a bunch of errors of the form 
  RuntimeError: There is no current event loop in thread 'Dummy-1'. 
that pop up once in a while on failing integration tests.

Example: https://github.com/featurebyte/featurebyte/actions/runs/4320831275/jobs/7541472752

Some googling suggests we can try to avoid this by having some extra handling around the event loop fixture.

Related links
- https://stackoverflow.com/questions/46727787/runtimeerror-there-is-no-current-event-loop-in-thread-in-async-apscheduler
- ultrafunkamsterdam/undetected-chromedriver#373
- pytest-dev/pytest-asyncio#257

I don't think this necessarily solves the underlying issue, but figured it might be worth 
a try to try to make a short-term patch to alleviate some flaky integration tests.
commonism added a commit to commonism/aiopenapi3 that referenced this issue Apr 5, 2023
…ng down the event_loop

 - using a different policy
 - fixture event_loop in conftest.py - fixes pytest-dev/pytest-asyncio#257
commonism added a commit to commonism/aiopenapi3 that referenced this issue Apr 5, 2023
…ng down the event_loop

 - using a different policy
 - fixture event_loop in conftest.py - fixes pytest-dev/pytest-asyncio#257
commonism added a commit to commonism/aiopenapi3 that referenced this issue Apr 5, 2023
…ng down the event_loop

 - using a different policy
 - fixture event_loop in conftest.py - fixes pytest-dev/pytest-asyncio#257
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 a pull request may close this issue.

5 participants