- Breaking: Drop support for Python < 3.11, the minimum supported version is now
Python 3.11, PR #150 - Add support for Python 3.15, PR #160
- Simplify type hints using Python 3.11 features (
typing.Self,X | Yunions)
and remove compatibility code for older Python versions, PR #150 - Add
add_before_skip_commentstoSectionfor inserting blocks before the
comments that directly precede a section, issue #117 - Fix
add_sectiongluing the new section header to the last line when the file
does not end with a newline, issue #126 - Fix
Nonebeing written as delimiter when assigning a value to an option that was
parsed without a value (allow_no_value), issue #141 - Port the option regexes of Python 3.15's
configparser(CPython gh-146333). The
old ones backtracked quadratically, so a long line with many spaces could stall
the parser for minutes, PR #161 - Fix navigating, detaching or inserting at the wrong position when a container holds
several equal comment or blank-line blocks, issue #140 del section[key](and thussection.pop(key)) now appliesoptionxform
likesection[key]does, PR #148- Document that a custom
optionxformmust be idempotent, PR #152 - Build with hatchling and hatch-vcs, with all metadata in
pyproject.toml. The
wheel is now taggedpy3-none-any(instead ofpy2.py3-none-any), and the
license is declared as a PEP 639 expression. Thetestingextra is removed;
development dependencies are dependency groups, e.g.uv sync, PR #156 - Complete the type annotations of the public API, now checked with mypy in strict
mode, and fix theNoneValueDisallowedwarning underpython -OO, PR #158 - Fix
NotAttachedError,AlreadyAttachedErrorandAssignMultilineValueError
failing with anAttributeErrorunderpython -OO, PR #163 - Correct the
NoneValueDisallowedmessage. 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 #163 add_before.optionandadd_after.optionpassdelimiterand
space_around_delimiterson to the new option instead of silently ignoring all
keyword arguments. Other keyword arguments now raise aTypeError, PR #163- Breaking: An explicit
space_around_delimitersof anOption(also given
toadd_before.option,add_after.optionorSection.create_option) now
takes precedence over the syntax options of theConfigUpdater, soFalse
writeskey=valueeven with the defaultspace_around_delimiters=True.
Optiondefaults tospace_around_delimiters=None, i.e. it follows the
ConfigUpdaterit belongs to:Option("key", "value")now writes
key=valueinto aConfigUpdater(space_around_delimiters=False)instead of
key = value. Options created withsection[key] = valueorsetkeep
following theConfigUpdaterthey are copied to, PR #166 - Breaking:
key in section,section.has_option(key)and
section.get(key)now applyoptionxformtokey, likesection[key]
and ConfigParser do. With the defaultstr.lower,"KEY" in sectionis now
Trueandsection.get("KEY")returns the option instead ofNone, PR #153 - Breaking:
Section.setandConfigUpdater.setkeep the given spelling
when they create a new option, likesection[key] = valuedoes. For example,
updater.set("metadata", "Name", "x")now writesName = xinstead of
name = x, PR #153 ConfigUpdater.set,get,has_optionandremove_optionapply
optionxformonly once instead of transforming already transformed keys again,
PR #153- Fix wrong code examples in the usage guide and the README, which are now tested,
PR #164 - Fix
update_filewriting the file with the platform's default encoding instead
of the encoding it was read with.readandread_fileremember the encoding
(read_filetakes it fromf.encoding), PR #165 ConfigUpdater.readandParser.readcallio.text_encodinglike
ConfigParser, so with-X warn_default_encodingtheEncodingWarningpoints
to the caller (PEP 597), PR #165