Skip to content

Commit

Permalink
Commit progress so far
Browse files Browse the repository at this point in the history
  • Loading branch information
jaimergp committed Mar 26, 2024
1 parent 1f4fccb commit f027cab
Show file tree
Hide file tree
Showing 12 changed files with 996 additions and 69 deletions.
File renamed without changes.
8 changes: 8 additions & 0 deletions _v2_changes_.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
# Libmamba v2 integration changes

- Deprecate CONDA_LIBMAMBA_SOLVER_NO_CHANNELS_FROM_INSTALLED. No longer needed with v2.
- Typing in all methods
- time_recorder for metadata collection and solving loop
- removed state.BaseIndexHelper
- The libmamba v1 "pool" (collection of "repos"; repo = loaded repodata.json) is now a "database" of "RepoInfo" objects.
- Do use current_repodata.json if explicitly set in CLI
14 changes: 2 additions & 12 deletions conda_libmamba_solver/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,20 +12,10 @@
except ImportError:
__version__ = "0.0.0.unknown"

from warnings import warn as _warn

from .solver import LibMambaSolver


def get_solver_class(key="libmamba"):
if key == "libmamba":
return LibMambaSolver
if key == "libmamba-draft":
_warn(
"The 'libmamba-draft' solver has been deprecated. "
"The 'libmamba' solver will be used instead. "
"Please consider updating your code to remove this warning. "
"Using 'libmamba-draft' will result in an error in a future release.",
)
from .solver2 import LibMambaSolver

return LibMambaSolver
raise ValueError("Key must be 'libmamba'")
3 changes: 1 addition & 2 deletions conda_libmamba_solver/index.py
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,6 @@
from conda.models.version import VersionOrder

from .mamba_utils import set_channel_priorities
from .state import IndexHelper
from .utils import escape_channel_url

log = logging.getLogger(f"conda.{__name__}")
Expand All @@ -110,7 +109,7 @@ class _ChannelRepoInfo:
noauth_url: str


class LibMambaIndexHelper(IndexHelper):
class LibMambaIndexHelper:
def __init__(
self,
installed_records: Iterable[PackageRecord] = (),
Expand Down
Loading

0 comments on commit f027cab

Please sign in to comment.