Sourcing python-remove-tests-dir-hook Sourcing python-catch-conflicts-hook.sh Sourcing python-remove-bin-bytecode-hook.sh Sourcing pypa-build-hook Using pypaBuildPhase Sourcing python-runtime-deps-check-hook Using pythonRuntimeDepsCheckHook Sourcing pypa-install-hook Using pypaInstallPhase Sourcing python-imports-check-hook.sh Using pythonImportsCheckPhase Sourcing python-metadata-check-hook.sh Using pythonMetadataCheckPhase Sourcing python-namespaces-hook Sourcing python-catch-conflicts-hook.sh Sourcing pytest-check-hook Using pytestCheckPhase Running phase: unpackPhase unpacking source archive /nix/store/77cd6pwijmyyyr1lcsab4l3nn8r29qp5-source source root is source setting SOURCE_DATE_EPOCH to timestamp 315619200 of file "source/uv.lock" Running phase: patchPhase applying patch /nix/store/42v99qcik26890bb5aqvgwrww90h0i1y-paths.patch patching file src/ocrmypdf/_exec/ghostscript.py Hunk #1 succeeded at 36 with fuzz 2. patching file src/ocrmypdf/_exec/jbig2enc.py patching file src/ocrmypdf/_exec/pngquant.py patching file src/ocrmypdf/_exec/tesseract.py patching file src/ocrmypdf/_exec/unpaper.py Running phase: updateAutotoolsGnuConfigScriptsPhase Running phase: configurePhase no configure script, doing nothing Running phase: buildPhase Executing pypaBuildPhase Setting SETUPTOOLS_SCM_PRETEND_VERSION to 17.13.0 Including all tracked files automatically Creating a wheel... pypa build flags: --no-isolation --outdir dist/ --wheel * Getting build dependencies for wheel... * Building wheel... Successfully built ocrmypdf-17.13.0-py3-none-any.whl Finished creating a wheel... Finished executing pypaBuildPhase Running phase: pythonRuntimeDepsCheckHook Executing pythonRuntimeDepsCheck Checking runtime dependencies for ocrmypdf-17.13.0-py3-none-any.whl Finished executing pythonRuntimeDepsCheck Running phase: installPhase Executing pypaInstallPhase Successfully installed ocrmypdf-17.13.0-py3-none-any.whl Finished executing pypaInstallPhase Running phase: pythonOutputDistPhase Executing pythonOutputDistPhase Finished executing pythonOutputDistPhase Running phase: fixupPhase shrinking RPATHs of ELF executables and libraries in /nix/store/kiya9z12yjrgd88rmz72brxjax449gps-python3.14-ocrmypdf-17.13.0-dist checking for references to /build/ in /nix/store/kiya9z12yjrgd88rmz72brxjax449gps-python3.14-ocrmypdf-17.13.0-dist... patching script interpreter paths in /nix/store/kiya9z12yjrgd88rmz72brxjax449gps-python3.14-ocrmypdf-17.13.0-dist shrinking RPATHs of ELF executables and libraries in /nix/store/prdz2ip38hn4byx51zwqx5hj6q85h19x-python3.14-ocrmypdf-17.13.0 checking for references to /build/ in /nix/store/prdz2ip38hn4byx51zwqx5hj6q85h19x-python3.14-ocrmypdf-17.13.0... patching script interpreter paths in /nix/store/prdz2ip38hn4byx51zwqx5hj6q85h19x-python3.14-ocrmypdf-17.13.0 /nix/store/prdz2ip38hn4byx51zwqx5hj6q85h19x-python3.14-ocrmypdf-17.13.0/lib/python3.14/site-packages/ocrmypdf/__main__.py: interpreter directive changed from "#!/usr/bin/env python3" to "/nix/store/bya4ansy58az5133kryqp2cvrxbnz8qy-python3-3.14.10/bin/python3" stripping (with command strip and flags -S -p) in /nix/store/prdz2ip38hn4byx51zwqx5hj6q85h19x-python3.14-ocrmypdf-17.13.0/lib /nix/store/prdz2ip38hn4byx51zwqx5hj6q85h19x-python3.14-ocrmypdf-17.13.0/bin Rewriting #!/nix/store/bya4ansy58az5133kryqp2cvrxbnz8qy-python3-3.14.10/bin/python3.14 to #!/nix/store/bya4ansy58az5133kryqp2cvrxbnz8qy-python3-3.14.10 wrapping `/nix/store/prdz2ip38hn4byx51zwqx5hj6q85h19x-python3.14-ocrmypdf-17.13.0/bin/ocrmypdf'... Executing pythonRemoveTestsDir Finished executing pythonRemoveTestsDir Running phase: installCheckPhase no Makefile or custom installCheckPhase, doing nothing Running phase: pythonCatchConflictsPhase Running phase: pythonRemoveBinBytecodePhase Running phase: pythonImportsCheckPhase Executing pythonImportsCheckPhase Check whether the following modules can be imported: ocrmypdf Running phase: pythonMetadataCheckPhase Executing pythonMetadataCheckPhase Running phase: pytestCheckPhase Executing pytestCheckPhase pytest flags: -m pytest -k not\ \(test_unzoned_creation_date_assumes_local_zone\)\ and\ not\ \(test_assume_local_time_zone\) --numprocesses=12 ============================= test session starts ============================== platform linux -- Python 3.14.10, pytest-9.1.1, pluggy-1.7.0 rootdir: /build/source configfile: pyproject.toml testpaths: tests plugins: hypothesis-6.168.1, xdist-3.8.0 12 workers [2194 items] ........................................................................ [ 3%] ........................................................................ [ 6%] ..........................s..................ssss...s.s....sss.........s [ 9%] ..s......s..s...............s....s.s.......................x.........s.. [ 13%] sss..................................................................... [ 16%] ..................................ssss....x............................. [ 19%] ........................................................................ [ 22%] ............................................ssssssssss........s......... [ 26%] ........................................................................ [ 29%] .......................................sss.ssssss......sssssssss........ [ 32%] ..............x.................................................ssssssss [ 36%] ssssssssssssssssssssssssssssssssssssss.sssssssssssssssssssssssssssssssss [ 39%] ssssssssssssssssssssssssssssssss......................sss............... [ 42%] ........................................................................ [ 45%] ........................................................................ [ 49%] ........................................................................ [ 52%] ........................................................................ [ 55%] ........................................................................ [ 59%] ........................................................................ [ 62%] .sss.sss................................................................ [ 65%] .....................................................F.............ss... [ 68%] ......................ssssssssssssssss.....s......................ss.... [ 72%] ..........................s.......................ssssssss.ss..s.sssssss [ 75%] sssssss................................................................. [ 78%] ........................................................................ [ 82%] s.........................ss........s................................... [ 85%] ...................ss..........x........................................ [ 88%] .............ss................s........................................ [ 91%] ..................................................................ssss.. [ 95%] ........................................................................ [ 98%] .................................. [100%] =================================== FAILURES =================================== _________________________ test_validation_performance __________________________ [gw3] linux -- Python 3.14.10 /nix/store/bya4ansy58az5133kryqp2cvrxbnz8qy-python3-3.14.10/bin/python3.14 one_page_ocr = PosixPath('/build/pytest-of-nixbld/pytest-0/popen-gw3/perf0/graph.pdf') tmp_path = PosixPath('/build/pytest-of-nixbld/pytest-0/popen-gw3/test_validation_performance0') def test_validation_performance(one_page_ocr, tmp_path): """A 300-page candidate validates in a few seconds. This measures scaling with the number of objects. The cost of content streams grows with the number of text-showing operators: pages of dense OCR text take about 13 ms each. """ merged = tmp_path / 'merged.pdf' sources = [pikepdf.open(one_page_ocr) for _ in range(300)] try: with pikepdf.new() as pdf: for source in sources: # Pages from separate Pdf objects are copied with all their # resources, so every page has its own fonts and images. pdf.pages.extend(source.pages) pdf.save(merged) finally: for source in sources: source.close() candidate = tmp_path / 'c.pdf' speculative_pdfa_conversion(merged, candidate, 'pdfa-2') with pikepdf.open(candidate) as pdf: assert len(pdf.pages) == 300 assert len(pdf.objects) > 300 * 5 start = time.perf_counter() report = validate_written(candidate, '2b') elapsed = time.perf_counter() - start assert report.verdict == 'pass', report.summary() # Locally this takes ~3 s; a pathological regression (e.g. quadratic # scaling in the number of objects/pages) would be many times slower, # not just somewhat slower. 20 s gives generous headroom for slow, # shared CI runners (observed 6.7 s on ubuntu-22.04/py3.13) while still # catching that kind of regression. > assert elapsed < 20.0, f"validation took {elapsed:.1f} s" E AssertionError: validation took 46.9 s E assert 46.850939837000624 < 20.0 tests/test_pdfa_internal.py:162: AssertionError ---------------------------- Captured stderr setup ----------------------------- Scanning contents ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 100% 1/1 0:00:00 OCR ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 100% 1/1 0:00:00 Linearizing ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 100% 100/100 0:00:00 Recompressing JPEGs ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 0% 0/0 -:--:-- Deflating JPEGs ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 0% 0/0 -:--:-- JBIG2 ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 0% 0/0 -:--:-- =========================== short test summary info ============================ FAILED tests/test_pdfa_internal.py::test_validation_performance - AssertionError: validation took 46.9 s assert 46.850939837000624 < 20.0 ====== 1 failed, 1955 passed, 235 skipped, 4 xfailed in 957.46s (0:15:57) ======