airspeed-velocity / asv

Airspeed Velocity: A simple Python benchmarking tool with web-based reporting
https://asv.readthedocs.io/
BSD 3-Clause "New" or "Revised" License
845 stars 177 forks source link

Creating a conda environment fails due to outdated env command #1396

Closed ivirshup closed 1 month ago

ivirshup commented 2 months ago

If conda>=24.3 is used, asv's creation of a conda environment fails with:

·· Error running /mnt/workspace/mambaforge/bin/conda env create -f /mnt/workspace/tmp/tmpd4g2uh44.yml -p /mnt/workspace/repos/anndata/benchmarks/.asv/env/64c601b255f4a31e6994caef8c345b33 --force (exit status 2)
   STDOUT -------->

   STDERR -------->
   usage: conda [-h] [-v] [--no-plugins] [-V] COMMAND ...
   conda: error: unrecognized arguments: --force

In conda 24.3, --force was replace with --yes to be more consistent with other conda commands:

Initially discovered when trying to use conda for env creation now that it uses mamba's solver by default:

I think this line just needs to be changed to use --yes, but am not sure what range of conda versions asv is meant to be compatible with

https://github.com/airspeed-velocity/asv/blob/8877eff343807e8bc594690dec08bc0da2caa401/asv/plugins/conda.py#L150