@@ -435,9 +435,9 @@ class Timestamp(_Timestamp):
435
435
"""
436
436
437
437
@classmethod
438
- def fromordinal (cls , ordinal , freq = None , tz = None , offset = None ):
438
+ def fromordinal (cls , ordinal , freq = None , tz = None ):
439
439
"""
440
- Timestamp.fromordinal(ordinal, freq=None, tz=None, offset=None )
440
+ Timestamp.fromordinal(ordinal, freq=None, tz=None)
441
441
442
442
passed an ordinal, translate and convert to a ts
443
443
note: by definition there cannot be any tz info on the ordinal itself
@@ -450,11 +450,9 @@ class Timestamp(_Timestamp):
450
450
Offset which Timestamp will have
451
451
tz : str, pytz.timezone, dateutil.tz.tzfile or None
452
452
Time zone for time which Timestamp will have.
453
- offset : str, DateOffset
454
- Deprecated, use freq
455
453
"""
456
454
return cls (datetime.fromordinal(ordinal),
457
- freq = freq, tz = tz, offset = offset )
455
+ freq = freq, tz = tz)
458
456
459
457
@classmethod
460
458
def now (cls , tz = None ):
@@ -529,8 +527,7 @@ class Timestamp(_Timestamp):
529
527
object freq = None , tz = None , unit = None ,
530
528
year = None , month = None , day = None ,
531
529
hour = None , minute = None , second = None , microsecond = None ,
532
- tzinfo = None ,
533
- object offset = None ):
530
+ tzinfo = None ):
534
531
# The parameter list folds together legacy parameter names (the first
535
532
# four) and positional and keyword parameter names from pydatetime.
536
533
#
@@ -554,15 +551,6 @@ class Timestamp(_Timestamp):
554
551
555
552
cdef _TSObject ts
556
553
557
- if offset is not None :
558
- # deprecate offset kwd in 0.19.0, GH13593
559
- if freq is not None :
560
- msg = " Can only specify freq or offset, not both"
561
- raise TypeError (msg)
562
- warnings.warn(" offset is deprecated. Use freq instead" ,
563
- FutureWarning )
564
- freq = offset
565
-
566
554
if tzinfo is not None :
567
555
if not PyTZInfo_Check(tzinfo):
568
556
# tzinfo must be a datetime.tzinfo object, GH#17690
@@ -676,12 +664,6 @@ class Timestamp(_Timestamp):
676
664
"""
677
665
return self .tzinfo
678
666
679
- @property
680
- def offset (self ):
681
- warnings.warn(" .offset is deprecated. Use .freq instead" ,
682
- FutureWarning )
683
- return self .freq
684
-
685
667
def __setstate__ (self , state ):
686
668
self .value = state[0 ]
687
669
self .freq = state[1 ]
0 commit comments