Skip to content

Commit 0c6f02e

Browse files
committed
Update documentation
1 parent 13ad4ab commit 0c6f02e

File tree

2 files changed

+18
-4
lines changed

2 files changed

+18
-4
lines changed

docs/migratetosemver3.rst

Lines changed: 16 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
.. _semver2-to-3:
22

3+
34
Migrating from semver2 to semver3
45
=================================
56

@@ -14,8 +15,8 @@ For a more detailed overview of all the changes, refer
1415
to our :ref:`changelog`.
1516

1617

17-
Use Version instead of VersionInfo
18-
----------------------------------
18+
Use :class:`Version` instead of :class:`VersionInfo`
19+
----------------------------------------------------
1920

2021
The :class:`VersionInfo` has been renamed to :class:`Version`
2122
to have a more succinct name.
@@ -29,9 +30,20 @@ If you still need the old version, use this line:
2930
from semver.version import Version as VersionInfo
3031
3132
33+
Use :class:`Version` instead of :meth:`Version.parse`
34+
-----------------------------------------------------
35+
36+
The :class:`~semver.version.Version` class supports now different variants
37+
how a version can be called (see section :ref:`sec_creating_version`
38+
for more details).
39+
40+
It's important to know that you do not need to use
41+
:meth:`Version.parse <semver.version.Version.parse>` anymore. You
42+
can pass a string directly to :class:`~semver.Version`.
43+
3244

33-
Use semver.cli instead of semver
34-
--------------------------------
45+
Use :mod:`semver.cli` instead of :mod:`semver`
46+
----------------------------------------------
3547

3648
All functions related to CLI parsing are moved to :mod:`semver.cli`.
3749
If you are such functions, like :func:`semver.cmd_bump <semver.cli.cmd_bump>`,

docs/usage.rst

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,8 @@ To know the version of semver itself, use the following construct::
2929
'3.0.0-dev.2'
3030

3131

32+
.. _sec_creating_version:
33+
3234
Creating a Version
3335
------------------
3436

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy