Skip to content

Commit 986a40c

Browse files
repare changelog and begin warnings crackdown
1 parent 730aaf4 commit 986a40c

File tree

4 files changed

+17
-2
lines changed

4 files changed

+17
-2
lines changed

CHANGELOG.rst

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,8 @@ v3.1.0
22
=======
33

44
* fix #297 - correct the invocation in version_from_scm and deprecate it as its exposed by accident
5+
* fix #298 - handle git file listing on empty repositories
6+
* fix #268 - deprecate ScmVersion.extra
57

68
v3.0.6
79
======

src/setuptools_scm/__init__.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,8 @@ def _call_entrypoint_fn(config, fn):
4141
warnings.warn(
4242
"parse functions are required to provide a named argument"
4343
" 'config' in the future.",
44-
PendingDeprecationWarning,
44+
category=PendingDeprecationWarning,
45+
stacklevel=2,
4546
)
4647
return fn(config.absolute_root)
4748

src/setuptools_scm/version.py

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -141,11 +141,20 @@ def __init__(
141141
self.distance = distance
142142
self.node = node
143143
self.time = datetime.datetime.now()
144-
self.extra = kw
144+
self._extra = kw
145145
self.dirty = dirty
146146
self.preformatted = preformatted
147147
self.branch = branch
148148

149+
@property
150+
def extra(self):
151+
warnings.warn(
152+
"ScmVersion.extra is deprecated and will be removed in future",
153+
category=DeprecationWarning,
154+
stacklevel=2,
155+
)
156+
return self._extra
157+
149158
@property
150159
def exact(self):
151160
return self.distance is None

tox.ini

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,9 @@
11
[tox]
22
envlist=py{27,34,35,36,37}-test,flake8,check_readme,py{27,36}-selfcheck
33

4+
[pytest]
5+
filterwarnings=error
6+
47
[flake8]
58
max-complexity = 10
69
max-line-length = 88

0 commit comments

Comments
 (0)