Repository navigation
Exclude incomplete fonttools 4.69.0 release from uv resolution - #734
Merged
Merged
Conversation
tompollard
added a commit
that referenced
this pull request
Nov 25, 2026
## Problem `processing.compare_annotations` subtracts NumPy sample-position scalars before taking their absolute difference. Unsigned subtraction can wrap when a nearby detection follows the reference, while a signed difference spanning the `int64` range can overflow. Large `uint64` offsets can also lose the intended small difference. This affects the public comparison API. For unsigned reference positions `[100, 200]` and detections `[101, 201]`, a five-sample window should match both pairs. ## Change Convert NumPy integer scalars to Python integers before subtracting, at all three sample-difference sites in `Comparitor`. After review, sorted-order validation also compares adjacent values directly instead of subtracting, and validates each input independently. Floating-point inputs are not truncated. The matching order and tie-breaking logic are unchanged. Add eighteen regressions covering unsigned types, large offsets, early/late detections, an extreme signed span, a fractional-distance control and input immutability. Add a changelog fragment. This is separate from #606's one-to-one matching correction and #566's empty-input statistics handling. ## Validation Python 3.12.16. The branch now merges upstream main `192465c645f02fb3b94c0989bef82fa1d74fc576`, including #734's dependency exclusion. The complete downloaded source tree at `d40be3a13228d72f71b3f7ed50d10e3fb10f32f2` byte-matches the tested current-main-plus-fix tree (same files and bytes). This is a merge update, not a history rewrite. - Original ten-case file against current upstream without this PR: 7 failed, 3 passed. - Expanded eighteen-case file against the first published revision: 6 failed, 12 passed, including two-element signed-extrema and descending-unsigned constructor cases. - Regression file plus processing and HR tests on current upstream with the patch: 234 passed. - Full available offline suite on that tree: 848 passed, 4 skipped because the external WFDB `bxb` utility is not installed, 21 network tests deselected. - Pinned Ruff 0.17.3 check and format passed for the changed Python files. - Strict Sphinx 9.0.4 HTML build (`-W --keep-going -E`) passed. An additional 4,000 randomized comparisons on the earlier `98df2c9` base preserved the matching results after translating small sorted inputs into unsigned and large signed integer ranges. This is a differential check, not proof that the matching algorithm is globally optimal. Other private fixes were not applied. The network suite, other Python/dependency versions and remote CI were not run for this change. Prepared and tested with AI assistance; no independent human review is claimed. CI note after review: the pre-refresh final-head workflow failed (13 jobs failed, four passed). The inspected Ubuntu Python 3.12 log stopped before tests because `fonttools==4.69.0` had no compatible distribution. Upstream #734 excludes that incomplete release; this branch now includes that upstream fix. This establishes the cause for the inspected job only. Fresh local offline validation on the refreshed tree passed 848 tests, with the same four skips and 21 network exclusions. New-head CI and maintainer re-review remain pending.
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.
Summary
Exclude
fonttools4.69.0 from uv's dependency resolution. That release currently has only CPython 3.11 Linux/macOS wheels and no source distribution, so most CI matrix jobs fail duringuv rundependency installation before pytest starts. Version 4.68.0 has a source distribution and wheels for the supported environments.Use an exact-version exclusion under
[tool.uv]so a later complete release remains eligible. This does not addfonttoolsas a direct runtime dependency.Validation
uv lock --python 3.12selectedfonttools4.68.0.uv runinstalled the dependencies and passedtests/test_processing.py: 151 passed.git diff --checkpassed.Remove the exclusion once the upstream release is repaired or superseded by a complete version.