Skip to content

Navigation Menu

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit bb2cb90

Browse filesBrowse files
committed
Document migration from semver2 to semver3
Create a separate file to describe how to migrate to new semver3.
1 parent edfbbe9 commit bb2cb90
Copy full SHA for bb2cb90

File tree

3 files changed

+43
-5
lines changed
Filter options

3 files changed

+43
-5
lines changed

‎README.rst

Copy file name to clipboardExpand all lines: README.rst
-5Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -30,11 +30,6 @@ A Python module for `semantic versioning`_. Simplifies comparing versions.
3030
.. |MAINT| replace:: ``maint/v2``
3131
.. _MAINT: https://github.com/python-semver/python-semver/tree/maint/v2
3232

33-
.. note::
34-
35-
The :class:`VersionInfo` has been renamed to :class:`Version`. An
36-
alias has been created to preserve compatibility but the use of the old
37-
name has been deprecated.
3833

3934
The module follows the ``MAJOR.MINOR.PATCH`` style:
4035

‎docs/index.rst

Copy file name to clipboardExpand all lines: docs/index.rst
+1Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@ Semver |version| -- Semantic Versioning
1111

1212
install
1313
usage
14+
migratetosemver3
1415
development
1516
api
1617

‎docs/migratetosemver3.rst

Copy file name to clipboard
+42Lines changed: 42 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,42 @@
1+
.. _semver2-to-3:
2+
3+
Migrating from semver2 to semver3
4+
=================================
5+
6+
This chapter describes the visible differences for
7+
users and how your code stays compatible for semver3.
8+
9+
Although the development team tries to make the transition
10+
to semver3 as smooth as possible, at some point change
11+
is inevitable.
12+
13+
For a more detailed overview of all the changes, refer
14+
to our :ref:`changelog`.
15+
16+
17+
Use Version instead of VersionInfo
18+
----------------------------------
19+
20+
The :class:`VersionInfo` has been renamed to :class:`Version`
21+
to have a more succinct name.
22+
An alias has been created to preserve compatibility but
23+
using old name has been deprecated.
24+
25+
If you still need the old version, use this line:
26+
27+
.. code-block:: python
28+
29+
from semver.version import Version as VersionInfo
30+
31+
32+
33+
Use semver.cli instead of semver
34+
--------------------------------
35+
36+
All functions related to CLI parsing are moved to :mod:`semver.cli`.
37+
If you are such functions, like :func:`semver.cmd_bump <semver.cli.cmd_bump>`,
38+
import it from :mod:`semver.cli` in the future:
39+
40+
.. code-block:: python
41+
42+
from semver.cli import cmd_bump

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.