Skip to content

deps: raise the PyMuPDF floor to 1.28.2 - #206

Merged
nelsonduarte merged 1 commit into
mainfrom
deps/pymupdf-1.28.2
Oct 16, 2026
Merged

nelsonduarte merged 1 commit into
mainfrom
deps/pymupdf-1.28.2

Conversation

@nelsonduarte

@nelsonduarte nelsonduarte commented Oct 16, 2026 •

Copy link
Copy Markdown
Owner

Why

The PyMuPDF 1.28.2 changelog includes "Fixed 5049: font subsetting segfaults in 1.28.0". PDFApps calls Document.subset_fonts() in pass B of Compress (app/utils.py) and in a text edit that re-embeds the original font (app/editor/apply_edits.py). A segfault cannot be caught by the try/except around those calls, so the app just dies. The current floor, pymupdf>=1.28.0, still admits the affected release.

Measurements

Each run in a fresh process. On Linux each path ran in two batches: a crash batch, whose outputs were not checked, and a corruption-check batch.

Platform PyMuPDF Path Runs Crashes (exit 139) Corrupted output
Linux 1.28.0 Compress, crash batch 200 6 not checked
Linux 1.28.0 Compress, corruption-check batch 200 8 192 of 192 that finished (corrupted glyph positions)
Linux 1.28.0 Editor, crash batch 200 8 not checked
Linux 1.28.0 Editor, corruption-check batch 50 1 49 of 49 that finished (corrupted glyph positions)
Linux 1.28.2 Compress 400 (200 + 200) 0 0 of 200 checked
Linux 1.28.2 Editor 250 (200 + 50) 0 0 of 50 checked
Windows 1.28.0 Compress 400 (200 + 200) 0 0 of 200 checked
Windows 1.28.0 Editor 650 (200 + 400 + 50) 1 (exit 139) 0 of 50 checked

What changes

  • the floor in requirements.txt (pymupdf>=1.28.2, with a comment explaining why);
  • the Flatpak pin (flatpak/requirements-pinned.txt) and wheel (flatpak/python-modules.yml), with the sha256 confirmed against PyPI;
  • the README version table;
  • a docstring in tests/test_no_legacy_fitz_import.py;
  • a new guard test, tests/test_pymupdf_floor.py, that fails if the floor admits a version below 1.28.2.

No file under app/ or .github/ is touched.

Supersedes #162 (Dependabot), which bumps the same two lines but leaves the Flatpak wheel at 1.28.0 and would fail test_wheel_versions_match_the_pinned_versions.

Verification

  • The suite passes on Windows and on Linux, with 1.28.0 and with 1.28.2.
  • The guard test fails with >=1.28.0, >1.28.0 and >=1.28.2rc1.
  • The sha256 of the Flatpak wheel was verified.
  • pip-audit --strict passes on both requirements files on Linux.

🤖 Generated with Claude Code

@cloudflare-workers-and-pages

cloudflare-workers-and-pages Bot commented Oct 16, 2026 •

Copy link
Copy Markdown

Deploying pdfapps with  Cloudflare Pages  Cloudflare Pages

Latest commit: 87649cb
Status: ✅  Deploy successful!
Preview URL: https://3a5be20a.pdfapps.pages.dev
Branch Preview URL: https://deps-pymupdf-1-28-2.pdfapps.pages.dev

View logs

@github-actions

Copy link
Copy Markdown
Contributor

Python dependencies security check

pip-audit: requirements.txt

No known vulnerabilities.

pip-audit: flatpak/requirements-pinned.txt

No known vulnerabilities.

Outdated check (informational)

Package Pin Latest on PyPI Status
PySide6 PySide6>=6.11.1,<6.12 6.12.0 outdated
pypdf pypdf>=6.19.0 6.21.0 outdated
cryptography cryptography>=50.0.1 50.0.2 outdated
qtawesome qtawesome>=1.4.2 1.4.2 up-to-date
pillow pillow>=12.3.0 12.3.0 up-to-date
pymupdf pymupdf>=1.28.2 1.28.2 up-to-date
pytesseract pytesseract>=0.3.13 0.3.13 up-to-date
python-docx python-docx>=1.2.0 1.2.0 up-to-date
python-pptx python-pptx>=1.0.2 1.0.2 up-to-date
openpyxl openpyxl>=3.1.5 3.1.5 up-to-date
beautifulsoup4 beautifulsoup4>=4.15.0 4.15.0 up-to-date
ebooklib ebooklib>=0.20 0.20 up-to-date
lxml lxml>=6.1.3 6.1.3 up-to-date
urllib3 urllib3>=2.8.0 2.8.0 up-to-date
idna idna>=3.18 3.20 outdated
pyinstaller pyinstaller>=6.22.3 6.22.3 up-to-date

Auto-generated by security-deps workflow. Merge is blocked only when pip-audit --strict reports vulnerabilities.

The PyMuPDF 1.28.2 changelog includes "Fixed 5049: font subsetting
segfaults in 1.28.0". PDFApps calls Document.subset_fonts() in pass B
of Compress (app/utils.py) and in a text edit that re-embeds the
original font (app/editor/apply_edits.py).

Measured on Linux with 1.28.0, each run in a fresh process, in two
batches per path:
- Compress: a crash batch of 200 runs had 6 crashes (exit 139); a
  corruption-check batch of 200 runs had 8 crashes, and all 192 runs
  that finished had corrupted glyph positions;
- editor: a crash batch of 200 runs had 8 crashes (exit 139); a
  corruption-check batch of 50 runs had 1 crash, and all 49 runs that
  finished had corrupted glyph positions.

With 1.28.2, in batches of the same sizes: 0 crashes and 0 corrupted
outputs.

On Windows with 1.28.0:
- Compress: 400 runs (200 + 200), 0 crashes; 0 of 200 checked
  outputs were corrupted;
- editor: 650 runs (200 + 400 + 50), 1 crash (exit 139); 0 of 50
  checked outputs were corrupted.

What changes:
- the floor in requirements.txt;
- the Flatpak pin and wheel, with the sha256 confirmed against PyPI;
- the README;
- a docstring;
- a new guard test that fails if the floor admits a version below
  1.28.2.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
@nelsonduarte
nelsonduarte merged commit 1ac7542 into main Oct 16, 2026
6 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant