diff --git a/conda_lock/conda_lock.py b/conda_lock/conda_lock.py index 5ac4d5d73..631db834b 100644 --- a/conda_lock/conda_lock.py +++ b/conda_lock/conda_lock.py @@ -414,7 +414,7 @@ def make_lock_files( # noqa: C901 deep=True, update={"package": packages_not_to_lock}, ) - new_lock_content = lock_content_to_persist | fresh_lock_content + new_lock_content = lock_content_to_persist.merge(fresh_lock_content) if "lock" in kinds: write_conda_lock_file( diff --git a/conda_lock/lockfile/v2prelim/models.py b/conda_lock/lockfile/v2prelim/models.py index 65c81cd33..6afcef9e8 100644 --- a/conda_lock/lockfile/v2prelim/models.py +++ b/conda_lock/lockfile/v2prelim/models.py @@ -39,10 +39,7 @@ class Lockfile(StrictModel): package: List[LockedDependency] metadata: LockMeta - def __or__(self, other: "Lockfile") -> "Lockfile": - return other.__ror__(self) - - def __ror__(self, other: "Optional[Lockfile]") -> "Lockfile": + def merge(self, other: "Optional[Lockfile]") -> "Lockfile": """ merge self into other """