pip-compile-multi icon indicating copy to clipboard operation
pip-compile-multi copied to clipboard

Unable to update pacakges with extras

Open PeterJCLaw opened this issue 1 year ago • 3 comments

Given input:

ibis-framework

which produces an output file with many dependencies, including:

ibis-framework==7.2.0
pins[gcs]==0.8.4  # change this line manually to 0.8.3

Attempting to update pins from 0.8.3 to the latest (0.8.4 at the time of writing) doesn't seem to work.

Running this with a single layer of requirements results in no changes and no errors. With several layers of requirements an error is emitted:

Package pins[gcs] was resolved to different versions in different environments: 0.8.4 and 0.8.3
...
RuntimeError: Please add constraints for the package version listed above

With single-layer input:

ibis-framework
pins==0.8.3

A similar error is present:

Could not find a version that matches fsspec<2023.9.0,==2023.12.2,>=0.8.0 (from pins[gcs]==0.8.3->-r requirements/base.in (line 2))
...
  fsspec==2023.12.2 (from gcsfs==2023.12.2.post1->pins[gcs]==0.8.3->-r requirements/base.in (line 2))
  fsspec<2023.9.0,>=0.8.0 (from pins[gcs]==0.8.3->-r requirements/base.in (line 2))
...
RuntimeError: Failed to pip-compile requirements/base.in

PeterJCLaw avatar Jan 04 '24 15:01 PeterJCLaw

Could you please try experimenting with --autoresolve and --backtracking flags?

peterdemin avatar Jan 04 '24 16:01 peterdemin

For the case of a single layer, pins not present in the .in file, but currently being at 0.8.3:

  • --autoresolve solves the issue (upgrade happens as desired)
  • --backtracking has no effect (no error, also no upgrade)

For the case of a single layer, with pins==0.8.3 being in the .in file:

  • --autoresolve has no effect (i.e: still errors)
  • --backtracking solves the issue (initial locking happens fine)

The cases with more layers don't seem quite the same; I'm currently working out exactly what they do.

I already had --autoresolve in my original but forgot to use that in my cut-down. Adding --backtracking to my original requirements hits other issues (possibly related to https://github.com/peterdemin/pip-compile-multi/issues/413).

PeterJCLaw avatar Jan 04 '24 16:01 PeterJCLaw

Thanks for reporting the issue. I think I saw something similar in the past. I don't have time to debug/fix it, but I'd be happy to review/merge a PR and publish a new release.

peterdemin avatar Jan 04 '24 18:01 peterdemin