diff --git a/.authors.yml b/.authors.yml index 69eb66f0e2..1f569a8379 100644 --- a/.authors.yml +++ b/.authors.yml @@ -1226,7 +1226,7 @@ first_commit: 2020-11-19 10:46:41 - name: Jannis Leidel email: jannis@leidel.info - num_commits: 39 + num_commits: 41 github: jezdez first_commit: 2020-11-19 10:46:41 - name: Christof Kaufmann diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index c7645edbee..23d30d6380 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -104,6 +104,40 @@ jobs: PYTEST_MARKER: ${{ matrix.test-type == 'serial' && 'serial' || 'not serial' }} steps: + - name: Free Disk Space + uses: endersonmenezes/free-disk-space@6c4664f43348c8c7011b53488d5ca65e9fc5cd1a # v3.0.0 + with: + remove_android: true + remove_dotnet: true + remove_haskell: true + remove_tool_cache: true + remove_swap: true + remove_packages: >- + azure-cli + google-cloud-cli + microsoft-edge-stable + google-chrome-stable + firefox + postgresql* + temurin-* + *llvm* + mysql* + dotnet-sdk-* + remove_packages_one_command: true + remove_folders: >- + /usr/share/swift + /usr/share/az* + /usr/local/lib/node_modules + /usr/local/share/chromium + /usr/local/share/powershell + /usr/local/julia + /usr/local/aws-cli + /usr/local/aws-sam-cli + /usr/share/gradle + rm_cmd: rmz + rmz_version: 3.1.1 + testing: false + - name: Checkout Source uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0 with: diff --git a/CHANGELOG.md b/CHANGELOG.md index c2e7fc51e0..b9f4874975 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,11 +1,27 @@ [//]: # (current developments) +## 25.11.1 (2025-12-04) + +### Bug fixes + +* Prevent empty channel lists from being passed to host environment creation. (#5857) + +### Deprecations + +* Remove fallback imports for `conda.core.index.Index`. (#5857) + +### Contributors + +* @jezdez + + + ## 25.11.0 (2025-11-20) ### Enhancements * Allow the PyYAML loader to be specified when calling `conda_build.variants.parse_config_file`. (#5800) -* Raise `menuinst` JSON validation errors, which used to be warnings. (#5807) +* Raise `menuinst` JSON validation errors, which used to be warnings. (#5828) ### Bug fixes diff --git a/conda_build/environ.py b/conda_build/environ.py index af9e6ce6d1..0335cca521 100644 --- a/conda_build/environ.py +++ b/conda_build/environ.py @@ -25,7 +25,6 @@ ) from conda.base.context import context, reset_context from conda.common.io import env_vars -from conda.core.index import LAST_CHANNEL_URLS from conda.core.link import PrefixSetup, UnlinkLinkTransaction from conda.core.package_cache_data import PackageCacheData, ProgressiveFetchExtract from conda.core.prefix_data import PrefixData @@ -38,7 +37,7 @@ UnsatisfiableError, ) from conda.gateways.disk.create import TemporaryDirectory -from conda.models.channel import Channel, prioritize_channels +from conda.models.channel import Channel from conda.models.match_spec import MatchSpec from conda.models.records import PackageRecord @@ -62,6 +61,8 @@ from pathlib import Path from typing import Any, TypedDict + from conda.core.index import Index + from .config import Config from .metadata import MetaData @@ -1262,7 +1263,7 @@ def get_pinned_deps(m, section): # checks for this name in the call stack explicitly. def install_actions( prefix: str | os.PathLike | Path, - index, + index: Index, specs: Iterable[str | MatchSpec], subdir: str | None = None, ) -> InstallActionsType: @@ -1280,25 +1281,8 @@ def install_actions( }, callback=reset_context, ): - # a hack since in conda-build we don't track channel_priority_map - channels: tuple[Channel, ...] | None - subdirs: tuple[str, ...] | None - if LAST_CHANNEL_URLS: - channel_priority_map = prioritize_channels(LAST_CHANNEL_URLS) - # tuple(dict.fromkeys(...)) removes duplicates while preserving input order. - channels = tuple( - dict.fromkeys(Channel(url) for url in channel_priority_map) - ) - subdirs = ( - tuple( - dict.fromkeys( - subdir for channel in channels if (subdir := channel.subdir) - ) - ) - or context.subdirs - ) - else: - channels = subdirs = None + channels: tuple[Channel, ...] | None = tuple(index.expanded_channels) or None + subdirs: tuple[str, ...] | None = tuple(index._subdirs) or None mspecs = tuple(MatchSpec(spec) for spec in specs) diff --git a/conda_build/index.py b/conda_build/index.py index be9e1721f9..940ab50a17 100644 --- a/conda_build/index.py +++ b/conda_build/index.py @@ -6,9 +6,9 @@ import os from functools import partial from os.path import dirname -from typing import TYPE_CHECKING from conda.base.context import context +from conda.core.index import Index from conda.exceptions import CondaHTTPError from conda.utils import url_path @@ -17,9 +17,6 @@ get_logger, ) -if TYPE_CHECKING: - from conda.models.channels import Channel - try: from conda_index.index import update_index as _update_index except ImportError: @@ -28,16 +25,6 @@ ) -try: - from conda.core.index import Index -except ImportError: - # FUTURE: remove for `conda >=24.9` - from conda.core.index import get_index - - def Index(channels: tuple[str | Channel, ...] = (), *args, **kwargs) -> dict: # type: ignore[no-redef] - return get_index(channel_urls=channels, *args, **kwargs) - - log = get_logger(__name__) diff --git a/conda_build/inspect_pkg.py b/conda_build/inspect_pkg.py index fcc54c8db0..fb30c590f6 100644 --- a/conda_build/inspect_pkg.py +++ b/conda_build/inspect_pkg.py @@ -16,6 +16,7 @@ from conda.api import Solver from conda.base.context import context from conda.cli.common import specs_from_args +from conda.core.index import Index from conda.core.prefix_data import PrefixData from conda.models.records import PrefixRecord @@ -37,12 +38,6 @@ package_has_file, ) -try: - from conda.core.index import Index -except ImportError: - # FUTURE: remove for `conda >=24.9` - from conda_build.index import Index - if TYPE_CHECKING: from collections.abc import Iterable from typing import Literal diff --git a/conda_build/skeletons/cpan.py b/conda_build/skeletons/cpan.py index f5ddcd82a5..4727f4fcf5 100644 --- a/conda_build/skeletons/cpan.py +++ b/conda_build/skeletons/cpan.py @@ -21,6 +21,7 @@ from os.path import basename, dirname, exists, join import requests +from conda.core.index import Index from conda.exceptions import CondaError, CondaHTTPError from conda.gateways.connection.download import TmpDownload, download from conda.gateways.disk.create import TemporaryDirectory @@ -33,12 +34,6 @@ from ..variants import get_default_variant from ..version import _parse as parse_version -try: - from conda.core.index import Index -except ImportError: - # FUTURE: remove for `conda >=24.9` - from conda_build.index import Index - CPAN_META = """\ {{% set name = "{packagename}" %}} {{% set version = "{version}" %}}