Skip to content

editable requirements are not allowed as constraints with the new backtracking resolver #1755

Description

@mmerickel

I'm using a pattern of 3 requirement files:

  • global constraints (base.txt)
  • setup
  • src
  • dev

Setup includes a local package that is used by later src packages as a custom setuptools build class.

Since things are ordered, we use the pins from the previous file as constraints for the next file to ensure that all the files are pinned to the same versions. Thus:

# setup.in
-c base.txt
-e file:src/my-setup-package#egg=my-setup-package

# src.in
-c base.txt
-c setup.txt  # <------------ note this is the output pin from setup.in
-e file:src/my-web-app#egg=my-web-app

With the pip-tools workflow we then update each .txt file in order:

$ pip-compile --find-links wheels --no-emit-find-links --resolver=backtracking setup.in
$ pip-compile --find-links wheels --no-emit-find-links --resolver=backtracking src.in
$ pip-compile --find-links wheels --no-emit-find-links --resolver=backtracking dev.in

This workflow only fails when using --resolver=backtracking.

Tested with pip-tools 6.11.0.

Metadata

Metadata

Assignees

No one assigned

    Labels

    resolverRelated to dependency resolvervcsRelated to VCS requirements

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions