From d08b4ec8a33db011baa04809d348231099d57b95 Mon Sep 17 00:00:00 2001 From: "Benjamin A. Beasley" Date: Thu, 16 Jul 2026 10:33:55 +0100 Subject: [PATCH] Avoid removed `glob.glob1` API; fixes RHBZ#2488354 --- 4133.patch | 41 +++++++++++++++++++++++++++++++++++++++++ fonttools.spec | 9 ++++++++- 2 files changed, 49 insertions(+), 1 deletion(-) create mode 100644 4133.patch diff --git a/4133.patch b/4133.patch new file mode 100644 index 0000000..6c27a8e --- /dev/null +++ b/4133.patch @@ -0,0 +1,41 @@ +From 3ad2c9564898d3cb4152482492a6d548b7b434ee Mon Sep 17 00:00:00 2001 +From: "Benjamin A. Beasley" +Date: Thu, 16 Jul 2026 10:27:17 +0100 +Subject: [PATCH] Avoid the undocumented `glob.glob1` API, removed in Python + 3.15 + +See https://docs.python.org/3.15/whatsnew/3.15.html#glob. + +See also https://docs.python.org/3.15/library/glob.html#glob.glob, which +notes that the `root_dir` keyword was added in Python 3.10. +--- + MetaTools/buildTableList.py | 2 +- + MetaTools/check_table_coverage.py | 2 +- + 2 files changed, 2 insertions(+), 2 deletions(-) + +diff --git a/MetaTools/buildTableList.py b/MetaTools/buildTableList.py +index b344f330f7..9bdd95642b 100755 +--- a/MetaTools/buildTableList.py ++++ b/MetaTools/buildTableList.py +@@ -12,7 +12,7 @@ + tablesDir = os.path.join(fontToolsDir, "Lib", "fontTools", "ttLib", "tables") + docFile = os.path.join(fontToolsDir, "Doc/source/ttx.rst") + +-names = glob.glob1(tablesDir, "*.py") ++names = glob.glob("*.py", root_dir=tablesDir) + + modules = [] + tables = [] +diff --git a/MetaTools/check_table_coverage.py b/MetaTools/check_table_coverage.py +index 5764daddb4..19ec986eb2 100644 +--- a/MetaTools/check_table_coverage.py ++++ b/MetaTools/check_table_coverage.py +@@ -141,7 +141,7 @@ + def get_table_modules() -> list[tuple[str, str]]: + """Return sorted list of (module_name, tag_raw) for all table .py files.""" + modules = [] +- for filename in glob.glob1(TABLES_DIR, "*.py"): ++ for filename in glob.glob("*.py", root_dir=TABLES_DIR): + name = filename[:-3] + try: + tag = identifierToTag(name) # may contain trailing spaces, e.g. "cvt " diff --git a/fonttools.spec b/fonttools.spec index 3036acf..be69cae 100644 --- a/fonttools.spec +++ b/fonttools.spec @@ -31,7 +31,7 @@ AFM and to an extent Type 1 and some Mac-specific formats.} Name: fonttools Version: 4.63.0 -Release: 5%{?dist} +Release: 6%{?dist} Summary: Tools to manipulate font files # https://spdx.org/licenses/MIT.html @@ -39,6 +39,10 @@ License: MIT URL: https://github.com/fonttools/fonttools/ Source: %{url}/archive/%{version}/fonttools-%{version}.tar.gz +# Avoid the undocumented `glob.glob1` API, removed in Python 3.15 +# https://github.com/fonttools/fonttools/pull/4133 +Patch: %{url}/pull/4133.patch + Requires: python3-fonttools = %{version}-%{release} Provides: ttx = %{version}-%{release} @@ -201,6 +205,9 @@ k="${k-}${k+ and }not (test_ttcompile_timestamp_calcs)" %doc NEWS.rst README.rst %changelog +* Thu Jul 16 2026 Benjamin A. Beasley - 4.63.0-6 +- Avoid removed `glob.glob1` API; fixes RHBZ#2488354 + * Wed Jul 15 2026 Fedora Release Engineering - 4.63.0-5 - Rebuilt for https://fedoraproject.org/wiki/Fedora_45_Mass_Rebuild