Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Remove deprecated code in conda.exports#15184

Merged
jezdez merged 5 commits intoconda:mainfrom
soapy1:marked-for-removal-25.9-exports
Sep 11, 2025
Merged

Remove deprecated code in conda.exports#15184
jezdez merged 5 commits intoconda:mainfrom
soapy1:marked-for-removal-25.9-exports

Conversation

@soapy1
Copy link
Contributor

@soapy1 soapy1 commented Sep 9, 2025

Description

Remove deprecated methods, arguments and constants from conda.exports.

xref: #15116

Checklist - did you ...

  • Add a file to the news directory (using the template) for the next release's release notes?
  • Add / update necessary tests?
  • Add / update outdated documentation?

@github-project-automation github-project-automation bot moved this to 🆕 New in 🔎 Review Sep 9, 2025
@conda-bot conda-bot added the cla-signed [bot] added once the contributor has signed the CLA label Sep 9, 2025
@soapy1
Copy link
Contributor Author

soapy1 commented Sep 9, 2025

pre-commit.ci autofix

@codspeed-hq
Copy link

codspeed-hq bot commented Sep 9, 2025

CodSpeed Instrumentation Performance Report

Merging #15184 will not alter performance

Comparing soapy1:marked-for-removal-25.9-exports (70fab5f) with main (7aa5cd7)

Summary

✅ 21 untouched

@soapy1 soapy1 marked this pull request as ready for review September 9, 2025 23:38
@soapy1 soapy1 requested a review from a team as a code owner September 9, 2025 23:38
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Oh let's just do that immediately here?

Comment on lines 6 to 16
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
# TODO: will need to be re-enabled for `CondaJSONEncoder` deprecation warning in 26.3
# @pytest.mark.parametrize(
# "function,raises",
# [
# ("EntityEncoder", TypeError),
# ],
# )
# def test_deprecations(function: str, raises: type[Exception] | None) -> None:
# raises_context = pytest.raises(raises) if raises else nullcontext()
# with pytest.deprecated_call(), raises_context:
# getattr(exports, function)()
@pytest.mark.parametrize(
"function,raises",
[
("EntityEncoder", TypeError),
],
)
def test_deprecations(function: str, raises: type[Exception] | None) -> None:
raises_context = pytest.raises(raises) if raises else nullcontext()
with pytest.deprecated_call(), raises_context:
getattr(exports, function)()

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

As of right now, this test will fail. I belive this error message will start appearing in release 26.3 https://github.com/conda/conda/blob/main/conda/exports.py#L120

Copy link
Contributor

@kenodegard kenodegard Sep 11, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The issue was just that EntityEncoder doesn't require any args so it doesn't raise a TypeError

All codes currently in any stage of the deprecation cycle will warn about the deprecation

@github-project-automation github-project-automation bot moved this from 🆕 New to ✅ Approved in 🔎 Review Sep 11, 2025
Copy link
Member

@jezdez jezdez left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good riddance!

@jezdez jezdez merged commit 78be3d7 into conda:main Sep 11, 2025
75 checks passed
@github-project-automation github-project-automation bot moved this from ✅ Approved to 🏁 Done in 🔎 Review Sep 11, 2025
@dholth
Copy link
Contributor

dholth commented Sep 15, 2025

As of today conda-build still references the removed unix_path_to_win. How can we avoid missing conda's deprecation cycle in conda-build?

@kenodegard kenodegard mentioned this pull request Sep 25, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

cla-signed [bot] added once the contributor has signed the CLA

Projects

Archived in project

Development

Successfully merging this pull request may close these issues.

5 participants

Comments