-
Notifications
You must be signed in to change notification settings - Fork 1.5k
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
mtest: Inline try_wait_one using asyncio.wait_for #10633
Conversation
Although the former accepts multiple awaitables, it is only ever called with a single one, so just use `wait_for` instead. Additionally, the `try_wait_one` fails in Python 3.11, as `Process.wait()` returns a coroutine, and `asyncio.wait` only accepts tasks, so it errors out.
Codecov Report
@@ Coverage Diff @@
## master #10633 +/- ##
==========================================
- Coverage 68.82% 68.82% -0.01%
==========================================
Files 406 406
Lines 88062 88066 +4
Branches 19560 19566 +6
==========================================
Hits 60612 60612
- Misses 22871 22875 +4
Partials 4579 4579
Continue to review full report at Codecov.
|
@bonzini does this look right to you? |
Yes, it does. |
@QuLogic is this a documented change? If not we should report a bug. |
It was deprecated in 3.8, and scheduled for removal in 3.11: https://docs.python.org/3/library/asyncio-task.html#asyncio.wait |
Ah I interpreted that as "Process.wait() returns a coroutine in 3.11 instead of another kind of future", thanks. |
Hmm, I tried to run the Meson testsuite with a warning filter that turns deprecations into errors, and I got a bunch of failures. But I never made it as far as this, I don't think. Instead,
|
And update all the CI builds to use the latest micro release from that series, 1.2.3. This version bump means we can: - Drop some backwards-compatibility Meson checks - Fix a periodic CI failure caused by a now-fixed Meson bug (mesonbuild/meson#10633) It’s in line with our [Meson version policy](./docs/meson-version.md), as Meson 1.2.1 is available in [Debian Trixie](https://packages.debian.org/source/trixie/meson) and the [freedesktop SDK](https://gitlab.com/freedesktop-sdk/freedesktop-sdk/-/blob/c95902f2ed5cb7d9b8e352135facc539029ef6c9/elements/components/meson.bst). Signed-off-by: Philip Withnall <philip@tecnocode.co.uk>
Although the former accepts multiple awaitables, it is only ever called with a single one, so just use
wait_for
instead.Additionally, the
try_wait_one
fails in Python 3.11, asProcess.wait()
returns a coroutine, andasyncio.wait
only accepts tasks, so it errors out.