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

ENH: Allow ignoring python_min hints #2170

Open
h-vetinari opened this issue Nov 26, 2024 · 3 comments
Open

ENH: Allow ignoring python_min hints #2170

h-vetinari opened this issue Nov 26, 2024 · 3 comments

Comments

@h-vetinari
Copy link
Member

Some feedstocks need to opt-out of the test pins for python_min, for example due to being used elsewhere as a downstreams: test against other python versions (c.f. conda-forge/conda-forge.github.io#2387, conda-forge/conda-smithy-feedstock#331, conda-forge/setuptools-feedstock#371).

Given this reality, we shouldn't force those feedstocks to live with linter warnings in perpetuity, but give them a way to silence the linter. In #2090, the following mechanism was introduced

linter:
  skip:
    - lint_noarch_selectors

This could easily be extended to allow

linter:
  skip:
    - hint_python_min
@isuruf
Copy link
Member

isuruf commented Nov 26, 2024

Or if we want to be more explicit

linter:
  skip:
    - hint_python_min_in_host
    - hint_python_min_in_run
    - hint_python_min_in_test_requires

@rgommers
Copy link
Contributor

Another lint I ran into that needed skipping was the check about a build backend being present for a noarch recipe (don't have the exact message at hand now). The reason is that meson-python has an in-tree build backend (namely, itself), so that it doesn't need an external one. This is probably going to be true for all build backends and perhaps a handful of other projects.

This could be handled via a linter skip, or by the linter also looking at the [build-requires] section of pyproject.toml and disabling the warning if backend-path is present.

I like the proposed syntax in the comments above.

@xylar
Copy link

xylar commented Dec 9, 2024

@rgommers, it might be best to make a separate issue for that because it's not related to python_min. But I agree. poetry-core is another package where the backend is provided in code and the warning could be skipped.

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

4 participants