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