From c8cb064d13d0fccdcf08c876a8f989afd9c7326b Mon Sep 17 00:00:00 2001 From: Marc Foley Date: Wed, 6 Nov 2024 09:04:31 +0000 Subject: [PATCH 1/4] update python versions Drop 3.8 since it is end of life and add 3.13 --- .github/workflows/test.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 592787947..ced3eac93 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -36,7 +36,7 @@ jobs: strategy: fail-fast: false matrix: - python-version: ["3.8", "3.9", "3.10", "3.11"] + python-version: ["3.9", "3.10", "3.11", "3.13"] platform: [ubuntu-latest, windows-latest] steps: - uses: actions/checkout@v4 From 72176e83f0010247dc026e8e9e1397dfbd512e22 Mon Sep 17 00:00:00 2001 From: Marc Foley Date: Tue, 5 Nov 2024 15:57:18 +0000 Subject: [PATCH 2/4] fix pygit2 fail --- pyproject.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pyproject.toml b/pyproject.toml index 4b38a0716..e7203eb89 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -44,7 +44,7 @@ dependencies = [ 'unidecode', 'opentype-sanitizer', 'vttlib', - 'pygit2<=1.14.1', + 'pygit2==1.16.0', 'strictyaml', 'fontmake[json]>=3.3.0', 'skia-pathops', From b39fb25daa532bd7f2537a5c9141f3e8552173b2 Mon Sep 17 00:00:00 2001 From: Marc Foley Date: Wed, 6 Nov 2024 09:19:12 +0000 Subject: [PATCH 3/4] pyproject.toml: use diff versions of pygit2 depending on python version --- pyproject.toml | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/pyproject.toml b/pyproject.toml index e7203eb89..998bff063 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -44,7 +44,9 @@ dependencies = [ 'unidecode', 'opentype-sanitizer', 'vttlib', - 'pygit2==1.16.0', + # pygit2 1.16.0 only supports 3.10+ + 'pygit2==1.15.0; python_version < "3.13"', + 'pygit2==1.16.0; python_version >= "3.13"', 'strictyaml', 'fontmake[json]>=3.3.0', 'skia-pathops', From f42023b00e7e8a920007c98b08824b1f1794364c Mon Sep 17 00:00:00 2001 From: Marc Foley Date: Wed, 6 Nov 2024 10:22:56 +0000 Subject: [PATCH 4/4] packager: use id instead of hex attrib since hex is removed in pygit 1.16 --- Lib/gftools/packager/__init__.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Lib/gftools/packager/__init__.py b/Lib/gftools/packager/__init__.py index d571cc19b..1888bcb35 100644 --- a/Lib/gftools/packager/__init__.py +++ b/Lib/gftools/packager/__init__.py @@ -423,7 +423,7 @@ def traverse( tree = repo.get(tree_oid) try: entry = tree[subtree_name] - existing_subtree = repo.get(entry.hex) + existing_subtree = repo.get(entry.id) sub_treebuilder = repo.TreeBuilder(existing_subtree) except KeyError: sub_treebuilder = repo.TreeBuilder()