NewYour coding agent can read the release notes before it upgrades.Set up the MCP server →
PyPI
PyPI, #2645 most downloaded on PyPI
Parser like ConfigParser but for updating configuration files
Latest stable
4.1.1
Last release 20 days ago
02 Nov 2026
Ships unpredictably
gaps range from 9 days to 2.9 years
Nearly every release is documented
notes for 23 of 23 stable releases
Nothing withdrawn
no release was ever pulled
8 years old
30 releases · first in 2018
Drag across the ruler to compare, or tap a release to open it.
Insert a newline before blocks added with add_after or insert_at when the file does not end with one, as add_section and add_option already do (follow
add_after or insert_at when the
file does not end with one, as add_section and add_option already do
(follow-up to PR #178), PR #185Behavior change: Option.as_list() returns an empty list instead of [""] for an empty value, e.g. key = or after set_values([]). An empty list and a si
Option.as_list() returns an empty list instead of
[""] for an empty value, e.g. key = or after set_values([]). An
empty list and a single empty value are written the same way, so set_values([])
now round-trips and a later append() no longer adds an empty first entry,
PR #182Your coding agent can read these notes before it upgrades. Set up the MCP server →
Make Option.as_list() use the current value after assignments to or from None, so append() no longer discards values added to a valueless option and c
Option.as_list() use the current value after assignments to or from
None, so append() no longer discards values added to a valueless option
and converting an option to None no longer raises an AttributeError, PR #179Insert a newline before a newly added option when the file does not end with one, so appending an option to the last section no longer glues the optio
empty_lines_in_values and the name of the
unsupported defaults argument of ConfigParser, PR #175Breaking: Drop support for Python < 3.11, the minimum supported version is now Python 3.11, PR #150
typing.Self, X | Y unions)
and remove compatibility code for older Python versions, PR #150add_before_skip_comments to Section for inserting blocks before the
comments that directly precede a section, issue #117add_section gluing the new section header to the last line when the file
does not end with a newline, issue #126None being written as delimiter when assigning a value to an option that was
parsed without a value (allow_no_value), issue #141configparser (CPython gh-146333). The
old ones backtracked quadratically, so a long line with many spaces could stall
the parser for minutes, PR #161del section[key] (and thus section.pop(key)) now applies optionxform
like section[key] does, PR #148optionxform must be idempotent, PR #152pyproject.toml. The
wheel is now tagged py3-none-any (instead of py2.py3-none-any), and the
license is declared as a PEP 639 expression. The testing extra is removed;
development dependencies are dependency groups, e.g. uv sync, PR #156NoneValueDisallowed warning under python -OO, PR #158NotAttachedError, AlreadyAttachedError and AssignMultilineValueError
failing with an AttributeError under python -OO, PR #163NoneValueDisallowed message. It claimed that an option without a
value is written with an empty value, but the option is omitted since version 3.0.1,
PR #163add_before.option and add_after.option pass delimiter and
space_around_delimiters on to the new option instead of silently ignoring all
keyword arguments. Other keyword arguments now raise a TypeError, PR #163space_around_delimiters of an Option (also given
to add_before.option, add_after.option or Section.create_option) now
takes precedence over the syntax options of the ConfigUpdater, so False
writes key=value even with the default space_around_delimiters=True.
Option defaults to space_around_delimiters=None, i.e. it follows the
ConfigUpdater it belongs to: Option("key", "value") now writes
key=value into a ConfigUpdater(space_around_delimiters=False) instead of
key = value. Options created with section[key] = value or set keep
following the ConfigUpdater they are copied to, PR #166key in section, section.has_option(key) and
section.get(key) now apply optionxform to key, like section[key]
and ConfigParser do. With the default str.lower, "KEY" in section is now
True and section.get("KEY") returns the option instead of None, PR #153Section.set and ConfigUpdater.set keep the given spelling
when they create a new option, like section[key] = value does. For example,
updater.set("metadata", "Name", "x") now writes Name = x instead of
name = x, PR #153ConfigUpdater.set, get, has_option and remove_option apply
optionxform only once instead of transforming already transformed keys again,
PR #153update_file writing the file with the platform's default encoding instead
of the encoding it was read with. read and read_file remember the encoding
(read_file takes it from f.encoding), PR #165ConfigUpdater.read and Parser.read call io.text_encoding like
ConfigParser, so with -X warn_default_encoding the EncodingWarning points
to the caller (PEP 597), PR #165Option prepend_newline in set_values to optionally avoid new lines, issue #104
Option prepend_newline in set_values to optionally avoid new lines, issue #104
Fix square brackets in section names not being parsed, issue #122
Nothing published for this version
Preserve indentation of section when there are comments, issue #92
Preserve indentation of section when there are comments, issue #92
Prevent modifying multi-line values directly with value, issue #87
Prevent modifying multi-line values directly with value, issue #87
Added append method to Option for editing multi-line values
Added as_list method to Option to handle multi-line values more easily
Fix error when parsing unindented comments in multi-line values, issue #73
Fix error when parsing unindented comments in multi-line values, issue #73
Fix invalid string produced when allow_no_value = False, issue #68
Fix parsing error of indented comment lines, issue #25
Added type hinting, issue #16
Fix parsing error of indented comment lines, issue #25
Allow handling of raw section comment, issue #25
More unit testing of optionxform, issue #55
Allow sections/options to be copied from one document to the other, issue #47
New logo, issue #29
Whole API was rechecked by @abravalheri and changed for consistency, issue #19
Nothing published for this version
Nothing published for this version
Changes in parser, i.e. comments in multi-line option values are kept
Changes in parser, i.e. comments in multi-line option values are kept
Issue #14 is fixed
Parameter empty_lines_in_values is now activated by default and can be changed
Renamed sections_blocks to section_blocks for consistency
Renamed last_item to last_block for consistency
Added first_block
Reworked some internal parts of the inheritance hierarchy
Added remove to remove the current block
Added next_block and previous_block for easier navigation in section
Added fallback argument to ConfigUpdater.get, mirroring ConfigParser
Added fallback argument to ConfigUpdater.get, mirroring ConfigParser
Fix wrongly modifying input in Option.set_value, issue #11
Fix wrongly modifying input in Option.set_value, issue #11
Fix iterating over the items() view of a section, issue #8
Fix iterating over the items() view of a section, issue #8
Validate format on write by default (can be deactivated)
Validate format on write by default (can be deactivated)
Fixed issue #7 with mixed-case options
Fixed issue #7 with add_before/add_after problem
Fixed issue #7 with wrong duplicate mixed-case entries
Fixed issue #7 with duplicate options after add_after/before
More sane error message if read_file is misused
More sane error message if read_file is misused
Also run unit tests on Windows
Fix: Use \n instead of os.linesep where appropriate
Fix: Use \n instead of os.linesep where appropriate
Added GitHub and documentation links to the project's metadata
Added GitHub and documentation links to the project's metadata
Nothing published for this version
Nothing published for this version
Require Python >= 3.4 with python_requires
Require Python >= 3.4 with python_requires
Added an insert_at method at section level
Added an insert_at method at section level
Some internal code simplifications
- Added a to_dict() function
Added a to_dict() function
Allow for flexible comment character in comment(...)
Allow for flexible comment character in comment(...)
- First release
First release
First release
On this page
Changelog
Version 4.2 (unreleased)
Version 4.1.1
Version 4.1
Version 4.0.2
Version 4.0.1
Version 4.0
Version 3.2
Version 3.1.1
Version 3.1
Version 3.0.1
Version 3.0
Version 2.0
Version 1.1.3
Version 1.1.2
Version 1.1.1
Version 1.1
Version 1.0.1
Version 1.0
Version 0.3.2
Version 0.3.1
Version 0.3
Version 0.2
Version 0.1.1
Version 0.1
Nothing published for this version
Nothing published for this version
One column per quarter.