Skip to content

Releases: jodal/biip

v3.1.0

09 Oct 08:48
v3.1.0
Compare
Choose a tag to compare

Changes

  • Drop support for Python 3.7, as it reached end-of-life this summer. (#207)
  • Add Python 3.12 to the test matrix. (#232)
  • Tooling: Type check with pyright in addition to mypy, and fix all typing issues indicated by pyright. (#186)
  • Tooling: Replace flake8 and all flake8 plugins with ruff. (#184)

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

v3.0.0

19 Dec 00:17
v3.0.0
Compare
Choose a tag to compare

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

Breaking changes

  • Parsing and validation errors of GLNs, GTINs, and SSCCs nested inside GS1 Element Strings no longer raises ParseError. Instead, the exception message is exposed on the GS1ElementString class as the new fields gln_error, gtin_error, and sscc_error. This is a breaking change, but makes it possible to extract some information from GS1 Element Strings that are not entirely valid. (Fixes: #157, PR: #169)
  • Remove RcnRegion.from_iso_3166_1_numeric_code() class method which as been deprecated since Biip 2.2. (Fixes: #161, PR: #166)

GS1 Company Prefix support

  • Add GS1CompanyPrefix class that can extract the company prefix from any GLN, GTIN, or SSCC. This is based on a data set from GS1 that is bundled with Biip, just like the GS1 Prefixes and GS1 Application Identifiers. The data set is preprocessed into a trie data structure, making company prefix length lookups fast. (Fixes: #160, PR: #172)
  • Add and set company_prefix fields on the Gln, Gtin, and Sssc classes, based on the new GS1CompanyPrefix class. (Fixes: #160, PR: #174)
  • Change Sscc.as_hri() to use GS1CompanyPrefix to automatically group the company prefix and the serial when rendering SSCC's for human consumption. The existing company_prefix_length parameter is now only used as an override in case you're rendering an SSCC whose company prefix is not included in the data set yet, or where you disagree with the data set. (Fixes: #160, PR: #173)

Other changes

  • Add rcn_verify_variable_measure parameter to all functions and methods taking rcn_region as a parameter. The parameter defaults to True and the old behavior. By setting this parameter to False, it is possible to parse and extract variable measure from RCNs that have separate check digit for the variable measure, but where the check digit is either incorrect or simply not in use as a check digit. This parameter only has any effect on RCN regions with formats including check digits, e.g. Great Britain and Germany. (PR: #171)
  • Update the bundled GS1 Application Identifier definitions. (PR: #164)
  • Update the bundled GS1 Prefix definitions, and add script to automate future updates. (PR: #165)
  • Add Python 3.11 to the test matrix, and updated development tooling. (PR: #163)

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

v2.3.0

02 Nov 08:28
v2.3.0
Compare
Choose a tag to compare

Changes

  • Add support for parsing GS1 Human Readable Interpretation (HRI) strings. HRI strings is the text typically printed below or next to GS1 element string barcodes. (PR: #155 and #156)
  • Update the bundled GS1 Application Identifier definitions.

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

v2.2.4

22 Sep 11:38
v2.2.4
Compare
Choose a tag to compare

Bug fixes

  • Fix crash on parsing of zero-prefixed RCNs. (PR: #150)

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

v2.2.3

19 Sep 11:02
v2.2.3
Compare
Choose a tag to compare

Bug fixes

  • Fix crash in decimal parsing of GS1 Message. Some GS1 AI patterns allow a group to be empty. Biip tried to parse these as decimal numbers without checking if it had anything to parse first, causing a crash. (PR: #149)

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

v2.2.2

12 May 10:00
v2.2.2
Compare
Choose a tag to compare

Bug fixes

  • Fix crash if input is numerical but not decimal, and thus fails conversion to integers. (PR: #143)

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

v2.2.1

03 Mar 11:29
v2.2.1
Compare
Choose a tag to compare

Bug fixes

  • Fix .without_variable_measure() for 14-digit RCNs. This bug was introduced in the RCN refactoring in Biip 2.2.0. (PR: #132)

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

v2.2.0

14 Feb 16:24
v2.2.0
Compare
Choose a tag to compare

Changes

  • Drop Python 3.6 support, as it has reached end-of-life. This is not considered a breaking change as Python 3.6 users will get the previous release when install Biip. (PR: #118)
  • Deprecate RcnRegion.from_iso_3166_1_numeric_code() as this functionality is deemed out of scope for Biip. The method will be removed in Biip 3.0. (PR: #130)
  • RCN: Add support for extracting weight/price/count and normalizing RCNs from:

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

v2.1.0

05 Oct 21:20
v2.1.0
Compare
Choose a tag to compare

Changes

  • Add support for parsing and validating Global Location Numbers (GLNs). This also includes GLNs embedded in GS1 Element Strings. (PR: #108)
  • Add Python 3.10 to the test matrix. (PR: #105)

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

v2.0.0

08 Sep 13:25
v2.0.0
Compare
Choose a tag to compare

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!