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

Revise the exclusive ordered comparison rules to no longer imply !=V.* #3

Merged
merged 1 commit into from Dec 31, 2014

Conversation

Projects
None yet
3 participants
@dstufft
Member

dstufft commented Dec 29, 2014

Instead of having these operators imply a !=V.* this will instead have them more-or-less simply check if the prospective version is greater than or less than the specifier version. They will not however match a post or pre-release of the version mentioned in the specifier unless the specifier itself contains a post or a pre-release. In addition, we will ensure that >V does not match V+local.version even though it is technically greater than V.

In particular that means that something like >1.7 will match 1.7.1 but will not match 1.7.post1 while >1.7.post0 would. Likewise <3.0 would not match 3.0.dev0 while <3.0rc1 would.

This is implemented in pypa/packaging#25

@dstufft dstufft added the PEP440 label Dec 29, 2014

that releases are later than a particular post release, include additional
post releases, by using ``>V.postN``. For example, ``>1.7`` should allow
``1.7.1`` but not ``1.7.0.post1`` and ``>1.7.post2`` should allow ``1.7.1``
and ``1.7.0.post3`` but not ``1.7.0.

This comment has been minimized.

@qwcode

qwcode Dec 29, 2014

Contributor

missing the closing ``

The exclusive ordered comparisons ``>`` and ``<`` are similar to the inclusive
ordered comparisons in that they rely on the relative position of the candidate
version and the specified version given the consistent ordering defined by the
standard `Version scheme`_. However, they specifically include pre-releases,

This comment has been minimized.

@qwcode

qwcode Dec 29, 2014

Contributor

you mean exclude?

The exclusive ordered comparison ``>V`` **MUST NOT** allow a post-release
of the given version unless ``V`` itself is a post release. You may mandate
that releases are later than a particular post release, include additional

This comment has been minimized.

@ncoghlan

ncoghlan Dec 29, 2014

Member

s/include/including/

of the given version unless ``V`` itself is a post release. You may mandate
that releases are later than a particular post release, include additional
post releases, by using ``>V.postN``. For example, ``>1.7`` should allow
``1.7.1`` but not ``1.7.0.post1`` and ``>1.7.post2`` should allow ``1.7.1``

This comment has been minimized.

@ncoghlan

ncoghlan Dec 29, 2014

Member

I suggest s/should/will/ in the last sentence here.

@ncoghlan

This comment has been minimized.

Member

ncoghlan commented Dec 29, 2014

Some minor editorial comments, and an actual error picked up by Marcus, but overall this looks good to me.

I unfortunately renamed the PEP 440 file based on the discussion in issue #2, so that will also need changing in the PR before it will apply cleanly again.

@dstufft dstufft force-pushed the dstufft:rework-ordered-comparison branch from b7cabbd to 797df18 Dec 29, 2014

@dstufft

This comment has been minimized.

Member

dstufft commented Dec 29, 2014

This is updated now.

The exclusive ordered comparison ``>V`` **MUST NOT** allow a post-release
of the given version unless ``V`` itself is a post release. You may mandate
that releases are later than a particular post release, including additional
post releases, by using ``>V.postN``. For example, ``>1.7`` should allow

This comment has been minimized.

@ncoghlan

ncoghlan Dec 29, 2014

Member

Still another s/should/will/ here.

@@ -1504,6 +1511,17 @@ reason for this is that the Wheel normalization scheme specifies that ``-``
gets normalized to a ``_`` to enable easier parsing of the filename.
Summary of changes to \PEP 440
==============================

This comment has been minimized.

@ncoghlan

ncoghlan Dec 29, 2014

Member

I'd suggest a short preamble here saying something like: "The following changes were made to this PEP based on feedback received after the initial reference implementation was released in setuptools 8.0 and pip 6.0:"

@ncoghlan

This comment has been minimized.

Member

ncoghlan commented Dec 29, 2014

Generally looks good to me - just one change that was missed from the previous review, and a realisation that the change log could likely use an introductory paragraph.

@dstufft dstufft force-pushed the dstufft:rework-ordered-comparison branch from 797df18 to def6195 Dec 29, 2014

@dstufft

This comment has been minimized.

Member

dstufft commented Dec 29, 2014

Updated again.

@ncoghlan

This comment has been minimized.

Member

ncoghlan commented Dec 31, 2014

Merging this one - I'll also add the 'c'->'rc' normalisation change to the changelog, and then give folks on distutils-sig one last chance to comment before we publish the change on python.org

ncoghlan added a commit that referenced this pull request Dec 31, 2014

Merge pull request #3 from dstufft/rework-ordered-comparison
Revise the exclusive ordered comparison rules to no longer imply !=V.*

@ncoghlan ncoghlan merged commit 225de0a into pypa:master Dec 31, 2014

@dstufft dstufft deleted the dstufft:rework-ordered-comparison branch Dec 31, 2014

@dstufft

This comment has been minimized.

Member

dstufft commented Dec 31, 2014

At what point can I merge the packaging PR and release it?

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