@@ -4666,6 +4666,11 @@ cdef class CustomBusinessDay(BusinessDay):
4666
4666
offset = timedelta(0 ),
4667
4667
):
4668
4668
BusinessDay.__init__ (self , n, normalize, offset)
4669
+ if not isinstance (calendar, (None , np.busdaycalendar)):
4670
+ raise TypeError (
4671
+ f" Only np.busdaycalendar is supported for calendar, "
4672
+ f" got {type(calendar).__name__} instead"
4673
+ )
4669
4674
self ._init_custom(weekmask, holidays, calendar)
4670
4675
4671
4676
cpdef __setstate__(self , state):
@@ -5108,8 +5113,8 @@ def _warn_about_deprecated_aliases(name: str, is_period: bool) -> str:
5108
5113
warnings.warn(
5109
5114
f"\'{name}\' is deprecated and will be removed "
5110
5115
f"in a future version , please use "
5111
- f"\'{c_PERIOD_AND_OFFSET_DEPR_FREQSTR.get(name )}\'"
5112
- f" instead.",
5116
+ f"\'{c_PERIOD_AND_OFFSET_DEPR_FREQSTR.get(name )}\' "
5117
+ f"instead.",
5113
5118
FutureWarning ,
5114
5119
stacklevel = find_stack_level(),
5115
5120
)
@@ -5122,8 +5127,8 @@ def _warn_about_deprecated_aliases(name: str, is_period: bool) -> str:
5122
5127
warnings.warn(
5123
5128
f" \' {name}\' is deprecated and will be removed "
5124
5129
f" in a future version, please use "
5125
- f" \' {_name}\' "
5126
- f" instead." ,
5130
+ f" \' {_name}\' "
5131
+ f" instead." ,
5127
5132
FutureWarning ,
5128
5133
stacklevel = find_stack_level(),
5129
5134
)
0 commit comments