Skip to content

Commit 97a4f23

Browse files
committed
Get rid of 'deprecated' package dependency
1 parent d3671c6 commit 97a4f23

File tree

5 files changed

+17
-6
lines changed

5 files changed

+17
-6
lines changed

.pre-commit-config.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,7 @@ repos:
6262
rev: v0.990
6363
hooks:
6464
- id: mypy
65-
additional_dependencies: [types-six, types-toml, types-Deprecated]
65+
additional_dependencies: [types-six, types-toml]
6666
- repo: https://github.com/pycqa/flake8
6767
rev: 5.0.4
6868
hooks:

CHANGELOG.rst

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,12 @@ Changelog
3535

3636
Remove local part of version because it is not allowed in PyPI
3737

38+
.. change::
39+
:tags: dependency, bugfix
40+
:tickets: 72
41+
42+
Get rid of ``deprecated`` package dependency
43+
3844
.. changelog::
3945
:version: 1.13.0
4046
:released: 01.11.2022

MANIFEST.in

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
1-
include README.rst LICENSE requirements.txt requirements-test.txt requirements-dev.txt requirements-doc.txt
2-
exclude pyproject.toml
1+
include README.rst LICENSE requirements.txt
2+
exclude pyproject.toml requirements-test.txt requirements-dev.txt requirements-doc.txt
33
recursive-exclude * __pycache__
44
recursive-exclude * *.pyc
55
recursive-exclude * *.pyo

requirements.txt

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
deprecated
21
packaging
32
setuptools
43
toml>=0.10.2; python_version<"3.11"

setuptools_git_versioning.py

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,6 @@
1515
from pprint import pformat
1616
from typing import Any, Callable
1717

18-
from deprecated import deprecated
1918
from packaging.version import Version
2019
from setuptools.dist import Distribution
2120

@@ -95,8 +94,15 @@ def get_all_tags(sort_by: str = DEFAULT_SORT_BY, root: str | os.PathLike | None
9594
return []
9695

9796

98-
@deprecated(version="1.8.0", reason="will be dropped in v2.0.0. Please use 'get_tags' instead")
9997
def get_branch_tags(*args, **kwargs) -> list[str]:
98+
warnings.warn(
99+
"`get_branch_tags` function is deprecated "
100+
"since setuptools-git-versioning v1.8.0 "
101+
"and will be dropped in v2.0.0\n"
102+
"Please use `get_tags` instead",
103+
category=UserWarning,
104+
)
105+
100106
return get_tags(*args, **kwargs)
101107

102108

0 commit comments

Comments
 (0)