|
5 | 5 | from collections import namedtuple |
6 | 6 | import enum |
7 | 7 | import functools |
8 | | -from io import StringIO |
9 | 8 | import logging |
10 | 9 | import os |
11 | 10 | import types |
@@ -92,14 +91,6 @@ def __init__(self, default_font_prop, mathtext_backend): |
92 | 91 | self.mathtext_backend = mathtext_backend |
93 | 92 | self.used_characters = {} |
94 | 93 |
|
95 | | - @_api.deprecated("3.4") |
96 | | - def destroy(self): |
97 | | - """ |
98 | | - Fix any cyclical references before the object is about |
99 | | - to be destroyed. |
100 | | - """ |
101 | | - self.used_characters = None |
102 | | - |
103 | 94 | def get_kern(self, font1, fontclass1, sym1, fontsize1, |
104 | 95 | font2, fontclass2, sym2, fontsize2, dpi): |
105 | 96 | """ |
@@ -203,11 +194,6 @@ def get_results(self, box): |
203 | 194 | """ |
204 | 195 | result = self.mathtext_backend.get_results( |
205 | 196 | box, self.get_used_characters()) |
206 | | - if self.destroy != TruetypeFonts.destroy.__get__(self): |
207 | | - destroy = _api.deprecate_method_override( |
208 | | - __class__.destroy, self, since="3.4") |
209 | | - if destroy: |
210 | | - destroy() |
211 | 197 | return result |
212 | 198 |
|
213 | 199 | def get_sized_alternatives_for_symbol(self, fontname, sym): |
@@ -235,11 +221,6 @@ def __init__(self, default_font_prop, mathtext_backend): |
235 | 221 | self._fonts['default'] = default_font |
236 | 222 | self._fonts['regular'] = default_font |
237 | 223 |
|
238 | | - @_api.deprecated("3.4") |
239 | | - def destroy(self): |
240 | | - self.glyphd = None |
241 | | - super().destroy() |
242 | | - |
243 | 224 | def _get_font(self, font): |
244 | 225 | if font in self.fontmap: |
245 | 226 | basename = self.fontmap[font] |
@@ -803,8 +784,6 @@ def __init__(self, default_font_prop, mathtext_backend=None): |
803 | 784 | self.fonts['default'] = default_font |
804 | 785 | self.fonts['regular'] = default_font |
805 | 786 |
|
806 | | - pswriter = _api.deprecated("3.4")(property(lambda self: StringIO())) |
807 | | - |
808 | 787 | def _get_font(self, font): |
809 | 788 | if font in self.fontmap: |
810 | 789 | basename = self.fontmap[font] |
|
0 commit comments