- Drop support for Python 3.4, which has reached end of life.
- Python 3.7 is now explicitly supported. No changes was required to the library, but the test suite now runs on Python 3.4, 3.5, 3.6, and 3.7.
- Require attrs >= 17.4, and replace all use of the deprecated keyword argument
converterso that netsgiro can continue working with attrs relases after January 2019.
- Format code with Black.
Record parsing and writing are now tested with an additional suite of property based tests, using the Hypothesis library. This testing effort identified a number of issues, all of which are fixed by this release.
Fixed exception in
Fixed exception in
ValueErrorif a too long string is used for any of:
netsgiro.records.TransactionAmountItem1.kid(max 25 chars)
netsgiro.records.TransactionAmountItem3.text(max 40 chars)
netsgiro.records.TransactionSpecification.text(max 40 chars)
netsgiro.records.AvtaleGiroAgreement.kid(max 25 chars)
Previously the string was accepted and the record generated invalid OCR data.
Strip newline characters (
\r) from record strings, like
Previously the newline characters were accepted and the record generated invalid OCR data.
netsgiro.records.TransactionSpecification.textto 40 chars, so that a manually created record and a record parsed from OCR are identical.
No changes from v1.0.0a3, which has been used in production for a few weeks without any issues.
- When writing record to OCR, cut
netsgiro.records.TransactionAmountItem2.payer_nameto 10 first chars, as that is all the field has room for.
Major improvements and changes.
- The objects API now supports parsing all known file variants with
netsgiro.parse()and can recreate the parsed OCR data perfectly with
- The objects API now does all the bookkeeping necessary for building payment requests. With this improvement, the code necessary to produce a payment request is cut to from around 100 to 25 lines of code.
- New quickstart guide shows how to parse files and build payment requests.
- All public methods and fields of both the objects API and records API are now documented.
- The low-level records API has been moved to the
Initial alpha release. No promises about backwards compatibility.