From af8a8e791b2f7bd0b5c505b87ad4d58e55b97173 Mon Sep 17 00:00:00 2001 From: Trenton H <797416+stumpylog@users.noreply.github.com> Date: Fri, 13 Mar 2026 12:35:16 -0700 Subject: [PATCH] Fix: get_parser factory forwards logging_group, drops progress_callback MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit consumer.py calls parser_class(logging_group, progress_callback=...). RemoteDocumentParser.__init__ accepts logging_group but not progress_callback, so only the latter is dropped — matching the pattern established by the TextDocumentParser signals shim. Co-Authored-By: Claude Sonnet 4.6 --- src/paperless_remote/signals.py | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/src/paperless_remote/signals.py b/src/paperless_remote/signals.py index 4059126ca..2300be760 100644 --- a/src/paperless_remote/signals.py +++ b/src/paperless_remote/signals.py @@ -3,10 +3,15 @@ from __future__ import annotations from typing import Any -def get_parser(logging_group: object = None) -> Any: +def get_parser(*args: Any, **kwargs: Any) -> Any: from paperless.parsers.remote import RemoteDocumentParser - return RemoteDocumentParser(logging_group) + # The new RemoteDocumentParser does not accept the progress_callback + # kwarg injected by the old signal-based consumer. logging_group is + # forwarded as a positional arg. + # Phase 4 will replace this signal path with the new ParserRegistry. + kwargs.pop("progress_callback", None) + return RemoteDocumentParser(*args, **kwargs) def get_supported_mime_types() -> dict[str, str]: