Home

Awesome

What is this?

You have a few choices:

Someday:

The Vision

The goal is for posy to act as a kind of high-level frontend to python: you install posy, then run posy [args] some_python.py and it takes care of everything up until entering the python interpreter. That includes:

(NOTE: not all of these are implemented yet!)

But the following is not in scope:

Packaging features I don't (currently) plan to implement

===

PEP 440 defines a === operator, for comparing non-PEP 440-compliant versions. Posy only supports PEP 440-compliant versions.

The platform_release and platform_version environment marker variables

These are values like:

 'platform_release': '5.19.0-23-generic',
 'platform_version': '#24-Ubuntu SMP PREEMPT_DYNAMIC Fri Oct 14 15:39:57 UTC 2022',

Technically, you're supposed to be able to make dependencies vary depending on these strings. But these are so quirky and machine-specific that I don't see how to implement that in posy's model, or why anyone would want them.

Prereleases in specifiers

According to PEP 440, specifiers like >= 2.0a1 are supposed to change meaning depending on whether or not the literal version contains a prerelease marker. So like, >= 2.0 doesn't match 2.1a1, because that's a prerelease, and regular specifiers never match prereleases. But >= 2.0a1 does match 2.1a1, because the presence of a prerelease in the specifier makes it legal for prerelease versions to match.

I don't think I can actually implement this using the pubgrub system, since it collapses multiple specifiers for the same package into a single set of valid ranges, and there's no way to preserve the information about which ranges were derived from specifiers that included prerelease suffixes, and which ranges weren't.

And if you think about it... that's actually because while this rule is well-defined for a specifier in isolation, it doesn't really make sense when you're talking about multiple packages with their own dependencies. E.g., if package A depends on foo == 2.0a1, and package B depends on foo >= 1.0, then is it valid to install foo v2.0a1? It feels like it ought to match all the requirements, but technically it doesn't... according to a strict reading of PEP 440, once any package says foo >= 1.0, it becomes impossible to ever use a foo pre-release anywhere in the dependency tree, no matter what other packages say. Pre-release validity is just inherently a global property, not a property of individual specifiers.

So I'm thinking we should use the rule: