-
Notifications
You must be signed in to change notification settings - Fork 3.1k
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
Issue #6163: Temporary workaround for legacy setup.py files #6210
Issue #6163: Temporary workaround for legacy setup.py files #6210
Conversation
The new test cases are now passing (explicit backend) and failing (implicit backend) as expected. Next step will be to tweak the handling of the implicit backend case to make that test pass without breaking anything else. |
@pradyunsg @pfmoore Something that does bother me a bit with the new tests is that the simplest way I found to get them to work was to let them have open access to PyPI in order to grab |
Latest push should get the new test passing by adding the source directory to sys.path in the implicit case. It's a pretty gross hack, since it tunnels "this was implicit" through to a patched version of I think it may still be worth doing though, as the |
Noting what would be required to remove the workaround once the real fix in
|
Could those reversion notes be added as a comment in the code somewhere, please? (My reaction to this fix is "ewww" and I still don't think it'll be significantly faster to fix this here rather than in setuptools, but that's really down to @pradyunsg as RM to decide how fast he wants to release another version). Also, can these tests be run against the in-progress setuptools fix? That would confirm if the non-test changes here are needed at all. (Note - I don't actually know how to run tests against a backend in an unreleased version of setuptools. That's a major issue I had with developing the PEP 517 code, and one that I never actually solved, but IMO we need a mechanism to do this, otherwise we'll never be able to properly co-ordinate changes between pip and the setuptools backend). |
@pfmoore I restructured all the changes to better mark the "This code is only here to work around issue #6163" sections, and added a block comment with the gory details to the code that sets the fallback build backend. Unfortunately, testing against pre-release setuptools runs up against the problem that build dependencies are restricted to pre-built artifacts, so simply declaring a direct VCS URL references doesn't work. However, I think resolving that ties in to my question above about having a way to run the new tests without needing to give them general access to PyPI: if I fix the test case to use the |
I tried my idea of modifying I then tried doing The approach I finally got to work was to clone @pganssle's branch locally, run the That approach finally worked, but the actual tests hit the issue I noted in pypa/setuptools#1652 (comment), where the correct entry to add is an absolute path, not the current directory. Amending the code with my suggested fix locally, rebuilding the test wheel, and re-running the PEP 517 functional tests got me a passing build again :) |
I posted #6212 to show what I'd expect the end state to look like after I still don't think it makes sense to put pressure on the |
Checking that this branch resolves the originally reported issue with
|
I like this "solution" better than rushing out a change to the public API in Maybe this is the only change that needs to happen, but I don't think we're actually gaining anything from opting people in to PEP 517 right now, and if the The old code path is still going to exist for quite some time, so it's not a big hardship to slow the roll out of the new code path a little. |
@pganssle If we make PEP 517 opt-in, how do you propose we get users to test whether it works with their configurations? The reason we made it opt-out was precisely this - unless we switch it on, we'll get no user feedback and we're simply delaying the point at which we find out any issues. (I'm not trying to block switching to opt-in if it's genuinely the best option, but I truly don't see how it helps us find out if the new code is any good, in any meaningful way). |
I'm suggesting a temporary reversion and we'll manually test the major problems we've seen. If we push the PEP 517-as-default rollout to 19.1 or 19.2, we would also have time to set up the pre-release integration testing repo to do some more thorough testing before it hits users. |
@pfmoore I think there's enough "It broke X, Y, and Z" feedback from the past few days that can provide fodder for the design of new |
@ncoghlan You're probably right. I'm happy to go with that, although I worry that no-one will step up and actually write those extra tests. But if that means we simply don't progress with PEP 517 support as fast as I'd like, then I guess that's just a reality that we have to accept. |
@pfmoore As long as the resolutions of the reported bugs are gated on adding relevant tests to the test suite, it will hopefully be OK :) |
Closing in favour of #6229 (see #6163 (comment) for more details) |
Reopening, as the CI results on #6229 aren't promising - in the current code base, |
@ncoghlan As for this PR implementation wise, patches to pip's vendored libraries have to stored in |
FYI, the MacOS failure is from a flaky test. See: #6043 (comment) |
I am okay with merging this -- as a temporary fix, if setuptools can't get a fix out in time -- but still prefer a setuptools-only fix. |
I'm not sure what "in time" means here, is there a deadline? I think the time for "quick let's work around it so it doesn't cause a disruption" was some time last week. At this point it's less of a critical problem and more of an ongoing annoyance. Assuming one of the other |
"in time" here means "before pip does its next release", plus a little bit of time to change the default backend in pip. IMO, I'd rather delay a pip release until the setuptools release is done - at this point I don't see much value in a "quick fix" pip that will only be around for a short while anyway. If we'd released a new version of pip with this fix in it within days, that would have been different. But at this point I agree it's more of an ongoing problem now than a critical failure. |
Yes. I am going to cut a pip release, hopefully containing one of the fixes for this issue, in the coming week -- if setuptools releases the backend by early next week (~Feb 7/8), that'd be perfect. edit: I can't seem to come up with a language that doesn't make this sound like a threat -- this isn't a threat/ultimatum etc. There's a bugfix release that I didn't cut yet and fixing this along with the other fixes, in that would be perfect. |
Agreed -- I messed up my timeline a bit and the second bugfix for 19.0 isn't out yet (:() so if we can fit either a setuptools + legacy backend or this fix in pip 19.0.2, I'd prefer that to the alternative. |
As I've noted previously: my main concern isn't with professional build pipelines that can be fixed by pinning So I'd prefer to see this merged (thus ensuring that 19.0.2 will definitely ship with a resolution for #6163), and then I'll rework #6212 atop that foundation in anticipation of a proper setuptools release being available in time. Declining to merge this one until the last minute because a |
Aye, I actually meant to close this when I last updated #6212 - fixing that oversight now :) |
This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs. |
Temporary resolution of #6163 while the longer term fix in
setuptools
is still undergoing design review.