diff --git a/src/paperless_text/signals.py b/src/paperless_text/signals.py index cf74d1c0e..bfdabc601 100644 --- a/src/paperless_text/signals.py +++ b/src/paperless_text/signals.py @@ -1,10 +1,12 @@ def get_parser(*args, **kwargs): from paperless.parsers.text import TextDocumentParser - # 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. + # TextDocumentParser accepts logging_group for constructor compatibility but + # does not store or use it (no legacy DocumentParser base class). + # progress_callback is also not used. Both may arrive as a positional arg + # (consumer) or a keyword arg (views); *args absorbs the positional form, + # kwargs.pop handles the keyword form. 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() diff --git a/src/paperless_tika/signals.py b/src/paperless_tika/signals.py index 412b80bb7..f1fd17ef6 100644 --- a/src/paperless_tika/signals.py +++ b/src/paperless_tika/signals.py @@ -1,10 +1,12 @@ def get_parser(*args, **kwargs): from paperless.parsers.tika import TikaDocumentParser - # The new TikaDocumentParser 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. + # TikaDocumentParser accepts logging_group for constructor compatibility but + # does not store or use it (no legacy DocumentParser base class). + # progress_callback is also not used. Both may arrive as a positional arg + # (consumer) or a keyword arg (views); *args absorbs the positional form, + # kwargs.pop handles the keyword form. 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 TikaDocumentParser()