test: make Python 3.13 async suite pass and cover it in CI#226
test: make Python 3.13 async suite pass and cover it in CI#226krystophny wants to merge 5 commits intowaybarrios:mainfrom
Conversation
|
@waybarrios, @krystophny: brief endorsement. This addresses issue #225 (also yours). The change is sensible: standardize on Validation shows 129 passed, 5 deselected. Mergeable on current main. Low risk for an infrastructure improvement that would catch Python 3.13 regressions before they ship. |
…pping - Remove asyncio_mode = "auto" from pyproject.toml (pytest-asyncio was removed) - Add anyio>=4.0 as explicit dev dependency (was only transitive via httpx) - Add anyio_backend fixture to conftest.py restricting tests to asyncio only (trio is not installed)
fbfe277 to
810fb0f
Compare
|
Force-pushed a refresh onto current upstream |
Thump604
left a comment
There was a problem hiding this comment.
Refresh confirmed on head 810fb0f against upstream main b4fa030. The async-harness changes are mechanical and low-risk: standardize on anyio with the asyncio backend, replace asyncio.get_event_loop().run_until_complete(...) with asyncio.run(...), drop the dead asyncio_mode = "auto" config (pytest-asyncio was already removed), add anyio>=4.0 as an explicit dev dependency, and add Python 3.13 to the Ubuntu test matrix plus the Apple Silicon MLX job.
CI is green on every matrix entry including the new test-matrix (3.13) and test-apple-silicon (3.13) jobs. The 2 failures from the local pytest run (test_batching_deterministic.py::TestBatchingPerformance::test_batched_faster_than_sequential and test_continuous_batching.py::TestContinuousBatchingIntegration::test_batching_improves_throughput) are throughput-threshold assertions, not event loop or plugin failures, so they do not block the async-harness change class.
Approved.
|
Rechecked on April 11: this still looks like an approved candidate, but it is currently |
|
I split the pushable/tested Python-side cleanup out into #288. The remaining Python 3.13 CI matrix update still makes sense, but I could not publish that branch from this auth context because GitHub rejects OAuth-app pushes that modify |
Summary
Fix Python 3.13 test execution and add real 3.13 coverage to the project test jobs.
Changes
anyiowith the asyncio backendasyncio.get_event_loop().run_until_complete(...)withasyncio.run(...)asyncio_mode = "auto"config (pytest-asyncio reference after its removal)anyio>=4.0as explicit dev dependencyStatus
main(b4fa030) on 2026-04-09Validation
python -m pytest tests/ -q --timeout=120->1020 passed, 2 failed, 9 skipped, 20 deselectedtests/test_batching_deterministic.py::TestBatchingPerformance::test_batched_faster_than_sequential[asyncio]andtests/test_continuous_batching.py::TestContinuousBatchingIntegration::test_batching_improves_throughput[asyncio]