A community-supported supercharged document management system: scan, index and archive all your documents
Python aiangulararchivingdjangodmsdocument-managementdocument-management-systemllmmachine-learningocroptical-character-recognitionpdf
Enables Python 3.11 testing
Trenton H0ef3a141a870
diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.ymlindex b928b8634..7be31de47 100644--- a/.github/workflows/ci.yml+++ b/.github/workflows/ci.yml@@ -105,7 +105,7 @@ jobs:- pre-commitstrategy:matrix:- python-version: ['3.8', '3.9', '3.10']+ python-version: ['3.8', '3.9', '3.10', '3.11']fail-fast: falsesteps:-diff --git a/docs/setup.md b/docs/setup.mdindex 6ade1cb96..10f260b73 100644--- a/docs/setup.md+++ b/docs/setup.md@@ -255,7 +255,7 @@ supported.1. Install dependencies. Paperless requires the following packages.- - `python3` 3.8, 3.9+ - `python3` - 3.8 - 3.11 are supported- `python3-pip`- `python3-dev`- `default-libmysqlclient-dev` for MariaDBdiff --git a/src/documents/tests/test_migration_archive_files.py b/src/documents/tests/test_migration_archive_files.pyindex 80fc04205..94e9f452c 100644--- a/src/documents/tests/test_migration_archive_files.py+++ b/src/documents/tests/test_migration_archive_files.py@@ -1,4 +1,5 @@import hashlib+import importlibimport osimport shutilfrom pathlib import Path@@ -15,6 +16,10 @@ from documents.tests.utils import TestMigrationsSTORAGE_TYPE_GPG = "gpg"+migration_1012_obj = importlib.import_module(+ "documents.migrations.1012_fix_archive_files",+)+def archive_name_from_filename(filename):return os.path.splitext(filename)[0] + ".pdf"@@ -331,7 +336,7 @@ class TestMigrateArchiveFilesErrors(DirectoriesMixin, TestMigrations):self.performMigration,)- @mock.patch("documents.migrations.1012_fix_archive_files.parse_wrapper")+ @mock.patch(f"{__name__}.migration_1012_obj.parse_wrapper")def test_parser_error(self, m):m.side_effect = ParseError()Document = self.apps.get_model("documents", "Document")@@ -396,7 +401,7 @@ class TestMigrateArchiveFilesErrors(DirectoriesMixin, TestMigrations):self.assertIsNone(doc1.archive_filename)self.assertIsNone(doc2.archive_filename)- @mock.patch("documents.migrations.1012_fix_archive_files.parse_wrapper")+ @mock.patch(f"{__name__}.migration_1012_obj.parse_wrapper")def test_parser_no_archive(self, m):m.side_effect = fake_parse_wrapperdiff --git a/src/setup.cfg b/src/setup.cfgindex 185ac6f55..fb6ecf315 100644--- a/src/setup.cfg+++ b/src/setup.cfg@@ -7,7 +7,7 @@ max-line-length = 88[tool:pytest]DJANGO_SETTINGS_MODULE=paperless.settings-addopts = --pythonwarnings=all --cov --cov-report=html --cov-report=xml --numprocesses auto --quiet+addopts = --pythonwarnings=all --cov --cov-report=html --cov-report=xml --numprocesses auto --quiet --durations=50env =PAPERLESS_DISABLE_DBHANDLER=true