From 0649cfaba7f128b6ef7d5953880deee7901efc40 Mon Sep 17 00:00:00 2001 From: Alex Lubbock Date: Fri, 16 Aug 2024 22:30:16 +0100 Subject: [PATCH] fix: calls to deprecated conda api --- microbench/__init__.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/microbench/__init__.py b/microbench/__init__.py index baae1d1..3762597 100644 --- a/microbench/__init__.py +++ b/microbench/__init__.py @@ -26,7 +26,7 @@ psutil = None try: import conda - import conda.cli.python_api + import conda.testing.conda_cli except ImportError: conda = None try: @@ -274,9 +274,9 @@ def capture_conda_packages(self, bm_data): # Use subprocess pkg_list = subprocess.check_output(['conda', 'list']).decode('utf8') else: - # Use conda Python API - pkg_list, stderr, ret_code = conda.cli.python_api.run_command( - conda.cli.python_api.Commands.LIST) + # Use conda API + pkg_list, stderr, ret_code = conda.testing.conda_cli.run_command( + conda.testing.conda_cli.Commands.LIST) if ret_code != 0 or stderr: raise RuntimeError('Error running conda list: {}'.format(