Skip to content

Commit d77aa13

Browse files
authored
Merge pull request #25183 from tacaswell/fix/nbagg_close-warning
FIX: do not use deprecated API internally
2 parents 6f753cd + c79f801 commit d77aa13

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

lib/matplotlib/backends/backend_nbagg.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414

1515
from matplotlib import is_interactive
1616
from matplotlib._pylab_helpers import Gcf
17-
from matplotlib.backend_bases import _Backend, NavigationToolbar2
17+
from matplotlib.backend_bases import _Backend, CloseEvent, NavigationToolbar2
1818
from .backend_webagg_core import (
1919
FigureCanvasWebAggCore, FigureManagerWebAgg, NavigationToolbar2WebAgg)
2020
from .backend_webagg_core import ( # noqa: F401 # pylint: disable=W0611
@@ -149,7 +149,7 @@ def clearup_closed(self):
149149
if socket.is_open()}
150150

151151
if len(self.web_sockets) == 0:
152-
self.canvas.close_event()
152+
CloseEvent("close_event", self.canvas)._process()
153153

154154
def remove_comm(self, comm_id):
155155
self.web_sockets = {socket for socket in self.web_sockets

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy