All notable changes to this project will be documented in this file.
The format is based on Keep a Changelog, and this project adheres to Semantic Versioning.
- TYP: distinguish read-only input and mutable output types in public interface
- TYP: fix type annotations to inifix.load and inifix.dump's first argument
- TYP: stop running basedpyright in CI as unsustainable
- TYP: run type checkers on test suite
- DEP: support for Python 3.10 has been dropped
- RFC: the CLI backing up pre-commit hooks is now published to PyPI as a separate package. Future developments in that package will not appear in this changelog.
- Breaking: pre-commit hooks are now discontinued in the historical repository.
Users needs to migrate to
https://github.com/la-niche/inifix-pre-commit
- TST: add support for CPython's experimental JIT compiler
- TST: add support for CPython 3.15 (alpha)
- TST: ensure utf-8 encoding is explicitly used everywhere
- TYP: add preliminary support for type-checking with
ty - ENH: (pre-commit hooks) in CPython 3.15 and newer,
inifix format --diff's output will now use color by default (unlessNO_COLOR=1is set) - ENH: (pre-commit hooks) add a
--no-colorflag toinifix format - DEP: (pre-commit hooks) drop dependency on
typer, useclickdirectly instead - DOC: fix incorrect language spec for py-console code blocks
- DOC: add badge showing Python versions supported in the most recent release
- BUG: fix error reporting in
inifix formatpre-commit hook
- BLD: use a minimal build backend (
flit-core) forinifix-cli. This only affects installing the repo's pre-commit hooks, and should reduce the chance of it breaking without maintenance. - ENH: validation now reports as many problems as possible instead of just the first one it finds
- ENH: add a
--sectionsargument toinifix-clicommands (pre-commit)
BLD: ensure conftest.py is included in source distributions
- API:
inifix's command line interfaces (inifix-validateandinifix-format) were removed from theinifixpackage and now exist as a separate, private packageinifix-cli, which is still used under the hood byinifix's pre-commit hooks. - API: all submodules are now explicitly marked as private. The only public
namespace is
inifix. - TST: test against oldest versions of dependencies
- TYP: add basedpyright to type checking test matrix
- TST: check pre-commit hooks' stability continuously
- TYP: prefer absolute forward references and avoid
__future__.annotations - TYP: ensure type annotations of the IO API are accessible at runtime in Python 3.14
TYP: complete partially unknown type information
BUG: restore IDEs' ability to obtain IO API docstrings by avoiding dynamic string interpolations
- TYP: add missing
__all__symbol to inifix's root namespace - TYP: fix errors reported by
pyright - ENH: add
inifix.__version_tuple__ - ENH: add sections-mode selection to
inifix.validate_inifile_schema - ENH: expose sections-mode selection in IO API
- TYP: narrow return type of
inifix.loadandinifix.loadsfollowingparse_scalars_as_listsandsectionsarguments - TYP: systematically typecheck with pyright as well as mypy
- DOC: add narrative docs for sections argument and type narrowing
- PERF: delay most costly import statements until they are needed
- CLN: cleanup unused future imports
- TST: add support for Python's optimized mode
- TST: validate inifix's pre-commit hooks continuously
- TST: test against CPython 3.14-dev
- BLD: include tests dir in source distributions
- DOC: add conda-forge badge to
README.md
BUG: fix CPU counting on Linux + Python <=3.12
- this address an edge case where the main process isn't allowed to utilize all CPUs
- the bug cannot be fixed for platforms other than Linux and on Python <3.13
- it is completely fixed on Python >=3.13
BUG: fix a crash in inifix-format on single-core machines
-
in version 4.5.0,
inifix.loadandinifix.loadsused to cast any integer-compatible string (e.g.'1.0','1.'or'1e0') as a Pythonint. They now read these as Pythonfloats by default. The previous behavior is still available as an opt-in, using the new argumentinteger_parsing='aggressive'. Strings such as'123'(without a'.', an'e'or an'E') are still parsed as Pythonints in all cases. -
restrict special "bool-like" unescaped strings to lower, upper, or title cases. This means that for instance
true,TRUEorTrueare still parsed as the Python booleanTrue, but e.g.TruEisn't. -
add and document
inifix.format_string, replacing previously undocumentedinifix.iniformat(still available for backward compatibility, but now deprecated)
- fix a corner case where data would be lost on dump for empty string values
- fix bugs around decoding supported bool values
- MNT: drop support for CPython 3.9
- TST: test against CPython 3.13 (both GIL flavor and free-threading flavor)
- TST: setup concurrency testing
- PERF:
inifix-format(and the associated pre-commit hook) now runs on multiple threads. The performance gain is modest on stable versions of Python (as of 3.12), but expected to get more significant in the future (PEP 703).
- DOC: illustate how to write type-safe applications of
inifix.load - ENH:
inifix-format(and pre-commit hook) now validates that formatted data compares identical to unformatted data (unless--skip-validationis passed)
BUG: fix a bug where inifix-format --diff would print extraneous trailing newlines
BUG: fix a confusing error message in validation routine for invalid iterable data
- BLD: drop support for CPython 3.8
- TST: add support for CPython 3.12
- DOC: fix a undesired asymmetry in usage example
- DEP: drop more-itertools as a dependency
- DOC: update link to Idefix
- MNT: migrate to src layout
BUG: fix type casting bugs affecting integers and strings
PERF: speedup parsing (take 3) This version is overall ~3x faster than inifix 4.1.0, and ~15% faster than inifix 4.3.0
- ENH: implement --skip-validation for inifix-format CLI
- DOC: improve documentation for pre-commit hooks and validation-skipping options
PERF: optimize parsing speed (reduce reading overhead by an additional 5%)
BUG: fix a regression (in 4.2.0) where signed floats were interpreted as strings
PERF: optimize parsing speed (reduce reading overhead by 60%)
- ENH: allow skipping validation in IO operations
- ENH: allow special character '.' in parameter names
TST: use requirement files instead of optional dependencies for tests and type checking
Installing with extra targets ([test] and [typecheck]) isn't supported anymore.
- ENH: optimize startup time
- ENH: add option to load scalars as single-element lists
This release contains a small, yet breaking change: in previous versions of
inifix, t and f were read as booleans. This feature was never documented
and was never supported in Idefix. Meanwhile, Idefix (dev) now supports reading
yes and no as booleans, so inifix will now also automatically parse these
special strings to booleans.
ENH: add support for binary IO
All internal IO operations are now performed in binary mode whenever possible, assuming UTF-8 encoding.
BUG: fix a regression (inifix 2.2.0) where inifix.dump was able to write to a file even if user doesn't have permission to.
- BUG: fix a critical bug in parsing lines with interleaved quoted strings and other types
- BUG: fix casting for numeric str
- ENH: file writing operations are now atomic
- BUG: fix a bug where formatting would affect spacing within quoted str values
- BUG: fix a bug where strings containing spacing would be dumped without correct quotes, making them appear as multiple separate values
- BUG: fix a bug where special strings 'true', 't', 'false' and 'f' would decay to boolean after two parsing cycles
- BUG: fix import * for inifix.io (add loads and dumps)
BUG: fix a bug where string values containing whitespaces would incorrectly be split
inifix-format now won't report noop by default when files are already formatted.
It can be turned on again with the --report-noop flag.
This makes the associated pre-commit hook much less verbose.
The format enforced by inifix-format was changed to improve compacity and readability. The new format is designed to be closer to manual formatting that is actually performed by Idefix users and contributors.
This is considered a major version change because the --name-column-size CLI
flag and its corresponding keyword argument from inifix.format.iniformat were
removed.
The API is otherwise identical to version 1.2.1
BUG: fix section invalidation
- ENH: add two functions to the public API to read from and write to strings (
inifix.loadsandinifix.dumps) - BUG: use more conservative rules in int/float casting rules to better match Idefix's reading routines.
ENH: inifix-format now produces more compact files, with fewer empty lines. PR #98
BUG: don't try to be clever with cumulative retcodes to avoid retcode overflow PR #97
TYP: add py.typed marker file to improve downstream type-checking PR #94
TYP: improve type-correctness PR #93
The API is now declared stable and any future intentionally breaking change will follow a deprecation cycle.
- DEPR: drop support for Python 3.6 and 3.7, inifix now requires Python 3.8 or newer
- DEPR: end deprecation cycle for function arguments marked as "future-potisional-only"
- ENH: simplify internal logic (remove a non-user facing class, InifixConf)
- TYP: add mypy conf, add missing type annotations
BUG: fix formatting for files with only sections and comments (no parameters) PR #90
BUG: pretty print warnings from iniformat so they don't look as bad from the CLI PR #89
ENH: replace --inplace option in inifix-format with a --diff option
PR #87
- ENH: expose name column length parameter to users in inifix-format PR #73
- BUG: fix formatter behaviour PR #83
BUG: fix a bug in str casting PR #80
ENH: improve schema validation and add a file validation pre-commit hook PR #74
This version is identical to 0.7.0 except that FutureWarnings are now raised for
api calls using future positional-only arguments using the keyword syntax.
This version is identical to 0.6.0 except that it's compatibly for Python 3.6 to 3.10. Positional-only arguments are not specified any more because their are not available for Python versions earlier than 3.8 Warnings may be added in a following version to discourage usage of keyword syntax for these arguments.