From: Debian Science Team Date: Sun, 13 Nov 2022 10:36:51 +0000 (+0000) Subject: Don't try to use git to find the version number X-Git-Tag: archive/raspbian/1.5.3+dfsg-2+rpi1~1^2^2^2~31 X-Git-Url: https://dgit.raspbian.org/?a=commitdiff_plain;h=ee33d648de399f6626cee6bd46b2117d8bd993da;p=pandas.git Don't try to use git to find the version number Needed as Debian buildds use tarballs Author: Yaroslav Halchenko Forwarded: not-needed Gbp-Pq: Name deb_nonversioneer_version.patch --- diff --git a/pandas/__init__.py b/pandas/__init__.py index db404368..0b04e1e0 100644 --- a/pandas/__init__.py +++ b/pandas/__init__.py @@ -179,13 +179,7 @@ from pandas.util._tester import test import pandas.testing import pandas.arrays -# use the closest tagged version if possible -from pandas._version import get_versions - -v = get_versions() -__version__ = v.get("closest-tag", v["version"]) -__git_version__ = v.get("full-revisionid") -del get_versions, v +from .__version import version as __version__ # GH 27101 diff --git a/pandas/tests/api/test_api.py b/pandas/tests/api/test_api.py index 38984238..3daf069c 100644 --- a/pandas/tests/api/test_api.py +++ b/pandas/tests/api/test_api.py @@ -198,7 +198,7 @@ class TestPDApi(Base): "_testing", "_tslib", "_typing", - "_version", +# not in Debian "_version", ] def test_api(self): diff --git a/pandas/tests/test_common.py b/pandas/tests/test_common.py index 12664e44..8a279306 100644 --- a/pandas/tests/test_common.py +++ b/pandas/tests/test_common.py @@ -133,7 +133,7 @@ def test_standardize_mapping(): dd = collections.defaultdict(list) assert isinstance(com.standardize_mapping(dd), partial) - +@pytest.mark.xfail(reason="deb_nonversioneer_version patch") def test_git_version(): # GH 21295 git_version = pd.__git_version__