Skip to content

Feat: Support constraints #65

Open

Description

@notatallshaw

Constraints are a way of specifying further restrictions on your requirements without requiring the specification be installed. e.g. you might say numpy<2 or urllib3>=2 without actually requiring them to be installed.

There are a lot of possible use cases for them but I beleive the strongest one is that allow that is not easy to replicate by juggling multiple requirements files is keep all your different "groups" of requirements in sync with each other, Apache Airflow uses this as they have many optional dependencies but a single constraints file per release that any user can use to make sure they get a tested version of each dependendy and transitive dependency: https://airflow.apache.org/docs/apache-airflow/stable/installation/installing-from-pypi.html#constraints-files

Because constraints directly interact with the resolution of the requirements I suspect it would fit into the low level nate of rip, but maybe you disagree.

Also, I think Pip may have some "lessons learnt" from add constraints that may want to be considered if pursuring this feature.

Activity

  1. wolfv commented on Oct 24, 2023

    @wolfv
    Member

    Interesting. In conda the feature is called run_constrained (and differs from run dependencies) and we do have support for this in resolvo.

    In conda, run constraints are "optional" packages (if it's installed, or going to be installed, it has to adhere to the constraint).

    Supporting this feature should be doable with rip!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions