8000 Fix #258: Keep semver._deprecated.compare · python-semver/python-semver@54a49fd · GitHub
[go: up one dir, main page]

Skip to content

Commit 54a49fd

Browse files
committed
Fix #258: Keep semver._deprecated.compare
Although it breaks consistency with module level functions, it seems it's a much needed/used function. * Function is also available accessing semver.compare * Decorate semver.compare as PendingDeprecationWarning * Adapt `deprecated` decorator and use enforce keyword arguments * Update CHANGELOG.rst * Use intersphinx to link to Python exception, use Python inventory It's still unclear if we should deprecate this function or not (that's why we use PendingDeprecationWarning). As we don't have a uniform initializer yet, this function stays in _deprecated.py for the time being until we find a better soltuion. See #258 for details
1 parent c40b6a4 commit 54a49fd

File tree

10 files changed

+77
-709
lines changed

10 files changed

+77
-709
lines changed

CHANGELOG.rst

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ This section covers the changes between major version 2 and version 3.
2121
Version 3.0.0
2222
=============
2323

24-
:Released: 2023-03-19
24+
:Released: 2023-04-02
2525
:Maintainer: Tom Schraitle
2626

2727

@@ -95,6 +95,14 @@ Deprecations
9595
didn't cast many votes, the majority agreed to remove support for
9696
Python 3.6.
9797

98+
* :pr:`402`: Keep :meth:`semver.compare <semver._deprecated.compare>`.
99+
Although it breaks consistency with module level functions, it seems it's
100+
a much needed/used function. It's still unclear if we should deprecate
101+
this function or not (that's why we use :py:exc:`PendingDeprecationWarning`).
102+
103+
As we don't have a uniform initializer yet, this function stays in the
104+
:file:`_deprecated.py` file for the time being until we find a better solution. See :gh:`258` for details.
105+
98106

99107
Features
100108
--------

docs/api.rst

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,8 @@ Deprecated Functions in :mod:`semver._deprecated`
1717

1818
.. automodule:: semver._deprecated
1919

20+
.. autofunction:: semver._deprecated.compare
21+
2022
.. autofunction:: semver._deprecated.bump_build
2123

2224
.. autofunction:: semver._deprecated.bump_major
@@ -27,8 +29,6 @@ Deprecated Functions in :mod:`semver._deprecated`
2729

2830
.. autofunction:: semver._deprecated.bump_prerelease
2931

30-
.. autofunction:: semver._deprecated.compare
31-
3232
.. autofunction:: semver._deprecated.deprecated
3333

3434
.. autofunction:: semver._deprecated.finalize_version

0 commit comments

Comments
 (0)
0