Compare commits
7 commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
9c933057a5 | ||
| b1ddfc7a67 | |||
|
|
cf76714eba | ||
| c53d97d231 | |||
| f5ef1f00bc | |||
|
|
5d312000eb | ||
| a81b0ff2a5 |
2 changed files with 14 additions and 60 deletions
|
|
@ -1,57 +0,0 @@
|
|||
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
|
||||
|
|
@ -3,13 +3,12 @@
|
|||
|
||||
Name: weasyprint
|
||||
Version: 69.0
|
||||
Release: 1%{?dist}
|
||||
Release: 2%{?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
|
||||
|
||||
|
|
@ -78,15 +77,27 @@ rm -rf %{buildroot}%{python3_sitelib}/%{modname}/tests
|
|||
%{python3_sitelib}/%{modname}/
|
||||
|
||||
%changelog
|
||||
* Thu Jun 04 2026 Felix Schwarz <fschwarz@fedoraproject.org> - 69.0-1
|
||||
* Fri Jul 17 2026 Fedora Release Engineering <releng@fedoraproject.org> - 69.0-2
|
||||
- Rebuilt for https://fedoraproject.org/wiki/Fedora_45_Mass_Rebuild
|
||||
|
||||
* Thu Jun 11 2026 Felix Schwarz <fschwarz@fedoraproject.org> - 69.0-1
|
||||
- update to 69.0
|
||||
|
||||
* Fri Jun 05 2026 Python Maint <python-maint@redhat.com> - 68.1-2
|
||||
- Rebuilt for Python 3.15
|
||||
|
||||
* Sat Feb 07 2026 Felix Schwarz <fschwarz@fedoraproject.org> - 68.1-1
|
||||
- update to 68.1
|
||||
|
||||
* Tue Jan 20 2026 Felix Schwarz <fschwarz@fedoraproject.org> - 68.0-1
|
||||
- update to 68.0
|
||||
|
||||
* Sat Jan 17 2026 Fedora Release Engineering <releng@fedoraproject.org> - 67.0-2
|
||||
- Rebuilt for https://fedoraproject.org/wiki/Fedora_44_Mass_Rebuild
|
||||
|
||||
* Wed Dec 03 2025 Felix Schwarz <fschwarz@fedoraproject.org> - 67.0-1
|
||||
- update to 67.0
|
||||
|
||||
* Fri Sep 19 2025 Python Maint <python-maint@redhat.com> - 66.0-3
|
||||
- Rebuilt for Python 3.14.0rc3 bytecode
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue