Skip to content

Commit ba4d79a

Browse files
authored
[3.10] bpo-45173: Note configparser deprecations will be removed in 3.12 (GH-31084)
Cherry-pick of [`b06e9ba`](python/cpython@b06e9ba) from python/cpython#30952.
1 parent e480def commit ba4d79a

File tree

2 files changed

+5
-4
lines changed

2 files changed

+5
-4
lines changed

Lib/configparser.py

+4-4
Original file line numberDiff line numberDiff line change
@@ -316,7 +316,7 @@ def __init__(self, source=None, filename=None):
316316
def filename(self):
317317
"""Deprecated, use `source'."""
318318
warnings.warn(
319-
"The 'filename' attribute will be removed in future versions. "
319+
"The 'filename' attribute will be removed in Python 3.12. "
320320
"Use 'source' instead.",
321321
DeprecationWarning, stacklevel=2
322322
)
@@ -326,7 +326,7 @@ def filename(self):
326326
def filename(self, value):
327327
"""Deprecated, user `source'."""
328328
warnings.warn(
329-
"The 'filename' attribute will be removed in future versions. "
329+
"The 'filename' attribute will be removed in Python 3.12. "
330330
"Use 'source' instead.",
331331
DeprecationWarning, stacklevel=2
332332
)
@@ -757,7 +757,7 @@ def read_dict(self, dictionary, source='<dict>'):
757757
def readfp(self, fp, filename=None):
758758
"""Deprecated, use read_file instead."""
759759
warnings.warn(
760-
"This method will be removed in future versions. "
760+
"This method will be removed in Python 3.12. "
761761
"Use 'parser.read_file()' instead.",
762762
DeprecationWarning, stacklevel=2
763763
)
@@ -1232,7 +1232,7 @@ def __init__(self, *args, **kwargs):
12321232
super().__init__(*args, **kwargs)
12331233
warnings.warn(
12341234
"The SafeConfigParser class has been renamed to ConfigParser "
1235-
"in Python 3.2. This alias will be removed in future versions."
1235+
"in Python 3.2. This alias will be removed in Python 3.12."
12361236
" Use ConfigParser directly instead.",
12371237
DeprecationWarning, stacklevel=2
12381238
)
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
Note the configparser deprecations will be removed in Python 3.12.

0 commit comments

Comments
 (0)