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 Pre-release versioning style? #78

Open
tony opened this issue Sep 8, 2018 · 1 comment
Open

PEP 440 Pre-release versioning style? #78

tony opened this issue Sep 8, 2018 · 1 comment

Comments

@tony
Copy link

tony commented Sep 8, 2018

In cihai, I currently have a tag / release like this:

https://github.com/cihai/cihai/blob/v0.9.0a1/cihai/__about__.py

__version__ = '0.9.0a1'

(First, since I prefix my version tags with v, #54/#76 applies by master link breaking by pointing to vmaster as a branch)

But the other issue is PEP440's pre-release semantic

Some projects use an "alpha, beta, release candidate" pre-release cycle to support testing by their users prior to a final release.

If used as part of a project's development cycle, these pre-releases are indicated by including a pre-release segment in the version identifier:

X.YaN # Alpha release
X.YbN # Beta release
X.YrcN # Release Candidate
X.Y # Final release

A version identifier that consists solely of a release segment and a pre-release segment is termed a "pre-release".

The pre-release segment consists of an alphabetical identifier for the pre-release phase, along with a non-negative integer value. Pre-releases for a given release are ordered first by phase (alpha, beta, release candidate) and then by the numerical component within that phase.

- :release:`0.9.0a1 <2018-09-07>`
Exception occurred:
  File "/Users/t/.local/share/virtualenvs/cihai-Ogsz9zWm/lib/python3.6/site-packages/semantic_version/base.py", line 205, in parse
    raise ValueError('Invalid version string: %r' % version_string)
ValueError: Invalid version string: '0.9.0a1'
The full traceback has been saved in /var/folders/v6/d9wjxg3s6ys7r4tqtp2b0w9c0000gn/T/sphinx-err-pdjyfvhh.log, if you want to report the issue to the developers.
- :release:`0.9.0a <2018-09-07>`
Exception occurred:
  File "/Users/t/.local/share/virtualenvs/cihai-Ogsz9zWm/lib/python3.6/site-packages/semantic_version/base.py", line 205, in parse
    raise ValueError('Invalid version string: %r' % version_string)
ValueError: Invalid version string: '0.9.0a'
The full traceback has been saved in /var/folders/v6/d9wjxg3s6ys7r4tqtp2b0w9c0000gn/T/sphinx-err-zr49qx_e.log, if you want to report the issue to the developers.

Version info

cihai-Ogsz9zWm ❯ python --version
Python 3.6.5

cihai-Ogsz9zWm ❯ pip show releases
Name: releases
Version: 1.6.1
Summary: A Sphinx extension for changelog manipulation

cihai-Ogsz9zWm ❯ pip show sphinx
Name: Sphinx
Version: 1.7.9
Summary: Python documentation generator
cihai-Ogsz9zWm ❯ pip show docutils
Name: docutils
Version: 0.14
Summary: Docutils -- Python Documentation Utilities
Home-page: http://docutils.sourceforge.net/
@bitprophet
Copy link
Owner

Handling pre-release releases is currently out of scope, but I'll leave this open and labeled in case somebody comes up with a well-presented PR to add support for them without rocking the boat too much. Thanks for the request!

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

2 participants