freezing-appointment-41336
08/17/2026, 8:37 PMpants test src/python:: , I'm seeing that each individual pytest process builds a unique requirements PEX, with just the subset of requirements needed for that particular test process' run.
So in this example scenario below, running pants test src/python:: might produce two distinct requirements given the different 3rdparty requirements in mod_a/a.py vs mod_b/b.py . But that seems less ideal than building a single requirements pex with the requirements set intersection for all tests under the src/python:: spec. Is this expected behavior to build multiple requirements.pex files for a test run, even if all the files fall under the same resolve?
src/python
āāā BUILD # __defaults__(all=dict(resolve="my_resolve", interpreter_constraints=["CPython==3.12.*"]))
āāā my-resolve-lockfile.json
āāā mod_a
ā āāā a.py # uses anyio and pyyaml
ā āāā test_a.py
ā āāā BUILD # contains a `python_tests` target
āāā mod_b
āāā b.py # uses pyyaml
āāā test_b.py
āāā BUILD # contains a `python_tests` targetfreezing-appointment-41336
08/17/2026, 8:38 PMpants test output:
Completed: Building 2 requirements for requirements.pex from the src/python/lockfile.json resolve: anyio, pytest
Completed: Building 3 requirements for requirements.pex from the src/python/lockfile.json resolve: anyio, pytest, pyyamlfreezing-wall-19707
08/17/2026, 9:18 PMbrief-scientist-13682
08/17/2026, 9:20 PMfreezing-appointment-41336
08/17/2026, 9:53 PMpants test :: hitting OOM failures during the requirements.pex build phase in CI (we mitigated this for now by blanket applying the full set of requirements as a dependency to all tests)
Anyways, thanks again for the helpful notes!freezing-wall-19707
08/17/2026, 10:19 PMfreezing-appointment-41336
08/17/2026, 10:27 PMcurved-manchester-66006
08/18/2026, 6:19 PMor running Airflow, which is notoriously requirement-heavy. That has very quickly led to pants test :: hitting OOMSince airflow is open source, you may be able to create a public reproduction case for this. Pants should not run away with your memory.