File tree Expand file tree Collapse file tree 1 file changed +7
-2
lines changed
Expand file tree Collapse file tree 1 file changed +7
-2
lines changed Original file line number Diff line number Diff line change @@ -1601,7 +1601,12 @@ def wrapper(*args, **kwargs):
16011601 r'^savefig|print_[A-Za-z0-9]+|_no_output_draw$'
16021602 )
16031603 seen_print_figure = False
1604- for frame , line in traceback .walk_stack (None ):
1604+ if sys .version_info < (3 , 11 ):
1605+ current_frame = None
1606+ else :
1607+ import inspect
1608+ current_frame = inspect .currentframe ()
1609+ for frame , line in traceback .walk_stack (current_frame ):
16051610 if frame is None :
16061611 # when called in embedded context may hit frame is None.
16071612 break
@@ -1635,7 +1640,7 @@ def wrapper(*args, **kwargs):
16351640 if arg in accepted_kwargs :
16361641 continue
16371642 _api .warn_deprecated (
1638- '3.3' , name = name ,
1643+ '3.3' , name = name , removal = '3.6' ,
16391644 message = '%(name)s() got unexpected keyword argument "'
16401645 + arg + '" which is no longer supported as of '
16411646 '%(since)s and will become an error '
You can’t perform that action at this time.
0 commit comments