python313Packages.fonttools: cherry-pick fix for Python 3.13.4 behavior change

K900 acd1fdac d77667ce

+31
+6
pkgs/development/python-modules/fonttools/default.nix
··· 39 hash = "sha256-ZkC1+I2d9wY9J7IoCGHGWG2gOVN7wW274UpN1lQxmJY="; 40 }; 41 42 build-system = [ 43 setuptools 44 setuptools-scm
··· 39 hash = "sha256-ZkC1+I2d9wY9J7IoCGHGWG2gOVN7wW274UpN1lQxmJY="; 40 }; 41 42 + patches = [ 43 + # https://github.com/fonttools/fonttools/pull/3855 44 + # FIXME: remove when merged 45 + ./python-3.13.4.patch 46 + ]; 47 + 48 build-system = [ 49 setuptools 50 setuptools-scm
+25
pkgs/development/python-modules/fonttools/python-3.13.4.patch
···
··· 1 + diff --git a/Lib/fontTools/feaLib/ast.py b/Lib/fontTools/feaLib/ast.py 2 + index efcce8c680..18e5a891d3 100644 3 + --- a/Lib/fontTools/feaLib/ast.py 4 + +++ b/Lib/fontTools/feaLib/ast.py 5 + @@ -719,7 +719,8 @@ def __init__(self, prefix, glyphs, suffix, lookups, location=None): 6 + for i, lookup in enumerate(lookups): 7 + if lookup: 8 + try: 9 + - (_ for _ in lookup) 10 + + for _ in lookup: 11 + + break 12 + except TypeError: 13 + self.lookups[i] = [lookup] 14 + 15 + @@ -777,7 +778,8 @@ def __init__(self, prefix, glyphs, suffix, lookups, location=None): 16 + for i, lookup in enumerate(lookups): 17 + if lookup: 18 + try: 19 + - (_ for _ in lookup) 20 + + for _ in lookup: 21 + + break 22 + except TypeError: 23 + self.lookups[i] = [lookup] 24 + 25 +