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 @@ -1599,7 +1599,12 @@ def wrapper(*args, **kwargs):
1599
1599
r'^savefig|print_[A-Za-z0-9]+|_no_output_draw$'
1600
1600
)
1601
1601
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 ):
1603
1608
if frame is None :
1604
1609
# when called in embedded context may hit frame is None.
1605
1610
break
@@ -1633,7 +1638,7 @@ def wrapper(*args, **kwargs):
1633
1638
if arg in accepted_kwargs :
1634
1639
continue
1635
1640
_api .warn_deprecated (
1636
- '3.3' , name = name ,
1641
+ '3.3' , name = name , removal = '3.6' ,
1637
1642
message = '%(name)s() got unexpected keyword argument "'
1638
1643
+ arg + '" which is no longer supported as of '
1639
1644
'%(since)s and will become an error '
You can’t perform that action at this time.
0 commit comments