summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorHugo van Kemenade <hugovk@users.noreply.github.com>2022-02-02 18:41:30 (GMT)
committerGitHub <noreply@github.com>2022-02-02 18:41:30 (GMT)
commitba4d79af32b6bb8378cb7003f67d6c4d413fbe89 (patch)
tree8fc6b9bb1646f4c209b5fd3957a812a18316f03b
parente480def027b68a570dc0c2e235463842373dc741 (diff)
downloadcpython-ba4d79af32b6bb8378cb7003f67d6c4d413fbe89.zip
cpython-ba4d79af32b6bb8378cb7003f67d6c4d413fbe89.tar.gz
cpython-ba4d79af32b6bb8378cb7003f67d6c4d413fbe89.tar.bz2
[3.10] bpo-45173: Note configparser deprecations will be removed in 3.12 (GH-31084)
Cherry-pick of [`b06e9ba`](https://github.com/python/cpython/pull/30952/commits/b06e9ba398fafe39028c3b2dc3943266a16b1416) from https://github.com/python/cpython/pull/30952.
-rw-r--r--Lib/configparser.py8
-rw-r--r--Misc/NEWS.d/next/Library/2022-01-27-11-16-59.bpo-45173.wreRF2.rst1
2 files changed, 5 insertions, 4 deletions
diff --git a/Lib/configparser.py b/Lib/configparser.py
index 042a5c7..3470624 100644
--- a/Lib/configparser.py
+++ b/Lib/configparser.py
@@ -316,7 +316,7 @@ class ParsingError(Error):
def filename(self):
"""Deprecated, use `source'."""
warnings.warn(
- "The 'filename' attribute will be removed in future versions. "
+ "The 'filename' attribute will be removed in Python 3.12. "
"Use 'source' instead.",
DeprecationWarning, stacklevel=2
)
@@ -326,7 +326,7 @@ class ParsingError(Error):
def filename(self, value):
"""Deprecated, user `source'."""
warnings.warn(
- "The 'filename' attribute will be removed in future versions. "
+ "The 'filename' attribute will be removed in Python 3.12. "
"Use 'source' instead.",
DeprecationWarning, stacklevel=2
)
@@ -757,7 +757,7 @@ class RawConfigParser(MutableMapping):
def readfp(self, fp, filename=None):
"""Deprecated, use read_file instead."""
warnings.warn(
- "This method will be removed in future versions. "
+ "This method will be removed in Python 3.12. "
"Use 'parser.read_file()' instead.",
DeprecationWarning, stacklevel=2
)
@@ -1232,7 +1232,7 @@ class SafeConfigParser(ConfigParser):
super().__init__(*args, **kwargs)
warnings.warn(
"The SafeConfigParser class has been renamed to ConfigParser "
- "in Python 3.2. This alias will be removed in future versions."
+ "in Python 3.2. This alias will be removed in Python 3.12."
" Use ConfigParser directly instead.",
DeprecationWarning, stacklevel=2
)
diff --git a/Misc/NEWS.d/next/Library/2022-01-27-11-16-59.bpo-45173.wreRF2.rst b/Misc/NEWS.d/next/Library/2022-01-27-11-16-59.bpo-45173.wreRF2.rst
new file mode 100644
index 0000000..ee5a88f
--- /dev/null
+++ b/Misc/NEWS.d/next/Library/2022-01-27-11-16-59.bpo-45173.wreRF2.rst
@@ -0,0 +1 @@
+Note the configparser deprecations will be removed in Python 3.12.