@@ -8,19 +8,18 @@ Replacing Deprecated Functions
8
8
the module level. The preferred way of using semver is through the
9
9
:class: `~semver.version.Version ` class.
10
10
11
- The deprecated functions can still be used in version 2.10.0 and above. In version 3 of
12
- semver, the deprecated functions will be removed.
11
+ The deprecated functions can still be used in version 2.10.0 and above. However, in
12
+ future versions of semver, the deprecated functions will be removed.
13
13
14
14
The following list shows the deprecated functions and how you can replace
15
15
them with code which is compatible for future versions:
16
16
17
-
18
17
* :func: `semver.bump_major `, :func: `semver.bump_minor `, :func: `semver.bump_patch `, :func: `semver.bump_prerelease `, :func: `semver.bump_build `
19
18
20
19
Replace them with the respective methods of the :class: `~semver.version.Version `
21
20
class.
22
21
For example, the function :func: `semver.bump_major ` is replaced by
23
- :meth: `~ semver.version.Version.bump_major ` and calling the ``str(versionobject) ``:
22
+ :meth: `Version.bump_major < semver.version.Version.bump_major> ` and calling the ``str(versionobject) ``:
24
23
25
24
.. code-block :: python
26
25
@@ -31,14 +30,14 @@ them with code which is compatible for future versions:
31
30
32
31
Likewise with the other module level functions.
33
32
34
- * :func : `semver.Version.isvalid `
33
+ * :meth : `semver.Version.isvalid `
35
34
36
- Replace it with :meth: `semver.version.Version.is_valid `:
35
+ Replace it with :meth: `Version.is_valid < semver.version.Version.is_valid> `:
37
36
38
37
39
38
* :func: `semver.finalize_version `
40
39
41
- Replace it with :func: ` semver.version.Version.finalize_version `:
40
+ Replace it with :meth: ` Version.finalize_version < semver.version.Version.finalize_version> `:
42
41
43
42
.. code-block :: python
44
43
@@ -71,7 +70,7 @@ them with code which is compatible for future versions:
71
70
72
71
* :func: `semver.min_ver `
73
72
74
- Replace it with ``min(version1, version2, ...) `` or ``min([version1, version2, ...]) ``:
73
+ Replace it with ``min(version1, version2, ...) `` or ``min([version1, version2, ...]) `` and a `` key `` :
75
74
76
75
.. code-block :: python
77
76
@@ -82,8 +81,8 @@ them with code which is compatible for future versions:
82
81
83
82
* :func: `semver.parse `
84
83
85
- Replace it with :meth: `semver.version.Version.parse ` and call
86
- :meth: `semver.version.Version.to_dict `:
84
+ Replace it with :meth: `Version.parse < semver.version.Version.parse> ` and call
85
+ :meth: `Version.to_dict < semver.version.Version.to_dict> `:
87
86
88
87
.. code-block :: python
89
88
@@ -94,7 +93,7 @@ them with code which is compatible for future versions:
94
93
95
94
* :func: `semver.parse_version_info `
96
95
97
- Replace it with :meth: `semver.version.Version.parse `:
96
+ Replace it with :meth: `Version.parse < semver.version.Version.parse> `:
98
97
99
98
.. code-block :: python
100
99
@@ -105,7 +104,7 @@ them with code which is compatible for future versions:
105
104
106
105
* :func: `semver.replace `
107
106
108
- Replace it with :meth: `semver.version.Version.replace `:
107
+ Replace it with :meth: `Version.replace < semver.version.Version.replace> `:
109
108
110
109
.. code-block :: python
111
110
0 commit comments