mirror of
https://github.com/python/cpython.git
synced 2025-08-30 21:48:47 +00:00
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:
parent
27858e2a17
commit
e800265aa1
4 changed files with 55 additions and 0 deletions
|
@ -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
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue