-
Notifications
You must be signed in to change notification settings - Fork 177
Make compatible with pip 22.2+, restoring Requires-Python patch #616
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
Make compatible with pip 22.2+, restoring Requires-Python patch #616
Conversation
a113b5c
to
6bbbcc9
Compare
About half of the jobs fail. Looks like it is a failure in only one test file, for example here:
It is hard to get a good overview of which jobs fail, but it looks like the 3.6 and lower jobs pass, while most 3.7+ jobs fail. If someone can assist, I would appreciate it. After all these years I have not figured out yet how to run the tests locally. Feel free to edit the PR branch. |
Thanks a lot for this. (I had tried to tackle the issue but did not get to satisfying code). I will check if I can fix the remaining broken test. I will also add some documentation how to run the tests locally. |
…ty there. Fixes #613. Note: we are patching `process_url` from `setuptools`. The existing comment says that this method was copied over from setuptools 46.1.3. I was wondering, so I checked: the method is still the same in latest setuptools. And it is largely unchanged since setuptools 42.0.2. So for that part we should still be compatible with quite a long range of setuptools versions.
6bbbcc9
to
1527861
Compare
I have rebased and force pushed this branch, after merging my unrelated other two much simpler PRs. |
This contains just as many test failures as on master. So perhaps it could be merged and released. The new release would have this bug fix, and support for I know, it would be better to not have test failures. But it is notoriously difficult to keep them passing on all environments that we support. On the other hand, it seems just one failure in |
I am worried that the test fail is related to changes in latest |
@gotcha Sure, sounds reasonable. |
This fixes test failures: extdemo-1.5 was not found, because the previous index page containing only extdemo-1.4 was cached. We were passing this before to HTMLPage, and still do as a fallback, but I missed that this was also needed in pip 22.2+ for the new IndexContent class.
I think I have found the problem. My new code in this PR was missing |
BTW, I think this was only a problem in the tests: in real world usage the index page would be read only once and it would not change during a single buildout run. |
@gotcha Yes, all is green! |
Great ! I have a small patch to merge and will do a release this weekend |
Fixes #613.
Note: we are patching
process_url
fromsetuptools
. The existing comment says that this method was copied over from setuptools 46.1.3. I was wondering, so I checked: the method is still the same in latest setuptools. And it is largely unchanged since setuptools 42.0.2. So for that part we should still be compatible with quite a long range of setuptools versions.This PR also expands the warning that is printed when the patch fails. Until now it said "Requires-Python support missing." There was no indication that this was a message from buildout, so I assumed this was something from a newer setuptools or pip, and it warned about a package that did not have a
requires_python
in itssetup.py/cfg
. Now it should be clear that it is a warning from buildout itself.