From c8a81ab59994a9cfb55961efc8bb78cca00c547d Mon Sep 17 00:00:00 2001 From: Debian Science Team Date: Wed, 26 Aug 2020 22:34:50 +0100 Subject: [PATCH] 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 --- pandas/__init__.py | 8 +------- pandas/tests/api/test_api.py | 2 +- pandas/tests/test_common.py | 2 +- 3 files changed, 3 insertions(+), 9 deletions(-) diff --git a/pandas/__init__.py b/pandas/__init__.py index 6eda468e..0eefab4b 100644 --- a/pandas/__init__.py +++ b/pandas/__init__.py @@ -180,13 +180,7 @@ from pandas.util._tester import test import pandas.testing import pandas.arrays -# use the closest tagged version if possible -from ._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 # TODO: remove Panel compat in 1.0 diff --git a/pandas/tests/api/test_api.py b/pandas/tests/api/test_api.py index 5aab5b81..85efac45 100644 --- a/pandas/tests/api/test_api.py +++ b/pandas/tests/api/test_api.py @@ -202,7 +202,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 a8a0fcea..5f2c85c5 100644 --- a/pandas/tests/test_common.py +++ b/pandas/tests/test_common.py @@ -113,7 +113,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__ -- 2.30.2