Don't try to use git to find the version number
authorDebian Science Team <debian-science-maintainers@lists.alioth.debian.org>
Sun, 22 Jan 2023 11:54:30 +0000 (11:54 +0000)
committerRebecca N. Palmer <rebecca_palmer@zoho.com>
Sun, 22 Jan 2023 11:54:30 +0000 (11:54 +0000)
Needed as Debian buildds use tarballs

Author: Yaroslav Halchenko
Forwarded: not-needed

Gbp-Pq: Name deb_nonversioneer_version.patch

pandas/__init__.py
pandas/tests/api/test_api.py
pandas/tests/test_common.py

index 5016bde000c3b5e506ebd9333c5f933a080628d4..3be6a66048548f780842512f9ca7d69f8be6136e 100644 (file)
@@ -175,13 +175,7 @@ from pandas.io.json import _json_normalize as json_normalize
 
 from pandas.util._tester import test
 
-# 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
 __deprecated_num_index_names = ["Float64Index", "Int64Index", "UInt64Index"]
index c2db9698d053709d1e5724281bf28760e3b80f14..f5eacf4545820323aad910abf8ce020a2fb11895 100644 (file)
@@ -195,7 +195,7 @@ class TestPDApi(Base):
         "_is_numpy_dev",
         "_testing",
         "_typing",
-        "_version",
+# not in Debian        "_version",
     ]
 
     def test_api(self):
index d31f617b9be15bf9d795ba68358991b7bf9788b9..9d1aa9f371a431444879f69932b85dda04570918 100644 (file)
@@ -156,7 +156,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__