Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 7 additions & 2 deletions lib/matplotlib/backend_bases.py
Original file line number Diff line number Diff line change
Expand Up @@ -1601,7 +1601,12 @@ def wrapper(*args, **kwargs):
r'^savefig|print_[A-Za-z0-9]+|_no_output_draw$'
)
seen_print_figure = False
for frame, line in traceback.walk_stack(None):
if sys.version_info < (3, 11):
current_frame = None
else:
import inspect
current_frame = inspect.currentframe()
for frame, line in traceback.walk_stack(current_frame):
if frame is None:
# when called in embedded context may hit frame is None.
break
Expand Down Expand Up @@ -1635,7 +1640,7 @@ def wrapper(*args, **kwargs):
if arg in accepted_kwargs:
continue
_api.warn_deprecated(
'3.3', name=name,
'3.3', name=name, removal='3.6',
message='%(name)s() got unexpected keyword argument "'
+ arg + '" which is no longer supported as of '
'%(since)s and will become an error '
Expand Down