buildout / buildout

Buildout is a deployment automation tool written in and extended with Python
http://www.buildout.org
Other
570 stars 168 forks source link

Error message with pip 22.2+ #613

Closed mauritsvanrees closed 1 year ago

mauritsvanrees commented 1 year ago

I get this traceback:

$ bin/buildout 
Traceback (most recent call last):
  File "/Users/maurits/tmp/foo/lib/python3.8/site-packages/zc/buildout/patches.py", line 52, in patch_PackageIndex
    from pip._internal.index.collector import HTMLPage
ImportError: cannot import name 'HTMLPage' from 'pip._internal.index.collector' (/Users/maurits/tmp/foo/lib/python3.8/site-packages/pip/_internal/index/collector.py)

Buildout does continue after this, so it is not fatal.

To reproduce:

$ python3.8 -m venv foo  # tried with 3.10 as well, same thing
$ cd foo
$ bin/pip install --pre -U pip setuptools zc.buildout
$ cat buildout.cfg
[buildout]
parts = test

[test]
recipe = zc.recipe.egg
eggs = build
$ bin/buildout

Note: I also get a warning: "Requires-Python support missing", but I think that is now thrown if a package that we need to install is missing the Requires-Python metadata. So not something buildout can do anything about.

When I install pip 22.1.2, all is well again.

mauritsvanrees commented 1 year ago

Related: https://github.com/pypa/pip/issues/10825

icemac commented 1 year ago

I also saw this traceback but it just seems to be a warning, buildout still runs.

mauritsvanrees commented 1 year ago

I am seeing it in tests failures targeting buildout main now too. See for example here, although the page is practically unreadable in my browser. I am trying a fix in a PR.

mauritsvanrees commented 1 year ago

Note: I also get a warning: "Requires-Python support missing", but I think that is now thrown if a package that we need to install is missing the Requires-Python metadata. So not something buildout can do anything about.

I was wrong. This is a message logged by Buildout itself. It prints this when the patch fails. So I realise the impact of the warning messages: if you use pip 22.2 or higher, then buildout does not have Requires-Python support. When run on Python 2 it will happily try to install a package that is marked as Python 3 only. I am trying to fix it in PR #616.