Skip to content

Release/3.0.0 dev.3 #348

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

Merged
merged 2 commits into from
Jan 20, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
85 changes: 85 additions & 0 deletions CHANGELOG.rst
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,91 @@ in our repository.
.. towncrier release notes start


Version 3.0.0-dev.3
===================

:Released: 2022-01-19
:Maintainer: Tom Schraitle


Bug Fixes
---------

* :gh:`310`: Rework API documentation.
Follow a more "semi-manual" attempt and add auto directives
into :file:`docs/api.rst`.



Improved Documentation
----------------------

* :gh:`312`: Rework "Usage" section.

* Mention the rename of :class:`~semver.version.VersionInfo` to
:class:`~semver.version.Version` class
* Remove semver. prefix in doctests to make examples shorter
* Correct some references to dunder methods like
:func:`~.semver.version.Version.__getitem__`,
:func:`~.semver.version.Version.__gt__` etc.
* Remove inconsistencies and mention module level function as
deprecated and discouraged from using
* Make empty :py:func:`super` call in :file:`semverwithvprefix.py` example

* :gh:`315`: Improve release procedure text



Trivial/Internal Changes
------------------------

* :gh:`309`: Some (private) functions from the :mod:`semver.version`
module has been changed.

The following functions got renamed:

* function ``semver.version.comparator`` got renamed to
:func:`semver.version._comparator` as it is only useful
inside the :class:`~semver.version.Version` class.
* function ``semver.version.cmp`` got renamed to
:func:`semver.version._cmp` as it is only useful
inside the :class:`~semver.version.Version` class.

The following functions got integrated into the
:class:`~semver.version.Version` class:

* function ``semver.version._nat_cmd`` as a classmethod
* function ``semver.version.ensure_str``

* :gh:`313`: Correct :file:`tox.ini` for ``changelog`` entry to skip
installation for semver. This should speed up the execution
of towncrier.

* :gh:`316`: Comparisons of :class:`~semver.version.Version` class and other
types return now a :py:const:`NotImplemented` constant instead
of a :py:exc:`TypeError` exception.

The `NotImplemented`_ section of the Python documentation recommends
returning this constant when comparing with ``__gt__``, ``__lt__``,
and other comparison operators to "to indicate that the operation is
not implemented with respect to the other type".

.. _NotImplemented: https://docs.python.org/3/library/constants.html#NotImplemented

* :gh:`319`: Introduce stages in :file:`.travis.yml`
The config file contains now two stages: check and test. If
check fails, the test stage won't be executed. This could
speed up things when some checks fails.

* :gh:`322`: Switch from Travis CI to GitHub Actions.

* :gh:`347`: Support Python 3.10 in GitHub Action and other config files.



----


Version 3.0.0-dev.2
===================

Expand Down
17 changes: 0 additions & 17 deletions changelog.d/309.trivial.rst

This file was deleted.

3 changes: 0 additions & 3 deletions changelog.d/310.bugfix.rst

This file was deleted.

11 changes: 0 additions & 11 deletions changelog.d/312.doc.rst

This file was deleted.

3 changes: 0 additions & 3 deletions changelog.d/313.trivial.rst

This file was deleted.

10 changes: 0 additions & 10 deletions changelog.d/316.trivial.rst

This file was deleted.

4 changes: 0 additions & 4 deletions changelog.d/319.trivial.rst

This file was deleted.

1 change: 0 additions & 1 deletion changelog.d/322.trivial.rst

This file was deleted.

1 change: 0 additions & 1 deletion changelog.d/347.trivial.rst

This file was deleted.

2 changes: 1 addition & 1 deletion docs/usage.rst
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ Getting the Version of semver
To know the version of semver itself, use the following construct::

>>> semver.__version__
'3.0.0-dev.2'
'3.0.0-dev.3'


Creating a Version
Expand Down
21 changes: 7 additions & 14 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -11,20 +11,13 @@ build-backend = "setuptools.build_meta"
line-length = 88
target-version = ['py36', 'py37', 'py38', 'py39', 'py310']
# diff = true
exclude = '''
(
/(
\.eggs # exclude a few common directories in the
| \.git # root of the project
| \.mypy_cache
| \.tox
| \.venv
| \.env
| _build
| build
| dist
)/
)
extend-exclude = '''
# A regex preceded with ^/ will apply only to files and directories
# in the root of the project.
^/*.py
'''
include = '''
^/setup.py
'''

[tool.towncrier]
Expand Down
58 changes: 42 additions & 16 deletions release-procedure.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,22 +5,31 @@ create a new release.

## Prepare the Release

1. Verify that issues about new release are closed https://github.com/python-semver/python-semver/issues.
1. Verify:

1. Verify that no pull requests that should be included in this release haven't been left out https://github.com/python-semver/python-semver/pulls.
* all issues for a new release are closed: <https://github.com/python-semver/python-semver/issues>.

1. Verify that continuous integration for latest build was passing https://travis-ci.com/python-semver/python-semver.
* that all pull requests that should be included in this release are merged: <https://github.com/python-semver/python-semver/pulls>.

1. Create a new branch `release/VERSION`.
* that continuous integration for latest build was passing: <https://github.com/python-semver/python-semver/actions>.

1. Create a new branch `release/<VERSION>`.

1. If one or several supported Python versions have been removed or added, verify that the 3 following files have been updated:
* [setup.py](https://github.com/python-semver/python-semver/blob/master/setup.py)
* [tox.ini](https://github.com/python-semver/python-semver/blob/master/tox.ini)
* [.travis.yml](https://github.com/python-semver/python-semver/blob/master/.travis.yml)
* `setup.cfg`
* `tox.ini`
* `.git/workflows/pythonpackage.yml`

1. Verify that the version has been updated and follow
<https://semver.org>:

* `src/semver/__about__.py`
* `docs/usage.rst`

1. Add eventually new contributor(s) to [CONTRIBUTORS](https://github.com/python-semver/python-semver/blob/master/CONTRIBUTORS).

1. Verify that `__version__` in [semver.py](https://github.com/python-semver/python-semver/blob/master/semver.py) have been updated and follow https://semver.org.

1. Check if all changelog entries are created. If some are missing, [create them](https://python-semver.readthedocs.io/en/latest/development.html#adding-a-changelog-entry).

1. Show the new draft [CHANGELOG](https://github.com/python-semver/python-semver/blob/master/CHANGELOG.rst) entry for the latest release with:

Expand All @@ -36,32 +45,47 @@ create a new release.

$ tox -e docs

1. Commit all changes, push, and create a pull request.


## Create the New Release

1. Ensure that long description (ie [README.rst](https://github.com/python-semver/python-semver/blob/master/README.rst)) can be correctly rendered by Pypi using `restview --long-description`
1. Ensure that long description ([README.rst](https://github.com/python-semver/python-semver/blob/master/README.rst)) can be correctly rendered by Pypi using `restview --long-description`

1. Clean up your local Git repository. Be careful,
as it **will remove all files** which are not
versioned by Git:

$ git clean -xfd

Before you create your distribution files, clean
the directory too:

$ rm dist/*

1. Create the distribution files (wheel and source):

$ tox -e prepare-dist

1. Upload the wheel and source to TestPyPI first:

```bash
$ git clean -xfd
$ rm dist/*
$ python3 setup.py sdist bdist_wheel
```bash
$ twine upload --repository-url https://test.pypi.org/legacy/ dist/*
```

If you have a `~/.pypirc` with a `testpyi` section, the upload can be
If you have a `~/.pypirc` with a `testpypi` section, the upload can be
simplified:

$ twine upload --repository testpyi dist/*
$ twine upload --repository testpypi dist/*

1. Check if everything is okay with the wheel.
Check also the web site `https://test.pypi.org/project/<VERSION>/`

1. Upload to PyPI:

```bash
$ git clean -xfd
$ python setup.py register sdist bdist_wheel
$ tox -e prepare-dist
$ twine upload dist/*
```

Expand All @@ -78,4 +102,6 @@ create a new release.
document the new release.
Usually it's enough to take it from a commit message or the tag description.

1. Announce it in <https://github.com/python-semver/python-semver/discussions/categories/announcements>.

You're done! Celebrate!
2 changes: 1 addition & 1 deletion setup.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,8 @@ author_email = k-bx@k-bx.com
maintainer = Sebastien Celles, Tom Schraitle
maintainer_email = s.celles@gmail.com
url = https://github.com/python-semver/python-semver
download_url = https://github.com/python-semver/python-semver/downloads
project_urls =
Changelog = https://python-semver.readthedocs.io/en/latest/changelog.html
Documentation = https://python-semver.rtfd.io
Releases = https://github.com/python-semver/python-semver/releases
Bug Tracker = https://github.com/python-semver/python-semver/issues
Expand Down
2 changes: 1 addition & 1 deletion src/semver/__about__.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
"""

#: Semver version
__version__ = "3.0.0-dev.2"
__version__ = "3.0.0-dev.3"

#: Original semver author
__author__ = "Kostiantyn Rybnikov"
Expand Down