-
Notifications
You must be signed in to change notification settings - Fork 3.1k
Support --use-pep517 and --no-use-pep517 inside requirements files. #13582
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
base: main
Are you sure you want to change the base?
Conversation
Hi @foundry-markf thanks for opening a PR to pip, please be aware that all all pip maintainers are currently volunteers and it may take awhile for someone to review. That said, let me know if you need any help fixing pre-commit failure, you can run locally following the linting step in the dev guide: https://pip.pypa.io/en/stable/development/getting-started/#running-linters |
I'm thinking that As for adding what options are allowed in the requirement file, I definitely would want to some other maintainers to weigh in, I am going to be uncomfortable approving that. If approved we should also give a heads up to uv, which will not be able to support this feature (they are PEP 517 only). |
I agree, I'm uncomfortable with adding this to the requirements file. While the file format is technically owned by pip, it's used widely enough that we need to be careful about disrupting other users. Also, given how far we now are along the process of removing non-PEP 517 workflows, I don't think this is a particularly worthwhile feature to add (we'd either be ripping it out again in a few releases, or it would be left as a confusing legacy option that did nothing). Furthermore, there's no real evidence that this feature is needed except possibly by a very small minority of users. The original issue was raised in 2019, over 6 years ago, and there was very little support for it beyond a general sense that it would probably be useful for consistency with other command line options. And any consistency argument looks extremely weak now, when the whole idea of non-PEP 517 workflows is nearly dead. So I'm -1 on this. I think we'd be better simply closing #6438 as "won't fix" at this point. Sorry @foundry-markf - I realise you have a need for this in your specific environment, but honestly, you can globally configure pip to use PEP 517 via a config file or environment variable. That may be more awkward for you, but we have to balance (extremely!) limited maintainer resource against benefits here, and I don't think this meets those criteria. |
Thank you for the feedback @pfmoore and @notatallshaw . I appreciate that you took the time to look into it, and that you gave reasoning for a downvote. This at least gives me direction in my org on what to do. I note that the main branch still reports the deprecation warning for non-compliant packages, rather than a hard failure, e.g.
I'm expecting a hard failure when 25.3 is release. Is that still the case? If it is, will there be a pre-release of 25.3 that can be tested ahead of time, so there isn't a surprise when 25.3 lands? Thanks! |
It depends whether the project builds with
In this case pip will call the backend
As the deprecation warning states, you can opt into this behavior with |
@notatallshaw Ah, I think I had misunderstood what happens after the deprecation. I have tested the set of packages we pull with I had interpreted the
that I had to do something to our pip install invocations when 25.3 is released to keep the legacy packages building. But I just had a re-read of comments above, in particular,
so as our installed packages work with |
This is another attempt to address #6438 after I saw #6447 had not been finished off.
The reasoning behind putting some effort into this is multi-fold:
pyproject.toml
, and we don't have capacity to address upgrades before pip 25.3 appearsPIP_USE_PEP517
or apip.conf
this is not shared between workflows and will result in upset. If I can fix it by adding an option to a requirements file, this is used by all modes of operationI left
--no-use-pep517
in from the original PR/issue, not that I need it, but simply for agreeable symmetryI realise pip 25.3 is on the horizon, so this is very late coming, but appreciate anyone looking over it. Thanks.