Pip install Plone 6.0.1 causing WARNING: cachecontrol does not provide the extra 'filecache' [SOLVED]

I'm attempting to move from Plone 6.0.0b3 to 6.0.1
So I've updated my constraints.txt to point to 6.0.1

-c https://dist.plone.org/release/6.0.1/constraints.txt

Just as a note, https://dist.plone.org/release/6.0.0b3/constraints.txt includes CacheControl as a dependency but none of them include the extra CacheControl[filecache]

When I attempt to run pip (inside docker) I get the following output

 Preparing metadata (setup.py): finished with status 'done'
Collecting CacheControl[filecache]
  Downloading CacheControl-0.12.10-py2.py3-none-any.whl (20 kB)
  Downloading CacheControl-0.12.9-py2.py3-none-any.whl (23 kB)
  Downloading CacheControl-0.12.8-py2.py3-none-any.whl (23 kB)
  Downloading CacheControl-0.12.7-py2.py3-none-any.whl (23 kB)
  Downloading CacheControl-0.12.6-py2.py3-none-any.whl (19 kB)
  Downloading CacheControl-0.12.5.tar.gz (14 kB)
  Preparing metadata (setup.py): started
  Preparing metadata (setup.py): finished with status 'done'
  Downloading CacheControl-0.12.4.tar.gz (14 kB)
  Preparing metadata (setup.py): started
  Preparing metadata (setup.py): finished with status 'done'
  Downloading CacheControl-0.12.3.tar.gz (14 kB)
  Preparing metadata (setup.py): started
  Preparing metadata (setup.py): finished with status 'done'
  Downloading CacheControl-0.12.2.tar.gz (14 kB)
  Preparing metadata (setup.py): started
  Preparing metadata (setup.py): finished with status 'done'
  Downloading CacheControl-0.12.1.tar.gz (13 kB)
  Preparing metadata (setup.py): started
  Preparing metadata (setup.py): finished with status 'done'
  Downloading CacheControl-0.12.0.tar.gz (13 kB)
  Preparing metadata (setup.py): started
  Preparing metadata (setup.py): finished with status 'done'
  Downloading CacheControl-0.11.7.tar.gz (13 kB)
  Preparing metadata (setup.py): started
...
WARNING: cachecontrol 0.8.0 does not provide the extra 'filecache'
WARNING: cachecontrol 0.7.3 does not provide the extra 'filecache'
WARNING: cachecontrol 0.7.2 does not provide the extra 'filecache'
WARNING: cachecontrol 0.7.1 does not provide the extra 'filecache'
WARNING: cachecontrol 0.6 does not provide the extra 'filecache'
WARNING: cachecontrol 0.5 does not provide the extra 'filecache'
WARNING: cachecontrol 0.11.1 does not provide the extra 'filecache'
WARNING: cachecontrol 0.11.0 does not provide the extra 'filecache'
WARNING: cachecontrol 0.10.7 does not provide the extra 'filecache'
WARNING: cachecontrol 0.10.6 does not provide the extra 'filecache'
WARNING: cachecontrol 0.10.4 does not provide the extra 'filecache'
WARNING: cachecontrol 0.10.3 does not provide the extra 'filecache'
WARNING: cachecontrol 0.10.2 does not provide the extra 'filecache'
WARNING: cachecontrol 0.10.1 does not provide the extra 'filecache'
WARNING: cachecontrol 0.10.0 does not provide the extra 'filecache'
WARNING: cachecontrol 0.9.4 does not provide the extra 'filecache'
WARNING: cachecontrol 0.9.3 does not provide the extra 'filecache'
WARNING: cachecontrol 0.9.2 does not provide the extra 'filecache'
WARNING: cachecontrol 0.9.1 does not provide the extra 'filecache'
WARNING: cachecontrol 0.9.0 does not provide the extra 'filecache'
WARNING: cachecontrol 0.8.3 does not provide the extra 'filecache'
WARNING: cachecontrol 0.8.2 does not provide the extra 'filecache'
WARNING: cachecontrol 0.8.1 does not provide the extra 'filecache'
WARNING: cachecontrol 0.8.0 does not provide the extra 'filecache'
WARNING: cachecontrol 0.7.3 does not provide the extra 'filecache'
WARNING: cachecontrol 0.7.2 does not provide the extra 'filecache'
WARNING: cachecontrol 0.7.1 does not provide the extra 'filecache'
WARNING: cachecontrol 0.6 does not provide the extra 'filecache'
WARNING: cachecontrol 0.5 does not provide the extra 'filecache'
WARNING: cachecontrol 0.11.1 does not provide the extra 'filecache'
WARNING: cachecontrol 0.11.0 does not provide the extra 'filecache'
WARNING: cachecontrol 0.10.7 does not provide the extra 'filecache'
WARNING: cachecontrol 0.10.6 does not provide the extra 'filecache'
WARNING: cachecontrol 0.10.4 does not provide the extra 'filecache'
WARNING: cachecontrol 0.10.3 does not provide the extra 'filecache'
WARNING: cachecontrol 0.10.2 does not provide the extra 'filecache'
WARNING: cachecontrol 0.10.1 does not provide the extra 'filecache'
WARNING: cachecontrol 0.10.0 does not provide the extra 'filecache'
WARNING: cachecontrol 0.9.4 does not provide the extra 'filecache'
WARNING: cachecontrol 0.9.3 does not provide the extra 'filecache'
WARNING: cachecontrol 0.9.2 does not provide the extra 'filecache'
WARNING: cachecontrol 0.9.1 does not provide the extra 'filecache'
WARNING: cachecontrol 0.9.0 does not provide the extra 'filecache'
WARNING: cachecontrol 0.8.3 does not provide the extra 'filecache'
WARNING: cachecontrol 0.8.2 does not provide the extra 'filecache'
WARNING: cachecontrol 0.8.1 does not provide the extra 'filecache'
WARNING: cachecontrol 0.8.0 does not provide the extra 'filecache'
WARNING: cachecontrol 0.7.3 does not provide the extra 'filecache'
WARNING: cachecontrol 0.7.2 does not provide the extra 'filecache'
WARNING: cachecontrol 0.7.1 does not provide the extra 'filecache'
WARNING: cachecontrol 0.6 does not provide the extra 'filecache'
WARNING: cachecontrol 0.5 does not provide the extra 'filecache'

Making the pip command in the Dockerfile more verbose. Will report with findings.

I've decided to build it locally. Was using a gitlab CI process which limits the amount of logging captured. Now I'm capturing all output to a build.log. Hopefully this can catch the issue.
docker build --no-cache --progress=plain . 2>&1 | tee build.log

As an experiment, I tried removing all additional requirements. My requirements.txt now looks like this:

-r https://dist.plone.org/release/6.0.1/constraints.txt

Even though my Dockerfile mentions additional packages, they are not used, because they are not included in the requirements.txt

FROM plone/plone-backend:6.0.1

COPY src/custom.profile /app/src/custom.profile
COPY src/plonetheme.custom /app/src/plonetheme.custom
COPY src/custom.content /app/src/custom.content
COPY src/custom.customviews /app/src/custom.customviews
COPY requirements.txt /app/requirements.txt

RUN apt-get update \
    && apt-get install -y --no-install-recommends gcc \
    && rm -rf /var/lib/apt/lists/*

RUN /app/bin/pip install -r /app/requirements.txt -vv

As a result, I'm, effectively, not using any additional packages, so there should be no additional dependencies. My expectation is that it will faithfully rebuild Plone 6.0.1.

I then run the build command locally (sending output to a build.log):

docker build --no-cache --progress=plain . 2>&1 | tee build.log

To my surprise, at some point during the build it attempts to get CacheControl[filecache]. The latest versions of CacheControl don't have a filecache extra so pip starts a long search.

This is from the build.log, it shows the first time that pip starts looking for the filecache extra on CacheControl (CacheControl[filecache]).

Given no hashes to check 2 links for project 'plone-supermodel': discarding no candidates
Given no hashes to check 2 links for project 'plone-supermodel': discarding no candidates
Requirement already satisfied: lxml[cssselect] in ./lib/python3.11/site-packages (from plone.protect==4.1.8->-r https://
dist.plone.org/release/6.0.0.2/constraints.txt (line 229)) (4.9.2)
Given no hashes to check 1 links for project 'zope-mkzeoinstance': discarding no candidates
Given no hashes to check 2 links for project 'gitpython': discarding no candidates
Given no hashes to check 2 links for project 'zest-releaser': discarding no candidates
Given no hashes to check 1 links for project 'zestreleaser-towncrier': discarding no candidates
Given no hashes to check 49 links for project 'cachecontrol': discarding no candidates
Collecting CacheControl[filecache]
  Created temporary directory: /tmp/pip-unpack-n6cp_e09
  Looking up "https://files.pythonhosted.org/packages/83/63/15ce47ede5b03657e920f3f006e56ca9a16f7873978146f2f77e297bdd22/CacheControl-0.12.11-py2.py3-none-any.whl" in the cache
  No cache entry available

I don't know if the build will eventually complete. I've waited up to 90 minutes... it tends to eventually get into a loop that shows pip searching for a version of cachecontrol that includes the 'filecache' extra:

WARNING: cachecontrol 0.11.1 does not provide the extra 'filecache'
WARNING: cachecontrol 0.11.0 does not provide the extra 'filecache'
WARNING: cachecontrol 0.10.7 does not provide the extra 'filecache'
WARNING: cachecontrol 0.10.6 does not provide the extra 'filecache'
WARNING: cachecontrol 0.10.4 does not provide the extra 'filecache'
WARNING: cachecontrol 0.10.3 does not provide the extra 'filecache'
WARNING: cachecontrol 0.10.2 does not provide the extra 'filecache'
WARNING: cachecontrol 0.10.1 does not provide the extra 'filecache'
WARNING: cachecontrol 0.10.0 does not provide the extra 'filecache'
WARNING: cachecontrol 0.9.4 does not provide the extra 'filecache'
WARNING: cachecontrol 0.9.3 does not provide the extra 'filecache'
WARNING: cachecontrol 0.9.2 does not provide the extra 'filecache'
WARNING: cachecontrol 0.9.1 does not provide the extra 'filecache'
WARNING: cachecontrol 0.9.0 does not provide the extra 'filecache'
WARNING: cachecontrol 0.8.3 does not provide the extra 'filecache'
WARNING: cachecontrol 0.8.2 does not provide the extra 'filecache'
WARNING: cachecontrol 0.8.1 does not provide the extra 'filecache'
WARNING: cachecontrol 0.8.0 does not provide the extra 'filecache'
WARNING: cachecontrol 0.7.3 does not provide the extra 'filecache'
WARNING: cachecontrol 0.7.2 does not provide the extra 'filecache'
WARNING: cachecontrol 0.7.1 does not provide the extra 'filecache'
WARNING: cachecontrol 0.6 does not provide the extra 'filecache'
WARNING: cachecontrol 0.5 does not provide the extra 'filecache'
WARNING: cachecontrol 0.11.1 does not provide the extra 'filecache'
WARNING: cachecontrol 0.11.0 does not provide the extra 'filecache'
WARNING: cachecontrol 0.10.7 does not provide the extra 'filecache'
WARNING: cachecontrol 0.10.6 does not provide the extra 'filecache'
WARNING: cachecontrol 0.10.4 does not provide the extra 'filecache'
WARNING: cachecontrol 0.10.3 does not provide the extra 'filecache'
WARNING: cachecontrol 0.10.2 does not provide the extra 'filecache'
WARNING: cachecontrol 0.10.1 does not provide the extra 'filecache'
WARNING: cachecontrol 0.10.0 does not provide the extra 'filecache'
WARNING: cachecontrol 0.9.4 does not provide the extra 'filecache'
WARNING: cachecontrol 0.9.3 does not provide the extra 'filecache'
WARNING: cachecontrol 0.9.2 does not provide the extra 'filecache'
WARNING: cachecontrol 0.9.1 does not provide the extra 'filecache'
WARNING: cachecontrol 0.9.0 does not provide the extra 'filecache'
WARNING: cachecontrol 0.8.3 does not provide the extra 'filecache'
WARNING: cachecontrol 0.8.2 does not provide the extra 'filecache'
WARNING: cachecontrol 0.8.1 does not provide the extra 'filecache'
WARNING: cachecontrol 0.8.0 does not provide the extra 'filecache'
WARNING: cachecontrol 0.7.3 does not provide the extra 'filecache'
WARNING: cachecontrol 0.7.2 does not provide the extra 'filecache'
WARNING: cachecontrol 0.7.1 does not provide the extra 'filecache'
WARNING: cachecontrol 0.6 does not provide the extra 'filecache'
WARNING: cachecontrol 0.5 does not provide the extra 'filecache'
WARNING: cachecontrol 0.11.1 does not provide the extra 'filecache'
WARNING: cachecontrol 0.11.0 does not provide the extra 'filecache'
WARNING: cachecontrol 0.10.7 does not provide the extra 'filecache'
WARNING: cachecontrol 0.10.6 does not provide the extra 'filecache'
WARNING: cachecontrol 0.10.4 does not provide the extra 'filecache'
WARNING: cachecontrol 0.10.3 does not provide the extra 'filecache'
WARNING: cachecontrol 0.10.2 does not provide the extra 'filecache'
WARNING: cachecontrol 0.10.1 does not provide the extra 'filecache'
WARNING: cachecontrol 0.10.0 does not provide the extra 'filecache'
WARNING: cachecontrol 0.9.4 does not provide the extra 'filecache'
WARNING: cachecontrol 0.9.3 does not provide the extra 'filecache'
WARNING: cachecontrol 0.9.2 does not provide the extra 'filecache'
WARNING: cachecontrol 0.9.1 does not provide the extra 'filecache'
WARNING: cachecontrol 0.9.0 does not provide the extra 'filecache'
WARNING: cachecontrol 0.8.3 does not provide the extra 'filecache'
WARNING: cachecontrol 0.8.2 does not provide the extra 'filecache'
WARNING: cachecontrol 0.8.1 does not provide the extra 'filecache'
WARNING: cachecontrol 0.8.0 does not provide the extra 'filecache'
WARNING: cachecontrol 0.7.3 does not provide the extra 'filecache'
WARNING: cachecontrol 0.7.2 does not provide the extra 'filecache'
WARNING: cachecontrol 0.7.1 does not provide the extra 'filecache'
WARNING: cachecontrol 0.6 does not provide the extra 'filecache'
WARNING: cachecontrol 0.5 does not provide the extra 'filecache'
WARNING: cachecontrol 0.11.1 does not provide the extra 'filecache'
WARNING: cachecontrol 0.11.0 does not provide the extra 'filecache'
WARNING: cachecontrol 0.10.7 does not provide the extra 'filecache'
WARNING: cachecontrol 0.10.6 does not provide the extra 'filecache'
WARNING: cachecontrol 0.10.4 does not provide the extra 'filecache'
WARNING: cachecontrol 0.10.3 does not provide the extra 'filecache'
WARNING: cachecontrol 0.10.2 does not provide the extra 'filecache'
WARNING: cachecontrol 0.10.1 does not provide the extra 'filecache'
WARNING: cachecontrol 0.10.0 does not provide the extra 'filecache'
WARNING: cachecontrol 0.9.4 does not provide the extra 'filecache'
WARNING: cachecontrol 0.9.3 does not provide the extra 'filecache'
WARNING: cachecontrol 0.9.2 does not provide the extra 'filecache'
WARNING: cachecontrol 0.9.1 does not provide the extra 'filecache'
WARNING: cachecontrol 0.9.0 does not provide the extra 'filecache'
WARNING: cachecontrol 0.8.3 does not provide the extra 'filecache'
WARNING: cachecontrol 0.8.2 does not provide the extra 'filecache'
WARNING: cachecontrol 0.8.1 does not provide the extra 'filecache'
WARNING: cachecontrol 0.8.0 does not provide the extra 'filecache'
WARNING: cachecontrol 0.7.3 does not provide the extra 'filecache'
WARNING: cachecontrol 0.7.2 does not provide the extra 'filecache'
WARNING: cachecontrol 0.7.1 does not provide the extra 'filecache'
WARNING: cachecontrol 0.6 does not provide the extra 'filecache'
WARNING: cachecontrol 0.5 does not provide the extra 'filecache'

This smells like your are using outdated versions of setuptools and/or pip. Update them before running the whole install.

This is all running inside the plone-backend docker image. I suppose I can update pip in the docker image before running the build.

I plan to modify the pip install in the Dockerfile to do an upgrade first.

RUN /app/bin/pip install --upgrade pip \
    && /app/bin/pip install --upgrade setuptools \
    && /app/bin/pip install -r /app/requirements.txt -vv

We'll see if this helps.

After upgrading pip and setuptools (see above) I'm still getting the same issue (ie. an attempt to install CacheControl[filecache] rather than CacheControl without the extra).

It turns out that I needed to use the "legacy resolver"

RUN /app/bin/pip install -r /app/requirements.txt --use-deprecated legacy-resolver

Found this information over at Step-by-step: Using Docker to Set Up Plone 6 — Six Feet Up
Thanks @tkimnguyen
@jensens... so it was a pip issue after all, just slightly different from what we thought.

It used to work without the legacy-resolver, hopefully that will be sorted out in the future.
For anyone trying to figure this out in the future.
The following Dockerfile demonstrates the structure that worked for me.

FROM plone/plone-backend:6.0.1

COPY src/custom.profile /app/src/custom.profile
COPY src/plonetheme.custom /app/src/plonetheme.custom
COPY src/custom.content /app/src/custom.content
COPY src/custom.customviews /app/src/custom.customviews
COPY requirements.txt /app/requirements.txt

RUN apt-get update \
    && apt-get install -y --no-install-recommends gcc \
    && rm -rf /var/lib/apt/lists/*

RUN /app/bin/pip install -r /app/requirements.txt --use-deprecated legacy-resolver

ad cachecontrol[filecache] extra requires: if you look at the latest

it is there a while.
So no idea about the warnings. I never get those.

I just ran into this while upgrading to 6.0.2 with pip (not docker).

With --use-deprecated legacy-resolver the installation completes but shows this interesting bit... Maybe pinning a newer Babel version might help?

pip install -r https://dist.plone.org/release/6.0.2/constraints.txt --use-deprecated legacy-resolver
Requirement already satisfied: AccessControl==5.7 in ./lib/python3.8/site-packages (from -r https://dist.plone.org/release/6.0.2/constraints.txt (line 1)) (5.7)
Requirement already satisfied: Acquisition==4.13 in ./lib/python3.8/site-packages (from -r https://dist.plone.org/release/6.0.2/constraints.txt (line 2)) (4.13)
Requirement already satisfied: AuthEncoding==4.3 in ./lib/python3.8/site-packages (from -r https://dist.plone.org/release/6.0.2/constraints.txt (line 3)) (4.3)
Requirement already satisfied: BTrees==4.11.3 in ./lib/python3.8/site-packages (from -r https://dist.plone.org/release/6.0.2/constraints.txt (line 4)) (4.11.3)
Collecting Babel==2.11.0
  Using cached Babel-2.11.0-py3-none-any.whl (9.5 MB)
WARNING: The candidate selected for download or install is a yanked version: 'CacheControl' candidate (version 0.12.12 at https://files.pythonhosted.org/packages/1e/49/9db6d5be74f606d1b6f2bd4469827b0eed557c4bbafb30134519510f7f0d/CacheControl-0.12.12-py2.py3-none-any.whl (from https://pypi.org/simple/cachecontrol/) (requires-python:>=3.6))
Reason for being yanked: Filelock dependency change are incompatible
[...]