Repository navigation
Replace pypdf2 1.28.6 with pypdf 6.20.1 - #876
Merged
Merged
Conversation
- Port PDFParser and tests to the PdfReader/PdfWriter API - Open with strict=True; keep reader hooks for 1.26 leniency - Drop CustomPDFWriter and CustomDestination Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
rtibblesbot
force-pushed
the
issue-872-917443
branch
from
October 22, 2026 09:02
e9a9a13 to
db50d9c
Compare
rtibblesbot
marked this pull request as ready for review
October 22, 2026 09:04
rtibbles
approved these changes
Oct 22, 2026
rtibbles
left a comment
Member
There was a problem hiding this comment.
Test coverage is sufficient, and existing tests still pass.
Contributor
Author
|
Quick check on rtibblesbot's work on this PR: react 👍 helpful · 😕 mixed · 👎 not helpful. Reply with anything specific. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
PDFParserrelies on.PDFParserand its tests topypdf, opened withstrict=Trueplus reader hooks keeping PyPDF2 1.26's lenient handling of malformed PDFs.References
Fixes #872. Closed bump: #668.
Reviewer guidance
Suggested review: Full code review.
pypdf==6.20.1pin, needed becauseCustomPDFReaderoverrides six private pypdf methods, is acceptable given that it blocks pypdf security releases until someone re-pins by hand.strict=Truepypdf behaves like 1.28.6 on real chef PDFs: the tests and the samples match base, but other strict-only raises (e.g. a GoTo outline action missing/Sor/D) still failget_toc.CustomPDFWriter/CustomDestinationnames, and making encrypted PDFs fail inopeninstead ofget_toc, is fine for external chef scripts.tests/test_pdfutils.pycovers the change on CI.AI usage
Used Claude Code to port
PDFParserand its tests to pypdf and to recheck each PyPDF2 override. Verified with the full test suite and prek.Written by rtibblesbot, an LLM-based coding agent.
🟢 Updating PR
Last updated: 2026-10-22 22:38 UTC