From a17f3d460a0f24d6f58d326d9f68fbc605fe49fd Mon Sep 17 00:00:00 2001 From: Cosimo Lupo Date: Mon, 15 Jan 2024 16:17:22 +0000 Subject: [PATCH 1/2] don't restrict lxml<5, and run tests with latest 5.1.0 Fixes https://github.com/fonttools/fonttools/issues/3418 --- requirements.txt | 2 +- setup.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/requirements.txt b/requirements.txt index 827bbc820..2a56ea8f9 100644 --- a/requirements.txt +++ b/requirements.txt @@ -16,5 +16,5 @@ pyobjc==10.1; sys_platform == "darwin" freetype-py==2.4.0 uharfbuzz==0.37.3 glyphsLib==6.6.0 # this is only required to run Tests/varLib/interpolatable_test.py -lxml==4.9.3 +lxml==5.1.0 sympy==1.12 diff --git a/setup.py b/setup.py index 302e9b765..1d360e030 100755 --- a/setup.py +++ b/setup.py @@ -97,7 +97,7 @@ extras_require = { # for fontTools.misc.etree and fontTools.misc.plistlib: use lxml to # read/write XML files (faster/safer than built-in ElementTree) "lxml": [ - "lxml >= 4.0, < 5", + "lxml >= 4.0", ], # for fontTools.sfnt and fontTools.woff2: to compress/uncompress # WOFF 1.0 and WOFF 2.0 webfonts. From b8b1bc4341410adf9839ce0630f524cef532a3ae Mon Sep 17 00:00:00 2001 From: Cosimo Lupo Date: Mon, 15 Jan 2024 17:10:11 +0000 Subject: [PATCH 2/2] path_test: fix parsing xml declaration the latest lxml.etree.fromstring complains with syntax error when the xml declaration contain 'standalone' but does not contain encoding, apparently the xml declaration attributes have predefined order --- Tests/svgLib/path/path_test.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/Tests/svgLib/path/path_test.py b/Tests/svgLib/path/path_test.py index 0b82193dd..c92ca6801 100644 --- a/Tests/svgLib/path/path_test.py +++ b/Tests/svgLib/path/path_test.py @@ -7,7 +7,7 @@ from tempfile import NamedTemporaryFile SVG_DATA = """\ - + -""" +""".encode( + "utf-8" +) EXPECTED_PEN_COMMANDS = [ ("moveTo", ((100.0, 100.0),)),