gramps-webapi 3.25.0__tar.gz → 3.25.2__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (342) hide show
  1. {gramps_webapi-3.25.0 → gramps_webapi-3.25.2}/PKG-INFO +2 -2
  2. {gramps_webapi-3.25.0 → gramps_webapi-3.25.2}/ROADMAP.md +2 -20
  3. {gramps_webapi-3.25.0 → gramps_webapi-3.25.2}/alembic_users/env.py +42 -6
  4. {gramps_webapi-3.25.0 → gramps_webapi-3.25.2}/gramps_webapi/_version.py +1 -1
  5. {gramps_webapi-3.25.0 → gramps_webapi-3.25.2}/gramps_webapi/api/__init__.py +12 -0
  6. {gramps_webapi-3.25.0 → gramps_webapi-3.25.2}/gramps_webapi/api/cache.py +14 -1
  7. {gramps_webapi-3.25.0 → gramps_webapi-3.25.2}/gramps_webapi/api/file.py +8 -5
  8. {gramps_webapi-3.25.0 → gramps_webapi-3.25.2}/gramps_webapi/api/image.py +6 -4
  9. {gramps_webapi-3.25.0 → gramps_webapi-3.25.2}/gramps_webapi/api/llm/__init__.py +8 -3
  10. {gramps_webapi-3.25.0 → gramps_webapi-3.25.2}/gramps_webapi/api/llm/agent.py +76 -18
  11. {gramps_webapi-3.25.0 → gramps_webapi-3.25.2}/gramps_webapi/api/llm/tools.py +5 -3
  12. {gramps_webapi-3.25.0 → gramps_webapi-3.25.2}/gramps_webapi/api/media.py +4 -4
  13. {gramps_webapi-3.25.0 → gramps_webapi-3.25.2}/gramps_webapi/api/resources/citations.py +1 -1
  14. {gramps_webapi-3.25.0 → gramps_webapi-3.25.2}/gramps_webapi/api/resources/dna.py +7 -2
  15. {gramps_webapi-3.25.0 → gramps_webapi-3.25.2}/gramps_webapi/api/s3.py +2 -2
  16. {gramps_webapi-3.25.0 → gramps_webapi-3.25.2}/gramps_webapi/api/search/text.py +3 -1
  17. {gramps_webapi-3.25.0 → gramps_webapi-3.25.2}/gramps_webapi/util/celery.py +25 -0
  18. {gramps_webapi-3.25.0 → gramps_webapi-3.25.2}/gramps_webapi.egg-info/PKG-INFO +2 -2
  19. {gramps_webapi-3.25.0 → gramps_webapi-3.25.2}/gramps_webapi.egg-info/SOURCES.txt +3 -0
  20. {gramps_webapi-3.25.0 → gramps_webapi-3.25.2}/gramps_webapi.egg-info/requires.txt +1 -1
  21. {gramps_webapi-3.25.0 → gramps_webapi-3.25.2}/pyproject.toml +1 -1
  22. gramps_webapi-3.25.2/tests/test_celery_logging.py +53 -0
  23. {gramps_webapi-3.25.0 → gramps_webapi-3.25.2}/tests/test_endpoints/test_etag.py +11 -0
  24. {gramps_webapi-3.25.0 → gramps_webapi-3.25.2}/tests/test_endpoints/test_file.py +10 -1
  25. {gramps_webapi-3.25.0 → gramps_webapi-3.25.2}/tests/test_endpoints/test_post.py +26 -0
  26. gramps_webapi-3.25.2/tests/test_llm_history.py +217 -0
  27. {gramps_webapi-3.25.0 → gramps_webapi-3.25.2}/tests/test_search_text.py +9 -0
  28. gramps_webapi-3.25.2/tests/test_user_db_migration.py +101 -0
  29. {gramps_webapi-3.25.0 → gramps_webapi-3.25.2}/.devcontainer/Dockerfile +0 -0
  30. {gramps_webapi-3.25.0 → gramps_webapi-3.25.2}/.devcontainer/devcontainer.json +0 -0
  31. {gramps_webapi-3.25.0 → gramps_webapi-3.25.2}/.devcontainer/docker-compose.yml +0 -0
  32. {gramps_webapi-3.25.0 → gramps_webapi-3.25.2}/.dockerignore +0 -0
  33. {gramps_webapi-3.25.0 → gramps_webapi-3.25.2}/.editorconfig +0 -0
  34. {gramps_webapi-3.25.0 → gramps_webapi-3.25.2}/.flake8 +0 -0
  35. {gramps_webapi-3.25.0 → gramps_webapi-3.25.2}/.github/ISSUE_TEMPLATE/bug_report.yml +0 -0
  36. {gramps_webapi-3.25.0 → gramps_webapi-3.25.2}/.github/ISSUE_TEMPLATE/config.yml +0 -0
  37. {gramps_webapi-3.25.0 → gramps_webapi-3.25.2}/.github/ISSUE_TEMPLATE/feature_request.md +0 -0
  38. {gramps_webapi-3.25.0 → gramps_webapi-3.25.2}/.github/workflows/base-image-pr.yml +0 -0
  39. {gramps_webapi-3.25.0 → gramps_webapi-3.25.2}/.github/workflows/base-image.yml +0 -0
  40. {gramps_webapi-3.25.0 → gramps_webapi-3.25.2}/.github/workflows/image.yml +0 -0
  41. {gramps_webapi-3.25.0 → gramps_webapi-3.25.2}/.github/workflows/pypi.yml +0 -0
  42. {gramps_webapi-3.25.0 → gramps_webapi-3.25.2}/.github/workflows/test.yml +0 -0
  43. {gramps_webapi-3.25.0 → gramps_webapi-3.25.2}/.gitignore +0 -0
  44. {gramps_webapi-3.25.0 → gramps_webapi-3.25.2}/.pre-commit-config.yaml +0 -0
  45. {gramps_webapi-3.25.0 → gramps_webapi-3.25.2}/.pylintrc +0 -0
  46. {gramps_webapi-3.25.0 → gramps_webapi-3.25.2}/.vscode/extensions.json +0 -0
  47. {gramps_webapi-3.25.0 → gramps_webapi-3.25.2}/.vscode/launch.json +0 -0
  48. {gramps_webapi-3.25.0 → gramps_webapi-3.25.2}/.vscode/settings.json +0 -0
  49. {gramps_webapi-3.25.0 → gramps_webapi-3.25.2}/.vscode/tasks.json +0 -0
  50. {gramps_webapi-3.25.0 → gramps_webapi-3.25.2}/AGENTS.md +0 -0
  51. {gramps_webapi-3.25.0 → gramps_webapi-3.25.2}/CLAUDE.md +0 -0
  52. {gramps_webapi-3.25.0 → gramps_webapi-3.25.2}/CODE_OF_CONDUCT.md +0 -0
  53. {gramps_webapi-3.25.0 → gramps_webapi-3.25.2}/CONTRIBUTING.md +0 -0
  54. {gramps_webapi-3.25.0 → gramps_webapi-3.25.2}/Dockerfile +0 -0
  55. {gramps_webapi-3.25.0 → gramps_webapi-3.25.2}/Dockerfile.base +0 -0
  56. {gramps_webapi-3.25.0 → gramps_webapi-3.25.2}/LICENSE +0 -0
  57. {gramps_webapi-3.25.0 → gramps_webapi-3.25.2}/MANIFEST.in +0 -0
  58. {gramps_webapi-3.25.0 → gramps_webapi-3.25.2}/README.md +0 -0
  59. {gramps_webapi-3.25.0 → gramps_webapi-3.25.2}/alembic.ini +0 -0
  60. {gramps_webapi-3.25.0 → gramps_webapi-3.25.2}/alembic_users/README +0 -0
  61. {gramps_webapi-3.25.0 → gramps_webapi-3.25.2}/alembic_users/script.py.mako +0 -0
  62. {gramps_webapi-3.25.0 → gramps_webapi-3.25.2}/alembic_users/versions/2082445b0769_add_oidc_accounts_table_for_secure_.py +0 -0
  63. {gramps_webapi-3.25.0 → gramps_webapi-3.25.2}/alembic_users/versions/22c8d1fba959_add_trees_enabled.py +0 -0
  64. {gramps_webapi-3.25.0 → gramps_webapi-3.25.2}/alembic_users/versions/4b7f9d2e6c01_add_web_push_subscriptions.py +0 -0
  65. {gramps_webapi-3.25.0 → gramps_webapi-3.25.2}/alembic_users/versions/66e56620891a_add_trees_table.py +0 -0
  66. {gramps_webapi-3.25.0 → gramps_webapi-3.25.2}/alembic_users/versions/6d8f3cb50b71_add_persistent_access_tokens_table.py +0 -0
  67. {gramps_webapi-3.25.0 → gramps_webapi-3.25.2}/alembic_users/versions/7b2e9f4c1a63_allow_several_access_tokens_per_scope.py +0 -0
  68. {gramps_webapi-3.25.0 → gramps_webapi-3.25.2}/alembic_users/versions/84960b7d968c_use_bigint_for_quota_media.py +0 -0
  69. {gramps_webapi-3.25.0 → gramps_webapi-3.25.2}/alembic_users/versions/9c4d2e7a5b18_track_task_lifecycle.py +0 -0
  70. {gramps_webapi-3.25.0 → gramps_webapi-3.25.2}/alembic_users/versions/a8e57fe0d82e_add_columns_for_ai_quota.py +0 -0
  71. {gramps_webapi-3.25.0 → gramps_webapi-3.25.2}/alembic_users/versions/b0582f54029c_use_bigint_for_usage_media.py +0 -0
  72. {gramps_webapi-3.25.0 → gramps_webapi-3.25.2}/alembic_users/versions/b2c3d4e5f6a7_add_tree_config_column.py +0 -0
  73. {gramps_webapi-3.25.0 → gramps_webapi-3.25.2}/alembic_users/versions/b6f1d3a9c2e4_add_token_version_to_user.py +0 -0
  74. {gramps_webapi-3.25.0 → gramps_webapi-3.25.2}/alembic_users/versions/c1d2e3f4a5b6_merge_task_tree_and_tree_config.py +0 -0
  75. {gramps_webapi-3.25.0 → gramps_webapi-3.25.2}/alembic_users/versions/c89728e71264_.py +0 -0
  76. {gramps_webapi-3.25.0 → gramps_webapi-3.25.2}/alembic_users/versions/d4e9a1c7b3f2_drop_unique_constraint_on_user_email.py +0 -0
  77. {gramps_webapi-3.25.0 → gramps_webapi-3.25.2}/alembic_users/versions/e176543c72a8_add_tree_column_to_user.py +0 -0
  78. {gramps_webapi-3.25.0 → gramps_webapi-3.25.2}/alembic_users/versions/e5e738d09fa7_added_configuration_table.py +0 -0
  79. {gramps_webapi-3.25.0 → gramps_webapi-3.25.2}/alembic_users/versions/f3a1c8e92b47_add_task_tree_table.py +0 -0
  80. {gramps_webapi-3.25.0 → gramps_webapi-3.25.2}/docker-entrypoint.sh +0 -0
  81. {gramps_webapi-3.25.0 → gramps_webapi-3.25.2}/gramps_webapi/__init__.py +0 -0
  82. {gramps_webapi-3.25.0 → gramps_webapi-3.25.2}/gramps_webapi/__main__.py +0 -0
  83. {gramps_webapi-3.25.0 → gramps_webapi-3.25.2}/gramps_webapi/api/access/__init__.py +0 -0
  84. {gramps_webapi-3.25.0 → gramps_webapi-3.25.2}/gramps_webapi/api/access/db.py +0 -0
  85. {gramps_webapi-3.25.0 → gramps_webapi-3.25.2}/gramps_webapi/api/access/policy.py +0 -0
  86. {gramps_webapi-3.25.0 → gramps_webapi-3.25.2}/gramps_webapi/api/access/sanitize.py +0 -0
  87. {gramps_webapi-3.25.0 → gramps_webapi-3.25.2}/gramps_webapi/api/auth.py +0 -0
  88. {gramps_webapi-3.25.0 → gramps_webapi-3.25.2}/gramps_webapi/api/backup.py +0 -0
  89. {gramps_webapi-3.25.0 → gramps_webapi-3.25.2}/gramps_webapi/api/backup_store.py +0 -0
  90. {gramps_webapi-3.25.0 → gramps_webapi-3.25.2}/gramps_webapi/api/blueprint.py +0 -0
  91. {gramps_webapi-3.25.0 → gramps_webapi-3.25.2}/gramps_webapi/api/check.py +0 -0
  92. {gramps_webapi-3.25.0 → gramps_webapi-3.25.2}/gramps_webapi/api/deprecations.py +0 -0
  93. {gramps_webapi-3.25.0 → gramps_webapi-3.25.2}/gramps_webapi/api/dna.py +0 -0
  94. {gramps_webapi-3.25.0 → gramps_webapi-3.25.2}/gramps_webapi/api/emails.py +0 -0
  95. {gramps_webapi-3.25.0 → gramps_webapi-3.25.2}/gramps_webapi/api/export.py +0 -0
  96. {gramps_webapi-3.25.0 → gramps_webapi-3.25.2}/gramps_webapi/api/faces.py +0 -0
  97. {gramps_webapi-3.25.0 → gramps_webapi-3.25.2}/gramps_webapi/api/html.py +0 -0
  98. {gramps_webapi-3.25.0 → gramps_webapi-3.25.2}/gramps_webapi/api/llm/deps.py +0 -0
  99. {gramps_webapi-3.25.0 → gramps_webapi-3.25.2}/gramps_webapi/api/llm/render.py +0 -0
  100. {gramps_webapi-3.25.0 → gramps_webapi-3.25.2}/gramps_webapi/api/media_importer.py +0 -0
  101. {gramps_webapi-3.25.0 → gramps_webapi-3.25.2}/gramps_webapi/api/people_families_cache.py +0 -0
  102. {gramps_webapi-3.25.0 → gramps_webapi-3.25.2}/gramps_webapi/api/ratelimiter.py +0 -0
  103. {gramps_webapi-3.25.0 → gramps_webapi-3.25.2}/gramps_webapi/api/report.py +0 -0
  104. {gramps_webapi-3.25.0 → gramps_webapi-3.25.2}/gramps_webapi/api/resources/__init__.py +0 -0
  105. {gramps_webapi-3.25.0 → gramps_webapi-3.25.2}/gramps_webapi/api/resources/access_tokens.py +0 -0
  106. {gramps_webapi-3.25.0 → gramps_webapi-3.25.2}/gramps_webapi/api/resources/anniversaries.py +0 -0
  107. {gramps_webapi-3.25.0 → gramps_webapi-3.25.2}/gramps_webapi/api/resources/backups.py +0 -0
  108. {gramps_webapi-3.25.0 → gramps_webapi-3.25.2}/gramps_webapi/api/resources/base.py +0 -0
  109. {gramps_webapi-3.25.0 → gramps_webapi-3.25.2}/gramps_webapi/api/resources/bookmarks.py +0 -0
  110. {gramps_webapi-3.25.0 → gramps_webapi-3.25.2}/gramps_webapi/api/resources/chat.py +0 -0
  111. {gramps_webapi-3.25.0 → gramps_webapi-3.25.2}/gramps_webapi/api/resources/config.py +0 -0
  112. {gramps_webapi-3.25.0 → gramps_webapi-3.25.2}/gramps_webapi/api/resources/db_backend.py +0 -0
  113. {gramps_webapi-3.25.0 → gramps_webapi-3.25.2}/gramps_webapi/api/resources/delete.py +0 -0
  114. {gramps_webapi-3.25.0 → gramps_webapi-3.25.2}/gramps_webapi/api/resources/emit.py +0 -0
  115. {gramps_webapi-3.25.0 → gramps_webapi-3.25.2}/gramps_webapi/api/resources/events.py +0 -0
  116. {gramps_webapi-3.25.0 → gramps_webapi-3.25.2}/gramps_webapi/api/resources/export_media.py +0 -0
  117. {gramps_webapi-3.25.0 → gramps_webapi-3.25.2}/gramps_webapi/api/resources/exporters.py +0 -0
  118. {gramps_webapi-3.25.0 → gramps_webapi-3.25.2}/gramps_webapi/api/resources/face_detection.py +0 -0
  119. {gramps_webapi-3.25.0 → gramps_webapi-3.25.2}/gramps_webapi/api/resources/facts.py +0 -0
  120. {gramps_webapi-3.25.0 → gramps_webapi-3.25.2}/gramps_webapi/api/resources/families.py +0 -0
  121. {gramps_webapi-3.25.0 → gramps_webapi-3.25.2}/gramps_webapi/api/resources/file.py +0 -0
  122. {gramps_webapi-3.25.0 → gramps_webapi-3.25.2}/gramps_webapi/api/resources/filter_param_types.py +0 -0
  123. {gramps_webapi-3.25.0 → gramps_webapi-3.25.2}/gramps_webapi/api/resources/filters.py +0 -0
  124. {gramps_webapi-3.25.0 → gramps_webapi-3.25.2}/gramps_webapi/api/resources/history.py +0 -0
  125. {gramps_webapi-3.25.0 → gramps_webapi-3.25.2}/gramps_webapi/api/resources/holidays.py +0 -0
  126. {gramps_webapi-3.25.0 → gramps_webapi-3.25.2}/gramps_webapi/api/resources/import_media.py +0 -0
  127. {gramps_webapi-3.25.0 → gramps_webapi-3.25.2}/gramps_webapi/api/resources/importers.py +0 -0
  128. {gramps_webapi-3.25.0 → gramps_webapi-3.25.2}/gramps_webapi/api/resources/living.py +0 -0
  129. {gramps_webapi-3.25.0 → gramps_webapi-3.25.2}/gramps_webapi/api/resources/match.py +0 -0
  130. {gramps_webapi-3.25.0 → gramps_webapi-3.25.2}/gramps_webapi/api/resources/media.py +0 -0
  131. {gramps_webapi-3.25.0 → gramps_webapi-3.25.2}/gramps_webapi/api/resources/merge.py +0 -0
  132. {gramps_webapi-3.25.0 → gramps_webapi-3.25.2}/gramps_webapi/api/resources/metadata.py +0 -0
  133. {gramps_webapi-3.25.0 → gramps_webapi-3.25.2}/gramps_webapi/api/resources/name_formats.py +0 -0
  134. {gramps_webapi-3.25.0 → gramps_webapi-3.25.2}/gramps_webapi/api/resources/name_groups.py +0 -0
  135. {gramps_webapi-3.25.0 → gramps_webapi-3.25.2}/gramps_webapi/api/resources/notes.py +0 -0
  136. {gramps_webapi-3.25.0 → gramps_webapi-3.25.2}/gramps_webapi/api/resources/object_query.py +0 -0
  137. {gramps_webapi-3.25.0 → gramps_webapi-3.25.2}/gramps_webapi/api/resources/objects.py +0 -0
  138. {gramps_webapi-3.25.0 → gramps_webapi-3.25.2}/gramps_webapi/api/resources/ocr.py +0 -0
  139. {gramps_webapi-3.25.0 → gramps_webapi-3.25.2}/gramps_webapi/api/resources/oidc.py +0 -0
  140. {gramps_webapi-3.25.0 → gramps_webapi-3.25.2}/gramps_webapi/api/resources/oidc_accounts.py +0 -0
  141. {gramps_webapi-3.25.0 → gramps_webapi-3.25.2}/gramps_webapi/api/resources/people.py +0 -0
  142. {gramps_webapi-3.25.0 → gramps_webapi-3.25.2}/gramps_webapi/api/resources/places.py +0 -0
  143. {gramps_webapi-3.25.0 → gramps_webapi-3.25.2}/gramps_webapi/api/resources/push_subscriptions.py +0 -0
  144. {gramps_webapi-3.25.0 → gramps_webapi-3.25.2}/gramps_webapi/api/resources/relations.py +0 -0
  145. {gramps_webapi-3.25.0 → gramps_webapi-3.25.2}/gramps_webapi/api/resources/reports.py +0 -0
  146. {gramps_webapi-3.25.0 → gramps_webapi-3.25.2}/gramps_webapi/api/resources/repositories.py +0 -0
  147. {gramps_webapi-3.25.0 → gramps_webapi-3.25.2}/gramps_webapi/api/resources/restore.py +0 -0
  148. {gramps_webapi-3.25.0 → gramps_webapi-3.25.2}/gramps_webapi/api/resources/schemas.py +0 -0
  149. {gramps_webapi-3.25.0 → gramps_webapi-3.25.2}/gramps_webapi/api/resources/search.py +0 -0
  150. {gramps_webapi-3.25.0 → gramps_webapi-3.25.2}/gramps_webapi/api/resources/sort.py +0 -0
  151. {gramps_webapi-3.25.0 → gramps_webapi-3.25.2}/gramps_webapi/api/resources/sources.py +0 -0
  152. {gramps_webapi-3.25.0 → gramps_webapi-3.25.2}/gramps_webapi/api/resources/tags.py +0 -0
  153. {gramps_webapi-3.25.0 → gramps_webapi-3.25.2}/gramps_webapi/api/resources/tasks.py +0 -0
  154. {gramps_webapi-3.25.0 → gramps_webapi-3.25.2}/gramps_webapi/api/resources/timeline.py +0 -0
  155. {gramps_webapi-3.25.0 → gramps_webapi-3.25.2}/gramps_webapi/api/resources/token.py +0 -0
  156. {gramps_webapi-3.25.0 → gramps_webapi-3.25.2}/gramps_webapi/api/resources/transactions.py +0 -0
  157. {gramps_webapi-3.25.0 → gramps_webapi-3.25.2}/gramps_webapi/api/resources/translations.py +0 -0
  158. {gramps_webapi-3.25.0 → gramps_webapi-3.25.2}/gramps_webapi/api/resources/trees.py +0 -0
  159. {gramps_webapi-3.25.0 → gramps_webapi-3.25.2}/gramps_webapi/api/resources/types.py +0 -0
  160. {gramps_webapi-3.25.0 → gramps_webapi-3.25.2}/gramps_webapi/api/resources/user.py +0 -0
  161. {gramps_webapi-3.25.0 → gramps_webapi-3.25.2}/gramps_webapi/api/resources/util.py +0 -0
  162. {gramps_webapi-3.25.0 → gramps_webapi-3.25.2}/gramps_webapi/api/resources/verify.py +0 -0
  163. {gramps_webapi-3.25.0 → gramps_webapi-3.25.2}/gramps_webapi/api/resources/ydna.py +0 -0
  164. {gramps_webapi-3.25.0 → gramps_webapi-3.25.2}/gramps_webapi/api/search/__init__.py +0 -0
  165. {gramps_webapi-3.25.0 → gramps_webapi-3.25.2}/gramps_webapi/api/search/indexer.py +0 -0
  166. {gramps_webapi-3.25.0 → gramps_webapi-3.25.2}/gramps_webapi/api/search/query.py +0 -0
  167. {gramps_webapi-3.25.0 → gramps_webapi-3.25.2}/gramps_webapi/api/search/schema.py +0 -0
  168. {gramps_webapi-3.25.0 → gramps_webapi-3.25.2}/gramps_webapi/api/snapshot.py +0 -0
  169. {gramps_webapi-3.25.0 → gramps_webapi-3.25.2}/gramps_webapi/api/tasks.py +0 -0
  170. {gramps_webapi-3.25.0 → gramps_webapi-3.25.2}/gramps_webapi/api/telemetry.py +0 -0
  171. {gramps_webapi-3.25.0 → gramps_webapi-3.25.2}/gramps_webapi/api/util.py +0 -0
  172. {gramps_webapi-3.25.0 → gramps_webapi-3.25.2}/gramps_webapi/app.py +0 -0
  173. {gramps_webapi-3.25.0 → gramps_webapi-3.25.2}/gramps_webapi/auth/__init__.py +0 -0
  174. {gramps_webapi-3.25.0 → gramps_webapi-3.25.2}/gramps_webapi/auth/const.py +0 -0
  175. {gramps_webapi-3.25.0 → gramps_webapi-3.25.2}/gramps_webapi/auth/oidc.py +0 -0
  176. {gramps_webapi-3.25.0 → gramps_webapi-3.25.2}/gramps_webapi/auth/oidc_helpers.py +0 -0
  177. {gramps_webapi-3.25.0 → gramps_webapi-3.25.2}/gramps_webapi/auth/passwords.py +0 -0
  178. {gramps_webapi-3.25.0 → gramps_webapi-3.25.2}/gramps_webapi/auth/sql_guid.py +0 -0
  179. {gramps_webapi-3.25.0 → gramps_webapi-3.25.2}/gramps_webapi/celery.py +0 -0
  180. {gramps_webapi-3.25.0 → gramps_webapi-3.25.2}/gramps_webapi/config.py +0 -0
  181. {gramps_webapi-3.25.0 → gramps_webapi-3.25.2}/gramps_webapi/const.py +0 -0
  182. {gramps_webapi-3.25.0 → gramps_webapi-3.25.2}/gramps_webapi/data/empty_gramps_auth.cfg +0 -0
  183. {gramps_webapi-3.25.0 → gramps_webapi-3.25.2}/gramps_webapi/data/example_gramps_auth.cfg +0 -0
  184. {gramps_webapi-3.25.0 → gramps_webapi-3.25.2}/gramps_webapi/data/face_detection_yunet_2023mar.onnx +0 -0
  185. {gramps_webapi-3.25.0 → gramps_webapi-3.25.2}/gramps_webapi/data/test_auth.cfg +0 -0
  186. {gramps_webapi-3.25.0 → gramps_webapi-3.25.2}/gramps_webapi/dbloader.py +0 -0
  187. {gramps_webapi-3.25.0 → gramps_webapi-3.25.2}/gramps_webapi/dbmanager.py +0 -0
  188. {gramps_webapi-3.25.0 → gramps_webapi-3.25.2}/gramps_webapi/future_gramps/__init__.py +0 -0
  189. {gramps_webapi-3.25.0 → gramps_webapi-3.25.2}/gramps_webapi/future_gramps/alive.py +0 -0
  190. {gramps_webapi-3.25.0 → gramps_webapi-3.25.2}/gramps_webapi/future_gramps/relationship.py +0 -0
  191. {gramps_webapi-3.25.0 → gramps_webapi-3.25.2}/gramps_webapi/logging_utils.py +0 -0
  192. {gramps_webapi-3.25.0 → gramps_webapi-3.25.2}/gramps_webapi/profiler.py +0 -0
  193. {gramps_webapi-3.25.0 → gramps_webapi-3.25.2}/gramps_webapi/sentry.py +0 -0
  194. {gramps_webapi-3.25.0 → gramps_webapi-3.25.2}/gramps_webapi/static/index.html +0 -0
  195. {gramps_webapi-3.25.0 → gramps_webapi-3.25.2}/gramps_webapi/templates/confirmation.html +0 -0
  196. {gramps_webapi-3.25.0 → gramps_webapi-3.25.2}/gramps_webapi/templates/reset_password.html +0 -0
  197. {gramps_webapi-3.25.0 → gramps_webapi-3.25.2}/gramps_webapi/templates/reset_password_base.html +0 -0
  198. {gramps_webapi-3.25.0 → gramps_webapi-3.25.2}/gramps_webapi/templates/reset_password_error.html +0 -0
  199. {gramps_webapi-3.25.0 → gramps_webapi-3.25.2}/gramps_webapi/translogger.py +0 -0
  200. {gramps_webapi-3.25.0 → gramps_webapi-3.25.2}/gramps_webapi/types.py +0 -0
  201. {gramps_webapi-3.25.0 → gramps_webapi-3.25.2}/gramps_webapi/undodb.py +0 -0
  202. {gramps_webapi-3.25.0 → gramps_webapi-3.25.2}/gramps_webapi/util/__init__.py +0 -0
  203. {gramps_webapi-3.25.0 → gramps_webapi-3.25.2}/gramps_webapi/util/task_state.py +0 -0
  204. {gramps_webapi-3.25.0 → gramps_webapi-3.25.2}/gramps_webapi/verify_lib.py +0 -0
  205. {gramps_webapi-3.25.0 → gramps_webapi-3.25.2}/gramps_webapi/webpush.py +0 -0
  206. {gramps_webapi-3.25.0 → gramps_webapi-3.25.2}/gramps_webapi/wsgi.py +0 -0
  207. {gramps_webapi-3.25.0 → gramps_webapi-3.25.2}/gramps_webapi.egg-info/dependency_links.txt +0 -0
  208. {gramps_webapi-3.25.0 → gramps_webapi-3.25.2}/gramps_webapi.egg-info/top_level.txt +0 -0
  209. {gramps_webapi-3.25.0 → gramps_webapi-3.25.2}/mypy.ini +0 -0
  210. {gramps_webapi-3.25.0 → gramps_webapi-3.25.2}/requirements-dev.txt +0 -0
  211. {gramps_webapi-3.25.0 → gramps_webapi-3.25.2}/scripts/s3_rename.py +0 -0
  212. {gramps_webapi-3.25.0 → gramps_webapi-3.25.2}/scripts/search_benchmark.py +0 -0
  213. {gramps_webapi-3.25.0 → gramps_webapi-3.25.2}/scripts/start_dev_container.sh +0 -0
  214. {gramps_webapi-3.25.0 → gramps_webapi-3.25.2}/setup.cfg +0 -0
  215. {gramps_webapi-3.25.0 → gramps_webapi-3.25.2}/setup.py +0 -0
  216. {gramps_webapi-3.25.0 → gramps_webapi-3.25.2}/tests/__init__.py +0 -0
  217. {gramps_webapi-3.25.0 → gramps_webapi-3.25.2}/tests/conftest.py +0 -0
  218. {gramps_webapi-3.25.0 → gramps_webapi-3.25.2}/tests/test_access.py +0 -0
  219. {gramps_webapi-3.25.0 → gramps_webapi-3.25.2}/tests/test_check.py +0 -0
  220. {gramps_webapi-3.25.0 → gramps_webapi-3.25.2}/tests/test_cli.py +0 -0
  221. {gramps_webapi-3.25.0 → gramps_webapi-3.25.2}/tests/test_close_db.py +0 -0
  222. {gramps_webapi-3.25.0 → gramps_webapi-3.25.2}/tests/test_db.py +0 -0
  223. {gramps_webapi-3.25.0 → gramps_webapi-3.25.2}/tests/test_delete.py +0 -0
  224. {gramps_webapi-3.25.0 → gramps_webapi-3.25.2}/tests/test_deprecations.py +0 -0
  225. {gramps_webapi-3.25.0 → gramps_webapi-3.25.2}/tests/test_dna_match_parser.py +0 -0
  226. {gramps_webapi-3.25.0 → gramps_webapi-3.25.2}/tests/test_endpoints/__init__.py +0 -0
  227. {gramps_webapi-3.25.0 → gramps_webapi-3.25.2}/tests/test_endpoints/checks.py +0 -0
  228. {gramps_webapi-3.25.0 → gramps_webapi-3.25.2}/tests/test_endpoints/test_access_tokens.py +0 -0
  229. {gramps_webapi-3.25.0 → gramps_webapi-3.25.2}/tests/test_endpoints/test_anniversaries_ics.py +0 -0
  230. {gramps_webapi-3.25.0 → gramps_webapi-3.25.2}/tests/test_endpoints/test_backups.py +0 -0
  231. {gramps_webapi-3.25.0 → gramps_webapi-3.25.2}/tests/test_endpoints/test_bookmarks.py +0 -0
  232. {gramps_webapi-3.25.0 → gramps_webapi-3.25.2}/tests/test_endpoints/test_chat.py +0 -0
  233. {gramps_webapi-3.25.0 → gramps_webapi-3.25.2}/tests/test_endpoints/test_citations.py +0 -0
  234. {gramps_webapi-3.25.0 → gramps_webapi-3.25.2}/tests/test_endpoints/test_config.py +0 -0
  235. {gramps_webapi-3.25.0 → gramps_webapi-3.25.2}/tests/test_endpoints/test_db_handle.py +0 -0
  236. {gramps_webapi-3.25.0 → gramps_webapi-3.25.2}/tests/test_endpoints/test_delete.py +0 -0
  237. {gramps_webapi-3.25.0 → gramps_webapi-3.25.2}/tests/test_endpoints/test_dna.py +0 -0
  238. {gramps_webapi-3.25.0 → gramps_webapi-3.25.2}/tests/test_endpoints/test_events.py +0 -0
  239. {gramps_webapi-3.25.0 → gramps_webapi-3.25.2}/tests/test_endpoints/test_exporters.py +0 -0
  240. {gramps_webapi-3.25.0 → gramps_webapi-3.25.2}/tests/test_endpoints/test_facts.py +0 -0
  241. {gramps_webapi-3.25.0 → gramps_webapi-3.25.2}/tests/test_endpoints/test_families.py +0 -0
  242. {gramps_webapi-3.25.0 → gramps_webapi-3.25.2}/tests/test_endpoints/test_filters.py +0 -0
  243. {gramps_webapi-3.25.0 → gramps_webapi-3.25.2}/tests/test_endpoints/test_history.py +0 -0
  244. {gramps_webapi-3.25.0 → gramps_webapi-3.25.2}/tests/test_endpoints/test_holidays.py +0 -0
  245. {gramps_webapi-3.25.0 → gramps_webapi-3.25.2}/tests/test_endpoints/test_import_media.py +0 -0
  246. {gramps_webapi-3.25.0 → gramps_webapi-3.25.2}/tests/test_endpoints/test_importers.py +0 -0
  247. {gramps_webapi-3.25.0 → gramps_webapi-3.25.2}/tests/test_endpoints/test_list_paging.py +0 -0
  248. {gramps_webapi-3.25.0 → gramps_webapi-3.25.2}/tests/test_endpoints/test_living.py +0 -0
  249. {gramps_webapi-3.25.0 → gramps_webapi-3.25.2}/tests/test_endpoints/test_media.py +0 -0
  250. {gramps_webapi-3.25.0 → gramps_webapi-3.25.2}/tests/test_endpoints/test_media_archive.py +0 -0
  251. {gramps_webapi-3.25.0 → gramps_webapi-3.25.2}/tests/test_endpoints/test_media_usage_sync.py +0 -0
  252. {gramps_webapi-3.25.0 → gramps_webapi-3.25.2}/tests/test_endpoints/test_merge.py +0 -0
  253. {gramps_webapi-3.25.0 → gramps_webapi-3.25.2}/tests/test_endpoints/test_metadata.py +0 -0
  254. {gramps_webapi-3.25.0 → gramps_webapi-3.25.2}/tests/test_endpoints/test_name_formats.py +0 -0
  255. {gramps_webapi-3.25.0 → gramps_webapi-3.25.2}/tests/test_endpoints/test_name_groups.py +0 -0
  256. {gramps_webapi-3.25.0 → gramps_webapi-3.25.2}/tests/test_endpoints/test_notes.py +0 -0
  257. {gramps_webapi-3.25.0 → gramps_webapi-3.25.2}/tests/test_endpoints/test_object_query.py +0 -0
  258. {gramps_webapi-3.25.0 → gramps_webapi-3.25.2}/tests/test_endpoints/test_object_query_where_tree.py +0 -0
  259. {gramps_webapi-3.25.0 → gramps_webapi-3.25.2}/tests/test_endpoints/test_ocr.py +0 -0
  260. {gramps_webapi-3.25.0 → gramps_webapi-3.25.2}/tests/test_endpoints/test_oidc.py +0 -0
  261. {gramps_webapi-3.25.0 → gramps_webapi-3.25.2}/tests/test_endpoints/test_oidc_accounts.py +0 -0
  262. {gramps_webapi-3.25.0 → gramps_webapi-3.25.2}/tests/test_endpoints/test_oidc_link.py +0 -0
  263. {gramps_webapi-3.25.0 → gramps_webapi-3.25.2}/tests/test_endpoints/test_paging_sort.py +0 -0
  264. {gramps_webapi-3.25.0 → gramps_webapi-3.25.2}/tests/test_endpoints/test_people.py +0 -0
  265. {gramps_webapi-3.25.0 → gramps_webapi-3.25.2}/tests/test_endpoints/test_people_query.py +0 -0
  266. {gramps_webapi-3.25.0 → gramps_webapi-3.25.2}/tests/test_endpoints/test_place_coordinates.py +0 -0
  267. {gramps_webapi-3.25.0 → gramps_webapi-3.25.2}/tests/test_endpoints/test_places.py +0 -0
  268. {gramps_webapi-3.25.0 → gramps_webapi-3.25.2}/tests/test_endpoints/test_profiler.py +0 -0
  269. {gramps_webapi-3.25.0 → gramps_webapi-3.25.2}/tests/test_endpoints/test_push_subscriptions.py +0 -0
  270. {gramps_webapi-3.25.0 → gramps_webapi-3.25.2}/tests/test_endpoints/test_put.py +0 -0
  271. {gramps_webapi-3.25.0 → gramps_webapi-3.25.2}/tests/test_endpoints/test_ready.py +0 -0
  272. {gramps_webapi-3.25.0 → gramps_webapi-3.25.2}/tests/test_endpoints/test_relations.py +0 -0
  273. {gramps_webapi-3.25.0 → gramps_webapi-3.25.2}/tests/test_endpoints/test_repair.py +0 -0
  274. {gramps_webapi-3.25.0 → gramps_webapi-3.25.2}/tests/test_endpoints/test_reports.py +0 -0
  275. {gramps_webapi-3.25.0 → gramps_webapi-3.25.2}/tests/test_endpoints/test_repositories.py +0 -0
  276. {gramps_webapi-3.25.0 → gramps_webapi-3.25.2}/tests/test_endpoints/test_restore.py +0 -0
  277. {gramps_webapi-3.25.0 → gramps_webapi-3.25.2}/tests/test_endpoints/test_s3.py +0 -0
  278. {gramps_webapi-3.25.0 → gramps_webapi-3.25.2}/tests/test_endpoints/test_search.py +0 -0
  279. {gramps_webapi-3.25.0 → gramps_webapi-3.25.2}/tests/test_endpoints/test_sources.py +0 -0
  280. {gramps_webapi-3.25.0 → gramps_webapi-3.25.2}/tests/test_endpoints/test_tags.py +0 -0
  281. {gramps_webapi-3.25.0 → gramps_webapi-3.25.2}/tests/test_endpoints/test_tasks.py +0 -0
  282. {gramps_webapi-3.25.0 → gramps_webapi-3.25.2}/tests/test_endpoints/test_timelines.py +0 -0
  283. {gramps_webapi-3.25.0 → gramps_webapi-3.25.2}/tests/test_endpoints/test_token.py +0 -0
  284. {gramps_webapi-3.25.0 → gramps_webapi-3.25.2}/tests/test_endpoints/test_token_revocation.py +0 -0
  285. {gramps_webapi-3.25.0 → gramps_webapi-3.25.2}/tests/test_endpoints/test_token_sync.py +0 -0
  286. {gramps_webapi-3.25.0 → gramps_webapi-3.25.2}/tests/test_endpoints/test_transactions.py +0 -0
  287. {gramps_webapi-3.25.0 → gramps_webapi-3.25.2}/tests/test_endpoints/test_translations.py +0 -0
  288. {gramps_webapi-3.25.0 → gramps_webapi-3.25.2}/tests/test_endpoints/test_treeless_admin.py +0 -0
  289. {gramps_webapi-3.25.0 → gramps_webapi-3.25.2}/tests/test_endpoints/test_trees.py +0 -0
  290. {gramps_webapi-3.25.0 → gramps_webapi-3.25.2}/tests/test_endpoints/test_types.py +0 -0
  291. {gramps_webapi-3.25.0 → gramps_webapi-3.25.2}/tests/test_endpoints/test_upload.py +0 -0
  292. {gramps_webapi-3.25.0 → gramps_webapi-3.25.2}/tests/test_endpoints/test_user.py +0 -0
  293. {gramps_webapi-3.25.0 → gramps_webapi-3.25.2}/tests/test_endpoints/test_verify.py +0 -0
  294. {gramps_webapi-3.25.0 → gramps_webapi-3.25.2}/tests/test_endpoints/test_webpush_delivery.py +0 -0
  295. {gramps_webapi-3.25.0 → gramps_webapi-3.25.2}/tests/test_endpoints/test_ydna.py +0 -0
  296. {gramps_webapi-3.25.0 → gramps_webapi-3.25.2}/tests/test_endpoints/util.py +0 -0
  297. {gramps_webapi-3.25.0 → gramps_webapi-3.25.2}/tests/test_face_detection.py +0 -0
  298. {gramps_webapi-3.25.0 → gramps_webapi-3.25.2}/tests/test_file.py +0 -0
  299. {gramps_webapi-3.25.0 → gramps_webapi-3.25.2}/tests/test_future_gramps_alive.py +0 -0
  300. {gramps_webapi-3.25.0 → gramps_webapi-3.25.2}/tests/test_future_gramps_relationship.py +0 -0
  301. {gramps_webapi-3.25.0 → gramps_webapi-3.25.2}/tests/test_image.py +0 -0
  302. {gramps_webapi-3.25.0 → gramps_webapi-3.25.2}/tests/test_import_util.py +0 -0
  303. {gramps_webapi-3.25.0 → gramps_webapi-3.25.2}/tests/test_jwt.py +0 -0
  304. {gramps_webapi-3.25.0 → gramps_webapi-3.25.2}/tests/test_limiter.py +0 -0
  305. {gramps_webapi-3.25.0 → gramps_webapi-3.25.2}/tests/test_llm_agent.py +0 -0
  306. {gramps_webapi-3.25.0 → gramps_webapi-3.25.2}/tests/test_llm_errors.py +0 -0
  307. {gramps_webapi-3.25.0 → gramps_webapi-3.25.2}/tests/test_llm_render.py +0 -0
  308. {gramps_webapi-3.25.0 → gramps_webapi-3.25.2}/tests/test_llm_tools.py +0 -0
  309. {gramps_webapi-3.25.0 → gramps_webapi-3.25.2}/tests/test_logging_utils.py +0 -0
  310. {gramps_webapi-3.25.0 → gramps_webapi-3.25.2}/tests/test_map_tile.py +0 -0
  311. {gramps_webapi-3.25.0 → gramps_webapi-3.25.2}/tests/test_media_importer.py +0 -0
  312. {gramps_webapi-3.25.0 → gramps_webapi-3.25.2}/tests/test_media_prefix_tree.py +0 -0
  313. {gramps_webapi-3.25.0 → gramps_webapi-3.25.2}/tests/test_migrate_grampsdb.py +0 -0
  314. {gramps_webapi-3.25.0 → gramps_webapi-3.25.2}/tests/test_missing_references.py +0 -0
  315. {gramps_webapi-3.25.0 → gramps_webapi-3.25.2}/tests/test_object_query_parsing.py +0 -0
  316. {gramps_webapi-3.25.0 → gramps_webapi-3.25.2}/tests/test_oidc_auth.py +0 -0
  317. {gramps_webapi-3.25.0 → gramps_webapi-3.25.2}/tests/test_openapi_operation_ids.py +0 -0
  318. {gramps_webapi-3.25.0 → gramps_webapi-3.25.2}/tests/test_password.py +0 -0
  319. {gramps_webapi-3.25.0 → gramps_webapi-3.25.2}/tests/test_postgres_driver.py +0 -0
  320. {gramps_webapi-3.25.0 → gramps_webapi-3.25.2}/tests/test_privacy_canary.py +0 -0
  321. {gramps_webapi-3.25.0 → gramps_webapi-3.25.2}/tests/test_private_proxy.py +0 -0
  322. {gramps_webapi-3.25.0 → gramps_webapi-3.25.2}/tests/test_private_proxy_backlinks.py +0 -0
  323. {gramps_webapi-3.25.0 → gramps_webapi-3.25.2}/tests/test_s3.py +0 -0
  324. {gramps_webapi-3.25.0 → gramps_webapi-3.25.2}/tests/test_search_api_updates.py +0 -0
  325. {gramps_webapi-3.25.0 → gramps_webapi-3.25.2}/tests/test_search_index.py +0 -0
  326. {gramps_webapi-3.25.0 → gramps_webapi-3.25.2}/tests/test_search_oracle.py +0 -0
  327. {gramps_webapi-3.25.0 → gramps_webapi-3.25.2}/tests/test_sentry.py +0 -0
  328. {gramps_webapi-3.25.0 → gramps_webapi-3.25.2}/tests/test_server_locale.py +0 -0
  329. {gramps_webapi-3.25.0 → gramps_webapi-3.25.2}/tests/test_shared_postgresql.py +0 -0
  330. {gramps_webapi-3.25.0 → gramps_webapi-3.25.2}/tests/test_snapshot.py +0 -0
  331. {gramps_webapi-3.25.0 → gramps_webapi-3.25.2}/tests/test_sort_raw_data.py +0 -0
  332. {gramps_webapi-3.25.0 → gramps_webapi-3.25.2}/tests/test_sort_sql.py +0 -0
  333. {gramps_webapi-3.25.0 → gramps_webapi-3.25.2}/tests/test_sqlauth.py +0 -0
  334. {gramps_webapi-3.25.0 → gramps_webapi-3.25.2}/tests/test_static_files.py +0 -0
  335. {gramps_webapi-3.25.0 → gramps_webapi-3.25.2}/tests/test_task_error.py +0 -0
  336. {gramps_webapi-3.25.0 → gramps_webapi-3.25.2}/tests/test_task_state.py +0 -0
  337. {gramps_webapi-3.25.0 → gramps_webapi-3.25.2}/tests/test_tasks.py +0 -0
  338. {gramps_webapi-3.25.0 → gramps_webapi-3.25.2}/tests/test_telemetry.py +0 -0
  339. {gramps_webapi-3.25.0 → gramps_webapi-3.25.2}/tests/test_undodb.py +0 -0
  340. {gramps_webapi-3.25.0 → gramps_webapi-3.25.2}/tests/test_util.py +0 -0
  341. {gramps_webapi-3.25.0 → gramps_webapi-3.25.2}/tests/test_verify_lib.py +0 -0
  342. {gramps_webapi-3.25.0 → gramps_webapi-3.25.2}/tests/test_version.py +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: gramps-webapi
3
- Version: 3.25.0
3
+ Version: 3.25.2
4
4
  Summary: A RESTful web API for the Gramps genealogical database.
5
5
  Author: Gramps Development Team
6
6
  Author-email: "David M. Straub" <straub@protonmail.com>
@@ -44,7 +44,7 @@ Requires-Dist: gramps-ql>=0.5.0
44
44
  Requires-Dist: psycopg2-binary
45
45
  Requires-Dist: requests
46
46
  Requires-Dist: yclade>=0.5.0
47
- Requires-Dist: Authlib>=1.6.4
47
+ Requires-Dist: Authlib>=1.9.0
48
48
  Requires-Dist: gramps-gedcom7>=0.4.0
49
49
  Requires-Dist: flask-smorest
50
50
  Requires-Dist: typing-extensions>=4.13.0
@@ -17,30 +17,12 @@ and API parameters are then still accepted but ignored.
17
17
 
18
18
  | Version | Target | Gramps | Breaking changes |
19
19
  |---|---|---|---|
20
- | 3.24.x | current | 6.0 | none |
21
- | 3.25.0 | early November 2026 | 6.0 | semantic search removed |
20
+ | 3.25.x | current | 6.0 | semantic search removed |
21
+ | 3.26.0 | late November 2026 | 6.0 | none |
22
22
  | 3.x | as needed | 6.0 | none |
23
23
  | 4.0.0 | TBD | 6.1 | multi-tree by default, removals below |
24
24
  | 5.0.0 | TBD | 6.2 | TBD |
25
25
 
26
- ## Notable in 3.24
27
-
28
- - User database migrations for task locking (#1049) and web push (#1001)
29
- - Configuration via the database is deprecated (#1050)
30
- - The non-shared `PostgreSQL` backend is deprecated (#981)
31
- - The server locale is always English, regardless of `LANG`/`LC_*` (#1042)
32
- - Media archives are stored in `EXPORT_DIR/media_archives/<tree>/` (or the media bucket) and expire by age instead of being deleted on download (#1059)
33
- - Search reindexing after import or restore runs as separate tasks, so the import task finishes before search is up to date (#1046)
34
- - Remove support for Python 3.10 (#1067)
35
- - Semantic search is deprecated, with a warning if `VECTOR_EMBEDDING_MODEL` is set
36
-
37
- ## Notable in 3.25
38
-
39
- - Semantic search is removed (#1074). `VECTOR_EMBEDDING_MODEL`, the `semantic` parameter of
40
- `/search/` and `/search/index/` and the `--semantic` option of the `search` CLI command
41
- are still accepted but ignored. `server.semantic_search` in `/metadata/` is always false
42
- - The Docker images no longer contain PyTorch, Sentence Transformers or an embedding model
43
-
44
26
  ## Breaking in 4.0
45
27
 
46
28
  > Note: Depending on the (unknown) release date of Gramps 6.1, these breaking changes may be moved to 5.0 instead.
@@ -3,14 +3,13 @@
3
3
  import os
4
4
  from logging.config import fileConfig
5
5
 
6
- from sqlalchemy import engine_from_config
7
- from sqlalchemy import pool
8
-
9
6
  from alembic import context
10
7
  from flask import Flask
8
+ from sqlalchemy import engine_from_config, event, pool, text
9
+ from sqlalchemy.engine import make_url
11
10
 
12
- from gramps_webapi.const import ENV_CONFIG_FILE
13
11
  from gramps_webapi.auth import User
12
+ from gramps_webapi.const import ENV_CONFIG_FILE
14
13
  from gramps_webapi.util import pin_postgres_driver
15
14
 
16
15
  # this is the Alembic Config object, which provides
@@ -23,6 +22,12 @@ fileConfig(config.config_file_name)
23
22
 
24
23
  target_metadata = User.metadata
25
24
 
25
+ # seconds a migration waits for another process's migration (SQLite)
26
+ SQLITE_LOCK_TIMEOUT = 300
27
+
28
+ # arbitrary key of the advisory lock that serializes migrations (PostgreSQL)
29
+ PG_MIGRATION_LOCK_KEY = 7302841965
30
+
26
31
  # other values from the config, defined by the needs of env.py,
27
32
  # can be acquired:
28
33
  # my_important_option = config.get_main_option("my_important_option")
@@ -79,19 +84,50 @@ def run_migrations_online():
79
84
  In this scenario we need to create an Engine
80
85
  and associate a connection with the context.
81
86
 
87
+ Several processes can migrate at the same time, e.g. the web and the
88
+ Celery container of a Docker Compose setup, which run the same
89
+ entrypoint. All migrations therefore run in one transaction that first
90
+ takes a lock: a second process waits for the first one and then finds
91
+ the database already upgraded.
82
92
  """
83
93
  configuration = config.get_section(config.config_ini_section)
84
- configuration["sqlalchemy.url"] = get_url()
94
+ url = get_url()
95
+ configuration["sqlalchemy.url"] = url
96
+ is_sqlite = make_url(url).get_backend_name() == "sqlite"
85
97
  connectable = engine_from_config(
86
98
  configuration,
87
99
  prefix="sqlalchemy.",
88
100
  poolclass=pool.NullPool,
101
+ # wait for another process's migration instead of failing with
102
+ # "database is locked" after the default of 5 seconds
103
+ connect_args={"timeout": SQLITE_LOCK_TIMEOUT} if is_sqlite else {},
89
104
  )
105
+ if is_sqlite:
106
+ # Python's sqlite3 module only begins transactions before DML, so
107
+ # the DDL would run outside of them. Begin them here instead, taking
108
+ # the write lock right away.
109
+ @event.listens_for(connectable, "connect")
110
+ def _disable_implicit_begin(dbapi_connection, connection_record):
111
+ dbapi_connection.isolation_level = None
112
+
113
+ @event.listens_for(connectable, "begin")
114
+ def _begin_immediate(conn):
115
+ conn.exec_driver_sql("BEGIN IMMEDIATE")
90
116
 
91
117
  with connectable.connect() as connection:
92
- context.configure(connection=connection, target_metadata=target_metadata)
118
+ context.configure(
119
+ connection=connection,
120
+ target_metadata=target_metadata,
121
+ # SQLite supports transactional DDL, Alembic just doesn't assume it
122
+ transactional_ddl=True if is_sqlite else None,
123
+ )
93
124
 
94
125
  with context.begin_transaction():
126
+ if connection.dialect.name == "postgresql":
127
+ connection.execute(
128
+ text("SELECT pg_advisory_xact_lock(:key)"),
129
+ {"key": PG_MIGRATION_LOCK_KEY},
130
+ )
95
131
  context.run_migrations()
96
132
 
97
133
 
@@ -19,4 +19,4 @@
19
19
 
20
20
  """Version information."""
21
21
 
22
- __version__ = "3.25.0"
22
+ __version__ = "3.25.2"
@@ -1033,6 +1033,16 @@ def get_thumbnail(args, handle, size):
1033
1033
  return handler.send_thumbnail(size=size, square=args["square"])
1034
1034
 
1035
1035
 
1036
+ def _abort_if_invalid_crop(x1: int, y1: int, x2: int, y2: int) -> None:
1037
+ """Abort unless the crop region (in percent) lies within the image.
1038
+
1039
+ Pillow pads crops outside the image, so unchecked coordinates could
1040
+ allocate an arbitrarily large image.
1041
+ """
1042
+ if not (0 <= x1 < x2 <= 100 and 0 <= y1 < y2 <= 100):
1043
+ abort_with_message(400, "Crop region must lie within 0 and 100 percent")
1044
+
1045
+
1036
1046
  @api_blueprint.route(
1037
1047
  "/media/<string:handle>/cropped/<int:x1>/<int:y1>/<int:x2>/<int:y2>"
1038
1048
  )
@@ -1049,6 +1059,7 @@ def get_thumbnail(args, handle, size):
1049
1059
  @thumbnail_cache_decorator
1050
1060
  def get_cropped(args, handle: str, x1: int, y1: int, x2: int, y2: int):
1051
1061
  """Get the thumbnail of a cropped file."""
1062
+ _abort_if_invalid_crop(x1, y1, x2, y2)
1052
1063
  tree = get_tree_from_jwt()
1053
1064
  db_handle = get_db_handle()
1054
1065
  handler = get_media_handler(db_handle, tree=tree).get_file_handler(
@@ -1075,6 +1086,7 @@ def get_thumbnail_cropped(
1075
1086
  args, handle: str, x1: int, y1: int, x2: int, y2: int, size: int
1076
1087
  ):
1077
1088
  """Get the thumbnail of a cropped file."""
1089
+ _abort_if_invalid_crop(x1, y1, x2, y2)
1078
1090
  tree = get_tree_from_jwt()
1079
1091
  db_handle = get_db_handle()
1080
1092
  handler = get_media_handler(db_handle, tree=tree).get_file_handler(
@@ -141,8 +141,21 @@ def skip_cache_missing_media(*args, **kwargs) -> bool:
141
141
  return g.cached_media is None
142
142
 
143
143
 
144
+ def is_cacheable_response(rv) -> bool:
145
+ """Only cache successful responses.
146
+
147
+ Since Flask-Caching 2.5.0, an exception raised by `abort()` is cached as
148
+ well. An error can depend on the server rather than the tree (e.g. an addon
149
+ that isn't installed yet), so it must not be served until the tree changes.
150
+ The view may return something other than a `Response`, e.g. a string.
151
+ """
152
+ return getattr(rv, "status_code", 200) < 400
153
+
154
+
144
155
  _request_cached = request_cache.cached(
145
- make_cache_key=make_cache_key_request, unless=skip_cache_condition_request
156
+ make_cache_key=make_cache_key_request,
157
+ unless=skip_cache_condition_request,
158
+ response_filter=is_cacheable_response,
146
159
  )
147
160
 
148
161
 
@@ -22,9 +22,11 @@
22
22
  import hashlib
23
23
  import json
24
24
  import os
25
+ import shutil
26
+ import tempfile
25
27
  from io import BytesIO
26
28
  from pathlib import Path
27
- from typing import Any, BinaryIO, Optional, Tuple, Union
29
+ from typing import IO, Any, BinaryIO, Optional, Tuple, Union
28
30
 
29
31
  from flask import jsonify, make_response, send_file, send_from_directory, current_app
30
32
  from gramps.gen.db.base import DbReadBase
@@ -326,7 +328,7 @@ class LocalFileHandler(FileHandler):
326
328
 
327
329
 
328
330
  def upload_file_local(
329
- base_dir: FilenameOrPath, rel_path: FilenameOrPath, stream: BinaryIO
331
+ base_dir: FilenameOrPath, rel_path: FilenameOrPath, stream: IO[bytes]
330
332
  ) -> None:
331
333
  """Upload a file from a stream to a path inside the base directory.
332
334
 
@@ -358,10 +360,11 @@ def get_checksum(fp) -> str:
358
360
  return md5sum
359
361
 
360
362
 
361
- def process_file(stream: Union[Any, BinaryIO]) -> Tuple[str, int, BinaryIO]:
363
+ def process_file(stream: Union[Any, BinaryIO]) -> Tuple[str, int, IO[bytes]]:
362
364
  """Process a file from a stream that has a read method."""
363
- fp = BytesIO()
364
- fp.write(stream.read())
365
+ # copy in chunks, spilling to disk, instead of holding the body in memory twice
366
+ fp = tempfile.SpooledTemporaryFile(max_size=10 * 1024 * 1024)
367
+ shutil.copyfileobj(stream, fp)
365
368
  fp.seek(0)
366
369
  checksum = get_checksum(fp)
367
370
  size = fp.tell()
@@ -75,11 +75,13 @@ def _fix_xmp(image: ImageType) -> None:
75
75
 
76
76
 
77
77
  def exif_transpose(image: ImageType) -> ImageType:
78
- """Return a copy of the image rotated according to its EXIF orientation."""
78
+ """Rotate the image in place according to its EXIF orientation and return it.
79
+
80
+ Pillow's default returns a full copy even when no rotation is needed.
81
+ """
79
82
  _fix_xmp(image)
80
- transposed = ImageOps.exif_transpose(image)
81
- assert transposed is not None # for type checker
82
- return transposed
83
+ ImageOps.exif_transpose(image, in_place=True)
84
+ return image
83
85
 
84
86
 
85
87
  def open_image(fp: Union[BinaryIO, FilenameOrPath]) -> ImageType:
@@ -240,7 +240,8 @@ def answer_with_agent(
240
240
 
241
241
  messages: list[ModelMessage] = []
242
242
  try:
243
- logger.debug("Running Pydantic AI agent with prompt: '%s'", prompt)
243
+ # never log the prompt or the answer, they contain private chat content
244
+ logger.debug("Running Pydantic AI agent")
244
245
  with capture_run_messages() as messages:
245
246
  result = agent.run_sync(
246
247
  prompt,
@@ -254,7 +255,7 @@ def answer_with_agent(
254
255
  else None
255
256
  ),
256
257
  )
257
- logger.debug("Agent response: '%s'", result.response.text or "")
258
+ logger.debug("Agent finished with reason: %s", result.response.finish_reason)
258
259
  if result.response.finish_reason == "length":
259
260
  logger.warning(
260
261
  "AI answer cut off at the output token limit, see "
@@ -295,7 +296,11 @@ def answer_with_agent(
295
296
  abort_with_message(
296
297
  400, "The AI model's response exceeded its output token limit."
297
298
  )
298
- logger.error("Pydantic AI error: %s", e)
299
+ # str(e) can include the model's response body
300
+ logger.error(
301
+ "Pydantic AI error: %s",
302
+ e.message if isinstance(e, UnexpectedModelBehavior) else type(e).__name__,
303
+ )
299
304
  abort_with_message(500, "Error communicating with the AI model")
300
305
  except Exception:
301
306
  logger.exception("Unexpected error in agent")
@@ -22,10 +22,17 @@
22
22
  from __future__ import annotations
23
23
 
24
24
  import warnings
25
+ from dataclasses import replace
25
26
 
26
27
  from pydantic_ai import Agent, RunContext
27
28
  from pydantic_ai.capabilities import ProcessHistory
28
- from pydantic_ai.messages import ModelMessage, ModelRequest, UserPromptPart
29
+ from pydantic_ai.messages import (
30
+ ModelMessage,
31
+ ModelRequest,
32
+ SystemPromptPart,
33
+ ToolReturnPart,
34
+ UserPromptPart,
35
+ )
29
36
  from pydantic_ai.models.ollama import OllamaModel
30
37
  from pydantic_ai.models.openai import OpenAIChatModel
31
38
  from pydantic_ai.providers import infer_provider_class
@@ -58,33 +65,84 @@ def _part_chars(part) -> int:
58
65
  return 0
59
66
 
60
67
 
61
- def _trim_history(
68
+ OMITTED_TOOL_RESULT = (
69
+ "[Result omitted from history to save space. "
70
+ "Call the tool again if you need the details.]"
71
+ )
72
+
73
+
74
+ def _compact_history(
62
75
  ctx: RunContext[AgentDeps], messages: list[ModelMessage]
63
76
  ) -> list[ModelMessage]:
64
- """Drop oldest complete user turns when history exceeds 3× the context budget.
65
-
66
- A "turn" is everything from one ModelRequest[UserPromptPart] up to (but not
67
- including) the next. Turns are always dropped as units to keep ToolCallPart /
68
- ToolReturnPart pairs intact.
77
+ """Keep the history within 3× the context budget.
78
+
79
+ First, tool results are replaced with a placeholder, oldest first, until
80
+ the history fits. The last message is left untouched, as it holds the
81
+ results the model is about to use. Only if that is not enough are the
82
+ oldest turns dropped. The system prompt and the current turn are always
83
+ kept, so the model keeps its instructions and the question it is
84
+ answering, and every tool call keeps its result.
69
85
  """
70
86
  budget = ctx.deps.max_context_length * 3
87
+ total = sum(_part_chars(p) for msg in messages for p in msg.parts)
88
+
89
+ compacted = list(messages)
90
+ for i, msg in enumerate(messages[:-1]):
91
+ if total <= budget:
92
+ break
93
+ if not isinstance(msg, ModelRequest):
94
+ continue
95
+ parts = []
96
+ for part in msg.parts:
97
+ size = _part_chars(part)
98
+ if isinstance(part, ToolReturnPart) and size > len(OMITTED_TOOL_RESULT):
99
+ total -= size - len(OMITTED_TOOL_RESULT)
100
+ part = replace(part, content=OMITTED_TOOL_RESULT)
101
+ parts.append(part)
102
+ compacted[i] = replace(msg, parts=parts)
103
+
104
+ if total <= budget:
105
+ return compacted
106
+ return _drop_old_turns(compacted, total, budget)
107
+
108
+
109
+ def _drop_old_turns(
110
+ messages: list[ModelMessage], total: int, budget: int
111
+ ) -> list[ModelMessage]:
112
+ """Drop the oldest complete turns until the history fits the budget.
71
113
 
114
+ A turn starts with a request containing a user prompt. The current turn is
115
+ never dropped, and the system prompt is moved to the first kept request.
116
+ """
72
117
  turn_starts = [
73
118
  i
74
119
  for i, msg in enumerate(messages)
75
120
  if isinstance(msg, ModelRequest)
76
121
  and any(isinstance(p, UserPromptPart) for p in msg.parts)
77
122
  ]
78
-
79
- total = sum(_part_chars(p) for msg in messages for p in msg.parts)
80
-
81
- while total > budget and len(turn_starts) > 1:
82
- drop_to = turn_starts[1]
83
- total -= sum(_part_chars(p) for msg in messages[:drop_to] for p in msg.parts)
84
- messages = messages[drop_to:]
85
- turn_starts = [i - drop_to for i in turn_starts[1:]]
86
-
87
- return messages
123
+ start = 0
124
+ for turn_start in turn_starts[1:]:
125
+ if total <= budget:
126
+ break
127
+ total -= sum(
128
+ _part_chars(p)
129
+ for msg in messages[start:turn_start]
130
+ for p in msg.parts
131
+ if not isinstance(p, SystemPromptPart)
132
+ )
133
+ start = turn_start
134
+ if start == 0:
135
+ return messages
136
+
137
+ system_parts = [
138
+ p
139
+ for msg in messages[:start]
140
+ for p in msg.parts
141
+ if isinstance(p, SystemPromptPart)
142
+ ]
143
+ first = messages[start]
144
+ assert isinstance(first, ModelRequest) # turns start with a request
145
+ return [replace(first, parts=[*system_parts, *first.parts]), *messages[start + 1 :]]
88
146
 
89
147
 
90
148
  SEARCH_STRATEGY_FULLTEXT = """search_genealogy_database matches exact names or
@@ -200,7 +258,7 @@ def create_agent(
200
258
  model,
201
259
  deps_type=AgentDeps,
202
260
  system_prompt=system_prompt,
203
- capabilities=[ProcessHistory(_trim_history)],
261
+ capabilities=[ProcessHistory(_compact_history)],
204
262
  )
205
263
  agent.tool(get_current_date)
206
264
  agent.tool(search_genealogy_database)
@@ -143,7 +143,10 @@ def _apply_gramps_filter(
143
143
  filter_dict["function"] = logic
144
144
 
145
145
  filter_rules = json.dumps(filter_dict)
146
- logger.debug("%s filter rules: %s", namespace, filter_rules)
146
+ # rule values come from the chat, so only log the rule names
147
+ logger.debug(
148
+ "%s filter rules: %s", namespace, [rule["name"] for rule in rules]
149
+ )
147
150
 
148
151
  args = {"rules": filter_rules}
149
152
  matching_handles = apply_filter(
@@ -404,10 +407,9 @@ def search_genealogy_database(
404
407
  if len(context_parts) < total:
405
408
  result += f"\n\n---\nShowing {len(context_parts)} of {total} matches."
406
409
  logger.debug(
407
- "Tool search_genealogy_database returned %d results (%d chars) for query: %r",
410
+ "Tool search_genealogy_database returned %d results (%d chars)",
408
411
  len(context_parts),
409
412
  len(result),
410
- query,
411
413
  )
412
414
  return result
413
415
 
@@ -26,7 +26,7 @@ import os
26
26
  import time
27
27
  import zipfile
28
28
  from pathlib import Path
29
- from typing import TYPE_CHECKING, BinaryIO, Callable, List, Optional, Set
29
+ from typing import IO, TYPE_CHECKING, Callable, List, Optional, Set
30
30
 
31
31
  from flask import current_app
32
32
  from flask_jwt_extended import get_jwt_identity
@@ -159,7 +159,7 @@ class MediaHandlerBase:
159
159
 
160
160
  def upload_file(
161
161
  self,
162
- stream: BinaryIO,
162
+ stream: IO[bytes],
163
163
  checksum: str,
164
164
  mime: str,
165
165
  path: Optional[FilenameOrPath] = None,
@@ -203,7 +203,7 @@ class MediaHandlerLocal(MediaHandlerBase):
203
203
 
204
204
  def upload_file(
205
205
  self,
206
- stream: BinaryIO,
206
+ stream: IO[bytes],
207
207
  checksum: str,
208
208
  mime: str,
209
209
  path: Optional[FilenameOrPath] = None,
@@ -347,7 +347,7 @@ class MediaHandlerS3(MediaHandlerBase):
347
347
 
348
348
  def upload_file(
349
349
  self,
350
- stream: BinaryIO,
350
+ stream: IO[bytes],
351
351
  checksum: str,
352
352
  mime: str,
353
353
  path: Optional[FilenameOrPath] = None,
@@ -50,7 +50,7 @@ class CitationResourceHelper(GrampsObjectResourceHelper):
50
50
  """Extend citation attributes as needed."""
51
51
  if "profile" in args:
52
52
  obj.profile = get_citation_profile_for_object(
53
- self.db_handle, obj, args["profile"]
53
+ self.db_handle, obj, args["profile"], locale=locale
54
54
  )
55
55
  if "extend" in args:
56
56
  obj.extended = get_extended_attributes(self.db_handle, obj, args)
@@ -87,8 +87,13 @@ class PersonDnaMatchesResource(ProtectedResource):
87
87
  abort(404)
88
88
  raise AssertionError # for type checker
89
89
 
90
- db_handle.cache_people()
91
- db_handle.cache_families()
90
+ # caching the whole tree is only worth it if there are matches to compute
91
+ if any(
92
+ association.get_relation() == "DNA"
93
+ for association in person.get_person_ref_list()
94
+ ):
95
+ db_handle.cache_people()
96
+ db_handle.cache_families()
92
97
 
93
98
  locale = get_locale_for_language(args["locale"], default=True)
94
99
 
@@ -20,7 +20,7 @@
20
20
  """Object storage (e.g. S3) handling utilities."""
21
21
 
22
22
  from io import BytesIO
23
- from typing import BinaryIO, Dict, Optional
23
+ from typing import IO, BinaryIO, Dict, Optional
24
24
 
25
25
  from flask import current_app, redirect, send_file
26
26
  from gramps.gen.db.base import DbReadBase
@@ -210,7 +210,7 @@ class ObjectStorageFileHandler(FileHandler):
210
210
 
211
211
  def upload_file_s3(
212
212
  bucket_name: str,
213
- stream: BinaryIO,
213
+ stream: IO[bytes],
214
214
  checksum: str,
215
215
  mime: str,
216
216
  prefix: Optional[str] = None,
@@ -241,7 +241,9 @@ def _collect(
241
241
  spec = FIELD_SPECS[data["_class"]]
242
242
  is_private = is_private or bool(data.get("private"))
243
243
  strings = private if is_private else public
244
- strings += [data[key] for key in spec.text if data.get(key)]
244
+ # Gramps does not enforce types, so data written by other tools can hold
245
+ # e.g. a postal code as a number
246
+ strings += [str(data[key]) for key in spec.text if data.get(key)]
245
247
  strings += [_type_string(data.get(key), False) for key in spec.types]
246
248
  strings += [_type_string(data.get(key), True) for key in spec.custom_types]
247
249
  for key in spec.children:
@@ -1,5 +1,7 @@
1
1
  """Utility functions for celery."""
2
2
 
3
+ import logging
4
+
3
5
  from celery import Task
4
6
  from celery import current_app as current_celery_app
5
7
  from werkzeug.exceptions import HTTPException
@@ -22,8 +24,31 @@ class TaskRejection(TaskError):
22
24
  """
23
25
 
24
26
 
27
+ class HideTaskResultFilter(logging.Filter):
28
+ """Hide task return values in Celery's "Task ... succeeded" log records.
29
+
30
+ Results can contain private tree data, e.g. OCR text or AI chat answers.
31
+ Celery has no setting for this, but passes the log context as ``data`` in
32
+ ``extra`` for custom handlers, so the value is replaced there too.
33
+ """
34
+
35
+ def filter(self, record: logging.LogRecord) -> bool:
36
+ context = record.args
37
+ if isinstance(context, dict) and "return_value" in context:
38
+ context = {**context, "return_value": "<hidden>"}
39
+ record.args = context
40
+ if isinstance(getattr(record, "data", None), dict):
41
+ record.data = context
42
+ return True
43
+
44
+
45
+ _hide_task_result_filter = HideTaskResultFilter()
46
+
47
+
25
48
  def create_celery(app):
26
49
  """App factory for celery."""
50
+ # no-op if already added, create_celery runs once per app
51
+ logging.getLogger("celery.app.trace").addFilter(_hide_task_result_filter)
27
52
  celery = current_celery_app
28
53
  celery.conf.name = app.import_name
29
54
  celery.conf.update(app.config["CELERY_CONFIG"])
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: gramps-webapi
3
- Version: 3.25.0
3
+ Version: 3.25.2
4
4
  Summary: A RESTful web API for the Gramps genealogical database.
5
5
  Author: Gramps Development Team
6
6
  Author-email: "David M. Straub" <straub@protonmail.com>
@@ -44,7 +44,7 @@ Requires-Dist: gramps-ql>=0.5.0
44
44
  Requires-Dist: psycopg2-binary
45
45
  Requires-Dist: requests
46
46
  Requires-Dist: yclade>=0.5.0
47
- Requires-Dist: Authlib>=1.6.4
47
+ Requires-Dist: Authlib>=1.9.0
48
48
  Requires-Dist: gramps-gedcom7>=0.4.0
49
49
  Requires-Dist: flask-smorest
50
50
  Requires-Dist: typing-extensions>=4.13.0
@@ -208,6 +208,7 @@ scripts/start_dev_container.sh
208
208
  tests/__init__.py
209
209
  tests/conftest.py
210
210
  tests/test_access.py
211
+ tests/test_celery_logging.py
211
212
  tests/test_check.py
212
213
  tests/test_cli.py
213
214
  tests/test_close_db.py
@@ -225,6 +226,7 @@ tests/test_jwt.py
225
226
  tests/test_limiter.py
226
227
  tests/test_llm_agent.py
227
228
  tests/test_llm_errors.py
229
+ tests/test_llm_history.py
228
230
  tests/test_llm_render.py
229
231
  tests/test_llm_tools.py
230
232
  tests/test_logging_utils.py
@@ -259,6 +261,7 @@ tests/test_task_state.py
259
261
  tests/test_tasks.py
260
262
  tests/test_telemetry.py
261
263
  tests/test_undodb.py
264
+ tests/test_user_db_migration.py
262
265
  tests/test_util.py
263
266
  tests/test_verify_lib.py
264
267
  tests/test_version.py
@@ -29,7 +29,7 @@ gramps-ql>=0.5.0
29
29
  psycopg2-binary
30
30
  requests
31
31
  yclade>=0.5.0
32
- Authlib>=1.6.4
32
+ Authlib>=1.9.0
33
33
  gramps-gedcom7>=0.4.0
34
34
  flask-smorest
35
35
  typing-extensions>=4.13.0
@@ -46,7 +46,7 @@ dependencies = [
46
46
  "psycopg2-binary", # PostgreSQL driver for the user DB and search index
47
47
  "requests",
48
48
  "yclade>=0.5.0",
49
- "Authlib>=1.6.4",
49
+ "Authlib>=1.9.0",
50
50
  "gramps-gedcom7>=0.4.0",
51
51
  "flask-smorest",
52
52
  "typing-extensions>=4.13.0",