Thanks to visit codestin.com
Credit goes to github.com

Skip to content

FIX: do not use deprecated API internally #25183

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Feb 9, 2023
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
4 changes: 2 additions & 2 deletions lib/matplotlib/backends/backend_nbagg.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@

from matplotlib import is_interactive
from matplotlib._pylab_helpers import Gcf
from matplotlib.backend_bases import _Backend, NavigationToolbar2
from matplotlib.backend_bases import _Backend, CloseEvent, NavigationToolbar2
from .backend_webagg_core import (
FigureCanvasWebAggCore, FigureManagerWebAgg, NavigationToolbar2WebAgg)
from .backend_webagg_core import ( # noqa: F401 # pylint: disable=W0611
Expand Down Expand Up @@ -149,7 +149,7 @@ def clearup_closed(self):
if socket.is_open()}

if len(self.web_sockets) == 0:
self.canvas.close_event()
CloseEvent("close_event", self.canvas)._process()

def remove_comm(self, comm_id):
self.web_sockets = {socket for socket in self.web_sockets
Expand Down