Skip to content

v2.0.0

Choose a tag to compare

@jodal jodal released this 08 Sep 13:25
· 504 commits to main since this release
v2.0.0

This release contains a couple of breaking changes, thus the version bump to 2.0.

Breaking changes

  • When a prefix looks valid but cannot be found in Biip's list of known GS1 Prefixes GS1Prefix.extract() now returns None instead of raising an exception. (Fixes: #93, PR: #94)
  • Following from the above, Gtin.prefix and Sscc.prefix can now be None. This makes it possible to parse and validate GTINs and SSCCs with prefixes missing from Biip's list of known GS1 Prefixes. (Fixes: #93, PR: #94)
  • The deprecated RCN region RcnRegion.BALTICS has been removed. Use ESTONIA, LATVIA, or LITHUANIA instead. (PR: #100)

Bug fixes

  • Parsing a GTIN-14 can no longer return the Rcn subclass. RCN is only defined for GTIN-8, GTIN-12, and GTIN-13. (PR: #96)
  • Rcn.without_variable_measure() no longer zeroes out digits from RCNs without variable measures. (PR: #97)

Changes

  • Added a no-op method Gtin.without_variable_measure() so that Gtin and Rcn instances can be used interchangeably in more cases. This should reduce the need for isinstance(gtin, Rcn) checks.
  • The RCN rules are now defined in a declarative data structure, making it a lot easier to contribute RCN rules for new geographical regions. (PR: #98)
  • Added FINLAND as a supported RCN region. (PR: #95)

If you're using Biip, please add yourself to the new list of users!