Skip to content

Commit

Permalink
Merge pull request #27151 from AdrianFreundQC/remove-hashabledict-usage
Browse files Browse the repository at this point in the history
Replace HashableDict with frozendict.deepfreeze
  • Loading branch information
isuruf authored Aug 1, 2024
2 parents 8d291b2 + 36354eb commit bb7f0e2
Showing 1 changed file with 3 additions and 5 deletions.
8 changes: 3 additions & 5 deletions .ci_support/compute_build_graph.py
Original file line number Diff line number Diff line change
Expand Up @@ -39,15 +39,13 @@
import functools
from functools import lru_cache

from frozendict import frozendict
from frozendict import frozendict, deepfreeze
import networkx as nx
from conda.models.match_spec import MatchSpec
from conda.models.records import PackageRecord
from conda_build import api
from conda_build.metadata import find_recipe, MetaData

from conda_build.utils import HashableDict


log = logging.getLogger(__file__)
CONDA_BUILD_CACHE = os.environ.get("CONDA_BUILD_CACHE")
Expand Down Expand Up @@ -347,7 +345,7 @@ def collapse_subpackage_nodes(graph):
if master_meta.name() == meta.name():
master = True
group = node_groups.get(meta_path, {})
subgroup = group.get(HashableDict(meta.config.variant), {})
subgroup = group.get(deepfreeze(meta.config.variant), {})
if master:
if 'master' in subgroup:
raise ValueError("tried to set more than one node in a group as master")
Expand All @@ -356,7 +354,7 @@ def collapse_subpackage_nodes(graph):
sps = subgroup.get('subpackages', [])
sps.append(node)
subgroup['subpackages'] = sps
group[HashableDict(meta.config.variant)] = subgroup
group[deepfreeze(meta.config.variant)] = subgroup
node_groups[meta_path] = group

for recipe_path, group in node_groups.items():
Expand Down

0 comments on commit bb7f0e2

Please sign in to comment.