Repository navigation
Support pint 0.26 - #84
Merged
Merged
Conversation
pint 0.26.2 validates aliases at definition time (hgrecco/pint#1918), so the registry failed to load. The alias was never usable: pint parses i.U. as i * U.
pint 0.26.2 raises on unknown operators such as "[" (hgrecco/pint#1814) instead of silently skipping them, which ucumvert relied on to resolve atoms like [in_i] to their alias in pint_ucum_defs.txt. The string transformer also emitted m[IU], which earlier pint read as meter * IU.
pint 0.26.0 changed Quantity.__repr__ (hgrecco/pint#1495).
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
pint 0.26 made three changes that break ucumvert:
PintUcumRegistry()failed to load because of thei.U.alias. pint never resolved that alias, since it parses it asi * U.[now raise (Currency symbols $ € £ cannot be used hgrecco/pint#1814). ucumvert passed bracketed atoms like[in_i]to pint and relied on pint skipping the brackets. Both transformers and the mapping report generator now strip the brackets themselves, which also fixesUcumToPintStrTransformeremittingm[IU](read by pint as meter * IU instead of milli-IU).Quantity.__repr__changed (Quantity repr hgrecco/pint#1495), which only affected a CLI test.Code that passes bracketed UCUM atoms directly to a pint registry, e.g.
PintUcumRegistry()("[IU]")instead offrom_ucum("[IU]"), fails with pint 0.26 regardless of this change.The full suite passes with pint 0.25.3 and 0.26.2. The generated mapping report is unchanged.
Closes #82