1
- import inspect
2
1
import operator
3
2
import re
4
3
import time
@@ -502,7 +501,7 @@ cdef class BaseOffset:
502
501
" DateOffset.__call__ is deprecated and will be removed in a future "
503
502
" version. Use `offset + other` instead." ,
504
503
FutureWarning ,
505
- stacklevel = find_stack_level(inspect.currentframe() ),
504
+ stacklevel = find_stack_level(),
506
505
)
507
506
return self ._apply(other)
508
507
@@ -512,7 +511,7 @@ cdef class BaseOffset:
512
511
f" {type(self).__name__}.apply is deprecated and will be removed "
513
512
" in a future version. Use `offset + other` instead" ,
514
513
FutureWarning ,
515
- stacklevel = find_stack_level(inspect.currentframe() ),
514
+ stacklevel = find_stack_level(),
516
515
)
517
516
return self ._apply(other)
518
517
@@ -823,15 +822,15 @@ cdef class BaseOffset:
823
822
warnings.warn(
824
823
"onOffset is a deprecated , use is_on_offset instead.",
825
824
FutureWarning ,
826
- stacklevel = find_stack_level(inspect.currentframe() ),
825
+ stacklevel = find_stack_level(),
827
826
)
828
827
return self.is_on_offset(dt )
829
828
830
829
def isAnchored(self ) -> bool:
831
830
warnings.warn(
832
831
"isAnchored is a deprecated , use is_anchored instead.",
833
832
FutureWarning ,
834
- stacklevel = find_stack_level(inspect.currentframe() ),
833
+ stacklevel = find_stack_level(),
835
834
)
836
835
return self.is_anchored()
837
836
0 commit comments