Description
Bug report
Bug description:
yt's test suite started crashing when switched to Python 3.12. rc1 was the earliest that we tried, and we're still seeing this with rc3. When run through GitHub Actions, jobs simply exit with Error: the operation was cancelled
, and we get no traceback.
It appeared that this crash can only be reproduced on machines with little RAM available, so we tried profiling memory usage.
Here's an illustrative graph, provided by @yut23, of memory usage VS time for a sample of yt's test suite (all third-party packages in the environment are at the same version in both envs)
Here's an self-contained reproducer script, using memray to trace memory usage
set -euxo pipefail
git clone https://github.com/yt-project/yt --depth=1
python3.12 -m venv .venv
source .venv/bin/activate
python -m pip install -e "./yt[test]"
python -m pip install memray
# setuptools is inspected at runtime in yt's pytest configuration, but it's not needed otherwise
python -m pip install setuptools
cd yt/
python -m memray run -m pytest yt/data_objects
yt uses weakref
quite a lot, so we suspect that the issue here might be reminiscent of #108295 (this was pointed out by @Xarthisius).
CPython versions tested on:
3.12
Operating systems tested on:
Linux, macOS