Skip to content

chore(deps): remove unused proprietary dep pymupdf-layout#742

Merged
cbcoutinho merged 1 commit into
masterfrom
chore/remove-pymupdf-layout
Apr 29, 2026
Merged

chore(deps): remove unused proprietary dep pymupdf-layout#742
cbcoutinho merged 1 commit into
masterfrom
chore/remove-pymupdf-layout

Conversation

@cbcoutinho

Copy link
Copy Markdown
Owner

Summary

Closes #725.

  • Remove pymupdf-layout>=1.26.6 from pyproject.toml and uv.lock. The package is Artifex commercial-only proprietary (its wheel ships only a one-line COPYING: "Commercial license. See artifex.com for details.") and is incompatible with the project's AGPL build. It was declared as a runtime dependency but unused — not imported anywhere in nextcloud_mcp_server/ or tests/.
  • Delete tools/parse-doc.py, an unused dev scratch script that was the only caller of pymupdf.layout.activate(). Per the explicit warning in nextcloud_mcp_server/document_processors/pymupdf.py:11-14, activating layout breaks pymupdf4llm.to_markdown(page_chunks=True) (upstream pymupdf4llm#323), so the script was inconsistent with main code anyway.

Test plan


This PR was generated with the help of AI, and reviewed by a Human

pymupdf-layout is Artifex commercial-only proprietary (its wheel ships
only a one-line COPYING noting "Commercial license. See artifex.com"),
incompatible with the project's AGPL build. It was declared as a runtime
dependency but unused: not imported anywhere in nextcloud_mcp_server/ or
tests/.

Also drop tools/parse-doc.py, an unused dev scratch script that was the
only caller of pymupdf.layout.activate(). Per the explicit warning in
document_processors/pymupdf.py, activating layout breaks
pymupdf4llm.to_markdown(page_chunks=True) per pymupdf4llm#323.

Closes #725

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
@claude

claude Bot commented Apr 29, 2026

Copy link
Copy Markdown

Claude finished @cbcoutinho's task in 1m 11s —— View job


PR Review: chore(deps): remove unused proprietary dep pymupdf-layout

Tasks:

  • Gather context and read changed files
  • Search for remaining references to removed packages
  • Review pyproject.toml changes
  • Review uv.lock changes
  • Review deleted tools/parse-doc.py
  • Post final review

Review Summary

This is a clean, well-scoped dependency removal. The changes are correct and complete. No issues found.

pyproject.toml

The single line removal of "pymupdf-layout>=1.26.6" from the dependencies list is correct. The package was indeed unused — no import of pymupdf.layout or pymupdf_layout exists anywhere in nextcloud_mcp_server/ or tests/.

pymupdf and pymupdf4llm remain as runtime deps, which are actively used in nextcloud_mcp_server/document_processors/pymupdf.py.

uv.lock

Three blocks correctly removed:

  1. networkx 3.6 — was only a transitive dep of pymupdf-layout
  2. pymupdf-layout 1.26.6 entry with its 5 platform wheels
  3. The pymupdf-layout entries in nextcloud-mcp-server's dependencies and requires-dist sections

Other transitive deps of pymupdf-layout (onnxruntime, numpy, pyyaml) are correctly retained since they're still needed by other packages (e.g. fastembed).

tools/parse-doc.py

The deleted script was the sole caller of pymupdf.layout.activate(). The deletion is appropriate:

  • It was an unused dev scratch script (not referenced anywhere else in the repo)
  • It directly contradicted the explicit warning at nextcloud_mcp_server/document_processors/pymupdf.py:11-14, which instructs not to call pymupdf.layout.activate() as it breaks pymupdf4llm.to_markdown(page_chunks=True)
  • The tools/ directory still contains rag_eval_cli.py, so the directory itself is not empty

Cross-checks

  • No remaining references to pymupdf-layout, pymupdf.layout, or parse-doc exist in the codebase (only CHANGELOG.md and the documentary comment in pymupdf.py:11, both of which are intentional)
  • networkx has no other callers — its removal from the lock file is correct

License Concern (mentioned in PR)

The PR correctly identifies the license incompatibility: pymupdf-layout ships a commercial-only COPYING note, which is incompatible with the project's AGPL-3.0-only license. The pending license-check CI (#724) will formally enforce this going forward.

Verdict: LGTM. This is a straightforward and correct cleanup. The PR description is accurate and the implementation matches the stated intent.

@cbcoutinho cbcoutinho merged commit 19c4911 into master Apr 29, 2026
11 of 12 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.

Remove unused proprietary dep pymupdf-layout

1 participant