-
Notifications
You must be signed in to change notification settings - Fork 427
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
Prepare deprecation of full index and action usage #5152
Conversation
7ea64c6
to
17a7d9a
Compare
@kenodegard, @jezdez, I noticed we need to deprecate some more things when we replace the What this does overall is:
|
@deprecated( | ||
"24.1.0", "24.5.0", addendum="Use `conda_index._apply_instructions` instead." | ||
) | ||
def _apply_instructions(subdir, repodata, instructions): |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I marked this explicitly as deprecated since I know there are some conda-forge scripts that use _apply_instructions
.
(We probably shouldn't to continue to use the underscore-prefixed function from conda-idex
either. But this way we can at least mark it for removal here.)
I assume we don't have to mark every single underscore-prefixed symbol here separately, right?!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Every function that we know is used and plan to remove, independent whether it's prefixed with an underscore or not, is going to need the decorator.
Remember Hyrum's Law, everything is API in the eye of the user, we can only manage the way it's being used and informing the users about our intentions, is good engineering practice.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Every function that we know is used [...]
The problem is, we of course don't know which are used in the wild...
I've now just plonked the decorator on everything in conda_build.index
🤷.
(If anyone knows a convenient way to really handle API<->internals definition in Python which we could use for future modules/packages, I'm all ears. Python, since it's one of those "everything is public and dynamic" languages, is just awful when Mr. Wright et al. point out these issues...)
Signed-off-by: Marcel Bargull <marcel.bargull@udo.edu>
17a7d9a
to
a93e5b3
Compare
Nice, thanks for working on the index feature. Optional channeldata in standalone conda-index https://github.com/conda/conda-index/blob/main/conda_index/cli/__init__.py#L134-L141 |
@deprecated( | ||
"24.1.0", "24.5.0", addendum="Use `conda_index._apply_instructions` instead." | ||
) | ||
def _apply_instructions(subdir, repodata, instructions): |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Every function that we know is used and plan to remove, independent whether it's prefixed with an underscore or not, is going to need the decorator.
Remember Hyrum's Law, everything is API in the eye of the user, we can only manage the way it's being used and informing the users about our intentions, is good engineering practice.
05a6ef4
to
70dfbf7
Compare
Signed-off-by: Marcel Bargull <marcel.bargull@udo.edu>
Signed-off-by: Marcel Bargull <marcel.bargull@udo.edu>
70dfbf7
to
4c8a732
Compare
Needs |
Thanks for the updates and reviews! |
conda_build.index._apply_instructions is marked for deprecation. refs: - conda/conda-build#5152 (comment) - conda/conda-build#5226 Signed-off-by: Marcel Bargull <marcel.bargull@udo.edu>
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 <marcel.bargull@udo.edu>
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 <marcel.bargull@udo.edu>
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 <marcel.bargull@udo.edu>
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 <marcel.bargull@udo.edu>
Description
Checklist - did you ...
news
directory (using the template) for the next release's release notes?