Releases: jodal/biip
Releases · jodal/biip
v3.1.0
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
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 theGS1ElementString
class as the new fieldsgln_error
,gtin_error
, andsscc_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 theGln
,Gtin
, andSssc
classes, based on the newGS1CompanyPrefix
class. (Fixes: #160, PR: #174) - Change
Sscc.as_hri()
to useGS1CompanyPrefix
to automatically group the company prefix and the serial when rendering SSCC's for human consumption. The existingcompany_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 takingrcn_region
as a parameter. The parameter defaults toTrue
and the old behavior. By setting this parameter toFalse
, 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
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
v2.2.3
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
v2.2.1
v2.2.0
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
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 returnsNone
instead of raising an exception. (Fixes: #93, PR: #94) - Following from the above,
Gtin.prefix
andSscc.prefix
can now beNone
. 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. UseESTONIA
,LATVIA
, orLITHUANIA
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 thatGtin
andRcn
instances can be used interchangeably in more cases. This should reduce the need forisinstance(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!