Skip to content

Support multiple constraints and constraint files #1096

@tiran

Description

@tiran

Fromager 0.82 and earlier only supports a single constraints file with unique entries. packaging 26.1 added a new feature to check if a SpecifierSet is satisfiable. This feature finally allows us to support multiple constraints and constraints files safely.

>>> from packaging.specifiers import SpecifierSet
>>> SpecifierSet("<1").is_unsatisfiable()
False
>>> SpecifierSet("<1,>2").is_unsatisfiable()
True
  1. extend fromager.constraints.Constraints.add_constraint to combine constraints and verify that the combined constraints are satisfiable.
  2. update the global -c / --constraints-file option to support multiple constraints files

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type
No fields configured for issues without a type.

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions