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

Replace HashableDict with frozendict.deepfreeze #27151

Merged
merged 1 commit into from
Aug 1, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading