Transforms complex documents like PDFs and Office docs into LLM-ready markdown/JSON for your Agentic workflows.
Python ai4sciencedocument-analysisdocxextract-datalayout-analysisocrparserpdfpdf-converterpdf-extractor-llmpdf-extractor-pretrainpdf-extractor-ragpdf-parserpptxpythonxlsx
feat: remove async context manager for PDF handling and simplify locking mechanism
myhloli6c52a44143ab
diff --git a/mineru/utils/pdfium_guard.py b/mineru/utils/pdfium_guard.pyindex d2883724..6cd36c51 100644--- a/mineru/utils/pdfium_guard.py+++ b/mineru/utils/pdfium_guard.py@@ -1,6 +1,5 @@-import asyncioimport threading-from contextlib import asynccontextmanager, contextmanager+from contextlib import contextmanagerfrom typing import Any, Callable, TypeVar@@ -15,15 +14,6 @@ def pdfium_guard():yield-@asynccontextmanager-async def aio_pdfium_guard():- await asyncio.to_thread(_pdfium_lock.acquire)- try:- yield- finally:- _pdfium_lock.release()--def open_pdfium_document(opener: Callable[..., T],*args: Any,