@@ -1178,26 +1178,12 @@ class Event:
11781178 def __init__ (self , name , canvas , guiEvent = None ):
11791179 self .name = name
11801180 self .canvas = canvas
1181- self ._guiEvent = guiEvent
1182- self ._guiEvent_deleted = False
1181+ self .guiEvent = guiEvent
11831182
11841183 def _process (self ):
11851184 """Process this event on ``self.canvas``, then unset ``guiEvent``."""
11861185 self .canvas .callbacks .process (self .name , self )
1187- self ._guiEvent_deleted = True
1188-
1189- @property
1190- def guiEvent (self ):
1191- # After deprecation elapses: remove _guiEvent_deleted; make guiEvent a plain
1192- # attribute set to None by _process.
1193- if self ._guiEvent_deleted :
1194- _api .warn_deprecated (
1195- "3.8" , message = "Accessing guiEvent outside of the original GUI event "
1196- "handler is unsafe and deprecated since %(since)s; in the future, the "
1197- "attribute will be set to None after quitting the event handler. You "
1198- "may separately record the value of the guiEvent attribute at your own "
1199- "risk." )
1200- return self ._guiEvent
1186+ self .guiEvent = None
12011187
12021188
12031189class DrawEvent (Event ):
@@ -2097,12 +2083,6 @@ def print_figure(
20972083 if dpi == 'figure' :
20982084 dpi = getattr (self .figure , '_original_dpi' , self .figure .dpi )
20992085
2100- if kwargs .get ("papertype" ) == 'auto' :
2101- # When deprecation elapses, remove backend_ps._get_papertype & its callers.
2102- _api .warn_deprecated (
2103- "3.8" , name = "papertype='auto'" , addendum = "Pass an explicit paper type, "
2104- "'figure', or omit the *papertype* argument entirely." )
2105-
21062086 # Remove the figure manager, if any, to avoid resizing the GUI widget.
21072087 with (cbook ._setattr_cm (self , manager = None ),
21082088 self ._switch_canvas_and_return_print_method (format , backend )
@@ -2207,20 +2187,6 @@ def get_default_filename(self):
22072187 default_filetype = self .get_default_filetype ()
22082188 return f'{ default_basename } .{ default_filetype } '
22092189
2210- @_api .deprecated ("3.8" )
2211- def switch_backends (self , FigureCanvasClass ):
2212- """
2213- Instantiate an instance of FigureCanvasClass
2214-
2215- This is used for backend switching, e.g., to instantiate a
2216- FigureCanvasPS from a FigureCanvasGTK. Note, deep copying is
2217- not done, so any changes to one of the instances (e.g., setting
2218- figure size or line props), will be reflected in the other
2219- """
2220- newCanvas = FigureCanvasClass (self .figure )
2221- newCanvas ._is_saving = self ._is_saving
2222- return newCanvas
2223-
22242190 def mpl_connect (self , s , func ):
22252191 """
22262192 Bind function *func* to event *s*.
0 commit comments