Skip to content

Commit 8649518

Browse files
committed
CLN: fix import preventing asv from running for old commits
1 parent 8ec6ed5 commit 8649518

File tree

1 file changed

+11
-8
lines changed

1 file changed

+11
-8
lines changed

asv_bench/benchmarks/pandas_vb_common.py

+11-8
Original file line numberDiff line numberDiff line change
@@ -16,14 +16,17 @@
1616
np.float64, np.int16, np.int8, np.uint16, np.uint8]
1717
datetime_dtypes = [np.datetime64, np.timedelta64]
1818
string_dtypes = [np.object]
19-
extension_dtypes = [pd.Int8Dtype, pd.Int16Dtype,
20-
pd.Int32Dtype, pd.Int64Dtype,
21-
pd.UInt8Dtype, pd.UInt16Dtype,
22-
pd.UInt32Dtype, pd.UInt64Dtype,
23-
pd.CategoricalDtype,
24-
pd.IntervalDtype,
25-
pd.DatetimeTZDtype('ns', 'UTC'),
26-
pd.PeriodDtype('D')]
19+
try:
20+
extension_dtypes = [pd.Int8Dtype, pd.Int16Dtype,
21+
pd.Int32Dtype, pd.Int64Dtype,
22+
pd.UInt8Dtype, pd.UInt16Dtype,
23+
pd.UInt32Dtype, pd.UInt64Dtype,
24+
pd.CategoricalDtype,
25+
pd.IntervalDtype,
26+
pd.DatetimeTZDtype('ns', 'UTC'),
27+
pd.PeriodDtype('D')]
28+
except AttributeError:
29+
extension_dtypes = []
2730

2831

2932
def setup(*args, **kwargs):

0 commit comments

Comments
 (0)