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

Deprecating conda_build.conda_interface #5222

Merged
merged 23 commits into from
Mar 19, 2024

Conversation

beeankha
Copy link
Member

@beeankha beeankha commented Mar 8, 2024

Description

Miscellaneous deprecations that were pending in conda_build.conda_interface are being done here, which encourages conda-build and other downstream projects to import from conda directly.

Note: cc_conda_build deprecation will be handled in a separate PR as it will involve some refactoring work.

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?

@conda-bot conda-bot added the cla-signed [bot] added once the contributor has signed the CLA label Mar 8, 2024
@beeankha beeankha added source::anaconda created by members of Anaconda, Inc. type::deprecation requests removal of deprecated feature(s) labels Mar 8, 2024
@beeankha
Copy link
Member Author

beeankha commented Mar 8, 2024

pre-commit.ci autofix

@beeankha beeankha marked this pull request as ready for review March 13, 2024 19:29
@beeankha beeankha requested a review from a team as a code owner March 13, 2024 19:29
ryanskeith
ryanskeith previously approved these changes Mar 14, 2024
Copy link
Contributor

@ryanskeith ryanskeith left a comment

Choose a reason for hiding this comment

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

Other than a small ask to expand a comment. This all looks great.

conda_build/__init__.py Outdated Show resolved Hide resolved
conda_build/__init__.py Outdated Show resolved Hide resolved
Comment on lines +20 to +21
# Skip context logic for doc generation since we don't install all dependencies in the CI doc build environment,
# see .readthedocs.yml file
Copy link
Member

Choose a reason for hiding this comment

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

I would argue this is a bug and needs to be resolved by installing all dependencies in the Ci doc build environment. Maybe add caching there? Switch to setup-miniconda?

Copy link
Contributor

Choose a reason for hiding this comment

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

Sure but that will require that we stop using the RTD pipeline and switch to a custom workflow which is out of scope for this PR

reset_context()

except ImportError:
pass
Copy link
Member

@jezdez jezdez Mar 15, 2024

Choose a reason for hiding this comment

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

This code will be run on every import of conda_build and seems like an overreach to fix a documentation rendering issue.

I would suggest to either

Copy link
Contributor

Choose a reason for hiding this comment

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

This is supposed to run for ALL imports of conda_build, it's only for docs rendering that we don't need this

Copy link
Member

Choose a reason for hiding this comment

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

Gotcha, I'd appreciate if we'd not have to handle the special case for the docs here though. Ultimately it's not a huge deal though.

mbargull added a commit to mbargull/conda-smithy that referenced this pull request Mar 16, 2024
conda_build.conda_interface is goind to be marked for deprecation.

refs:
- conda/conda-build#5222

Signed-off-by: Marcel Bargull <[email protected]>
mbargull added a commit to mbargull/conda-smithy that referenced this pull request Mar 16, 2024
conda_build.conda_interface is going to be marked for deprecation.

refs:
- conda/conda-build#5222

Signed-off-by: Marcel Bargull <[email protected]>
mbargull added a commit to mbargull/cdt-builds that referenced this pull request Mar 16, 2024
conda_build.conda_interface.get_index (which is conda.exports.get_index)
is using the conda.models.Dist -> conda.models.records.PackageRecord
mapping. Dist class is legacy code that's being phased out, so avoid it.

refs:
- conda/conda-build#5152
- conda/conda-build#5222

Signed-off-by: Marcel Bargull <[email protected]>
mbargull added a commit to mbargull/cdt-builds that referenced this pull request Mar 16, 2024
conda_build.conda_interface is being deprecated.

conda_build.conda_interface.get_index (which is conda.exports.get_index)
is using the conda.models.Dist -> conda.models.records.PackageRecord
mapping. Dist class is legacy code that's being phased out, so avoid it.

refs:
- conda/conda-build#5152
- conda/conda-build#5222

Signed-off-by: Marcel Bargull <[email protected]>
mbargull added a commit to mbargull/conda-forge-webservices that referenced this pull request Mar 16, 2024
conda_build.conda_interface is being deprecated.

conda_build.conda_interface.get_index (which is conda.exports.get_index)
is using the conda.models.Dist -> conda.models.records.PackageRecord
mapping. Dist class is legacy code that's being phased out, so avoid it.

refs:
- conda/conda-build#5152
- conda/conda-build#5222

Signed-off-by: Marcel Bargull <[email protected]>
mbargull added a commit to mbargull/conda-forge-feedstock-check-solvable that referenced this pull request Mar 16, 2024
conda_build.conda_interface is being deprecated.

refs:
- conda/conda-build#5222

Signed-off-by: Marcel Bargull <[email protected]>
mbargull added a commit to mbargull/staged-recipes that referenced this pull request Mar 16, 2024
conda_build.conda_interface is being deprecated.

conda_build.conda_interface.get_index (which is conda.exports.get_index)
is using the conda.models.dist.Dist -> conda.models.records.PackageRecord
mapping. Dist class is legacy code that's being phased out, so avoid it.

refs:
- conda/conda-build#5152
- conda/conda-build#5222

Signed-off-by: Marcel Bargull <[email protected]>
@kenodegard kenodegard changed the title Deprecating conda_build.conda_interface.py Deprecating conda_build.conda_interface Mar 17, 2024
reset_context()

except ImportError:
pass
Copy link
Member

Choose a reason for hiding this comment

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

Gotcha, I'd appreciate if we'd not have to handle the special case for the docs here though. Ultimately it's not a huge deal though.

@beeankha beeankha enabled auto-merge (squash) March 19, 2024 15:36
Copy link

codspeed-hq bot commented Mar 19, 2024

CodSpeed Performance Report

Merging #5222 will not alter performance

Comparing beeankha:remove-conda_interface (fab3d1c) with main (f3615dc)

Summary

✅ 2 untouched benchmarks

@beeankha beeankha merged commit 1bfee9f into conda:main Mar 19, 2024
28 checks passed
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 source::anaconda created by members of Anaconda, Inc. type::deprecation requests removal of deprecated feature(s)
Projects
Archived in project
Development

Successfully merging this pull request may close these issues.

5 participants