diff --git a/weasyprint-remove-pillow-12-requirement.patch b/weasyprint-remove-pillow-12-requirement.patch new file mode 100644 index 0000000..ef21cb9 --- /dev/null +++ b/weasyprint-remove-pillow-12-requirement.patch @@ -0,0 +1,57 @@ +revert upstream commit 9a3ef379 to support pillow < 12.1 again + +diff --git a/pyproject.toml b/pyproject.toml +index fdacf37..8c55cc0 100644 +--- a/pyproject.toml ++++ b/pyproject.toml +@@ -52,7 +52,7 @@ Donation = 'https://opencollective.com/courtbouillon' + + [project.optional-dependencies] + doc = ['sphinx', 'furo'] +-test = ['pytest', 'ruff', 'Pillow >=12.1.0'] ++test = ['pytest', 'ruff'] + + [project.scripts] + weasyprint = 'weasyprint.__main__:main' +diff --git a/tests/draw/__init__.py b/tests/draw/__init__.py +index 9464910..7b10948 100644 +--- a/tests/draw/__init__.py ++++ b/tests/draw/__init__.py +@@ -134,4 +134,4 @@ def html_to_pixels(html): + def document_to_pixels(document): + """Render an HTML document to PNG, check its size and return pixel data.""" + image = Image.open(io.BytesIO(document.write_png())) +- return image.width, image.height, image.get_flattened_data() ++ return image.width, image.height, image.getdata() +diff --git a/tests/test_acid2.py b/tests/test_acid2.py +index 14234c7..d182cab 100644 +--- a/tests/test_acid2.py ++++ b/tests/test_acid2.py +@@ -23,12 +23,12 @@ def test_acid2(assert_pixels_equal): + intro_page, test_page = document.pages + # Ignore the intro page: it is not in the reference + test_png = document.copy([test_page]).write_png() +- test_pixels = Image.open(io.BytesIO(test_png)).get_flattened_data() ++ test_pixels = Image.open(io.BytesIO(test_png)).getdata() + + # This is a copy of https://www.webstandards.org/files/acid2/reference.html + ref_png = render('acid2-reference.html').write_png() + ref_image = Image.open(io.BytesIO(ref_png)) +- ref_pixels = ref_image.get_flattened_data() ++ ref_pixels = ref_image.getdata() + width, height = ref_image.size + + assert_pixels_equal(width, height, test_pixels, ref_pixels, tolerance=2) +diff --git a/tests/test_api.py b/tests/test_api.py +index 57871a1..65dd0de 100644 +--- a/tests/test_api.py ++++ b/tests/test_api.py +@@ -301,7 +301,7 @@ def check_png_pattern(assert_pixels_equal, png_bytes, x2=False, blank=False, + ''' + image = Image.open(io.BytesIO(png_bytes)) + width, height, pixels = parse_pixels(expected_pixels) +- assert_pixels_equal(width, height, image.get_flattened_data(), pixels) ++ assert_pixels_equal(width, height, image.getdata(), pixels) + + + @assert_no_logs diff --git a/weasyprint.spec b/weasyprint.spec index d5a01df..e83722c 100644 --- a/weasyprint.spec +++ b/weasyprint.spec @@ -3,12 +3,13 @@ Name: weasyprint Version: 69.0 -Release: 2%{?dist} +Release: 1%{?dist} Summary: Utility to render HTML and CSS to PDF License: BSD-3-Clause URL: https://weasyprint.org Source0: %{pypi_source weasyprint} +Patch1: weasyprint-remove-pillow-12-requirement.patch BuildArch: noarch @@ -77,27 +78,15 @@ rm -rf %{buildroot}%{python3_sitelib}/%{modname}/tests %{python3_sitelib}/%{modname}/ %changelog -* Fri Jul 17 2026 Fedora Release Engineering - 69.0-2 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_45_Mass_Rebuild - -* Thu Jun 11 2026 Felix Schwarz - 69.0-1 +* Thu Jun 04 2026 Felix Schwarz - 69.0-1 - update to 69.0 -* Fri Jun 05 2026 Python Maint - 68.1-2 -- Rebuilt for Python 3.15 - * Sat Feb 07 2026 Felix Schwarz - 68.1-1 - update to 68.1 * Tue Jan 20 2026 Felix Schwarz - 68.0-1 - update to 68.0 -* Sat Jan 17 2026 Fedora Release Engineering - 67.0-2 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_44_Mass_Rebuild - -* Wed Dec 03 2025 Felix Schwarz - 67.0-1 -- update to 67.0 - * Fri Sep 19 2025 Python Maint - 66.0-3 - Rebuilt for Python 3.14.0rc3 bytecode