Avoid removed glob.glob1 API; fixes RHBZ#2488354
This commit is contained in:
parent
7d9e64af76
commit
d08b4ec8a3
2 changed files with 49 additions and 1 deletions
41
4133.patch
Normal file
41
4133.patch
Normal file
|
|
@ -0,0 +1,41 @@
|
|||
From 3ad2c9564898d3cb4152482492a6d548b7b434ee Mon Sep 17 00:00:00 2001
|
||||
From: "Benjamin A. Beasley" <code@musicinmybrain.net>
|
||||
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 "
|
||||
|
|
@ -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 <code@musicinmybrain.net> - 4.63.0-6
|
||||
- Avoid removed `glob.glob1` API; fixes RHBZ#2488354
|
||||
|
||||
* Wed Jul 15 2026 Fedora Release Engineering <releng@fedoraproject.org> - 4.63.0-5
|
||||
- Rebuilt for https://fedoraproject.org/wiki/Fedora_45_Mass_Rebuild
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue