diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/setuptools_scm/__init__.py | 3 | ||||
-rw-r--r-- | src/setuptools_scm/version.py | 11 |
2 files changed, 12 insertions, 2 deletions
diff --git a/src/setuptools_scm/__init__.py b/src/setuptools_scm/__init__.py index 72b7b22..b81654d 100644 --- a/src/setuptools_scm/__init__.py +++ b/src/setuptools_scm/__init__.py @@ -41,7 +41,8 @@ def _call_entrypoint_fn(config, fn): warnings.warn( "parse functions are required to provide a named argument" " 'config' in the future.", - PendingDeprecationWarning, + category=PendingDeprecationWarning, + stacklevel=2, ) return fn(config.absolute_root) diff --git a/src/setuptools_scm/version.py b/src/setuptools_scm/version.py index ea414f6..fbe01c9 100644 --- a/src/setuptools_scm/version.py +++ b/src/setuptools_scm/version.py @@ -141,12 +141,21 @@ class ScmVersion(object): self.distance = distance self.node = node self.time = datetime.datetime.now() - self.extra = kw + self._extra = kw self.dirty = dirty self.preformatted = preformatted self.branch = branch @property + def extra(self): + warnings.warn( + "ScmVersion.extra is deprecated and will be removed in future", + category=DeprecationWarning, + stacklevel=2, + ) + return self._extra + + @property def exact(self): return self.distance is None |