From 599fb1a1f6c74918c56c2fac7aa73434fca8d731 Mon Sep 17 00:00:00 2001 From: "James R. Barlow" Date: Sun, 14 Sep 2025 13:02:33 -0700 Subject: [PATCH] Fix test_semfree (skip Python 3.14) This feature is now deprecated and won't be fixed for Python 3.14. Instead we just use threads on platforms that don't support semaphores. Closes #1558 --- tests/test_semfree.py | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/tests/test_semfree.py b/tests/test_semfree.py index 1c897b52..8e313e19 100644 --- a/tests/test_semfree.py +++ b/tests/test_semfree.py @@ -3,6 +3,8 @@ from __future__ import annotations +import sys + import pytest from ocrmypdf.exceptions import ExitCode @@ -11,6 +13,10 @@ from .conftest import is_linux, run_ocrmypdf_api @pytest.mark.skipif(not is_linux(), reason='semfree plugin only works on Linux') +@pytest.mark.skipif( + sys.version_info >= (3, 14), + reason='semfree plugin only works on Python 3.13 or earlier', +) def test_semfree(resources, outpdf): with pytest.warns(DeprecationWarning, match="semfree.py is deprecated"): exitcode = run_ocrmypdf_api(