summaryrefslogtreecommitdiff
path: root/dev-python/pypdf
diff options
context:
space:
mode:
authorV3n3RiX <venerix@koprulu.sector>2024-01-30 17:49:05 +0000
committerV3n3RiX <venerix@koprulu.sector>2024-01-30 17:49:05 +0000
commit28d8acbb30a9ebda81447e5e3f5210a438ba7d24 (patch)
tree6d6b6b0a1aca19e8118845870c9e6a25bad27963 /dev-python/pypdf
parent840a65e2af3f2cc7527e723a28f6e627a9592fb7 (diff)
gentoo auto-resync : 30:01:2024 - 17:49:05
Diffstat (limited to 'dev-python/pypdf')
-rw-r--r--dev-python/pypdf/Manifest3
-rw-r--r--dev-python/pypdf/files/pypdf-4.0.1-pytest-8.patch80
-rw-r--r--dev-python/pypdf/pypdf-4.0.1.ebuild19
3 files changed, 94 insertions, 8 deletions
diff --git a/dev-python/pypdf/Manifest b/dev-python/pypdf/Manifest
index 72f1a62c04d8..4d4a0ecf2551 100644
--- a/dev-python/pypdf/Manifest
+++ b/dev-python/pypdf/Manifest
@@ -1,8 +1,9 @@
+AUX pypdf-4.0.1-pytest-8.patch 3106 BLAKE2B bc5ed79dc84cd8e826e21ea839ec926a57fe32f94446f85ecb48418edf20b58ee2298929ea96c65ed2a7848e8904a2d2c63221f3d71a1d8ea86bdba226cc52f2 SHA512 08106dc12e0f60453658925785e05673c62acbff7cb509d7e14416d0b033ea5d6f39ee955b0328ba988ae3546e8e475d1819b5ec68c0b1e7b5d8c8658f5ac5ae
DIST pypdf-3.17.4.gh.tar.gz 7976829 BLAKE2B c2b7aef937186aecf525729f336ad6d00a8bf40850be17cb450daba5d0100acc0b0c3f51ef242e3cf7ef710d5c40c9f334db94a372b6d6eb4f2270dc00dde156 SHA512 f687a2032f085dac9b920f881f2df9f96e4da2a8dcdd5f971d3601ab05ae4f9b5528d0155adcb5ef01c6d8ffdc4f3d79077706915851bad7868bf761d28c513a
DIST pypdf-4.0.0.gh.tar.gz 7992828 BLAKE2B 97ab3783ab91ebc638b625fe39c3008516de82f1ac384a45ef27a06bb0b91a86a5fdc24efbb92644a4355743b24e86f68822858eef2df39a3b6415795276c7c4 SHA512 488adffc330bb372df245d2dfdaee357bcd4303cc33d7ee31fd7abc393ce366c78715ca4a6516795ada6b5517ca32fec5f24cdad15e0d2c109fa90ebd2f9b05c
DIST pypdf-4.0.1.gh.tar.gz 7992979 BLAKE2B a072b50d177a89133bd5c7a74cae1d4f4ed5d6bcb1d78c68573c98f792a28a8ded26b5a82743a70ec2cd41651db8a19580cc48b0376c0dfe2f422826311914c3 SHA512 e9170b75ab00ce86580194bfa64ff3a31eb6fca62adc006478fcee3a78a99df269c75857672838c2b752b78b19174883cecb2eea5586878f81eb75474fabee6d
DIST pypdf-sample-files-964fb47b0fbfa89864680582640ae4eedf143890.gh.tar.gz 11668924 BLAKE2B 0c7d8e7cfb2f9d06d7633d57b691ba473d33cfcb58d2f1f83661cef9d755340d05db8767771a385d0ba88aa904f84b8bc7eafdb5d4f614b7a21a2d138572316f SHA512 28070b575273b6fee3173e797ed5bac618f8e8aca16d0122dcf3b4b16cedbcad69b84a9bc4be65037695597bcc1fa7898cdf766c37915c49f880a0c6ca057e68
EBUILD pypdf-3.17.4.ebuild 1358 BLAKE2B 06c968d344aeb134c17141f789f938131b0d4555a9d00b11b52c8fcd71bdd9c5ed990eaf679ee56f123d99384a10b9cad6e70894a4a55da53bf6a3a5076b28de SHA512 57f571867687731a9d5dbd6f8e32c21345fb1fadd84879116a00102c00bf6934162f4c72154cafabe7c995d20bc64264571b7d6e28d74dab3f0cc05bb5c719e0
EBUILD pypdf-4.0.0.ebuild 1505 BLAKE2B bcedbaafc6229810abae5a5ed775e554369c91707d58fe93dbbc63949a5bc315a180dc55f63192e6d90f4dd72dc23f7ce3319e11e919ebe6dd465964d393d609 SHA512 8182093c605a8fcf654c964886b25d60fec34717b9929723c945d9ca64146b5234080fe28d8f2c97ffc60da8708f38bd7de1b20302d4379401dcb4b32f462ef2
-EBUILD pypdf-4.0.1.ebuild 1392 BLAKE2B 4c95d7e70ad2f5a1f309be15fb19283c2e6a5eb08a37e780a7e109d5473b65dfa8f45efa70f14740276f780bf80f12f3388a4186ee9f1f1e94485d7b10be5d2e SHA512 172ef97c61d3d35f94bd98dca47feea97b27fdd9041bd4d133ab8436e9cef70cb4b04551b96d3a8a84c22182154fe57bc884436d4d170631385126fada8a1c4d
+EBUILD pypdf-4.0.1.ebuild 1499 BLAKE2B b2b257f06bd781bbe02dfae0d317c966a26099ae47a60a49c61cde9dd4a2f5e195f593f5ea0e7ea8408f8d454fa44bf314f27ceecbe2bd62aaab3179bbb92dc1 SHA512 46d183dcf0f6da55dc14f8c0dfe40f7208a8f34c7d64a3338cc1bc01791b4ce7348e25c31b7648a31338e23f11db5cc8df6818d20e83a42b6be9706c3f6fcd60
MISC metadata.xml 373 BLAKE2B a829b7048eb3a95caeb1be83b6172603df6a031d40995294f2687bf3c3cb70e66fafb9ba8339d9979fc85f5936b9552963a8fcd072a20661fa78f3aa3c4b89c0 SHA512 775ac2de487f11fba1ea8d283b42b9ef56e42cd95ea11f50a06b099420e69c0567f65c506b14891ac641da90ea05ca70da4f8a3e4a028cf41bdbc823021dccfe
diff --git a/dev-python/pypdf/files/pypdf-4.0.1-pytest-8.patch b/dev-python/pypdf/files/pypdf-4.0.1-pytest-8.patch
new file mode 100644
index 000000000000..16b685970b55
--- /dev/null
+++ b/dev-python/pypdf/files/pypdf-4.0.1-pytest-8.patch
@@ -0,0 +1,80 @@
+From 7fd67692faf502663c001b38e48083c68876085b Mon Sep 17 00:00:00 2001
+From: Stefan <96178532+stefan6419846@users.noreply.github.com>
+Date: Mon, 29 Jan 2024 15:43:52 +0100
+Subject: [PATCH 1/2] TST: Avoid catching not emitted warnings
+
+---
+ tests/test_reader.py | 10 +++++-----
+ 1 file changed, 5 insertions(+), 5 deletions(-)
+
+diff --git a/tests/test_reader.py b/tests/test_reader.py
+index 98f73a01c..ad289c296 100644
+--- a/tests/test_reader.py
++++ b/tests/test_reader.py
+@@ -335,7 +335,7 @@ def test_get_images_raw(
+ )
+ pdf_stream = io.BytesIO(pdf_data)
+ if should_fail:
+- with pytest.raises(PdfReadError) as exc, pytest.warns(PdfReadWarning):
++ with pytest.raises(PdfReadError) as exc:
+ PdfReader(pdf_stream, strict=strict)
+ assert exc.type == PdfReadError
+ if startx_correction == -1:
+@@ -530,7 +530,7 @@ def test_read_prev_0_trailer():
+ pdf_data.find(b"xref") - 1,
+ )
+ pdf_stream = io.BytesIO(pdf_data)
+- with pytest.raises(PdfReadError) as exc, pytest.warns(PdfReadWarning):
++ with pytest.raises(PdfReadError) as exc:
+ PdfReader(pdf_stream, strict=True)
+ assert exc.value.args[0] == "/Prev=0 in the trailer (try opening with strict=False)"
+
+@@ -607,7 +607,7 @@ def test_read_unknown_zero_pages(caplog):
+ "Xref table not zero-indexed. ID numbers for objects will be corrected.",
+ ]
+ assert normalize_warnings(caplog.text) == warnings
+- with pytest.raises(PdfReadError) as exc, pytest.warns(PdfReadWarning):
++ with pytest.raises(PdfReadError) as exc:
+ len(reader.pages)
+
+ assert exc.value.args[0] == "Could not find object."
+@@ -617,7 +617,7 @@ def test_read_unknown_zero_pages(caplog):
+ "startxref on same line as offset",
+ ]
+ assert normalize_warnings(caplog.text) == warnings
+- with pytest.raises(AttributeError) as exc, pytest.warns(PdfReadWarning):
++ with pytest.raises(AttributeError) as exc:
+ len(reader.pages)
+ assert exc.value.args[0] == "'NoneType' object has no attribute 'get_object'"
+
+@@ -687,7 +687,7 @@ def test_issue604(caplog, strict):
+ outline = None
+ if strict:
+ pdf = PdfReader(f, strict=strict)
+- with pytest.raises(PdfReadError) as exc, pytest.warns(PdfReadWarning):
++ with pytest.raises(PdfReadError) as exc:
+ outline = pdf.outline
+ if "Unknown Destination" not in exc.value.args[0]:
+ raise Exception("Expected exception not raised")
+
+From 259128c25e25e23f284267d0abb9d7f1bd932de5 Mon Sep 17 00:00:00 2001
+From: Stefan <96178532+stefan6419846@users.noreply.github.com>
+Date: Mon, 29 Jan 2024 15:46:34 +0100
+Subject: [PATCH 2/2] remove now unused import
+
+---
+ tests/test_reader.py | 1 -
+ 1 file changed, 1 deletion(-)
+
+diff --git a/tests/test_reader.py b/tests/test_reader.py
+index ad289c296..c9c6be9b3 100644
+--- a/tests/test_reader.py
++++ b/tests/test_reader.py
+@@ -17,7 +17,6 @@
+ EmptyFileError,
+ FileNotDecryptedError,
+ PdfReadError,
+- PdfReadWarning,
+ WrongPasswordError,
+ )
+ from pypdf.generic import (
diff --git a/dev-python/pypdf/pypdf-4.0.1.ebuild b/dev-python/pypdf/pypdf-4.0.1.ebuild
index 3035c819ee29..766a25f1da60 100644
--- a/dev-python/pypdf/pypdf-4.0.1.ebuild
+++ b/dev-python/pypdf/pypdf-4.0.1.ebuild
@@ -37,13 +37,9 @@ BDEPEND="
distutils_enable_tests pytest
-EPYTEST_DESELECT=(
- tests/test_reader.py::test_decode_permissions
- tests/test_workflows.py::test_text_extraction_layout_mode
- # rely on -Werror
- tests/test_utils.py::test_deprecate_no_replacement
- tests/test_workflows.py::test_orientations
- tests/test_writer.py::test_remove_image_per_type
+PATCHES=(
+ # https://github.com/py-pdf/pypdf/pull/2429
+ "${FILESDIR}/${P}-pytest-8.patch"
)
src_unpack() {
@@ -54,6 +50,15 @@ src_unpack() {
}
python_test() {
+ local EPYTEST_DESELECT=(
+ tests/test_reader.py::test_decode_permissions
+ tests/test_workflows.py::test_text_extraction_layout_mode
+ # rely on -Werror
+ tests/test_utils.py::test_deprecate_no_replacement
+ tests/test_workflows.py::test_orientations
+ tests/test_writer.py::test_remove_image_per_type
+ )
+
local -x PYTEST_DISABLE_PLUGIN_AUTOLOAD=1
epytest -o addopts= -m "not enable_socket"
}