@@ -895,13 +895,6 @@ cdef class Tick(SingleConstructorOffset):
895
895
896
896
raise ApplyTypeError(f" Unhandled type: {type(other).__name__}" )
897
897
898
- # --------------------------------------------------------------------
899
- # Pickle Methods
900
-
901
- def __setstate__ (self , state ):
902
- self .n = state[" n" ]
903
- self .normalize = False
904
-
905
898
906
899
cdef class Day(Tick):
907
900
_nanos_inc = 24 * 3600 * 1 _000_000_000
@@ -2005,11 +1998,6 @@ cdef class QuarterOffset(SingleConstructorOffset):
2005
1998
startingMonth = self ._default_starting_month
2006
1999
self .startingMonth = startingMonth
2007
2000
2008
- cpdef __setstate__(self , state):
2009
- self .startingMonth = state.pop(" startingMonth" )
2010
- self .n = state.pop(" n" )
2011
- self .normalize = state.pop(" normalize" )
2012
-
2013
2001
@classmethod
2014
2002
def _from_name (cls , suffix = None ):
2015
2003
kwargs = {}
@@ -2265,11 +2253,6 @@ cdef class SemiMonthOffset(SingleConstructorOffset):
2265
2253
f" got {self.day_of_month}"
2266
2254
)
2267
2255
2268
- cpdef __setstate__(self , state):
2269
- self .n = state.pop(" n" )
2270
- self .normalize = state.pop(" normalize" )
2271
- self .day_of_month = state.pop(" day_of_month" )
2272
-
2273
2256
@classmethod
2274
2257
def _from_name (cls , suffix = None ):
2275
2258
return cls (day_of_month = suffix)
@@ -2587,12 +2570,6 @@ cdef class WeekOfMonth(WeekOfMonthMixin):
2587
2570
if self .week < 0 or self .week > 3 :
2588
2571
raise ValueError (f" Week must be 0<=week<=3, got {self.week}" )
2589
2572
2590
- cpdef __setstate__(self , state):
2591
- self .n = state.pop(" n" )
2592
- self .normalize = state.pop(" normalize" )
2593
- self .weekday = state.pop(" weekday" )
2594
- self .week = state.pop(" week" )
2595
-
2596
2573
def _get_offset_day (self , other: datetime ) -> int:
2597
2574
"""
2598
2575
Find the day in the same month as other that has the same
@@ -2652,12 +2629,6 @@ cdef class LastWeekOfMonth(WeekOfMonthMixin):
2652
2629
if self .n == 0 :
2653
2630
raise ValueError (" N cannot be 0" )
2654
2631
2655
- cpdef __setstate__(self , state):
2656
- self .n = state.pop(" n" )
2657
- self .normalize = state.pop(" normalize" )
2658
- self .weekday = state.pop(" weekday" )
2659
- self .week = - 1
2660
-
2661
2632
def _get_offset_day (self , other: datetime ) -> int:
2662
2633
"""
2663
2634
Find the day in the same month as other that has the same
@@ -2709,12 +2680,6 @@ cdef class FY5253Mixin(SingleConstructorOffset):
2709
2680
if self .variation not in [" nearest" , " last" ]:
2710
2681
raise ValueError (f" {self.variation} is not a valid variation" )
2711
2682
2712
- cpdef __setstate__(self , state):
2713
- self .n = state.pop(" n" )
2714
- self .normalize = state.pop(" normalize" )
2715
- self .weekday = state.pop(" weekday" )
2716
- self .variation = state.pop(" variation" )
2717
-
2718
2683
def is_anchored (self ) -> bool:
2719
2684
return (
2720
2685
self.n == 1 and self.startingMonth is not None and self.weekday is not None
@@ -2995,10 +2960,6 @@ cdef class FY5253Quarter(FY5253Mixin):
2995
2960
)
2996
2961
self .qtr_with_extra_week = qtr_with_extra_week
2997
2962
2998
- cpdef __setstate__(self , state):
2999
- FY5253Mixin.__setstate__(self , state)
3000
- self .qtr_with_extra_week = state.pop(" qtr_with_extra_week" )
3001
-
3002
2963
@cache_readonly
3003
2964
def _offset (self ):
3004
2965
return FY5253(
@@ -3141,10 +3102,6 @@ cdef class Easter(SingleConstructorOffset):
3141
3102
Right now uses the revised method which is valid in years 1583-4099.
3142
3103
"""
3143
3104
3144
- cpdef __setstate__(self , state):
3145
- self .n = state.pop(" n" )
3146
- self .normalize = state.pop(" normalize" )
3147
-
3148
3105
@apply_wraps
3149
3106
def apply (self , other: datetime ) -> datetime:
3150
3107
current_easter = easter(other.year)
0 commit comments