From 926827af8c7d601c35bbfabf0acc4a0d4de581fd Mon Sep 17 00:00:00 2001 From: Hugo van Kemenade Date: Thu, 27 Jan 2022 09:16:40 +0200 Subject: [PATCH] bpo-45173: Note these configparser deprecations will be removed in 3.12 --- Lib/configparser.py | 8 ++++---- .../next/Library/2022-01-27-11-16-59.bpo-45173.wreRF2.rst | 1 + 2 files changed, 5 insertions(+), 4 deletions(-) create mode 100644 Misc/NEWS.d/next/Library/2022-01-27-11-16-59.bpo-45173.wreRF2.rst diff --git a/Lib/configparser.py b/Lib/configparser.py index 042a5c74b696fb..3470624e63f61b 100644 --- a/Lib/configparser.py +++ b/Lib/configparser.py @@ -316,7 +316,7 @@ def __init__(self, source=None, filename=None): 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 @@ def filename(self): 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 @@ def read_dict(self, dictionary, source=''): 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 @@ def __init__(self, *args, **kwargs): 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 00000000000000..ee5a88f6214986 --- /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.