File tree 1 file changed +1
-18
lines changed 1 file changed +1
-18
lines changed Original file line number Diff line number Diff line change @@ -235,31 +235,14 @@ def get_latex_manager():
235
235
LatexManagerFactory .previous_instance = new_inst
236
236
return new_inst
237
237
238
- class WeakSet (object ):
239
- # TODO: Poor man's weakref.WeakSet.
240
- # Remove this once python 2.6 support is dropped from matplotlib.
241
-
242
- def __init__ (self ):
243
- self .weak_key_dict = weakref .WeakKeyDictionary ()
244
-
245
- def add (self , item ):
246
- self .weak_key_dict [item ] = None
247
-
248
- def discard (self , item ):
249
- if item in self .weak_key_dict :
250
- del self .weak_key_dict [item ]
251
-
252
- def __iter__ (self ):
253
- return six .iterkeys (self .weak_key_dict )
254
-
255
238
256
239
class LatexManager (object ):
257
240
"""
258
241
The LatexManager opens an instance of the LaTeX application for
259
242
determining the metrics of text elements. The LaTeX environment can be
260
243
modified by setting fonts and/or a custem preamble in the rc parameters.
261
244
"""
262
- _unclean_instances = WeakSet ()
245
+ _unclean_instances = weakref . WeakSet ()
263
246
264
247
@staticmethod
265
248
def _build_latex_header ():
You can’t perform that action at this time.
0 commit comments