-
Notifications
You must be signed in to change notification settings - Fork 75
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
add mini-piggyback migrator for removing pin_compatible("numpy"...)
#2470
Conversation
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## master #2470 +/- ##
==========================================
- Coverage 71.28% 71.23% -0.06%
==========================================
Files 100 101 +1
Lines 10118 10140 +22
==========================================
+ Hits 7213 7223 +10
- Misses 2905 2917 +12 ☔ View full report in Codecov by Sentry. |
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.
The _slice_into_output_sections
can raise an error. This made sense for the stdlib work, but here we could iterate through the lines and do a straight replacement.
Also, the code will fail if people do unusual but valid things in yaml like an explicit list. I don't think we should handle this last case maybe?
You mean like:
?
Fine by me. |
Yes I mean like this |
It's already handled. The regular expression doesn't care what comes before the first |
Ah but if _replacer ignores the whole line, then we delete the entire run section? |
It doesn't ignore the line, it deletes it (if the thing to be inserted is empty; as our run:
- - boost-cpp or run_constrained:
- - __osx >={{ MACOSX_DEPLOYMENT_TARGET|default("10.9") }} # [osx and x86_64] and that was fine? |
Yep agreed! I was just checking that I understood the code. |
Thanks Axel and Matt! 🙏 Have we seen this piggyback migrator applied in any PRs? Would be interesting to see how it is doing |
It explicitly looks for the |
Interesting am curious is there a particular reason to wait for NumPy 2 to make this change? As noted in issue ( #2469 ), this change should be ok to make with the current NumPy pinning Please let me know if this is more to the story |
You're right that we could already remove it based on the existing 1.x infrastructure, but it's a numpy-related change - IMO it makes sense to roll it out together with the numpy migrator, rather than just attach it to random migrators or version updates. |
Fixes #2469; goes hand-in-hand with (the migrator filename used in) conda-forge/conda-forge-pinning-feedstock#5790
This is a baby version of #2135 / #1668, where we've already extensively tested the used functionality. Strictly speaking, we could even avoid the whole dance with
_slice_into_output_sections
and just directly remove any lines matching the regex pattern forpin_compatible("numpy",...)
in the meta.yaml. However, I left it in for now in case anyone wants to add some logic that takes into account existing host-/run-dependencies, because then we need to operate on a per-section basis.