Comment 2 for bug 1906322

Revision history for this message
Elod Illes (elod-illes) wrote :

The error message says:

"DEPRECATION: Constraints are only allowed to
take the form of a package name and a version specifier. Other forms
were originally permitted as an accident of the implementation, but
were undocumented. The new implementation of the resolver no longer
supports these forms. A possible replacement is replacing the
constraint with a requirement.."

So as I understand the only way is to use the links only as requirement
(links in costraint is completely unsupported).

Currently we are replacing the constraints of packages to *links*, for
those packages which are installed from source [1], to avoid that an
install pulls that package from pypi instead of having it from source.
This link injection causes the above deprecation message.

I've experimented a bit and found that it is enough to just simply
filter out these packages from the upper-constraints.txt. This can be
done because we install the packages from source right after the
constraints file editing (at least this is what I experienced). If I'm
not mistaken, this way, if there is a package dependency that is
available from source, then it is installed already and won't be

One issue might happen, though, with the following scenario:
* we have two package, both from source
* one depends on the other
* we use the depends-on tag at the package, which is the dependency of
  the other package
In this case we *might* reinstall the package from pypi... but I'm not

Anyway, I've uploaded some Work In Progress patch [2], which shows that
the filtering is enough, as far as I see. In this way we can use latest
pip, as we are not using links anymore.

Any opinion about this idea and possible drawbacks?