add custom asyncio.wait_for()

This patch uses `wait_for2` package to implement `asyncio.wait_for()` for
Python < 3.12.

In Python 3.12, `asyncio.wait_for()` is implemented in terms of
`asyncio.timeout()` which fixed a bunch of issues. However, this was never
backported (because of the lack of `async.timeout()`) and there are still many
remainig issues, specially in Python 3.10, in `async.wait_for()`.

See https://github.com/python/cpython/pull/98518
This commit is contained in:
Aleix Conchillo Flaqué
2025-08-20 10:58:09 -07:00
parent 5286591826
commit f387776985
31 changed files with 119 additions and 53 deletions

View File

@@ -36,6 +36,7 @@ dependencies = [
"openai>=1.74.0,<=1.99.1",
# Pinning numba to resolve package dependencies
"numba==0.61.2",
"wait_for2>=0.4.1; python_version<'3.12'",
]
[project.urls]