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