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

Remove deprecations slated for 24.3 #5203

Merged
merged 21 commits into from
Mar 8, 2024
Merged
Show file tree
Hide file tree
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
4 changes: 2 additions & 2 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -76,10 +76,10 @@ jobs:
include:
# minimum Python/conda combo
- python-version: '3.8'
conda-version: 22.11.0
conda-version: 23.5.0
test-type: serial
- python-version: '3.8'
conda-version: 22.11.0
conda-version: 23.5.0
test-type: parallel
# maximum Python/conda combo
- python-version: '3.12'
Expand Down
2 changes: 1 addition & 1 deletion conda_build/build.py
Original file line number Diff line number Diff line change
Expand Up @@ -3501,7 +3501,7 @@ def test(
AssertionError,
) as exc:
log.warn(
"failed to get install actions, retrying. exception was: %s", str(exc)
"failed to get package records, retrying. exception was: %s", str(exc)
)
tests_failed(
metadata,
Expand Down
2 changes: 0 additions & 2 deletions conda_build/cli/main_render.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,6 @@
from .. import __version__, api
from ..conda_interface import ArgumentParser, add_parser_channels, cc_conda_build
from ..config import get_channel_urls, get_or_merge_config
from ..deprecations import deprecated
from ..utils import LoggingContext
from ..variants import get_package_variants, set_language_env_vars

Expand Down Expand Up @@ -193,7 +192,6 @@ def parse_args(args: Sequence[str] | None) -> tuple[ArgumentParser, Namespace]:
return parser, parser.parse_args(args)


@deprecated.argument("24.1.1", "24.3.0", "print_results")
jezdez marked this conversation as resolved.
Show resolved Hide resolved
def execute(args: Sequence[str] | None = None) -> int:
_, parsed = parse_args(args)

Expand Down
51 changes: 28 additions & 23 deletions conda_build/conda_interface.py
Original file line number Diff line number Diff line change
Expand Up @@ -45,13 +45,9 @@
add_parser_channels,
add_parser_prefix,
download,
handle_proxy_407,
hashsum_file,
human_bytes,
input,
lchmod,
md5_file,
memoized,
normalized_version,
prefix_placeholder,
rm_rf,
Expand All @@ -65,29 +61,11 @@
walk_prefix,
win_path_to_unix,
)
from conda.exports import display_actions as _display_actions
from conda.exports import execute_actions as _execute_actions
from conda.exports import execute_plan as _execute_plan
from conda.exports import get_index as _get_index
from conda.exports import install_actions as _install_actions
from conda.exports import linked as _linked
from conda.exports import linked_data as _linked_data
from conda.exports import package_cache as _package_cache
from conda.gateways.disk.read import compute_sum
from conda.models.channel import get_conda_build_local_url # noqa: F401
from conda.models.dist import Dist as _Dist

from .deprecations import deprecated

deprecated.constant("24.1.0", "24.3.0", "Dist", _Dist)
deprecated.constant("24.1.0", "24.3.0", "display_actions", _display_actions)
deprecated.constant("24.1.0", "24.3.0", "execute_actions", _execute_actions)
deprecated.constant("24.1.0", "24.3.0", "execute_plan", _execute_plan)
deprecated.constant("24.1.0", "24.3.0", "get_index", _get_index)
deprecated.constant("24.1.0", "24.3.0", "install_actions", _install_actions)
deprecated.constant("24.1.0", "24.3.0", "linked", _linked)
deprecated.constant("24.1.0", "24.3.0", "linked_data", _linked_data)
deprecated.constant("24.1.0", "24.3.0", "package_cache", _package_cache)

# TODO: Go to references of all properties below and import them from `context` instead
binstar_upload = context.binstar_upload
default_python = context.default_python
Expand All @@ -112,3 +90,30 @@
# When deactivating envs (e.g. switching from root to build/test) this env var is used,
# except the PR that removed this has been reverted (for now) and Windows doesn't need it.
env_path_backup_var_exists = os.environ.get("CONDA_PATH_BACKUP", None)


@deprecated(
"24.3",
"24.5",
addendum="Handled by `conda.gateways.connection.session.CondaSession`.",
)
def handle_proxy_407(x, y):
pass


deprecated.constant(
"24.3",
"24.5",
"hashsum_file",
compute_sum,
addendum="Use `conda.gateways.disk.read.compute_sum` instead.",
)


@deprecated(
"24.3",
"24.5",
addendum="Use `conda.gateways.disk.read.compute_sum(path, 'md5')` instead.",
)
def md5_file(path: str | os.PathLike) -> str:
return compute_sum(path, "md5")
Loading
Loading