[services] pytest update#15517
Conversation
There was a problem hiding this comment.
Pull request overview
Routine pip and npm dependency updates plus an upgrade of pytest to 9.0.3 (with related pytest-asyncio, pytest-html, pytest-xdist bumps). The Python version used to compile pinned-requirements.txt files moves from 3.10 to 3.11 to avoid pulling in backport packages (async-timeout, exceptiongroup, tomli, importlib-metadata, zipp) that are incompatible with newer dependencies. The bump in pytest-asyncio (>=0.23) allows removing the manual event_loop session fixtures and adopting asyncio_default_fixture_loop_scope = session in the pytest configs instead.
Changes:
- Bump
--python-versionused by uv from 3.10 to 3.11 in the two compile scripts and regenerate allpinned-requirements.txtfiles (drops backport packages, bumps idna, numpy, scipy, tornado, boto3/botocore, etc.). - Upgrade pytest to 9.0.3 and remove the custom
event_loopsession fixture frombatch/test/conftest.py,hail/python/test/hail/conftest.py, andhail/python/test/hailtop/conftest.py; addasyncio_default_fixture_loop_scope = sessionto allpytest.inifiles. - Refresh npm lockfile for
services/ui(babel runtime/code-frame, es-toolkit, hasown, ws).
Reviewed changes
Copilot reviewed 18 out of 19 changed files in this pull request and generated no comments.
Show a summary per file
| File | Description |
|---|---|
| generate-pip-lockfile.sh | Switch uv compile target to Python 3.11. |
| check_pip_requirements.sh | Switch uv compile check target to Python 3.11. |
| auth/test/pytest.ini, batch/test/pytest.ini, ci/test/pytest.ini, monitoring/test/pytest.ini, hail/python/pytest.ini | Set asyncio_default_fixture_loop_scope = session for new pytest-asyncio. |
| batch/test/conftest.py, hail/python/test/hail/conftest.py, hail/python/test/hailtop/conftest.py | Remove now-redundant custom session-scoped event_loop fixture. |
| hail/python/dev/requirements.txt | Bump pytest stack (pytest 9, pytest-html 4, pytest-xdist 3, pytest-asyncio 1.4) and drop workaround pin. |
| hail/python/dev/pinned-requirements.txt | Regenerated lockfile reflecting Python 3.11 + new pytest stack (drops tomli, exceptiongroup, importlib-metadata, py, pytest-forked, zipp). |
| hail/python/pinned-requirements.txt, hail/python/hailtop/pinned-requirements.txt | Regenerated lockfiles; drop async-timeout, bump numpy/scipy/tornado/boto3/botocore/etc. |
| gear/pinned-requirements.txt, web_common/pinned-requirements.txt, batch/pinned-requirements.txt, ci/pinned-requirements.txt | Regenerated lockfiles for Python 3.11. |
| services/ui/package-lock.json | Bumps for @babel/code-frame, @babel/helper-validator-identifier, @babel/runtime, es-toolkit, hasown, ws. |
Files not reviewed (1)
- services/ui/package-lock.json: Language not supported
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
… fixing backports-asyncio-runner incompatibility
1c9fb71 to
2755e74
Compare
Change Description
Regular pip and npm updates.
Also updates pytest to 9.0.3.
Doing so had the nice side effect of being able to remove a couple of clunky workarounds but required us to switch our uv compile from 3.10 to 3.11 (to avoid bringing in a couple of backport packages which are incompatible with new dependencies). Justification is that the only environments that need dev/pinned-requirements are 3.11 so this is fine, and that the custom builds on 3.10 don't need any dev packages.
Will supersede #15516 unless there are test issues with the new library version.
Security Assessment
Impact Rating
Impact Description
Standard regular updates
Appsec Review