hgrecco
pint
Blog
Docs
Changelog
Blog
Docs
Changelog
Overview
Branches
Benchmarks
Runs
Performance History
Latest Results
Shorten find_connected_nodes comment to link the issue
lilu5458:fix-find-connected-nodes-recursion
18 days ago
Document that Quantity(value, unit) beats string/multiply construction (#2384) * Document that (magnitude, unit) construction beats string/multiply Add a benchmarked comparison to the Optimizing Performance guide: Q_(value, "unit") vs Q_("value unit") vs value * ureg.unit, per #1873. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com> * Simplify Fraction-exponent FAQ wording * Trim redundant float-exponent example from FAQ --------- Co-authored-by: Claude Sonnet 5 <noreply@anthropic.com>
master
20 days ago
Fix RecursionError in find_connected_nodes for deeply chained graphs find_connected_nodes used unbounded recursion to traverse the context dimension graph, recursing once per unvisited adjacent node. A linear chain longer than sys.getrecursionlimit() (default 1000) raised an uncaught RecursionError out of the public API when contexts were enabled and get_compatible_units was called (CWE-674 denial of service). Replace the recursion with an iterative DFS using an explicit stack, producing identical results without any depth limit. This is the same class of issue fixed in _build_eval_tree (#2376).
lilu5458:fix-find-connected-nodes-recursion
21 days ago
Merge remote-tracking branch 'origin/master' into codex/application-registry-getitem-warning
therealclvn:codex/application-registry-getitem-warning
22 days ago
fix(formatter): do not raise on Fraction unit exponents Formatting a Unit or Quantity whose exponent is a fractions.Fraction (as produced by a registry created with non_int_type=Fraction) raised ValueError: Invalid format specifier 'n' for object of type 'Fraction', because both the default exp_call and pretty_fmt_exponent format the exponent with the 'n' spec, which Fraction.__format__ rejects. Exponent formatting now goes through fmt_exponent_number(), which falls back to str() for types that do not accept 'n'. The pretty formatter maps the resulting '/' to the superscript slash already used by pretty_fmt_exponent_fraction. Float and int exponents are unchanged. Adds a regression test in pint/testsuite/test_formatter.py.
Sanjays2402:fix/format-fraction-exponent
23 days ago
Trim redundant float-exponent example from FAQ
andrewgsavage:fix/1873-performance-docs
24 days ago
Localize units whose pint name differs from the CLDR identifier format_babel returned the raw pint name for units such as kilowatt_hour ("kilowatt_hour" instead of "kilowatt-heure"). localize_unit_name passed the pint unit name straight to babel's _find_unit_pattern, which only knows CLDR identifiers, so any unit listed in pint's own _babel_units mapping (kilowatt_hour, light_year, mph, ...) fell through to the untranslated name. localize_unit_name now retries the lookup through _babel_units when the direct lookup finds nothing. Units whose pint name already matches a CLDR identifier are unaffected. Closes #2234
Sanjays2402:fix/babel-localize-pint-specific-unit-names
24 days ago
Document that (magnitude, unit) construction beats string/multiply Add a benchmarked comparison to the Optimizing Performance guide: Q_(value, "unit") vs Q_("value unit") vs value * ureg.unit, per #1873. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
andrewgsavage:fix/1873-performance-docs
24 days ago
Latest Branches
CodSpeed Performance Gauge
0%
Fix RecursionError in find_connected_nodes for deeply chained graphs
#2388
18 days ago
a345fcb
lilu5458:fix-find-connected-nodes-recursion
CodSpeed Performance Gauge
0%
Warn on application registry getitem
#2338
22 days ago
eb95d7e
therealclvn:codex/application-registry-getitem-warning
CodSpeed Performance Gauge
0%
fix(formatter): do not raise on Fraction unit exponents
#2387
23 days ago
3a5d16b
Sanjays2402:fix/format-fraction-exponent
© 2026 CodSpeed Technology
Home
Terms
Privacy
Docs