BUG: Cannot create third-party ExtensionArrays for datetime types · Issue #34986 · pandas-dev/pandas (original) (raw)

Skip to content

Provide feedback

Saved searches

Use saved searches to filter your results more quickly

Sign up

Appearance settings

@xhochy

Description

@xhochy


Code Sample: #34987

Problem description

With #33400 type checks now fasttrack on the kind of the dtype. Thus for every ExtensionDtype that is of kind M, is_datetime64tz_dtype returns True. This is then used in get_block_type which leads to the usage of DatetimeTZBlock for all of these arrays although this block only supports DatetimeArray.

elif is_datetime64tz_dtype(values.dtype):
cls = DatetimeTZBlock
elif is_interval_dtype(dtype) or is_period_dtype(dtype):
cls = ObjectValuesExtensionBlock
elif is_extension_array_dtype(values.dtype):
cls = ExtensionBlock