@@ -30,6 +30,12 @@ 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.
38+
3339The module follows the ``MAJOR.MINOR.PATCH `` style:
3440
3541* ``MAJOR `` version when you make incompatible API changes,
@@ -45,11 +51,11 @@ To import this library, use:
4551 >> > import semver
4652
4753 Working with the library is quite straightforward. To turn a version string into the
48- different parts, use the ``semver.VersionInfo .parse `` function:
54+ different parts, use the ``semver.Version .parse `` function:
4955
5056.. code-block :: python
5157
52- >> > ver = semver.VersionInfo .parse(' 1.2.3-pre.2+build.4' )
58+ >> > ver = semver.Version .parse(' 1.2.3-pre.2+build.4' )
5359 >> > ver.major
5460 1
5561 >> > ver.minor
@@ -62,21 +68,21 @@ different parts, use the ``semver.VersionInfo.parse`` function:
6268 ' build.4'
6369
6470 To raise parts of a version, there are a couple of functions available for
65- you. The function ``semver.VersionInfo .bump_major `` leaves the original object untouched, but
66- returns a new ``semver.VersionInfo `` instance with the raised major part:
71+ you. The function ``semver.Version .bump_major `` leaves the original object untouched, but
72+ returns a new ``semver.Version `` instance with the raised major part:
6773
6874.. code-block :: python
6975
70- >> > ver = semver.VersionInfo .parse(" 3.4.5" )
76+ >> > ver = semver.Version .parse(" 3.4.5" )
7177 >> > ver.bump_major()
72- VersionInfo (major = 4 , minor = 0 , patch = 0 , prerelease = None , build = None )
78+ Version (major = 4 , minor = 0 , patch = 0 , prerelease = None , build = None )
7379
7480 It is allowed to concatenate different "bump functions":
7581
7682.. code-block :: python
7783
7884 >> > ver.bump_major().bump_minor()
79- VersionInfo (major = 4 , minor = 1 , patch = 0 , prerelease = None , build = None )
85+ Version (major = 4 , minor = 1 , patch = 0 , prerelease = None , build = None )
8086
8187 To compare two versions, semver provides the ``semver.compare `` function.
8288The return value indicates the relationship between the first and second
0 commit comments