• Maurits van Rees's avatar
    Make compatible with pip 22.2+, restoring Requires-Python patch (#616) · 6fed3ff0
    Maurits van Rees authored
    * Make compatible with pip 22.2+, restoring Requires-Python functionality there.
    
    Fixes https://github.com/buildout/buildout/issues/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.
    
    * process_url patch: must pass cache_link_parsing=False.
    
    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.
    6fed3ff0
patches.py 6.69 KB