diff options
author | Hugo van Kemenade <hugovk@users.noreply.github.com> | 2021-09-13 17:12:36 (GMT) |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-09-13 17:12:36 (GMT) |
commit | 1fc41ae8709e20d741bd86c2345173688a5e84b0 (patch) | |
tree | c68e72e63a373fc3730d6d45a1e287026c088227 /Doc | |
parent | 85dc53a463967659075744ad911d08a32aa70dd5 (diff) | |
download | cpython-1fc41ae8709e20d741bd86c2345173688a5e84b0.zip cpython-1fc41ae8709e20d741bd86c2345173688a5e84b0.tar.gz cpython-1fc41ae8709e20d741bd86c2345173688a5e84b0.tar.bz2 |
bpo-45173 Remove configparser deprecations (GH-28292)
In the configparser module, these have been deprecated since Python 3.2:
* the SafeConfigParser class,
* the filename property of the ParsingError class,
* the readfp method of the ConfigParser class,
Diffstat (limited to 'Doc')
-rw-r--r-- | Doc/library/configparser.rst | 25 | ||||
-rw-r--r-- | Doc/whatsnew/3.11.rst | 7 |
2 files changed, 10 insertions, 22 deletions
diff --git a/Doc/library/configparser.rst b/Doc/library/configparser.rst index 2bb4259..1ec0fa1 100644 --- a/Doc/library/configparser.rst +++ b/Doc/library/configparser.rst @@ -1200,28 +1200,6 @@ ConfigParser Objects names is stripped before :meth:`optionxform` is called. - .. method:: readfp(fp, filename=None) - - .. deprecated:: 3.2 - Use :meth:`read_file` instead. - - .. versionchanged:: 3.2 - :meth:`readfp` now iterates on *fp* instead of calling ``fp.readline()``. - - For existing code calling :meth:`readfp` with arguments which don't - support iteration, the following generator may be used as a wrapper - around the file-like object:: - - def readline_generator(fp): - line = fp.readline() - while line: - yield line - line = fp.readline() - - Instead of ``parser.readfp(fp)`` use - ``parser.read_file(readline_generator(fp))``. - - .. data:: MAX_INTERPOLATION_DEPTH The maximum depth for recursive interpolation for :meth:`get` when the *raw* @@ -1359,6 +1337,9 @@ Exceptions The ``filename`` attribute and :meth:`__init__` argument were renamed to ``source`` for consistency. + .. versionchanged:: 3.11 + The deprecated ``filename`` attribute was removed. + .. rubric:: Footnotes diff --git a/Doc/whatsnew/3.11.rst b/Doc/whatsnew/3.11.rst index 7619e48..fbc5fa3 100644 --- a/Doc/whatsnew/3.11.rst +++ b/Doc/whatsnew/3.11.rst @@ -284,6 +284,13 @@ Removed the ``l*gettext()`` functions. (Contributed by Dong-hee Na and Serhiy Storchaka in :issue:`44235`.) +* Remove from the :mod:`configparser` module: + the :class:`SafeConfigParser` class, + the :attr:`filename` property of the :class:`ParsingError` class, + the :meth:`readfp` method of the :class:`ConfigParser` class, + deprecated since Python 3.2. + (Contributed by Hugo van Kemenade in :issue:`45173`.) + Optimizations ============= |