File tree Expand file tree Collapse file tree 3 files changed +11
-1
lines changed Expand file tree Collapse file tree 3 files changed +11
-1
lines changed Original file line number Diff line number Diff line change @@ -185,7 +185,7 @@ Other Enhancements
185185- :class:`Resampler` now is iterable like :class:`GroupBy` (:issue:`15314`).
186186- :meth:`Series.resample` and :meth:`DataFrame.resample` have gained the :meth:`Resampler.quantile` (:issue:`15023`).
187187- :meth:`Index.to_frame` now supports overriding column name(s) (:issue:`22580`).
188-
188+ - New attribute :attr:`__git_version__` will return git commit sha of current build (:issue:`21295`).
189189.. _whatsnew_0240.api_breaking:
190190
191191Backwards incompatible API changes
Original file line number Diff line number Diff line change 8080from ._version import get_versions
8181v = get_versions ()
8282__version__ = v .get ('closest-tag' , v ['version' ])
83+ __git_version__ = v .get ('full-revisionid' )
8384del get_versions , v
8485
8586# module level doc-string
Original file line number Diff line number Diff line change 11# -*- coding: utf-8 -*-
22
33import collections
4+ import string
45from functools import partial
56
67import numpy as np
78import pytest
89
10+ import pandas as pd
911from pandas import Series , Timestamp
1012from pandas .core import (
1113 common as com ,
@@ -110,3 +112,10 @@ def test_standardize_mapping():
110112
111113 dd = collections .defaultdict (list )
112114 assert isinstance (com .standardize_mapping (dd ), partial )
115+
116+
117+ def test_git_version ():
118+ # GH 21295
119+ git_version = pd .__git_version__
120+ assert len (git_version ) == 40
121+ assert all (c in string .hexdigits for c in git_version )
You can’t perform that action at this time.
0 commit comments