Repository navigation
varLib.interpolatable: normalize SciPy master indices - #4276
Merged
behdad merged 1 commit intoOct 10, 2026
Merged
Conversation
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.
SciPy's
minimum_spanning_treereturns NumPy row/column indices. These enterthe master graph and reach diagnostic
master_1_idx/master_2_idxvalues,causing
--jsonto raiseTypeError: Object of type int32 is not JSON serializable.Convert the indices to Python
intat graph insertion, following theSciPy-boundary conversion used for assignment results in #3526. Regression
coverage checks multi-hop, reordered-base, branched and discrete-axis graphs,
plus JSON output from the existing CFF2 variable-font fixture.
This addresses the JSON serialization part of #3870 only. It does not change
the spanning-tree topology or the kink/underweight comparison behavior.
Validation with non-editable wheels on Windows:
python -m pytest Tests fontTools: twice, 5415 passed, 13 skipped,2 xfailed on Python 3.13.1 with SciPy 1.16.3. Against the unmodified runtime,
the same suite has 5 new regression failures; all other outcomes match.
python -m pytest Tests/varLib/interpolatable_test.py: 19 passed, 1 skipped;repeated. The six new cases also pass twice on Python 3.11.16 with SciPy.
fonttools varLib.interpolatablecommands: compatible andincompatible designspaces, CFF2 variable fonts, JSON stdout/file output,
direct UFO input and invalid-input paths. No-SciPy fallback checked separately.
twine check,pip check, Black andgit diff --checkpass.Rendering, native/Cython builds, other operating systems and the full Python
3.11 suite were not tested. Black's notebook checks were skipped without Jupyter
dependencies; configured mypy checks only
plistlib, not this changed module.