From d725d007849dd00d494c94477acea6b7e5bc3647 Mon Sep 17 00:00:00 2001 From: sebastianMindee <130448732+sebastianMindee@users.noreply.github.com> Date: Wed, 29 Oct 2025 10:23:27 +0100 Subject: [PATCH 1/5] :bug: fix tests breaking on python 3.14 --- .github/workflows/_test-code-samples.yml | 2 +- .github/workflows/_test-integrations.yml | 2 +- .github/workflows/_test-regressions.yml | 2 +- .github/workflows/_test-units.yml | 1 + tests/data | 2 +- tests/test_client_v2_integration.py | 2 -- 6 files changed, 5 insertions(+), 6 deletions(-) diff --git a/.github/workflows/_test-code-samples.yml b/.github/workflows/_test-code-samples.yml index 826a05ff..d7b46874 100644 --- a/.github/workflows/_test-code-samples.yml +++ b/.github/workflows/_test-code-samples.yml @@ -13,7 +13,7 @@ jobs: matrix: python-version: - "3.8" - - "3.12" + - "3.14" runs-on: "ubuntu-22.04" steps: - uses: actions/checkout@v4 diff --git a/.github/workflows/_test-integrations.yml b/.github/workflows/_test-integrations.yml index d5d6d210..2beeacff 100644 --- a/.github/workflows/_test-integrations.yml +++ b/.github/workflows/_test-integrations.yml @@ -19,7 +19,7 @@ jobs: - "windows-2022" python-version: - "3.8" - - "3.12" + - "3.14" runs-on: ${{ matrix.os }} steps: - uses: actions/checkout@v4 diff --git a/.github/workflows/_test-regressions.yml b/.github/workflows/_test-regressions.yml index 246d8ff0..3fa2d022 100644 --- a/.github/workflows/_test-regressions.yml +++ b/.github/workflows/_test-regressions.yml @@ -19,7 +19,7 @@ jobs: - "windows-2022" python-version: - "3.8" - - "3.12" + - "3.14" runs-on: ${{ matrix.os }} steps: - uses: actions/checkout@v4 diff --git a/.github/workflows/_test-units.yml b/.github/workflows/_test-units.yml index 0ff41b05..51dcad0e 100644 --- a/.github/workflows/_test-units.yml +++ b/.github/workflows/_test-units.yml @@ -22,6 +22,7 @@ jobs: - "3.11" - "3.12" - "3.13" + - "3.14" runs-on: ${{ matrix.os }} steps: - uses: actions/checkout@v4 diff --git a/tests/data b/tests/data index bc8356c1..7d843db0 160000 --- a/tests/data +++ b/tests/data @@ -1 +1 @@ -Subproject commit bc8356c1ce52d60351ed3430d336f33366025012 +Subproject commit 7d843db01df952740d0f2d39f62fc3efb86f92bb diff --git a/tests/test_client_v2_integration.py b/tests/test_client_v2_integration.py index 26d60ff3..d8b40ffb 100644 --- a/tests/test_client_v2_integration.py +++ b/tests/test_client_v2_integration.py @@ -1,5 +1,3 @@ -from __future__ import annotations - import os from pathlib import Path From 123fc6f97180a360b847235c2e58367fcb3754d3 Mon Sep 17 00:00:00 2001 From: sebastianMindee <130448732+sebastianMindee@users.noreply.github.com> Date: Wed, 29 Oct 2025 10:25:02 +0100 Subject: [PATCH 2/5] fix wrong import --- mindee/pdf/pdf_compressor.py | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/mindee/pdf/pdf_compressor.py b/mindee/pdf/pdf_compressor.py index cfaf4254..88e24616 100644 --- a/mindee/pdf/pdf_compressor.py +++ b/mindee/pdf/pdf_compressor.py @@ -1,12 +1,11 @@ import io import logging -from ctypes import c_char_p, c_ushort +from ctypes import c_char_p, c_ushort, POINTER from threading import RLock from typing import BinaryIO, List, Optional, Tuple, Union import pypdfium2 as pdfium import pypdfium2.raw as pdfium_c -from _ctypes import POINTER from PIL import Image from mindee.image_operations.image_compressor import compress_image From 603a7fd56b54cc867675a4f6a53521f34ccfc1a0 Mon Sep 17 00:00:00 2001 From: sebastianMindee <130448732+sebastianMindee@users.noreply.github.com> Date: Wed, 29 Oct 2025 10:32:43 +0100 Subject: [PATCH 3/5] bump gitleaks & fix invalid import --- .pre-commit-config.yaml | 2 +- mindee/pdf/pdf_compressor.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index fbe4db9f..e392940c 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -22,7 +22,7 @@ repos: ] - repo: https://github.com/gitleaks/gitleaks - rev: v8.18.4 + rev: v8.28.0 hooks: - id: gitleaks diff --git a/mindee/pdf/pdf_compressor.py b/mindee/pdf/pdf_compressor.py index 88e24616..c5686838 100644 --- a/mindee/pdf/pdf_compressor.py +++ b/mindee/pdf/pdf_compressor.py @@ -1,6 +1,6 @@ import io import logging -from ctypes import c_char_p, c_ushort, POINTER +from ctypes import POINTER, c_char_p, c_ushort from threading import RLock from typing import BinaryIO, List, Optional, Tuple, Union From 568a8919b087d7c3b632b5bb2b8b584363e8221c Mon Sep 17 00:00:00 2001 From: sebastianMindee <130448732+sebastianMindee@users.noreply.github.com> Date: Wed, 29 Oct 2025 10:36:25 +0100 Subject: [PATCH 4/5] downgrade test lib version --- tests/data | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/data b/tests/data index 7d843db0..bc8356c1 160000 --- a/tests/data +++ b/tests/data @@ -1 +1 @@ -Subproject commit 7d843db01df952740d0f2d39f62fc3efb86f92bb +Subproject commit bc8356c1ce52d60351ed3430d336f33366025012 From 9d818d147ead0d4154f0108c66fe29faa2464982 Mon Sep 17 00:00:00 2001 From: sebastianMindee <130448732+sebastianMindee@users.noreply.github.com> Date: Wed, 29 Oct 2025 10:43:22 +0100 Subject: [PATCH 5/5] fix remote path for test --- tests/input/test_url_input_source_integration.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/input/test_url_input_source_integration.py b/tests/input/test_url_input_source_integration.py index 26edbd41..6d6616bd 100644 --- a/tests/input/test_url_input_source_integration.py +++ b/tests/input/test_url_input_source_integration.py @@ -19,7 +19,7 @@ def output_file_path(): @pytest.fixture def reference_file_path(): - return "https://github.com/mindee/client-lib-test-data/blob/main/products/invoice_splitter/invoice_5p.pdf?raw=true" + return "https://github.com/mindee/client-lib-test-data/blob/main/v1/products/invoice_splitter/invoice_5p.pdf?raw=true" @pytest.mark.integration