Revert the upgrades to test in CI

This commit is contained in:
Trenton Holmes 2024-09-25 09:01:14 -07:00
parent dda3d2e3a5
commit 7223af0303
4 changed files with 4608 additions and 4551 deletions

9148
Pipfile.lock generated

File diff suppressed because it is too large Load Diff

View File

@ -251,7 +251,7 @@ class Command(BaseCommand):
self.handle_inotify(directory, recursive, options["testing"]) self.handle_inotify(directory, recursive, options["testing"])
else: else:
if INotify is None and settings.CONSUMER_POLLING == 0: # pragma: no cover if INotify is None and settings.CONSUMER_POLLING == 0: # pragma: no cover
logger.warn("Using polling as INotify import failed") logger.warning("Using polling as INotify import failed")
self.handle_polling(directory, recursive, options["testing"]) self.handle_polling(directory, recursive, options["testing"])
logger.debug("Consumer exiting.") logger.debug("Consumer exiting.")
@ -267,7 +267,7 @@ class Command(BaseCommand):
polling_interval = settings.CONSUMER_POLLING polling_interval = settings.CONSUMER_POLLING
if polling_interval == 0: # pragma: no cover if polling_interval == 0: # pragma: no cover
# Only happens if INotify failed to import # Only happens if INotify failed to import
logger.warn("Using polling of 10s, consider setting this") logger.warning("Using polling of 10s, consider setting this")
polling_interval = 10 polling_interval = 10
with ThreadPoolExecutor(max_workers=4) as pool: with ThreadPoolExecutor(max_workers=4) as pool:

View File

@ -1,7 +1,6 @@
import re import re
from html import escape from html import escape
from pathlib import Path from pathlib import Path
from typing import Optional
from bleach import clean from bleach import clean
from bleach import linkify from bleach import linkify
@ -33,7 +32,7 @@ class MailDocumentParser(DocumentParser):
logging_name = "paperless.parsing.mail" logging_name = "paperless.parsing.mail"
def _settings_to_gotenberg_pdfa(self) -> Optional[PdfAFormat]: def _settings_to_gotenberg_pdfa(self) -> PdfAFormat | None:
""" """
Converts our requested PDF/A output into the Gotenberg API Converts our requested PDF/A output into the Gotenberg API
format format
@ -44,7 +43,7 @@ class MailDocumentParser(DocumentParser):
}: }:
return PdfAFormat.A2b return PdfAFormat.A2b
elif settings.OCR_OUTPUT_TYPE == OutputTypeChoices.PDF_A1: # pragma: no cover elif settings.OCR_OUTPUT_TYPE == OutputTypeChoices.PDF_A1: # pragma: no cover
self.log.warn( self.log.warning(
"Gotenberg does not support PDF/A-1a, choosing PDF/A-2b instead", "Gotenberg does not support PDF/A-1a, choosing PDF/A-2b instead",
) )
return PdfAFormat.A2b return PdfAFormat.A2b

View File

@ -102,7 +102,7 @@ class TikaDocumentParser(DocumentParser):
}: }:
route.pdf_format(PdfAFormat.A2b) route.pdf_format(PdfAFormat.A2b)
elif settings.OCR_OUTPUT_TYPE == OutputTypeChoices.PDF_A1: elif settings.OCR_OUTPUT_TYPE == OutputTypeChoices.PDF_A1:
self.log.warn( self.log.warning(
"Gotenberg does not support PDF/A-1a, choosing PDF/A-2b instead", "Gotenberg does not support PDF/A-1a, choosing PDF/A-2b instead",
) )
route.pdf_format(PdfAFormat.A2b) route.pdf_format(PdfAFormat.A2b)