Skip to content

Commit 99ba44f

Browse files
add back import of DatetimeTZBlock for compat with pyarrow version 12 to 15
1 parent f7403b3 commit 99ba44f

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

pandas/core/internals/__init__.py

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@
88
__all__ = [
99
"Block", # pyright:ignore[reportUnsupportedDunderAll)]
1010
"BlockManager",
11+
"DatetimeTZBlock", # pyright:ignore[reportUnsupportedDunderAll)]
1112
"ExtensionBlock", # pyright:ignore[reportUnsupportedDunderAll)]
1213
"SingleBlockManager",
1314
"concatenate_managers",
@@ -36,6 +37,7 @@ def __getattr__(name: str):
3637
if name in [
3738
"Block",
3839
"ExtensionBlock",
40+
"DatetimeTZBlock",
3941
]:
4042
warnings.warn(
4143
f"{name} is deprecated and will be removed in a future version. "
@@ -45,6 +47,10 @@ def __getattr__(name: str):
4547
# on hard-coding stacklevel
4648
stacklevel=2,
4749
)
50+
if name == "DatetimeTZBlock":
51+
from pandas.core.internals.blocks import DatetimeLikeBlock
52+
53+
return DatetimeLikeBlock
4854
if name == "ExtensionBlock":
4955
from pandas.core.internals.blocks import ExtensionBlock
5056

0 commit comments

Comments
 (0)