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

recipe pins appear to be implemented incorrectly relative to conda-build #1174

Open
beckermr opened this issue Nov 8, 2024 · 4 comments
Open

Comments

@beckermr
Copy link

beckermr commented Nov 8, 2024

It appears that for a bit of yaml like this

requirements
  run:
    - python ${{ python_min }}

with python_min=3.10, rattler produces a different spec than conda-build.

For rattler-build, I see

requirements:
  run:
    - python ==3.10

See this CI job (https://dev.azure.com/conda-forge/feedstock-builds/_build/results?buildId=1075636&view=logs&jobId=7b6f2c87-f3a7-5133-8d84-7c03a75d9dfc&j=7b6f2c87-f3a7-5133-8d84-7c03a75d9dfc&t=9eb77fd2-8ddd-5444-8fc0-71cb28dcb736)

conda-build adds an implicit .* like this

requirements:
  run:
    - python 3.10.*

For a pin like 3.10, the net effect of .* for conda-build is to pull the latest version that is less than the next minor version (i.e., 3.11.0). An equivalent syntax, I think, is python =3.10 (i.e., a single =). rattler-build could use a single = if it does not handle .*

@beckermr beckermr changed the title recipe pins appear to be implemented in correctly relative to conda-build recipe pins appear to be implemented incorrectly relative to conda-build Nov 8, 2024
@wolfv
Copy link
Member

wolfv commented Nov 8, 2024

Can we just put "3.10.*" for the least ambiguous syntax?

@beckermr
Copy link
Author

beckermr commented Nov 8, 2024

Sure! I just didn't know if rattler-build supported that.

@rgommers
Copy link
Contributor

Rendering a recipe using python_min now seems to yield this complaint:

 26 │     - python ${{ python_min }}
    ·       ────────────┬───────────
    ·                   ╰── This match spec is ambiguous. Do you mean `python ==3.9` or `python 3.9.*`?

That is better than silently using 3.9.0, but still bad - the 3.9 is defined by conda-forge, and it shouldn't have to be overridden in every recipe.yaml. That would also defeat the purpose of the whole exercise, so unless conda-forge wants to update the 3.9.* now (does that work with conda-build?) there is an issue.

Either way it seem much better to make this work as expected in rattler-build; using a specifier like 3.9 is very common in both conda and python metadata file, and people always mean .* and never .0.

@beckermr
Copy link
Author

Yep. There are a lot of strong opinions floating around on these specific issues. We're not going to resolve them until we write and vote on a CEP that defines the correct behavior.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants