MCPcopy Create free account
hub / github.com/ipython/ipython / clear_app_refs

Method clear_app_refs

IPython/lib/inputhook.py:188–210  ·  view source on GitHub ↗

DEPRECATED since IPython 5.0 Clear IPython's internal reference to an application instance. Whenever we create an app for a user on qt4 or wx, we hold a reference to the app. This is needed because in some cases bad things can happen if a user doesn't hold a refere

(self, gui=None)

Source from the content-addressed store, hash-verified

186 return original
187
188 def clear_app_refs(self, gui=None):
189 """DEPRECATED since IPython 5.0
190
191 Clear IPython's internal reference to an application instance.
192
193 Whenever we create an app for a user on qt4 or wx, we hold a
194 reference to the app. This is needed because in some cases bad things
195 can happen if a user doesn't hold a reference themselves. This
196 method is provided to clear the references we are holding.
197
198 Parameters
199 ----------
200 gui : None or str
201 If None, clear all app references. If ('wx', 'qt4') clear
202 the app for that toolkit. References are not held for gtk or tk
203 as those toolkits don't have the notion of an app.
204 """
205 warn("`clear_app_refs` is deprecated since IPython 5.0 and will be removed in future versions.",
206 DeprecationWarning, stacklevel=2)
207 if gui is None:
208 self.apps = {}
209 elif gui in self.apps:
210 del self.apps[gui]
211
212 def register(self, toolkitname, *aliases):
213 """DEPRECATED since IPython 5.0

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected