File tree 3 files changed +11
-1
lines changed
3 files changed +11
-1
lines changed Original file line number Diff line number Diff line change @@ -185,7 +185,7 @@ Other Enhancements
185
185
- :class:`Resampler` now is iterable like :class:`GroupBy` (:issue:`15314`).
186
186
- :meth:`Series.resample` and :meth:`DataFrame.resample` have gained the :meth:`Resampler.quantile` (:issue:`15023`).
187
187
- :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`).
189
189
.. _whatsnew_0240.api_breaking:
190
190
191
191
Backwards incompatible API changes
Original file line number Diff line number Diff line change 80
80
from ._version import get_versions
81
81
v = get_versions ()
82
82
__version__ = v .get ('closest-tag' , v ['version' ])
83
+ __git_version__ = v .get ('full-revisionid' )
83
84
del get_versions , v
84
85
85
86
# module level doc-string
Original file line number Diff line number Diff line change 1
1
# -*- coding: utf-8 -*-
2
2
3
3
import collections
4
+ import string
4
5
from functools import partial
5
6
6
7
import numpy as np
7
8
import pytest
8
9
10
+ import pandas as pd
9
11
from pandas import Series , Timestamp
10
12
from pandas .core import (
11
13
common as com ,
@@ -110,3 +112,10 @@ def test_standardize_mapping():
110
112
111
113
dd = collections .defaultdict (list )
112
114
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