Skip to content

Commit 9a98394

Browse files
authored
Merge pull request #431 from tomschr/version-policy
Clarify version policy for semver
2 parents 9391f8a + 083b592 commit 9a98394

File tree

5 files changed

+63
-26
lines changed

5 files changed

+63
-26
lines changed

README.rst

Lines changed: 2 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -12,19 +12,8 @@ A Python module to simplify `semantic versioning`_.
1212
1313
.. note::
1414

15-
This project works for Python 3.7 and greater only. If you are
16-
looking for a compatible version for Python 2, use the
17-
maintenance branch |MAINT|_.
18-
19-
The last version of semver which supports Python 2.7 to 3.5 will be
20-
2.x.y However, keep in mind, the major 2 release is frozen: no new
21-
features nor backports will be integrated.
22-
23-
We recommend to upgrade your workflow to Python 3 to gain support,
24-
bugfixes, and new features.
25-
26-
.. |MAINT| replace:: ``maint/v2``
27-
.. _MAINT: https://github.com/python-semver/python-semver/tree/maint/v2
15+
This project works for Python 3.7 and greater only.
16+
Refer to :ref:`version-policy` for more details.
2817

2918

3019
The module follows the ``MAJOR.MINOR.PATCH`` style:

changelog.d/pr431.doc.rst

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
Clarify version policy for the different semver versions (v2, v3, >v3)
2+
and the supported Python versions.

docs/index.rst

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@ Semver |version| -- Semantic Versioning
1616
migration/index
1717
advanced/index
1818
contribute/index
19+
version-policy
1920
api
2021

2122
.. toctree::

docs/install.rst

Lines changed: 8 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -6,25 +6,20 @@ Release Policy
66

77
As semver uses `Semantic Versioning`_, breaking changes are only introduced in major
88
releases (incremented ``X`` in "X.Y.Z").
9+
Refer to section :ref:`version-policy` for a general overview.
910

10-
For users who want to stay with major 2 releases only, add the following version
11-
restriction::
11+
For users who want or need to stay with major 3 releases only, add the
12+
following version restriction (:file:`setup.py`, :file:`requirements.txt`,
13+
or :file:`pyproject.toml`)::
1214

13-
semver>=2,<3
14-
15-
This line avoids surprises. You will get any updates within the major 2 release like
16-
2.11.0 or above. However, you will never get an update for semver 3.0.0.
15+
semver>=3,<4
1716

18-
Keep in mind, as this line avoids any major version updates, you also will never
19-
get new exciting features or bug fixes.
17+
This line avoids surprises. You will get any updates within the major 3 release like 3.1.x and above. However, you will never get an update for semver 4.0.0.
2018

21-
Same applies for semver v3, if you want to get all updates for the semver v3
22-
development line, but not a major update to semver v4::
19+
For users who have to stay with major 2 releases only, use the following line::
2320

24-
semver>=3,<4
21+
semver>=2,<3
2522

26-
You can add this line in your file :file:`setup.py`, :file:`requirements.txt`,
27-
:file:`pyproject.toml`, or any other file that lists your dependencies.
2823

2924
Pip
3025
---

docs/version-policy.rst

Lines changed: 50 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,50 @@
1+
.. _version-policy:
2+
3+
Version Policy
4+
==============
5+
6+
.. |MAINT| replace:: ``maint/v2``
7+
.. _MAINT: https://github.com/python-semver/python-semver/tree/maint/v2
8+
.. |CHANGELOG| replace:: ``Changelog``
9+
.. _CHANGELOG: https://github.com/python-semver/python-semver/blob/maint/v2/CHANGELOG.rst
10+
11+
The move from v2 to v3 introduced many changes and deprecated module functions.
12+
The main functionality is handled by the :class:`~semver.version.Version` class
13+
now. Find more information in the section :ref:`semver2-to-3`.
14+
15+
16+
semver Version 2
17+
----------------
18+
19+
Active development of major version 2 has stopped. No new features nor
20+
backports will be integrated.
21+
We recommend to upgrade your workflow to Python 3 to gain support,
22+
bugfixes, and new features.
23+
24+
If you still need this old version, use the |MAINT|_ branch. There you
25+
can look for the |CHANGELOG|_ if you need some details about the history.
26+
27+
28+
semver Version 3
29+
----------------
30+
31+
We will not intentionally make breaking changes in minor releases of V3.
32+
33+
Methods marked as ``deprecated`` raise a warning message when used from the :py:mod:`warnings` module.
34+
Check section :ref:`sec_replace_deprecated_functions` to make your code
35+
ready for future major releases.
36+
37+
38+
semver Version 3 and beyond
39+
---------------------------
40+
41+
Methods that were marked as deprecated will be very likely be removed.
42+
43+
44+
Support for Python versions
45+
---------------------------
46+
47+
This project will drop support for a Python version when the
48+
following conditions are met:
49+
50+
* The Python version has reached `EOL <https://devguide.python.org/versions/>`_.

0 commit comments

Comments
 (0)