mirror of
https://github.com/paperless-ngx/paperless-ngx.git
synced 2026-03-30 12:52:46 +00:00
Fix: update paperless_text signal shim to import from new parser location
paperless_text/parsers.py was moved to paperless/parsers/text.py as part of the Phase 3 parser migration. Update the signal-based get_parser() factory to import from the new location and strip the legacy logging_group / progress_callback kwargs that the new TextDocumentParser no longer accepts. This shim keeps document consumption functional until Phase 4 replaces the signal path with the new ParserRegistry. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -1,7 +1,13 @@
|
||||
def get_parser(*args, **kwargs):
|
||||
from paperless_text.parsers import TextDocumentParser
|
||||
from paperless.parsers.text import TextDocumentParser
|
||||
|
||||
return TextDocumentParser(*args, **kwargs)
|
||||
# The new TextDocumentParser does not accept the legacy logging_group /
|
||||
# progress_callback kwargs injected by the old signal-based consumer.
|
||||
# These are dropped here; Phase 4 will replace this signal path with the
|
||||
# new ParserRegistry so the shim can be removed at that point.
|
||||
kwargs.pop("logging_group", None)
|
||||
kwargs.pop("progress_callback", None)
|
||||
return TextDocumentParser()
|
||||
|
||||
|
||||
def text_consumer_declaration(sender, **kwargs):
|
||||
|
||||
Reference in New Issue
Block a user