diff --git a/pandas/compat/pickle_compat.py b/pandas/compat/pickle_compat.py index ca539eefd3aee..499506bea8c58 100644 --- a/pandas/compat/pickle_compat.py +++ b/pandas/compat/pickle_compat.py @@ -21,7 +21,6 @@ PeriodArray, TimedeltaArray, ) -from pandas.core.internals import BlockManager if TYPE_CHECKING: from pandas import ( @@ -223,8 +222,7 @@ def load_newobj(self): elif issubclass(cls, TimedeltaArray) and not args: arr = np.array([], dtype="m8[ns]") obj = cls.__new__(cls, arr, arr.dtype) - elif cls is BlockManager and not args: - obj = cls.__new__(cls, (), [], False) + else: obj = cls.__new__(cls, *args) diff --git a/pandas/core/arrays/period.py b/pandas/core/arrays/period.py index a9c94b615f49c..5a9dd0e89bd65 100644 --- a/pandas/core/arrays/period.py +++ b/pandas/core/arrays/period.py @@ -178,8 +178,8 @@ class PeriodArray(dtl.DatelikeOps): "days_in_month", "daysinmonth", ] - _datetimelike_ops: list[str] = _field_ops + _object_ops + _bool_ops - _datetimelike_methods: list[str] = ["strftime", "to_timestamp", "asfreq"] + _datetimelike_ops = _field_ops + _object_ops + _bool_ops + _datetimelike_methods = ["strftime", "to_timestamp", "asfreq"] # -------------------------------------------------------------------- # Constructors