pypi / mt-940
mt-940
What changed in mt-940 5, from its official release notes, upgrade guides and advisories. Sources checked 2026-10-29.
1 breaking11 new APIs and options2 tooling14 fixes and other
See which of these apply to your code, ranked, in your agent:
npx @unstale/cli initmt-940 528 changes
Breaking changes 1
parse() and parse_statements() no longer pass options=None to a Transactions subclass with the 5.0.0 constructor.
New APIs and options 11
Enables
?31to be parsed into its own field again; the parsing fix is opt-in.Enables case-insensitive mark parsing; the parsing fix is opt-in.
Enables the floor-limit blank-mark parsing fix; it is opt-in.
Enables the GVC leading-text parsing fix; it is opt-in.
Prevents a structured
:86:from nulling the:61:customer reference; the parsing fix is opt-in.Enables parsing of non-SWIFT free text; the parsing fix is opt-in.
Makes
RCnegative; the parsing fix is opt-in.Enables BOM stripping; the parsing fix is opt-in.
Reads
:13D:offsets as hours and minutes; the parsing fix is opt-in.Removes the 585-character cap on
:86:; the parsing fix is opt-in.Switches on all parsing fixes that are otherwise opt-in through
mt940.Options.
Tooling 2
The source archive now includes the test suite, examples, documentation sources, and tool configuration, so tests can run from an sdist.
The build requirement now allows every uv_build release from 0.11.0 up to, but not including, 1.0, letting packagers and python -m build users build with newer uv releases.
Fixes and other changes 14
One-shot transaction_boundary iterables are now applied to every statement, not just the first.
Pickles written by 4.x now restore transaction_boundary, allowing parsing to work again.
A subclass's own pattern retains its full capture instead of being cut back to the 585-character cap.
Parsing no longer crashes when
:13:has no offset or a negative offset.Parsing no longer crashes when
:13D:has no offset or a negative offset.Two structured
:86:tags on one:61:no longer crash withNone += str.Amountinstances are hashable.Balanceinstances are hashable.Free-form lines in
:NS:values no longer abort parsing withre.error.Accepts file descriptors as sources again, raises
TypeErrorfor unsupported sources, and raisesFileNotFoundErrorfor missing path-like sources.Python 3.14 is supported.
SumAmountinstances are hashable.Raises the documented
RuntimeErrorfor unmatched values instead ofre.error.Returns
Nonerather than raising when a balance has no amount.