Skip to content

Commit 9fef5ee

Browse files
Debian Science Teamrebecca-palmer
Debian Science Team
authored andcommitted
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
1 parent 60e0a82 commit 9fef5ee

File tree

4 files changed

+2
-12
lines changed

4 files changed

+2
-12
lines changed

pandas/__init__.py

+1-6
Original file line numberDiff line numberDiff line change
@@ -186,12 +186,7 @@
186186

187187
_built_with_meson = True
188188
except ImportError:
189-
from pandas._version import get_versions
190-
191-
v = get_versions()
192-
__version__ = v.get("closest-tag", v["version"])
193-
__git_version__ = v.get("full-revisionid")
194-
del get_versions, v
189+
from .__version import version as __version__
195190

196191
# GH#55043 - deprecation of the data_manager option
197192
if "PANDAS_DATA_MANAGER" in os.environ:

pandas/tests/api/test_api.py

-2
Original file line numberDiff line numberDiff line change
@@ -193,8 +193,6 @@ class TestPDApi(Base):
193193
"_testing",
194194
"_typing",
195195
]
196-
if not pd._built_with_meson:
197-
private_modules.append("_version")
198196

199197
def test_api(self):
200198
checkthese = (

pandas/tests/test_common.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -159,7 +159,7 @@ def test_standardize_mapping():
159159
dd = collections.defaultdict(list)
160160
assert isinstance(com.standardize_mapping(dd), partial)
161161

162-
162+
@pytest.mark.xfail(reason="deb_nonversioneer_version patch")
163163
def test_git_version():
164164
# GH 21295
165165
git_version = pd.__git_version__

pandas/tests/util/test_show_versions.py

-3
Original file line numberDiff line numberDiff line change
@@ -55,9 +55,6 @@ def test_show_versions_console(capsys):
5555
# check header
5656
assert "INSTALLED VERSIONS" in result
5757

58-
# check full commit hash
59-
assert re.search(r"commit\s*:\s[0-9a-f]{40}\n", result)
60-
6158
# check required dependency
6259
# 2020-12-09 npdev has "dirty" in the tag
6360
# 2022-05-25 npdev released with RC wo/ "dirty".

0 commit comments

Comments
 (0)