PEP 440 Implementation #1

Merged
merged 17 commits into from Aug 26, 2014

Conversation

Projects
None yet
4 participants
@dstufft
Member

dstufft commented May 19, 2014

TODO

  • Sort local versions using the PEP sort order.
  • Figure out where exactly prefix operators are valid (issue).
  • Figure out if ~=N is a valid operator (issue).
  • Don't allow ~=N.
  • Document the spec? Maybe just linking to PEP 440 is enough?
  • Write a contrib script that will test versions on PyPI against Version() and Version.suggest().
  • Write a contrib script that will test version sorting on PyPI against how we sort then and how pkg_resources sorts them.
  • Implement Version.suggest().
  • Implement Version().is_prerelease or something similar.
  • Ensure all of the specifiers sanely handle Epoch versions.
  • Convert local versions to use + as a separator rather than ~. See issue.
  • Disallow a prefix match after a .devN segment (e.g. ==1.0.dev1.*).
  • Implement extra normalization steps to increase compatibility.
  • Implement ===<anything> which can be used as an escape hatch for non conformant versions.

Pending PEP Updates

  • Local versions are alphanumeric and .
  • Disallow "top level" ~= like ~=1.
  • Removal of default comparison operator
  • Removal of parentheses and returning to the pkg_resources style.
  • rc and c equivalency.
  • Use + instead of ~ for local versions.
  • Disallow a prefix match after a .devN segment (e.g. ==1.0.dev1.*).
  • Document extra normalization steps to increase compatibility.
  • Document the ===<anything> escape hatch.
  • Do not move the local version into a Wheel build number.
  • Figure out how all of our characters map into filenames in current packaging tools.
  • Update the compatibility statistics.
@qwcode

View changes

packaging/version.py
+
+# TODO We deviate from the spec in that local versions are sorted
+# lexicographically. We need a sort order but it appears the PEP will go
+# a different way.

This comment has been minimized.

@qwcode

qwcode May 19, 2014

more than just sorting, the fact that you're allowing letters at all.
the spec is written to only support -N[.N]+], although there was a recent conversation to change that.

@qwcode

qwcode May 19, 2014

more than just sorting, the fact that you're allowing letters at all.
the spec is written to only support -N[.N]+], although there was a recent conversation to change that.

This comment has been minimized.

@dstufft

dstufft May 19, 2014

Member

I mean gosh, it's a whole 2 days old, keep up! ;)

@dstufft

dstufft May 19, 2014

Member

I mean gosh, it's a whole 2 days old, keep up! ;)

This comment has been minimized.

@qwcode

qwcode May 19, 2014

ok, that hasn't made it up to the PEP page yet.

@qwcode

qwcode May 19, 2014

ok, that hasn't made it up to the PEP page yet.

This comment has been minimized.

@qwcode

qwcode May 19, 2014

I had brought it up recently here: https://mail.python.org/pipermail/distutils-sig/2014-May/024185.html

so I figured an update was coming.

@qwcode

qwcode May 19, 2014

I had brought it up recently here: https://mail.python.org/pipermail/distutils-sig/2014-May/024185.html

so I figured an update was coming.

@dstufft dstufft referenced this pull request in pypa/pip Jun 25, 2014

Merged

PEP 440 Version and Specifiers #1894

tox.ini
@@ -32,7 +33,7 @@ basepython = python2.6
deps =
flake8
pep8-naming
-commands = flake8 .
+commands = flake8 . --exclude tasks/*,.tox,*.egg

This comment has been minimized.

@alex

alex Aug 8, 2014

Member

You should put the exclude in the flake8 section so that people can just run flake8 on the CLI.

@alex

alex Aug 8, 2014

Member

You should put the exclude in the flake8 section so that people can just run flake8 on the CLI.

This comment has been minimized.

@dstufft

dstufft Aug 8, 2014

Member

The reason I did this, was at the time the tasks were Python 3 only. That might not actually be the case anymore though.

@dstufft

dstufft Aug 8, 2014

Member

The reason I did this, was at the time the tasks were Python 3 only. That might not actually be the case anymore though.

+Reference
+---------
+
+.. class:: Version(version)

This comment has been minimized.

@merwok

merwok Aug 9, 2014

IIRC the things in parens in a Sphinx class definition should be base classes, not arguments for init.

@merwok

merwok Aug 9, 2014

IIRC the things in parens in a Sphinx class definition should be base classes, not arguments for init.

This comment has been minimized.

dstufft added a commit that referenced this pull request Aug 26, 2014

Merge pull request #1 from pypa/pep440
[WIP] PEP 440 Implementation

@dstufft dstufft merged commit affaa73 into master Aug 26, 2014

1 check passed

continuous-integration/travis-ci The Travis CI build passed
Details

@dstufft dstufft deleted the pep440 branch Aug 26, 2014

@dstufft dstufft changed the title from [WIP] PEP 440 Implementation to PEP 440 Implementation Aug 26, 2014

dstufft added a commit that referenced this pull request Aug 26, 2014

Merge pull request #1 from pypa/pep440
PEP 440 Implementation
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment