-
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
PipProvider._known_depths sets depths to math.inf incorrectly #10415
Comments
FYI, fixing this didn't help resolution times in my specific test cases, but I assume it might help in some other use cases. |
Probably should still fix this. Also I think the type of |
Would you like me to submit a PR? Might take up to a few weeks as I only do this in my spare time.
|
A PR would be most awesome. We’re in no hurry now since this will go into the next release cycle the soonist in October anyway.
We only care about |
I don't think this is right, to maintain the feature of user order I think it would need to be Random side-note: I learnt today that Python can sort an integer larger than a maximum floating value and |
You’re right, I messed that up. And yes, you can just use a very large int as well. The usual approach is |
I've tried setting up local pip development environment and create a pull request but it seems like Windows tests don't fully work: https://github.com/notatallshaw/pip/runs/3515183542?check_suite_focus=true ? Is this a known issue I can ignore and direct the pull request towards https://github.com/pypa/pip ? Also is there somewhere I should be adding a unit test for this? |
The signal only works in main thread error is a known bug in pytest-xdist and not related to pip itself. It happens from time to time (and now only on Windows), you can safely it. |
Made first attempt at pull request. Also it seems like running test suite locally on Windows is just a no go for Pip? The best I've been able to get so far is:
About 7 or 8 of the failures are unit tests, and when I look at why they failed they don't seem to make any sense, I've figured out one requires your machine to be in UTC but no idea why. The integration tests give hundreds of failures with no clear pattern. I'll try setting up a WSL 2 environment I guess. |
I have no problem running the tests on my Windows 10, UK English PC. Everything passes (or xfails) in my environment. I don't have time right now to do a lot of digging, I'm afraid, but if you've got specific issues, I can try to take a look over the next week. The one that seems to need UTC sounds interesting - I'm in the UK but I have run the tests while I have summer time set, so I think it may be a little more than just assuming UTC... Or if you'd rather switch to Linux (WSL) for your tests, that's fine. Whatever works best for you. |
Could you file a new issue, with the complete output of the test run? |
Thanks everyone for your inputs, here is what I will do:
If 1) I am still getting a large number of errors on Windows, and 2) I am not getting a large number of errors in WSL 2, I will make a new issue documenting all the steps I followed and the full output. If I am getting a large number of errors in both environments it's probably a failure in my ability to follow instructions and I will spend more time trying to figure out what I've done wrong. |
We should split the Windows test setup topic into a separate issue. I am pretty sure the tests work on Windows (I’m developing pip on native Windows as well). |
Can this be closed now that #10482 has merged? :-) |
Yes, thanks for noticing it! |
Description
While investigating #10201 using the following requirements:
I printed out the
inferred_depth
in the methodPipProvider.get_preference
and noticed that almost all the packages, other than those listed above, had theirinferred_depth
calculated asmath.inf
.Expected behavior
The actual inferred depth should be calculated. This can be fixed by moving the line to after the try/except statement:
E.g. changing the code to:
pip version
21.2.4
Python version
all
OS
all
How to Reproduce
Output
No response
Code of Conduct
The text was updated successfully, but these errors were encountered: