Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

document the backward-incompatible PEP 440 change to requirement semantics #310

Open
ghost opened this issue Dec 23, 2014 · 1 comment
Open

Comments

@ghost
Copy link

ghost commented Dec 23, 2014

Originally reported by: dairahopwood (Bitbucket: dairahopwood, GitHub: Unknown)


The PEP 440-compliant requirement checking is not backward-compatible with setuptools prior to version 8, or pip prior to version 6. An example of a requirement whose meaning has changed is:

foo == X, foo >= Y

In the old semantics, this would allow either foo == X or foo >= Y. In the new semantics, it fails to match any version of foo unless X == Y.

This causes problems for applications that have non-trivial version requirements and need to work with both old and new setuptools (for example, see https://tahoe-lafs.org/trac/tahoe-lafs/ticket/2354 ). While the PEP 440 semantics is clearly simpler and more understandable, there needs to be documentation of the incompatibility, and of how an application can restrict itself to requirements that have the same meaning under the old and new semantics.

I believe requirements of the following form have the same meaning:

[{>|>=} X], [!= Y_i, ...], [{<|<=} Z] where X < Y_i < Z for all Y_i

(There may be any number of Y_i including zero; the lower and upper bound constraints are also optional. In the above, {|} and [] and ... are metacharacters, not literal parts of the requirement string.)

Of course any requirement with only a single constraint (foo op X) also has the same meaning, provided that constraint is supported in the old setuptools/pip version.


@pganssle pganssle added Needs Triage Issues that need to be evaluated for severity and status. documentation help wanted Needs Implementation Issues that are ready to be implemented. and removed Needs Triage Issues that need to be evaluated for severity and status. labels Oct 19, 2018
@pganssle
Copy link
Member

Has this "aged out", given that it's been so long? Are people still migrating?

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

No branches or pull requests

1 participant