-
-
Notifications
You must be signed in to change notification settings - Fork 614
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
Print provenance information when pip-compile fails #837
Conversation
Test failures are from provenance info added to string representations of requirements. Should be straightforward to fix if the approach here seems like the right one. |
Codecov Report
@@ Coverage Diff @@
## master #837 +/- ##
==========================================
- Coverage 98.69% 98.55% -0.14%
==========================================
Files 36 36
Lines 2139 2150 +11
Branches 279 284 +5
==========================================
+ Hits 2111 2119 +8
- Misses 16 17 +1
- Partials 12 14 +2
Continue to review full report at Codecov.
|
Codecov Report
@@ Coverage Diff @@
## master #837 +/- ##
==========================================
+ Coverage 98.69% 98.75% +0.06%
==========================================
Files 36 36
Lines 2139 2173 +34
Branches 279 285 +6
==========================================
+ Hits 2111 2146 +35
Misses 16 16
+ Partials 12 11 -1
Continue to review full report at Codecov.
|
I'm having trouble testing the generated exception message, because the current version of |
I managed to fix the issue in conftest, so that I could add an integration test of the new error behavior. |
This is ready for a review |
@atugushev would you be willing to review? Thanks! |
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.
This is awesome! I've reviewed code briefly though and found a few minor nitpicks. Soon i'll review combine_install_requirements
more closely and give you a comprehensive feedback.
Also i've tried PR locally with echo "pyrax==1.9.8" | pip-compile - -vo-
(thanks for good example #693) and got this:
Could not find a version that matches pbr!=2.1.0,<2.0,>=1.6,>=2.0.0 (from python-novaclient==2.27.0->pyrax==1.9.8->-r /var/folders/4x/rz_w89dx1z3bydfd6qpdjn_h0000gn/T/tmpnu5oa32f (line 1))
Tried: 0.5.2.5.g5b3e942, 0.5.0, 0.5.1, 0.5.2, 0.5.4, 0.5.5, 0.5.6, 0.5.7, 0.5.8, 0.5.10, 0.5.11, 0.5.12, 0.5.13, 0.5.14, 0.5.15, 0.5.16, 0.5.17, 0.5.18, 0.5.19, 0.5.20, 0.5.21, 0.5.22, 0.5.23, 0.6, 0.7.0, 0.8.0, 0.8.1, 0.8.2, 0.9.0, 0.9.0, 0.10.0, 0.10.0, 0.10.1, 0.10.1, 0.10.2, 0.10.2, 0.10.3, 0.10.3, 0.10.4, 0.10.4, 0.10.5, 0.10.5, 0.10.6, 0.10.6, 0.10.7, 0.10.7, 0.10.8, 0.10.8, 0.11.0, 0.11.0, 0.11.1, 0.11.1, 1.0.0, 1.0.0, 1.0.1, 1.0.1, 1.1.0, 1.1.0, 1.1.1, 1.1.1, 1.2.0, 1.2.0, 1.3.0, 1.3.0, 1.4.0, 1.4.0, 1.5.0, 1.5.0, 1.6.0, 1.6.0, 1.7.0, 1.7.0, 1.8.0, 1.8.0, 1.8.1, 1.8.1, 1.9.0, 1.9.0, 1.9.1, 1.9.1, 1.10.0, 1.10.0, 2.0.0, 2.0.0, 2.1.0, 2.1.0, 3.0.0, 3.0.0, 3.0.1, 3.0.1, 3.1.0, 3.1.0, 3.1.1, 3.1.1, 4.0.0, 4.0.0, 4.0.1, 4.0.1, 4.0.2, 4.0.2, 4.0.3, 4.0.3, 4.0.4, 4.0.4, 4.1.0, 4.1.0, 4.1.1, 4.1.1, 4.2.0, 4.2.0, 4.3.0, 4.3.0, 5.0.0, 5.0.0, 5.1.0, 5.1.0, 5.1.1, 5.1.1, 5.1.2, 5.1.2, 5.1.3, 5.1.3, 5.2.0, 5.2.0, 5.2.1, 5.2.1, 5.3.0, 5.3.0, 5.3.1, 5.3.1
There are incompatible versions in the resolved dependencies.
- pbr!=2.1.0,>=2.0.0 (from oslo.utils==3.41.0->python-novaclient==2.27.0->pyrax==1.9.8->-r /var/folders/4x/rz_w89dx1z3bydfd6qpdjn_h0000gn/T/tmpnu5oa32f (line 1))
- pbr!=2.1.0,>=2.0.0 (from oslo.serialization==2.29.1->python-novaclient==2.27.0->pyrax==1.9.8->-r /var/folders/4x/rz_w89dx1z3bydfd6qpdjn_h0000gn/T/tmpnu5oa32f (line 1))
- pbr!=2.1.0,>=2.0.0 (from oslo.i18n==3.23.1->python-novaclient==2.27.0->pyrax==1.9.8->-r /var/folders/4x/rz_w89dx1z3bydfd6qpdjn_h0000gn/T/tmpnu5oa32f (line 1))
- pbr!=2.1.0,>=2.0.0 (from python-keystoneclient==3.19.0->python-novaclient==2.27.0->pyrax==1.9.8->-r /var/folders/4x/rz_w89dx1z3bydfd6qpdjn_h0000gn/T/tmpnu5oa32f (line 1))
- pbr<2.0,>=1.6 (from python-novaclient==2.27.0->pyrax==1.9.8->-r /var/folders/4x/rz_w89dx1z3bydfd6qpdjn_h0000gn/T/tmpnu5oa32f (line 1))
Looks tasty!
This looks good. I began to work on this myself and also thought using a class like |
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.
LGTM! 👍
@jakevdp could you please squash your commits before it'll be merged? |
squashed & force-pushed |
Awesome, thanks everyone! |
|
According to |
Just based on taking a look at what changed here, deleting |
Not sure if this is the right solution, but this seems to fix jazzband#851, which was introduced when the `source_ireqs.sort(key=str)` operation was added in jazzband#837. Signed-off-by: Anders Kaseorg <andersk@mit.edu>
I just stumbled on this new feature (I've been away for a while), you are my heroes! 🎉 🎉 🎉 |
For motivation, see #836
For the following
requirements.in
file:Before this change, the output is this:
With this change, the output is this:
This involves adding a piptools-specific attribute to combined
InstallRequirements
objects. This might be cleaner if we used a class-based approach (defining, e.g. aCombinedInstallRequirements
class) but this is difficult to do cleanly because pip'sInstallRequirements
class is an internal implementation that changes often between pip versions.Changelog-friendly one-liner: Print provenance information when pip-compile fails (Fixes #836)
Contributor checklist