chore(pdf): remove the pdfminer psparser patch that can no longer apply
KR
4h ago+0+0+0123456789-83-83-01234567890123456789
Summary
unstructured/partition/pdf.py calls patch_psparser() at import time. It replaces PSBaseParser.seek, _parse_keyword and nexttoken, but only when:
if pdfminer.__version__ <= "20240706":
pyproject.toml now requires pdfminer.six>=20251230, <20270000. pdfminer.six versions are YYYYMMDD strings, so every allowed version compares greater than "20240706" and the condition is always false. The function runs on every import of pdf.py and does nothing, and the three replacement methods are never installed. Coverage over the full test suite confirms they never run.
This PR removes unstructured/patches/ (its only module was pdfminer.py) and the import and call in pdf.py.
Behavior
Unchanged for every supported pdfminer.six version: the code removed was never reached.
Validation
test_unstructured/partition/pdf_imageand the PDF/image cases intest_unstructured/partition/test_auto.pypass (687 passed, 3 skipped).ruff check/ruff format --checkpass.