gh-107625: configparser: Raise error if a missing value is continued (GH-107651)

Co-authored-by: Éric <merwok@netwok.org>
Co-authored-by: Petr Viktorin <encukou@gmail.com>
Co-authored-by: Jason R. Coombs <jaraco@jaraco.com>
This commit is contained in:
Prince Roshan 2024-03-06 19:35:54 +05:30 committed by GitHub
parent 27858e2a17
commit e800265aa1
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
4 changed files with 55 additions and 0 deletions

View file

@ -978,6 +978,10 @@ ConfigParser Objects
The default *dict_type* is :class:`dict`, since it now preserves
insertion order.
.. versionchanged:: 3.13
Raise a :exc:`MultilineContinuationError` when *allow_no_value* is
``True``, and a key without a value is continued with an indented line.
.. method:: defaults()
Return a dictionary containing the instance-wide defaults.
@ -1349,6 +1353,13 @@ Exceptions
The ``filename`` attribute and :meth:`!__init__` constructor argument were
removed. They have been available using the name ``source`` since 3.2.
.. exception:: MultilineContinuationError
Exception raised when a key without a corresponding value is continued with
an indented line.
.. versionadded:: 3.13
.. rubric:: Footnotes
.. [1] Config parsers allow for heavy customization. If you are interested in