Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

libmambapy 2.0 compatibility (RuntimeError: libmambapy.Pool→libmambapy.solver.libsolv.Database) #1438

Open
flying-sheep opened this issue Oct 22, 2024 · 1 comment

Comments

@flying-sheep
Copy link

flying-sheep commented Oct 22, 2024

Reproducer:

With "environment_type": "mamba", in asv.conf.json

$ conda create -n asv python=3.12 asv libmambapy conda-build
$ conda run -n asv asv HEAD^!
[…]
· Creating environments
·· Creating mamba environment for mamba-py3.12-h5py-memory_profiler-natsort-numpy-pandas-pooch-pytest-pytoml-scipy-zarr
·· Failure creating environment for mamba-py3.12-h5py-memory_profiler-natsort-numpy-pandas-pooch-pytest-pytoml-scipy-zarr
Traceback (most recent call last):
  File "/home/runner/micromamba/envs/asv/bin/asv", line 10, in <module>
    sys.exit(main())
             ^^^^^^
  File "/home/runner/micromamba/envs/asv/lib/python3.12/site-packages/asv/main.py", line 29, in main
    result = args.func(args)
             ^^^^^^^^^^^^^^^
  File "/home/runner/micromamba/envs/asv/lib/python3.12/site-packages/asv/commands/__init__.py", line 49, in run_from_args
    return cls.run_from_conf_args(conf, args)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/runner/micromamba/envs/asv/lib/python3.12/site-packages/asv/commands/run.py", line 166, in run_from_conf_args
    return cls.run(
           ^^^^^^^^
  File "/home/runner/micromamba/envs/asv/lib/python3.12/site-packages/asv/commands/run.py", line 278, in run
    Setup.perform_setup(environments, parallel=parallel)
  File "/home/runner/micromamba/envs/asv/lib/python3.12/site-packages/asv/commands/setup.py", line 82, in perform_setup
    list(map(_create, environments))
  File "/home/runner/micromamba/envs/asv/lib/python3.12/site-packages/asv/commands/setup.py", line 14, in _create
    env.create()
  File "/home/runner/micromamba/envs/asv/lib/python3.12/site-packages/asv/environment.py", line 754, in create
    self._setup()
  File "/home/runner/micromamba/envs/asv/lib/python3.12/site-packages/asv/plugins/mamba.py", line 150, in _setup
    solver = MambaSolver(
             ^^^^^^^^^^^^
  File "/home/runner/micromamba/envs/asv/lib/python3.12/site-packages/asv/plugins/_mamba_helpers.py", line 168, in __init__
    self.pool = libmambapy.Pool()
                ^^^^^^^^^^^^^^^^^
RuntimeError: libmambapy.Pool has been moved to libmambapy.solver.libsolv.Database. The database contains functions to directly load packages, from a list or a repodata.json. High level functions such as libmambapy.load_subdir_in_database and libmambapy.load_installed_packages_in_database are also available to work with other Mamba objects and Context parameters.
@flying-sheep flying-sheep changed the title RuntimeError: libmambapy.Pool has been moved to libmambapy.solver.libsolv.Database libmambapy 2.0 compatibility (RuntimeError: libmambapy.Pool→libmambapy.solver.libsolv.Database) Oct 22, 2024
@lucascolley
Copy link
Contributor

I can reproduce these failures in the asv test suite with libmambapy=2.0.2

HaoZeke added a commit to HaoZeke/asv that referenced this issue Nov 18, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants