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