@@ -312,26 +312,6 @@ def __init__(self, source=None, filename=None):
312
312
self .errors = []
313
313
self .args = (source , )
314
314
315
- @property
316
- def filename (self ):
317
- """Deprecated, use `source'."""
318
- warnings .warn (
319
- "The 'filename' attribute will be removed in Python 3.12. "
320
- "Use 'source' instead." ,
321
- DeprecationWarning , stacklevel = 2
322
- )
323
- return self .source
324
-
325
- @filename .setter
326
- def filename (self , value ):
327
- """Deprecated, user `source'."""
328
- warnings .warn (
329
- "The 'filename' attribute will be removed in Python 3.12. "
330
- "Use 'source' instead." ,
331
- DeprecationWarning , stacklevel = 2
332
- )
333
- self .source = value
334
-
335
315
def append (self , lineno , line ):
336
316
self .errors .append ((lineno , line ))
337
317
self .message += '\n \t [line %2d]: %s' % (lineno , line )
@@ -768,15 +748,6 @@ def read_dict(self, dictionary, source='<dict>'):
768
748
elements_added .add ((section , key ))
769
749
self .set (section , key , value )
770
750
771
- def readfp (self , fp , filename = None ):
772
- """Deprecated, use read_file instead."""
773
- warnings .warn (
774
- "This method will be removed in Python 3.12. "
775
- "Use 'parser.read_file()' instead." ,
776
- DeprecationWarning , stacklevel = 2
777
- )
778
- self .read_file (fp , source = filename )
779
-
780
751
def get (self , section , option , * , raw = False , vars = None , fallback = _UNSET ):
781
752
"""Get an option value for a given section.
782
753
@@ -1239,19 +1210,6 @@ def _read_defaults(self, defaults):
1239
1210
self ._interpolation = hold_interpolation
1240
1211
1241
1212
1242
- class SafeConfigParser (ConfigParser ):
1243
- """ConfigParser alias for backwards compatibility purposes."""
1244
-
1245
- def __init__ (self , * args , ** kwargs ):
1246
- super ().__init__ (* args , ** kwargs )
1247
- warnings .warn (
1248
- "The SafeConfigParser class has been renamed to ConfigParser "
1249
- "in Python 3.2. This alias will be removed in Python 3.12."
1250
- " Use ConfigParser directly instead." ,
1251
- DeprecationWarning , stacklevel = 2
1252
- )
1253
-
1254
-
1255
1213
class SectionProxy (MutableMapping ):
1256
1214
"""A proxy for a single section from a parser."""
1257
1215
0 commit comments