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

PEP 440 Implementation #1

Merged
merged 17 commits into from
Aug 26, 2014
Merged

PEP 440 Implementation #1

merged 17 commits into from
Aug 26, 2014

Conversation

dstufft
Copy link
Member

@dstufft 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.


# 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.
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

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

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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)
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

dstufft added a commit that referenced this pull request Aug 26, 2014
[WIP] PEP 440 Implementation
@dstufft dstufft merged commit affaa73 into master Aug 26, 2014
@dstufft dstufft deleted the pep440 branch August 26, 2014 22:06
@dstufft dstufft changed the title [WIP] PEP 440 Implementation PEP 440 Implementation Aug 26, 2014
dstufft added a commit that referenced this pull request Aug 26, 2014
PEP 440 Implementation
@Aof8888

This comment was marked as spam.

pradyunsg pushed a commit that referenced this pull request Dec 19, 2023
The ignore was added in #1, and was migrated from `.coveragerc` to the `pyproject.toml` in #586, even though the file had already been deleted over a year ago in #376.

Since the file no longer exists, the ignore should just be removed.
brettcannon added a commit that referenced this pull request Jan 12, 2024
Signed-off-by: StepSecurity Bot <bot@stepsecurity.io>
Co-authored-by: StepSecurity Bot <bot@stepsecurity.io>
Co-authored-by: Brett Cannon <brett@python.org>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants