gramps-webapi 3.25.2__tar.gz → 3.26.0__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 (366) hide show
  1. {gramps_webapi-3.25.2 → gramps_webapi-3.26.0}/Dockerfile.base +1 -1
  2. {gramps_webapi-3.25.2 → gramps_webapi-3.26.0}/PKG-INFO +5 -4
  3. gramps_webapi-3.26.0/ROADMAP.md +73 -0
  4. {gramps_webapi-3.25.2 → gramps_webapi-3.26.0}/gramps_webapi/__main__.py +22 -1
  5. {gramps_webapi-3.25.2 → gramps_webapi-3.26.0}/gramps_webapi/_version.py +1 -1
  6. {gramps_webapi-3.25.2 → gramps_webapi-3.26.0}/gramps_webapi/api/__init__.py +32 -1
  7. {gramps_webapi-3.25.2 → gramps_webapi-3.26.0}/gramps_webapi/api/access/db.py +131 -18
  8. {gramps_webapi-3.25.2 → gramps_webapi-3.26.0}/gramps_webapi/api/cache.py +18 -6
  9. gramps_webapi-3.26.0/gramps_webapi/api/dry_run.py +60 -0
  10. {gramps_webapi-3.25.2 → gramps_webapi-3.26.0}/gramps_webapi/api/export.py +0 -4
  11. {gramps_webapi-3.25.2 → gramps_webapi-3.26.0}/gramps_webapi/api/faces.py +5 -1
  12. {gramps_webapi-3.25.2 → gramps_webapi-3.26.0}/gramps_webapi/api/file.py +2 -3
  13. {gramps_webapi-3.25.2 → gramps_webapi-3.26.0}/gramps_webapi/api/llm/__init__.py +51 -2
  14. {gramps_webapi-3.25.2 → gramps_webapi-3.26.0}/gramps_webapi/api/llm/agent.py +38 -0
  15. {gramps_webapi-3.25.2 → gramps_webapi-3.26.0}/gramps_webapi/api/llm/deps.py +20 -0
  16. gramps_webapi-3.26.0/gramps_webapi/api/llm/images.py +140 -0
  17. gramps_webapi-3.26.0/gramps_webapi/api/llm/propose.py +805 -0
  18. {gramps_webapi-3.25.2 → gramps_webapi-3.26.0}/gramps_webapi/api/llm/render.py +12 -1
  19. {gramps_webapi-3.25.2 → gramps_webapi-3.26.0}/gramps_webapi/api/llm/tools.py +269 -193
  20. {gramps_webapi-3.25.2 → gramps_webapi-3.26.0}/gramps_webapi/api/media.py +36 -4
  21. gramps_webapi-3.26.0/gramps_webapi/api/media_importer.py +400 -0
  22. {gramps_webapi-3.25.2 → gramps_webapi-3.26.0}/gramps_webapi/api/report.py +1 -5
  23. {gramps_webapi-3.25.2 → gramps_webapi-3.26.0}/gramps_webapi/api/resources/anniversaries.py +8 -3
  24. {gramps_webapi-3.25.2 → gramps_webapi-3.26.0}/gramps_webapi/api/resources/base.py +33 -35
  25. gramps_webapi-3.26.0/gramps_webapi/api/resources/bulk_edit.py +123 -0
  26. {gramps_webapi-3.25.2 → gramps_webapi-3.26.0}/gramps_webapi/api/resources/chat.py +66 -5
  27. {gramps_webapi-3.25.2 → gramps_webapi-3.26.0}/gramps_webapi/api/resources/delete.py +13 -6
  28. {gramps_webapi-3.25.2 → gramps_webapi-3.26.0}/gramps_webapi/api/resources/dna.py +27 -1
  29. {gramps_webapi-3.25.2 → gramps_webapi-3.26.0}/gramps_webapi/api/resources/emit.py +5 -3
  30. {gramps_webapi-3.25.2 → gramps_webapi-3.26.0}/gramps_webapi/api/resources/facts.py +1 -0
  31. {gramps_webapi-3.25.2 → gramps_webapi-3.26.0}/gramps_webapi/api/resources/filters.py +184 -70
  32. {gramps_webapi-3.25.2 → gramps_webapi-3.26.0}/gramps_webapi/api/resources/living.py +5 -3
  33. {gramps_webapi-3.25.2 → gramps_webapi-3.26.0}/gramps_webapi/api/resources/metadata.py +3 -2
  34. {gramps_webapi-3.25.2 → gramps_webapi-3.26.0}/gramps_webapi/api/resources/object_query.py +222 -475
  35. {gramps_webapi-3.25.2 → gramps_webapi-3.26.0}/gramps_webapi/api/resources/objects.py +62 -2
  36. {gramps_webapi-3.25.2 → gramps_webapi-3.26.0}/gramps_webapi/api/resources/oidc.py +164 -10
  37. {gramps_webapi-3.25.2 → gramps_webapi-3.26.0}/gramps_webapi/api/resources/relations.py +91 -1
  38. {gramps_webapi-3.25.2 → gramps_webapi-3.26.0}/gramps_webapi/api/resources/schemas.py +204 -9
  39. {gramps_webapi-3.25.2 → gramps_webapi-3.26.0}/gramps_webapi/api/resources/search.py +5 -3
  40. {gramps_webapi-3.25.2 → gramps_webapi-3.26.0}/gramps_webapi/api/resources/timeline.py +17 -12
  41. {gramps_webapi-3.25.2 → gramps_webapi-3.26.0}/gramps_webapi/api/resources/translations.py +1 -0
  42. {gramps_webapi-3.25.2 → gramps_webapi-3.26.0}/gramps_webapi/api/resources/user.py +93 -22
  43. gramps_webapi-3.26.0/gramps_webapi/api/resources/user_merge.py +113 -0
  44. {gramps_webapi-3.25.2 → gramps_webapi-3.26.0}/gramps_webapi/api/resources/util.py +109 -62
  45. {gramps_webapi-3.25.2 → gramps_webapi-3.26.0}/gramps_webapi/api/tasks.py +119 -51
  46. {gramps_webapi-3.25.2 → gramps_webapi-3.26.0}/gramps_webapi/api/telemetry.py +23 -4
  47. {gramps_webapi-3.25.2 → gramps_webapi-3.26.0}/gramps_webapi/api/util.py +76 -18
  48. {gramps_webapi-3.25.2 → gramps_webapi-3.26.0}/gramps_webapi/app.py +24 -3
  49. {gramps_webapi-3.25.2 → gramps_webapi-3.26.0}/gramps_webapi/auth/__init__.py +118 -0
  50. {gramps_webapi-3.25.2 → gramps_webapi-3.26.0}/gramps_webapi/auth/oidc.py +10 -0
  51. {gramps_webapi-3.25.2 → gramps_webapi-3.26.0}/gramps_webapi/config.py +6 -0
  52. {gramps_webapi-3.25.2 → gramps_webapi-3.26.0}/gramps_webapi/future_gramps/__init__.py +3 -1
  53. gramps_webapi-3.26.0/gramps_webapi/future_gramps/raw_data_many.py +160 -0
  54. gramps_webapi-3.26.0/gramps_webapi/future_gramps/relationship_path.py +782 -0
  55. {gramps_webapi-3.25.2 → gramps_webapi-3.26.0}/gramps_webapi/profiler.py +5 -8
  56. {gramps_webapi-3.25.2 → gramps_webapi-3.26.0}/gramps_webapi/undodb.py +8 -0
  57. {gramps_webapi-3.25.2 → gramps_webapi-3.26.0}/gramps_webapi/util/__init__.py +14 -0
  58. {gramps_webapi-3.25.2 → gramps_webapi-3.26.0}/gramps_webapi.egg-info/PKG-INFO +5 -4
  59. {gramps_webapi-3.25.2 → gramps_webapi-3.26.0}/gramps_webapi.egg-info/SOURCES.txt +18 -1
  60. {gramps_webapi-3.25.2 → gramps_webapi-3.26.0}/gramps_webapi.egg-info/requires.txt +4 -3
  61. {gramps_webapi-3.25.2 → gramps_webapi-3.26.0}/pyproject.toml +6 -5
  62. {gramps_webapi-3.25.2 → gramps_webapi-3.26.0}/tests/test_cli.py +99 -1
  63. gramps_webapi-3.26.0/tests/test_dry_run.py +255 -0
  64. {gramps_webapi-3.25.2 → gramps_webapi-3.26.0}/tests/test_endpoints/test_anniversaries_ics.py +16 -0
  65. {gramps_webapi-3.25.2 → gramps_webapi-3.26.0}/tests/test_endpoints/test_chat.py +146 -1
  66. {gramps_webapi-3.25.2 → gramps_webapi-3.26.0}/tests/test_endpoints/test_dna.py +34 -0
  67. gramps_webapi-3.26.0/tests/test_endpoints/test_edit_by_handle.py +358 -0
  68. {gramps_webapi-3.25.2 → gramps_webapi-3.26.0}/tests/test_endpoints/test_etag.py +20 -5
  69. {gramps_webapi-3.25.2 → gramps_webapi-3.26.0}/tests/test_endpoints/test_file.py +16 -0
  70. {gramps_webapi-3.25.2 → gramps_webapi-3.26.0}/tests/test_endpoints/test_filters.py +292 -0
  71. {gramps_webapi-3.25.2 → gramps_webapi-3.26.0}/tests/test_endpoints/test_import_media.py +32 -0
  72. {gramps_webapi-3.25.2 → gramps_webapi-3.26.0}/tests/test_endpoints/test_media_archive.py +9 -9
  73. {gramps_webapi-3.25.2 → gramps_webapi-3.26.0}/tests/test_endpoints/test_object_query.py +5 -5
  74. {gramps_webapi-3.25.2 → gramps_webapi-3.26.0}/tests/test_endpoints/test_oidc.py +293 -8
  75. {gramps_webapi-3.25.2 → gramps_webapi-3.26.0}/tests/test_endpoints/test_people.py +29 -28
  76. {gramps_webapi-3.25.2 → gramps_webapi-3.26.0}/tests/test_endpoints/test_people_query.py +288 -45
  77. {gramps_webapi-3.25.2 → gramps_webapi-3.26.0}/tests/test_endpoints/test_put.py +8 -12
  78. gramps_webapi-3.26.0/tests/test_endpoints/test_query_conformance.py +285 -0
  79. {gramps_webapi-3.25.2 → gramps_webapi-3.26.0}/tests/test_endpoints/test_relations.py +162 -0
  80. {gramps_webapi-3.25.2 → gramps_webapi-3.26.0}/tests/test_endpoints/test_timelines.py +8 -0
  81. {gramps_webapi-3.25.2 → gramps_webapi-3.26.0}/tests/test_endpoints/test_transactions.py +27 -2
  82. {gramps_webapi-3.25.2 → gramps_webapi-3.26.0}/tests/test_endpoints/test_user.py +44 -0
  83. gramps_webapi-3.26.0/tests/test_endpoints/test_user_merge.py +361 -0
  84. gramps_webapi-3.26.0/tests/test_endpoints/test_user_set_password.py +196 -0
  85. {gramps_webapi-3.25.2 → gramps_webapi-3.26.0}/tests/test_face_detection.py +8 -0
  86. gramps_webapi-3.26.0/tests/test_family_link_graph.py +177 -0
  87. {gramps_webapi-3.25.2 → gramps_webapi-3.26.0}/tests/test_file.py +15 -0
  88. gramps_webapi-3.26.0/tests/test_future_gramps_raw_data_many.py +197 -0
  89. gramps_webapi-3.26.0/tests/test_future_gramps_relationship_path.py +830 -0
  90. {gramps_webapi-3.25.2 → gramps_webapi-3.26.0}/tests/test_import_util.py +292 -5
  91. {gramps_webapi-3.25.2 → gramps_webapi-3.26.0}/tests/test_llm_errors.py +11 -0
  92. gramps_webapi-3.26.0/tests/test_llm_images.py +326 -0
  93. gramps_webapi-3.26.0/tests/test_llm_propose.py +741 -0
  94. {gramps_webapi-3.25.2 → gramps_webapi-3.26.0}/tests/test_llm_render.py +9 -0
  95. gramps_webapi-3.26.0/tests/test_llm_tools.py +812 -0
  96. gramps_webapi-3.26.0/tests/test_media_importer.py +539 -0
  97. gramps_webapi-3.26.0/tests/test_object_query_parsing.py +531 -0
  98. {gramps_webapi-3.25.2 → gramps_webapi-3.26.0}/tests/test_oidc_auth.py +53 -0
  99. gramps_webapi-3.26.0/tests/test_proxy_fix.py +104 -0
  100. gramps_webapi-3.26.0/tests/test_s3.py +183 -0
  101. {gramps_webapi-3.25.2 → gramps_webapi-3.26.0}/tests/test_shared_postgresql.py +105 -16
  102. {gramps_webapi-3.25.2 → gramps_webapi-3.26.0}/tests/test_telemetry.py +51 -0
  103. {gramps_webapi-3.25.2 → gramps_webapi-3.26.0}/tests/test_util.py +68 -1
  104. gramps_webapi-3.25.2/ROADMAP.md +0 -43
  105. gramps_webapi-3.25.2/gramps_webapi/api/media_importer.py +0 -293
  106. gramps_webapi-3.25.2/tests/test_endpoints/test_object_query_where_tree.py +0 -168
  107. gramps_webapi-3.25.2/tests/test_llm_tools.py +0 -1353
  108. gramps_webapi-3.25.2/tests/test_media_importer.py +0 -240
  109. gramps_webapi-3.25.2/tests/test_object_query_parsing.py +0 -1191
  110. gramps_webapi-3.25.2/tests/test_s3.py +0 -82
  111. {gramps_webapi-3.25.2 → gramps_webapi-3.26.0}/.devcontainer/Dockerfile +0 -0
  112. {gramps_webapi-3.25.2 → gramps_webapi-3.26.0}/.devcontainer/devcontainer.json +0 -0
  113. {gramps_webapi-3.25.2 → gramps_webapi-3.26.0}/.devcontainer/docker-compose.yml +0 -0
  114. {gramps_webapi-3.25.2 → gramps_webapi-3.26.0}/.dockerignore +0 -0
  115. {gramps_webapi-3.25.2 → gramps_webapi-3.26.0}/.editorconfig +0 -0
  116. {gramps_webapi-3.25.2 → gramps_webapi-3.26.0}/.flake8 +0 -0
  117. {gramps_webapi-3.25.2 → gramps_webapi-3.26.0}/.github/ISSUE_TEMPLATE/bug_report.yml +0 -0
  118. {gramps_webapi-3.25.2 → gramps_webapi-3.26.0}/.github/ISSUE_TEMPLATE/config.yml +0 -0
  119. {gramps_webapi-3.25.2 → gramps_webapi-3.26.0}/.github/ISSUE_TEMPLATE/feature_request.md +0 -0
  120. {gramps_webapi-3.25.2 → gramps_webapi-3.26.0}/.github/workflows/base-image-pr.yml +0 -0
  121. {gramps_webapi-3.25.2 → gramps_webapi-3.26.0}/.github/workflows/base-image.yml +0 -0
  122. {gramps_webapi-3.25.2 → gramps_webapi-3.26.0}/.github/workflows/image.yml +0 -0
  123. {gramps_webapi-3.25.2 → gramps_webapi-3.26.0}/.github/workflows/pypi.yml +0 -0
  124. {gramps_webapi-3.25.2 → gramps_webapi-3.26.0}/.github/workflows/test.yml +0 -0
  125. {gramps_webapi-3.25.2 → gramps_webapi-3.26.0}/.gitignore +0 -0
  126. {gramps_webapi-3.25.2 → gramps_webapi-3.26.0}/.pre-commit-config.yaml +0 -0
  127. {gramps_webapi-3.25.2 → gramps_webapi-3.26.0}/.pylintrc +0 -0
  128. {gramps_webapi-3.25.2 → gramps_webapi-3.26.0}/.vscode/extensions.json +0 -0
  129. {gramps_webapi-3.25.2 → gramps_webapi-3.26.0}/.vscode/launch.json +0 -0
  130. {gramps_webapi-3.25.2 → gramps_webapi-3.26.0}/.vscode/settings.json +0 -0
  131. {gramps_webapi-3.25.2 → gramps_webapi-3.26.0}/.vscode/tasks.json +0 -0
  132. {gramps_webapi-3.25.2 → gramps_webapi-3.26.0}/AGENTS.md +0 -0
  133. {gramps_webapi-3.25.2 → gramps_webapi-3.26.0}/CLAUDE.md +0 -0
  134. {gramps_webapi-3.25.2 → gramps_webapi-3.26.0}/CODE_OF_CONDUCT.md +0 -0
  135. {gramps_webapi-3.25.2 → gramps_webapi-3.26.0}/CONTRIBUTING.md +0 -0
  136. {gramps_webapi-3.25.2 → gramps_webapi-3.26.0}/Dockerfile +0 -0
  137. {gramps_webapi-3.25.2 → gramps_webapi-3.26.0}/LICENSE +0 -0
  138. {gramps_webapi-3.25.2 → gramps_webapi-3.26.0}/MANIFEST.in +0 -0
  139. {gramps_webapi-3.25.2 → gramps_webapi-3.26.0}/README.md +0 -0
  140. {gramps_webapi-3.25.2 → gramps_webapi-3.26.0}/alembic.ini +0 -0
  141. {gramps_webapi-3.25.2 → gramps_webapi-3.26.0}/alembic_users/README +0 -0
  142. {gramps_webapi-3.25.2 → gramps_webapi-3.26.0}/alembic_users/env.py +0 -0
  143. {gramps_webapi-3.25.2 → gramps_webapi-3.26.0}/alembic_users/script.py.mako +0 -0
  144. {gramps_webapi-3.25.2 → gramps_webapi-3.26.0}/alembic_users/versions/2082445b0769_add_oidc_accounts_table_for_secure_.py +0 -0
  145. {gramps_webapi-3.25.2 → gramps_webapi-3.26.0}/alembic_users/versions/22c8d1fba959_add_trees_enabled.py +0 -0
  146. {gramps_webapi-3.25.2 → gramps_webapi-3.26.0}/alembic_users/versions/4b7f9d2e6c01_add_web_push_subscriptions.py +0 -0
  147. {gramps_webapi-3.25.2 → gramps_webapi-3.26.0}/alembic_users/versions/66e56620891a_add_trees_table.py +0 -0
  148. {gramps_webapi-3.25.2 → gramps_webapi-3.26.0}/alembic_users/versions/6d8f3cb50b71_add_persistent_access_tokens_table.py +0 -0
  149. {gramps_webapi-3.25.2 → gramps_webapi-3.26.0}/alembic_users/versions/7b2e9f4c1a63_allow_several_access_tokens_per_scope.py +0 -0
  150. {gramps_webapi-3.25.2 → gramps_webapi-3.26.0}/alembic_users/versions/84960b7d968c_use_bigint_for_quota_media.py +0 -0
  151. {gramps_webapi-3.25.2 → gramps_webapi-3.26.0}/alembic_users/versions/9c4d2e7a5b18_track_task_lifecycle.py +0 -0
  152. {gramps_webapi-3.25.2 → gramps_webapi-3.26.0}/alembic_users/versions/a8e57fe0d82e_add_columns_for_ai_quota.py +0 -0
  153. {gramps_webapi-3.25.2 → gramps_webapi-3.26.0}/alembic_users/versions/b0582f54029c_use_bigint_for_usage_media.py +0 -0
  154. {gramps_webapi-3.25.2 → gramps_webapi-3.26.0}/alembic_users/versions/b2c3d4e5f6a7_add_tree_config_column.py +0 -0
  155. {gramps_webapi-3.25.2 → gramps_webapi-3.26.0}/alembic_users/versions/b6f1d3a9c2e4_add_token_version_to_user.py +0 -0
  156. {gramps_webapi-3.25.2 → gramps_webapi-3.26.0}/alembic_users/versions/c1d2e3f4a5b6_merge_task_tree_and_tree_config.py +0 -0
  157. {gramps_webapi-3.25.2 → gramps_webapi-3.26.0}/alembic_users/versions/c89728e71264_.py +0 -0
  158. {gramps_webapi-3.25.2 → gramps_webapi-3.26.0}/alembic_users/versions/d4e9a1c7b3f2_drop_unique_constraint_on_user_email.py +0 -0
  159. {gramps_webapi-3.25.2 → gramps_webapi-3.26.0}/alembic_users/versions/e176543c72a8_add_tree_column_to_user.py +0 -0
  160. {gramps_webapi-3.25.2 → gramps_webapi-3.26.0}/alembic_users/versions/e5e738d09fa7_added_configuration_table.py +0 -0
  161. {gramps_webapi-3.25.2 → gramps_webapi-3.26.0}/alembic_users/versions/f3a1c8e92b47_add_task_tree_table.py +0 -0
  162. {gramps_webapi-3.25.2 → gramps_webapi-3.26.0}/docker-entrypoint.sh +0 -0
  163. {gramps_webapi-3.25.2 → gramps_webapi-3.26.0}/gramps_webapi/__init__.py +0 -0
  164. {gramps_webapi-3.25.2 → gramps_webapi-3.26.0}/gramps_webapi/api/access/__init__.py +0 -0
  165. {gramps_webapi-3.25.2 → gramps_webapi-3.26.0}/gramps_webapi/api/access/policy.py +0 -0
  166. {gramps_webapi-3.25.2 → gramps_webapi-3.26.0}/gramps_webapi/api/access/sanitize.py +0 -0
  167. {gramps_webapi-3.25.2 → gramps_webapi-3.26.0}/gramps_webapi/api/auth.py +0 -0
  168. {gramps_webapi-3.25.2 → gramps_webapi-3.26.0}/gramps_webapi/api/backup.py +0 -0
  169. {gramps_webapi-3.25.2 → gramps_webapi-3.26.0}/gramps_webapi/api/backup_store.py +0 -0
  170. {gramps_webapi-3.25.2 → gramps_webapi-3.26.0}/gramps_webapi/api/blueprint.py +0 -0
  171. {gramps_webapi-3.25.2 → gramps_webapi-3.26.0}/gramps_webapi/api/check.py +0 -0
  172. {gramps_webapi-3.25.2 → gramps_webapi-3.26.0}/gramps_webapi/api/deprecations.py +0 -0
  173. {gramps_webapi-3.25.2 → gramps_webapi-3.26.0}/gramps_webapi/api/dna.py +0 -0
  174. {gramps_webapi-3.25.2 → gramps_webapi-3.26.0}/gramps_webapi/api/emails.py +0 -0
  175. {gramps_webapi-3.25.2 → gramps_webapi-3.26.0}/gramps_webapi/api/html.py +0 -0
  176. {gramps_webapi-3.25.2 → gramps_webapi-3.26.0}/gramps_webapi/api/image.py +0 -0
  177. {gramps_webapi-3.25.2 → gramps_webapi-3.26.0}/gramps_webapi/api/people_families_cache.py +0 -0
  178. {gramps_webapi-3.25.2 → gramps_webapi-3.26.0}/gramps_webapi/api/ratelimiter.py +0 -0
  179. {gramps_webapi-3.25.2 → gramps_webapi-3.26.0}/gramps_webapi/api/resources/__init__.py +0 -0
  180. {gramps_webapi-3.25.2 → gramps_webapi-3.26.0}/gramps_webapi/api/resources/access_tokens.py +0 -0
  181. {gramps_webapi-3.25.2 → gramps_webapi-3.26.0}/gramps_webapi/api/resources/backups.py +0 -0
  182. {gramps_webapi-3.25.2 → gramps_webapi-3.26.0}/gramps_webapi/api/resources/bookmarks.py +0 -0
  183. {gramps_webapi-3.25.2 → gramps_webapi-3.26.0}/gramps_webapi/api/resources/citations.py +0 -0
  184. {gramps_webapi-3.25.2 → gramps_webapi-3.26.0}/gramps_webapi/api/resources/config.py +0 -0
  185. {gramps_webapi-3.25.2 → gramps_webapi-3.26.0}/gramps_webapi/api/resources/db_backend.py +0 -0
  186. {gramps_webapi-3.25.2 → gramps_webapi-3.26.0}/gramps_webapi/api/resources/events.py +0 -0
  187. {gramps_webapi-3.25.2 → gramps_webapi-3.26.0}/gramps_webapi/api/resources/export_media.py +0 -0
  188. {gramps_webapi-3.25.2 → gramps_webapi-3.26.0}/gramps_webapi/api/resources/exporters.py +0 -0
  189. {gramps_webapi-3.25.2 → gramps_webapi-3.26.0}/gramps_webapi/api/resources/face_detection.py +0 -0
  190. {gramps_webapi-3.25.2 → gramps_webapi-3.26.0}/gramps_webapi/api/resources/families.py +0 -0
  191. {gramps_webapi-3.25.2 → gramps_webapi-3.26.0}/gramps_webapi/api/resources/file.py +0 -0
  192. {gramps_webapi-3.25.2 → gramps_webapi-3.26.0}/gramps_webapi/api/resources/filter_param_types.py +0 -0
  193. {gramps_webapi-3.25.2 → gramps_webapi-3.26.0}/gramps_webapi/api/resources/history.py +0 -0
  194. {gramps_webapi-3.25.2 → gramps_webapi-3.26.0}/gramps_webapi/api/resources/holidays.py +0 -0
  195. {gramps_webapi-3.25.2 → gramps_webapi-3.26.0}/gramps_webapi/api/resources/import_media.py +0 -0
  196. {gramps_webapi-3.25.2 → gramps_webapi-3.26.0}/gramps_webapi/api/resources/importers.py +0 -0
  197. {gramps_webapi-3.25.2 → gramps_webapi-3.26.0}/gramps_webapi/api/resources/match.py +0 -0
  198. {gramps_webapi-3.25.2 → gramps_webapi-3.26.0}/gramps_webapi/api/resources/media.py +0 -0
  199. {gramps_webapi-3.25.2 → gramps_webapi-3.26.0}/gramps_webapi/api/resources/merge.py +0 -0
  200. {gramps_webapi-3.25.2 → gramps_webapi-3.26.0}/gramps_webapi/api/resources/name_formats.py +0 -0
  201. {gramps_webapi-3.25.2 → gramps_webapi-3.26.0}/gramps_webapi/api/resources/name_groups.py +0 -0
  202. {gramps_webapi-3.25.2 → gramps_webapi-3.26.0}/gramps_webapi/api/resources/notes.py +0 -0
  203. {gramps_webapi-3.25.2 → gramps_webapi-3.26.0}/gramps_webapi/api/resources/ocr.py +0 -0
  204. {gramps_webapi-3.25.2 → gramps_webapi-3.26.0}/gramps_webapi/api/resources/oidc_accounts.py +0 -0
  205. {gramps_webapi-3.25.2 → gramps_webapi-3.26.0}/gramps_webapi/api/resources/people.py +0 -0
  206. {gramps_webapi-3.25.2 → gramps_webapi-3.26.0}/gramps_webapi/api/resources/places.py +0 -0
  207. {gramps_webapi-3.25.2 → gramps_webapi-3.26.0}/gramps_webapi/api/resources/push_subscriptions.py +0 -0
  208. {gramps_webapi-3.25.2 → gramps_webapi-3.26.0}/gramps_webapi/api/resources/reports.py +0 -0
  209. {gramps_webapi-3.25.2 → gramps_webapi-3.26.0}/gramps_webapi/api/resources/repositories.py +0 -0
  210. {gramps_webapi-3.25.2 → gramps_webapi-3.26.0}/gramps_webapi/api/resources/restore.py +0 -0
  211. {gramps_webapi-3.25.2 → gramps_webapi-3.26.0}/gramps_webapi/api/resources/sort.py +0 -0
  212. {gramps_webapi-3.25.2 → gramps_webapi-3.26.0}/gramps_webapi/api/resources/sources.py +0 -0
  213. {gramps_webapi-3.25.2 → gramps_webapi-3.26.0}/gramps_webapi/api/resources/tags.py +0 -0
  214. {gramps_webapi-3.25.2 → gramps_webapi-3.26.0}/gramps_webapi/api/resources/tasks.py +0 -0
  215. {gramps_webapi-3.25.2 → gramps_webapi-3.26.0}/gramps_webapi/api/resources/token.py +0 -0
  216. {gramps_webapi-3.25.2 → gramps_webapi-3.26.0}/gramps_webapi/api/resources/transactions.py +0 -0
  217. {gramps_webapi-3.25.2 → gramps_webapi-3.26.0}/gramps_webapi/api/resources/trees.py +0 -0
  218. {gramps_webapi-3.25.2 → gramps_webapi-3.26.0}/gramps_webapi/api/resources/types.py +0 -0
  219. {gramps_webapi-3.25.2 → gramps_webapi-3.26.0}/gramps_webapi/api/resources/verify.py +0 -0
  220. {gramps_webapi-3.25.2 → gramps_webapi-3.26.0}/gramps_webapi/api/resources/ydna.py +0 -0
  221. {gramps_webapi-3.25.2 → gramps_webapi-3.26.0}/gramps_webapi/api/s3.py +0 -0
  222. {gramps_webapi-3.25.2 → gramps_webapi-3.26.0}/gramps_webapi/api/search/__init__.py +0 -0
  223. {gramps_webapi-3.25.2 → gramps_webapi-3.26.0}/gramps_webapi/api/search/indexer.py +0 -0
  224. {gramps_webapi-3.25.2 → gramps_webapi-3.26.0}/gramps_webapi/api/search/query.py +0 -0
  225. {gramps_webapi-3.25.2 → gramps_webapi-3.26.0}/gramps_webapi/api/search/schema.py +0 -0
  226. {gramps_webapi-3.25.2 → gramps_webapi-3.26.0}/gramps_webapi/api/search/text.py +0 -0
  227. {gramps_webapi-3.25.2 → gramps_webapi-3.26.0}/gramps_webapi/api/snapshot.py +0 -0
  228. {gramps_webapi-3.25.2 → gramps_webapi-3.26.0}/gramps_webapi/auth/const.py +0 -0
  229. {gramps_webapi-3.25.2 → gramps_webapi-3.26.0}/gramps_webapi/auth/oidc_helpers.py +0 -0
  230. {gramps_webapi-3.25.2 → gramps_webapi-3.26.0}/gramps_webapi/auth/passwords.py +0 -0
  231. {gramps_webapi-3.25.2 → gramps_webapi-3.26.0}/gramps_webapi/auth/sql_guid.py +0 -0
  232. {gramps_webapi-3.25.2 → gramps_webapi-3.26.0}/gramps_webapi/celery.py +0 -0
  233. {gramps_webapi-3.25.2 → gramps_webapi-3.26.0}/gramps_webapi/const.py +0 -0
  234. {gramps_webapi-3.25.2 → gramps_webapi-3.26.0}/gramps_webapi/data/empty_gramps_auth.cfg +0 -0
  235. {gramps_webapi-3.25.2 → gramps_webapi-3.26.0}/gramps_webapi/data/example_gramps_auth.cfg +0 -0
  236. {gramps_webapi-3.25.2 → gramps_webapi-3.26.0}/gramps_webapi/data/face_detection_yunet_2023mar.onnx +0 -0
  237. {gramps_webapi-3.25.2 → gramps_webapi-3.26.0}/gramps_webapi/data/test_auth.cfg +0 -0
  238. {gramps_webapi-3.25.2 → gramps_webapi-3.26.0}/gramps_webapi/dbloader.py +0 -0
  239. {gramps_webapi-3.25.2 → gramps_webapi-3.26.0}/gramps_webapi/dbmanager.py +0 -0
  240. {gramps_webapi-3.25.2 → gramps_webapi-3.26.0}/gramps_webapi/future_gramps/alive.py +0 -0
  241. {gramps_webapi-3.25.2 → gramps_webapi-3.26.0}/gramps_webapi/future_gramps/relationship.py +0 -0
  242. {gramps_webapi-3.25.2 → gramps_webapi-3.26.0}/gramps_webapi/logging_utils.py +0 -0
  243. {gramps_webapi-3.25.2 → gramps_webapi-3.26.0}/gramps_webapi/sentry.py +0 -0
  244. {gramps_webapi-3.25.2 → gramps_webapi-3.26.0}/gramps_webapi/static/index.html +0 -0
  245. {gramps_webapi-3.25.2 → gramps_webapi-3.26.0}/gramps_webapi/templates/confirmation.html +0 -0
  246. {gramps_webapi-3.25.2 → gramps_webapi-3.26.0}/gramps_webapi/templates/reset_password.html +0 -0
  247. {gramps_webapi-3.25.2 → gramps_webapi-3.26.0}/gramps_webapi/templates/reset_password_base.html +0 -0
  248. {gramps_webapi-3.25.2 → gramps_webapi-3.26.0}/gramps_webapi/templates/reset_password_error.html +0 -0
  249. {gramps_webapi-3.25.2 → gramps_webapi-3.26.0}/gramps_webapi/translogger.py +0 -0
  250. {gramps_webapi-3.25.2 → gramps_webapi-3.26.0}/gramps_webapi/types.py +0 -0
  251. {gramps_webapi-3.25.2 → gramps_webapi-3.26.0}/gramps_webapi/util/celery.py +0 -0
  252. {gramps_webapi-3.25.2 → gramps_webapi-3.26.0}/gramps_webapi/util/task_state.py +0 -0
  253. {gramps_webapi-3.25.2 → gramps_webapi-3.26.0}/gramps_webapi/verify_lib.py +0 -0
  254. {gramps_webapi-3.25.2 → gramps_webapi-3.26.0}/gramps_webapi/webpush.py +0 -0
  255. {gramps_webapi-3.25.2 → gramps_webapi-3.26.0}/gramps_webapi/wsgi.py +0 -0
  256. {gramps_webapi-3.25.2 → gramps_webapi-3.26.0}/gramps_webapi.egg-info/dependency_links.txt +0 -0
  257. {gramps_webapi-3.25.2 → gramps_webapi-3.26.0}/gramps_webapi.egg-info/top_level.txt +0 -0
  258. {gramps_webapi-3.25.2 → gramps_webapi-3.26.0}/mypy.ini +0 -0
  259. {gramps_webapi-3.25.2 → gramps_webapi-3.26.0}/requirements-dev.txt +0 -0
  260. {gramps_webapi-3.25.2 → gramps_webapi-3.26.0}/scripts/s3_rename.py +0 -0
  261. {gramps_webapi-3.25.2 → gramps_webapi-3.26.0}/scripts/search_benchmark.py +0 -0
  262. {gramps_webapi-3.25.2 → gramps_webapi-3.26.0}/scripts/start_dev_container.sh +0 -0
  263. {gramps_webapi-3.25.2 → gramps_webapi-3.26.0}/setup.cfg +0 -0
  264. {gramps_webapi-3.25.2 → gramps_webapi-3.26.0}/setup.py +0 -0
  265. {gramps_webapi-3.25.2 → gramps_webapi-3.26.0}/tests/__init__.py +0 -0
  266. {gramps_webapi-3.25.2 → gramps_webapi-3.26.0}/tests/conftest.py +0 -0
  267. {gramps_webapi-3.25.2 → gramps_webapi-3.26.0}/tests/test_access.py +0 -0
  268. {gramps_webapi-3.25.2 → gramps_webapi-3.26.0}/tests/test_celery_logging.py +0 -0
  269. {gramps_webapi-3.25.2 → gramps_webapi-3.26.0}/tests/test_check.py +0 -0
  270. {gramps_webapi-3.25.2 → gramps_webapi-3.26.0}/tests/test_close_db.py +0 -0
  271. {gramps_webapi-3.25.2 → gramps_webapi-3.26.0}/tests/test_db.py +0 -0
  272. {gramps_webapi-3.25.2 → gramps_webapi-3.26.0}/tests/test_delete.py +0 -0
  273. {gramps_webapi-3.25.2 → gramps_webapi-3.26.0}/tests/test_deprecations.py +0 -0
  274. {gramps_webapi-3.25.2 → gramps_webapi-3.26.0}/tests/test_dna_match_parser.py +0 -0
  275. {gramps_webapi-3.25.2 → gramps_webapi-3.26.0}/tests/test_endpoints/__init__.py +0 -0
  276. {gramps_webapi-3.25.2 → gramps_webapi-3.26.0}/tests/test_endpoints/checks.py +0 -0
  277. {gramps_webapi-3.25.2 → gramps_webapi-3.26.0}/tests/test_endpoints/test_access_tokens.py +0 -0
  278. {gramps_webapi-3.25.2 → gramps_webapi-3.26.0}/tests/test_endpoints/test_backups.py +0 -0
  279. {gramps_webapi-3.25.2 → gramps_webapi-3.26.0}/tests/test_endpoints/test_bookmarks.py +0 -0
  280. {gramps_webapi-3.25.2 → gramps_webapi-3.26.0}/tests/test_endpoints/test_citations.py +0 -0
  281. {gramps_webapi-3.25.2 → gramps_webapi-3.26.0}/tests/test_endpoints/test_config.py +0 -0
  282. {gramps_webapi-3.25.2 → gramps_webapi-3.26.0}/tests/test_endpoints/test_db_handle.py +0 -0
  283. {gramps_webapi-3.25.2 → gramps_webapi-3.26.0}/tests/test_endpoints/test_delete.py +0 -0
  284. {gramps_webapi-3.25.2 → gramps_webapi-3.26.0}/tests/test_endpoints/test_events.py +0 -0
  285. {gramps_webapi-3.25.2 → gramps_webapi-3.26.0}/tests/test_endpoints/test_exporters.py +0 -0
  286. {gramps_webapi-3.25.2 → gramps_webapi-3.26.0}/tests/test_endpoints/test_facts.py +0 -0
  287. {gramps_webapi-3.25.2 → gramps_webapi-3.26.0}/tests/test_endpoints/test_families.py +0 -0
  288. {gramps_webapi-3.25.2 → gramps_webapi-3.26.0}/tests/test_endpoints/test_history.py +0 -0
  289. {gramps_webapi-3.25.2 → gramps_webapi-3.26.0}/tests/test_endpoints/test_holidays.py +0 -0
  290. {gramps_webapi-3.25.2 → gramps_webapi-3.26.0}/tests/test_endpoints/test_importers.py +0 -0
  291. {gramps_webapi-3.25.2 → gramps_webapi-3.26.0}/tests/test_endpoints/test_list_paging.py +0 -0
  292. {gramps_webapi-3.25.2 → gramps_webapi-3.26.0}/tests/test_endpoints/test_living.py +0 -0
  293. {gramps_webapi-3.25.2 → gramps_webapi-3.26.0}/tests/test_endpoints/test_media.py +0 -0
  294. {gramps_webapi-3.25.2 → gramps_webapi-3.26.0}/tests/test_endpoints/test_media_usage_sync.py +0 -0
  295. {gramps_webapi-3.25.2 → gramps_webapi-3.26.0}/tests/test_endpoints/test_merge.py +0 -0
  296. {gramps_webapi-3.25.2 → gramps_webapi-3.26.0}/tests/test_endpoints/test_metadata.py +0 -0
  297. {gramps_webapi-3.25.2 → gramps_webapi-3.26.0}/tests/test_endpoints/test_name_formats.py +0 -0
  298. {gramps_webapi-3.25.2 → gramps_webapi-3.26.0}/tests/test_endpoints/test_name_groups.py +0 -0
  299. {gramps_webapi-3.25.2 → gramps_webapi-3.26.0}/tests/test_endpoints/test_notes.py +0 -0
  300. {gramps_webapi-3.25.2 → gramps_webapi-3.26.0}/tests/test_endpoints/test_ocr.py +0 -0
  301. {gramps_webapi-3.25.2 → gramps_webapi-3.26.0}/tests/test_endpoints/test_oidc_accounts.py +0 -0
  302. {gramps_webapi-3.25.2 → gramps_webapi-3.26.0}/tests/test_endpoints/test_oidc_link.py +0 -0
  303. {gramps_webapi-3.25.2 → gramps_webapi-3.26.0}/tests/test_endpoints/test_paging_sort.py +0 -0
  304. {gramps_webapi-3.25.2 → gramps_webapi-3.26.0}/tests/test_endpoints/test_place_coordinates.py +0 -0
  305. {gramps_webapi-3.25.2 → gramps_webapi-3.26.0}/tests/test_endpoints/test_places.py +0 -0
  306. {gramps_webapi-3.25.2 → gramps_webapi-3.26.0}/tests/test_endpoints/test_post.py +0 -0
  307. {gramps_webapi-3.25.2 → gramps_webapi-3.26.0}/tests/test_endpoints/test_profiler.py +0 -0
  308. {gramps_webapi-3.25.2 → gramps_webapi-3.26.0}/tests/test_endpoints/test_push_subscriptions.py +0 -0
  309. {gramps_webapi-3.25.2 → gramps_webapi-3.26.0}/tests/test_endpoints/test_ready.py +0 -0
  310. {gramps_webapi-3.25.2 → gramps_webapi-3.26.0}/tests/test_endpoints/test_repair.py +0 -0
  311. {gramps_webapi-3.25.2 → gramps_webapi-3.26.0}/tests/test_endpoints/test_reports.py +0 -0
  312. {gramps_webapi-3.25.2 → gramps_webapi-3.26.0}/tests/test_endpoints/test_repositories.py +0 -0
  313. {gramps_webapi-3.25.2 → gramps_webapi-3.26.0}/tests/test_endpoints/test_restore.py +0 -0
  314. {gramps_webapi-3.25.2 → gramps_webapi-3.26.0}/tests/test_endpoints/test_s3.py +0 -0
  315. {gramps_webapi-3.25.2 → gramps_webapi-3.26.0}/tests/test_endpoints/test_search.py +0 -0
  316. {gramps_webapi-3.25.2 → gramps_webapi-3.26.0}/tests/test_endpoints/test_sources.py +0 -0
  317. {gramps_webapi-3.25.2 → gramps_webapi-3.26.0}/tests/test_endpoints/test_tags.py +0 -0
  318. {gramps_webapi-3.25.2 → gramps_webapi-3.26.0}/tests/test_endpoints/test_tasks.py +0 -0
  319. {gramps_webapi-3.25.2 → gramps_webapi-3.26.0}/tests/test_endpoints/test_token.py +0 -0
  320. {gramps_webapi-3.25.2 → gramps_webapi-3.26.0}/tests/test_endpoints/test_token_revocation.py +0 -0
  321. {gramps_webapi-3.25.2 → gramps_webapi-3.26.0}/tests/test_endpoints/test_token_sync.py +0 -0
  322. {gramps_webapi-3.25.2 → gramps_webapi-3.26.0}/tests/test_endpoints/test_translations.py +0 -0
  323. {gramps_webapi-3.25.2 → gramps_webapi-3.26.0}/tests/test_endpoints/test_treeless_admin.py +0 -0
  324. {gramps_webapi-3.25.2 → gramps_webapi-3.26.0}/tests/test_endpoints/test_trees.py +0 -0
  325. {gramps_webapi-3.25.2 → gramps_webapi-3.26.0}/tests/test_endpoints/test_types.py +0 -0
  326. {gramps_webapi-3.25.2 → gramps_webapi-3.26.0}/tests/test_endpoints/test_upload.py +0 -0
  327. {gramps_webapi-3.25.2 → gramps_webapi-3.26.0}/tests/test_endpoints/test_verify.py +0 -0
  328. {gramps_webapi-3.25.2 → gramps_webapi-3.26.0}/tests/test_endpoints/test_webpush_delivery.py +0 -0
  329. {gramps_webapi-3.25.2 → gramps_webapi-3.26.0}/tests/test_endpoints/test_ydna.py +0 -0
  330. {gramps_webapi-3.25.2 → gramps_webapi-3.26.0}/tests/test_endpoints/util.py +0 -0
  331. {gramps_webapi-3.25.2 → gramps_webapi-3.26.0}/tests/test_future_gramps_alive.py +0 -0
  332. {gramps_webapi-3.25.2 → gramps_webapi-3.26.0}/tests/test_future_gramps_relationship.py +0 -0
  333. {gramps_webapi-3.25.2 → gramps_webapi-3.26.0}/tests/test_image.py +0 -0
  334. {gramps_webapi-3.25.2 → gramps_webapi-3.26.0}/tests/test_jwt.py +0 -0
  335. {gramps_webapi-3.25.2 → gramps_webapi-3.26.0}/tests/test_limiter.py +0 -0
  336. {gramps_webapi-3.25.2 → gramps_webapi-3.26.0}/tests/test_llm_agent.py +0 -0
  337. {gramps_webapi-3.25.2 → gramps_webapi-3.26.0}/tests/test_llm_history.py +0 -0
  338. {gramps_webapi-3.25.2 → gramps_webapi-3.26.0}/tests/test_logging_utils.py +0 -0
  339. {gramps_webapi-3.25.2 → gramps_webapi-3.26.0}/tests/test_map_tile.py +0 -0
  340. {gramps_webapi-3.25.2 → gramps_webapi-3.26.0}/tests/test_media_prefix_tree.py +0 -0
  341. {gramps_webapi-3.25.2 → gramps_webapi-3.26.0}/tests/test_migrate_grampsdb.py +0 -0
  342. {gramps_webapi-3.25.2 → gramps_webapi-3.26.0}/tests/test_missing_references.py +0 -0
  343. {gramps_webapi-3.25.2 → gramps_webapi-3.26.0}/tests/test_openapi_operation_ids.py +0 -0
  344. {gramps_webapi-3.25.2 → gramps_webapi-3.26.0}/tests/test_password.py +0 -0
  345. {gramps_webapi-3.25.2 → gramps_webapi-3.26.0}/tests/test_postgres_driver.py +0 -0
  346. {gramps_webapi-3.25.2 → gramps_webapi-3.26.0}/tests/test_privacy_canary.py +0 -0
  347. {gramps_webapi-3.25.2 → gramps_webapi-3.26.0}/tests/test_private_proxy.py +0 -0
  348. {gramps_webapi-3.25.2 → gramps_webapi-3.26.0}/tests/test_private_proxy_backlinks.py +0 -0
  349. {gramps_webapi-3.25.2 → gramps_webapi-3.26.0}/tests/test_search_api_updates.py +0 -0
  350. {gramps_webapi-3.25.2 → gramps_webapi-3.26.0}/tests/test_search_index.py +0 -0
  351. {gramps_webapi-3.25.2 → gramps_webapi-3.26.0}/tests/test_search_oracle.py +0 -0
  352. {gramps_webapi-3.25.2 → gramps_webapi-3.26.0}/tests/test_search_text.py +0 -0
  353. {gramps_webapi-3.25.2 → gramps_webapi-3.26.0}/tests/test_sentry.py +0 -0
  354. {gramps_webapi-3.25.2 → gramps_webapi-3.26.0}/tests/test_server_locale.py +0 -0
  355. {gramps_webapi-3.25.2 → gramps_webapi-3.26.0}/tests/test_snapshot.py +0 -0
  356. {gramps_webapi-3.25.2 → gramps_webapi-3.26.0}/tests/test_sort_raw_data.py +0 -0
  357. {gramps_webapi-3.25.2 → gramps_webapi-3.26.0}/tests/test_sort_sql.py +0 -0
  358. {gramps_webapi-3.25.2 → gramps_webapi-3.26.0}/tests/test_sqlauth.py +0 -0
  359. {gramps_webapi-3.25.2 → gramps_webapi-3.26.0}/tests/test_static_files.py +0 -0
  360. {gramps_webapi-3.25.2 → gramps_webapi-3.26.0}/tests/test_task_error.py +0 -0
  361. {gramps_webapi-3.25.2 → gramps_webapi-3.26.0}/tests/test_task_state.py +0 -0
  362. {gramps_webapi-3.25.2 → gramps_webapi-3.26.0}/tests/test_tasks.py +0 -0
  363. {gramps_webapi-3.25.2 → gramps_webapi-3.26.0}/tests/test_undodb.py +0 -0
  364. {gramps_webapi-3.25.2 → gramps_webapi-3.26.0}/tests/test_user_db_migration.py +0 -0
  365. {gramps_webapi-3.25.2 → gramps_webapi-3.26.0}/tests/test_verify_lib.py +0 -0
  366. {gramps_webapi-3.25.2 → gramps_webapi-3.26.0}/tests/test_version.py +0 -0
@@ -112,7 +112,7 @@ RUN pip install --no-cache-dir 'opencv-python-headless>=4.8,<6'
112
112
 
113
113
  # Install AI dependencies
114
114
  # keep in sync with the "ai" extra in pyproject.toml
115
- RUN pip install --no-cache-dir 'pydantic-ai-slim[openai,anthropic,google,mistral,groq,bedrock]>=1.101.0,<2.0.0'
115
+ RUN pip install --no-cache-dir 'pydantic-ai-slim[openai,anthropic,google,mistral,groq,bedrock]>=1.101.0,<2.0.0' 'httpx2!=2.16.1'
116
116
 
117
117
  # install Gramps addons
118
118
  RUN mkdir -p /root/gramps/gramps$GRAMPS_VERSION/plugins && \
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: gramps-webapi
3
- Version: 3.25.2
3
+ Version: 3.26.0
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>
@@ -39,13 +39,12 @@ Requires-Dist: alembic
39
39
  Requires-Dist: celery[redis]
40
40
  Requires-Dist: Unidecode
41
41
  Requires-Dist: pytesseract
42
- Requires-Dist: gramps-object-query-language<0.6,>=0.5.7
43
- Requires-Dist: gramps-ql>=0.5.0
42
+ Requires-Dist: gramps-object-query-language<0.6,>=0.5.11
44
43
  Requires-Dist: psycopg2-binary
45
44
  Requires-Dist: requests
46
45
  Requires-Dist: yclade>=0.5.0
47
46
  Requires-Dist: Authlib>=1.9.0
48
- Requires-Dist: gramps-gedcom7>=0.4.0
47
+ Requires-Dist: gramps-gedcom7>=0.6.0
49
48
  Requires-Dist: flask-smorest
50
49
  Requires-Dist: typing-extensions>=4.13.0
51
50
  Requires-Dist: pywebpush<3.0.0,>=2.5.0
@@ -53,6 +52,7 @@ Requires-Dist: cryptography>=47.0.0
53
52
  Requires-Dist: py-vapid>=1.7.0
54
53
  Provides-Extra: ai
55
54
  Requires-Dist: pydantic-ai-slim[anthropic,bedrock,google,groq,mistral,openai]<2.0.0,>=1.101.0; extra == "ai"
55
+ Requires-Dist: httpx2!=2.16.1; extra == "ai"
56
56
  Provides-Extra: face
57
57
  Requires-Dist: opencv-python-headless<6,>=4.8; extra == "face"
58
58
  Provides-Extra: sentry
@@ -62,6 +62,7 @@ Requires-Dist: pytest; extra == "test"
62
62
  Requires-Dist: PyYAML; extra == "test"
63
63
  Provides-Extra: all
64
64
  Requires-Dist: pydantic-ai-slim[anthropic,bedrock,google,groq,mistral,openai]<2.0.0,>=1.101.0; extra == "all"
65
+ Requires-Dist: httpx2!=2.16.1; extra == "all"
65
66
  Requires-Dist: opencv-python-headless<6,>=4.8; extra == "all"
66
67
  Requires-Dist: sentry-sdk[flask]>=2.0.0; extra == "all"
67
68
  Requires-Dist: pytest; extra == "all"
@@ -0,0 +1,73 @@
1
+ # Roadmap
2
+
3
+ Release timing and breaking changes, for projects building on the API.
4
+ Features live in the issue tracker; dates here are estimates.
5
+
6
+ ## Versioning
7
+
8
+ Semver applies to the HTTP API, config options and env vars, not to Python internals.
9
+ Only majors break: minors add, patches fix. Deprecations are announced in a minor and
10
+ removed no earlier than the next major.
11
+
12
+ Exception: an optional feature can be removed in a minor, at the earliest one minor after
13
+ its deprecation, if neither clients nor deployments have to change. Its config options
14
+ and API parameters are then still accepted but ignored.
15
+
16
+ ## Releases
17
+
18
+ | Version | Target | Gramps | Breaking changes |
19
+ |---|---|---|---|
20
+ | 3.25.x | current | 6.0 | semantic search removed |
21
+ | 3.26.0 | late November 2026 | 6.0 | Gramps QL removed, `/query/` request body |
22
+ | 3.x | as needed | 6.0 | none |
23
+ | 4.0.0 | TBD | 6.1 | multi-tree by default, removals below |
24
+ | 5.0.0 | TBD | 6.2 | TBD |
25
+
26
+ ## Breaking in 3.26
27
+
28
+ The `gql` query parameter on object list endpoints (Gramps QL) is removed, together with
29
+ the `gramps_ql` key in `GET /api/metadata/`. Requests using `gql` are rejected with 422.
30
+ Use the `MatchesQuery` filter rule with a GOQL query in `rules` instead.
31
+
32
+ The `POST /api/<objects>/query/` endpoints take every part of a query that names fields
33
+ only as a [GOQL](https://github.com/dsblank/gramps-object-query-language) string
34
+ ([#1164](https://github.com/gramps-project/gramps-web-api/pull/1164)). The removed JSON
35
+ forms repeated GOQL's grammar, and no known client used them except gramps-connect's
36
+ `order_by` objects; gramps-connect switches with this release.
37
+
38
+ | Removed | Replacement |
39
+ |---|---|
40
+ | `where` (JSON condition tree) | `where_expr`, e.g. `"gender == 1"` |
41
+ | `select` entries as objects (`{"json_path": [...], "as": ...}`, `{"count_of": ...}`) | strings, e.g. `"birth.date as b"`, `"count(events) as n"` |
42
+ | `order_by` entries as objects (`{"column": ..., "direction": ...}`) | strings, `-` for descending, e.g. `"-change"` |
43
+
44
+ A request with a removed form gets a 422. New: an `env` field supplies values for
45
+ `Env.NAME` in `where_expr`, `select` and `order_by`.
46
+
47
+ A 422 for a query string now has a short `message` naming the body field
48
+ (`"Invalid 'where_expr'"`), `type: "invalid_query"`, and GOQL's full text in
49
+ `messages`, keyed like a schema error: `{"json": {"where_expr": ["..."]}}`, with the
50
+ entry index for `select` and `order_by` (`{"json": {"select": {"1": ["..."]}}}`).
51
+
52
+ GOQL's syntax is now part of the API contract, and
53
+ `tests/test_endpoints/test_query_conformance.py` checks that the strings clients send
54
+ keep their meaning when GOQL is upgraded.
55
+
56
+ ## Breaking in 4.0
57
+
58
+ > Note: Depending on the (unknown) release date of Gramps 6.1, these breaking changes may be moved to 5.0 instead.
59
+
60
+ Multi-tree mode becomes the default and single-tree mode goes away
61
+ ([#885](https://github.com/gramps-project/gramps-web-api/issues/885)).
62
+
63
+ | Removed | Replacement |
64
+ |---|---|
65
+ | Unprefixed env vars (`TREE`, `SECRET_KEY`, …) | `GRAMPSWEB_*` |
66
+ | `SEARCH_INDEX_DIR` | `SEARCH_INDEX_DB_URI` |
67
+ | `EMAIL_USE_TLS` | `EMAIL_USE_SSL` / `EMAIL_USE_STARTTLS` |
68
+ | `GET /api/token/create_owner/` | `POST` on same endpoint |
69
+ | `tree` arg on `GET /api/oidc/login/` | Tree selection after login |
70
+
71
+ Support for the `PostgreSQL` backend will be dropped in 4.0, because it is not compatible with multi-tree mode. Note that both the `SharedPostgreSQL` and `SQLite` backends will continue to be fully supported.
72
+
73
+ Configuration via the database is removed in 4.0, so that all configuration is in env vars or config files. The `config` table will be dropped, and the `config` API endpoints will return 404.
@@ -38,7 +38,7 @@ from .api.tasks import send_email_confirm_email, send_email_reset_password
38
38
  from .types import ProgressCallback
39
39
  from .api.util import close_db, get_db_manager, list_trees
40
40
  from .app import create_app
41
- from .auth import add_user, delete_user, fill_tree, user_db
41
+ from .auth import add_user, delete_user, fill_tree, get_guid, modify_user, user_db
42
42
  from .auth.const import ROLE_ADMIN
43
43
  from .const import ENV_CONFIG_FILE, TREE_MULTI
44
44
  from .dbmanager import WebDbManager
@@ -207,6 +207,27 @@ def user_add(ctx, name, password, fullname, email, role, tree):
207
207
  add_user(name, password, fullname, email, role, tree)
208
208
 
209
209
 
210
+ @user.command("set-password")
211
+ @click.argument("name")
212
+ @click.password_option(
213
+ help="The new password. Prompted for (hidden, twice) if not given, so that"
214
+ " it stays out of the shell history."
215
+ )
216
+ @click.pass_context
217
+ def user_set_password(ctx, name, password):
218
+ """Set a user's password and end all of their sessions."""
219
+ app = ctx.obj["app"]
220
+ if not password:
221
+ raise click.UsageError("The password must not be empty.")
222
+ with app.app_context():
223
+ try:
224
+ get_guid(name)
225
+ except ValueError:
226
+ raise click.ClickException(f"User {name} does not exist.")
227
+ app.logger.info(f"Setting the password of user {name} ...")
228
+ modify_user(name=name, password=password)
229
+
230
+
210
231
  @user.command("delete")
211
232
  @click.argument("name")
212
233
  @click.pass_context
@@ -19,4 +19,4 @@
19
19
 
20
20
  """Version information."""
21
21
 
22
- __version__ = "3.25.2"
22
+ __version__ = "3.26.0"
@@ -116,6 +116,7 @@ from .resources.objects import (
116
116
  CreateObjectsResource,
117
117
  DeleteObjectsByHandleResource,
118
118
  DeleteObjectsResource,
119
+ EditObjectsByHandleResource,
119
120
  )
120
121
  from .resources.ocr import MediaOcrResource
121
122
  from .resources.oidc import (
@@ -134,7 +135,11 @@ from .resources.places import (
134
135
  PlacesResource,
135
136
  )
136
137
  from .resources.push_subscriptions import UserPushSubscriptionsResource
137
- from .resources.relations import RelationResource, RelationsResource
138
+ from .resources.relations import (
139
+ RelationPathsResource,
140
+ RelationResource,
141
+ RelationsResource,
142
+ )
138
143
  from .resources.reports import (
139
144
  ReportFileResource,
140
145
  ReportFileResultResource,
@@ -179,6 +184,7 @@ from .resources.types import (
179
184
  TypesResource,
180
185
  )
181
186
  from .resources.user import (
187
+ RegistrationConfigResource,
182
188
  UserChangePasswordResource,
183
189
  UserConfirmEmailResource,
184
190
  UserCreateOwnerResource,
@@ -188,6 +194,7 @@ from .resources.user import (
188
194
  UsersResource,
189
195
  UserTriggerResetPasswordResource,
190
196
  )
197
+ from .resources.user_merge import UserMergeResource
191
198
  from .resources.verify import VerifyResource
192
199
  from .resources.ydna import PersonYDnaResource
193
200
  from .util import abort_with_message, get_db_handle, get_tree_from_jwt, parser, use_args
@@ -273,6 +280,12 @@ register_endpt(
273
280
  "delete_objects_by_handle",
274
281
  tags=["Transactions"],
275
282
  )
283
+ register_endpt(
284
+ EditObjectsByHandleResource,
285
+ "/objects/edit-by-handle/",
286
+ "edit_objects_by_handle",
287
+ tags=["Transactions"],
288
+ )
276
289
  # Transactions
277
290
  register_endpt(
278
291
  TransactionsResource, "/transactions/", "transactions", tags=["Transactions"]
@@ -742,6 +755,12 @@ register_endpt(
742
755
  "relations",
743
756
  tags=["Relations"],
744
757
  )
758
+ register_endpt(
759
+ RelationPathsResource,
760
+ "/relations/<string:handle1>/<string:handle2>/paths",
761
+ "relation-paths",
762
+ tags=["Relations"],
763
+ )
745
764
  # Living
746
765
  register_endpt(
747
766
  LivingDatesResource,
@@ -876,12 +895,24 @@ register_endpt(
876
895
  "user_access_token_item",
877
896
  tags=["Users"],
878
897
  )
898
+ register_endpt(
899
+ UserMergeResource,
900
+ "/users/<string:user_name>/merge/",
901
+ "user_merge",
902
+ tags=["Users"],
903
+ )
879
904
  register_endpt(
880
905
  UserRegisterResource,
881
906
  "/users/<string:user_name>/register/",
882
907
  "register",
883
908
  tags=["Users"],
884
909
  )
910
+ register_endpt(
911
+ RegistrationConfigResource,
912
+ "/register/config/",
913
+ "register_config",
914
+ tags=["Users"],
915
+ )
885
916
  register_endpt(
886
917
  UserCreateOwnerResource,
887
918
  "/users/<string:user_name>/create_owner/",
@@ -34,9 +34,11 @@ from typing import (
34
34
  Callable,
35
35
  ContextManager,
36
36
  Generator,
37
+ Iterable,
37
38
  Iterator,
38
39
  NoReturn,
39
40
  Optional,
41
+ Sequence,
40
42
  Union,
41
43
  )
42
44
 
@@ -55,6 +57,7 @@ from gramps.gen.lib.json_utils import (
55
57
  string_to_data,
56
58
  )
57
59
 
60
+ from ...future_gramps.raw_data_many import RAW_DATA_BATCH_SIZE
58
61
  from ..resources.db_backend import (
59
62
  has_secondary_columns,
60
63
  sql_count,
@@ -108,7 +111,7 @@ EXTRA_COLUMNS = {
108
111
  "Note": "CASE WHEN json_data LIKE ? THEN json_data END",
109
112
  }
110
113
  # Lookups of single handles in a table, after which all visible handles of the
111
- # table are read at once.
114
+ # table are read at once. Handles looked up in batches don't count.
112
115
  SINGLE_LOOKUPS = 200
113
116
 
114
117
  CUSTOM_TYPE_METHODS = [
@@ -145,13 +148,17 @@ class RestrictedDb(DbReadBase):
145
148
  self.__policy = policy
146
149
  # class name -> all visible handles
147
150
  self.__visible: dict[str, frozenset[str]] = {}
148
- # class name -> handle -> visible, for single lookups
151
+ # class name -> handle -> visible, for single and batch lookups
149
152
  self.__single: dict[str, dict[str, bool]] = {}
153
+ # class name -> number of single lookups
154
+ self.__lookups: dict[str, int] = {}
150
155
  # family handle -> handles of children with a public child reference,
151
156
  # read at once when iterating over all people
152
157
  self.__child_refs: Optional[dict[str, frozenset[str]]] = None
153
158
  # the same for single families, until a request needs many
154
159
  self.__single_child_refs: dict[str, frozenset[str]] = {}
160
+ # number of single families read for their child references
161
+ self.__child_ref_lookups = 0
155
162
  self.name_formats = db.name_formats
156
163
  # the tree's title, set by Gramps when opening it
157
164
  self.db_name = getattr(db, "db_name", "")
@@ -196,12 +203,36 @@ class RestrictedDb(DbReadBase):
196
203
  cache = self.__single.setdefault(class_name, {})
197
204
  if handle in cache:
198
205
  return cache[handle]
199
- if len(cache) >= SINGLE_LOOKUPS:
206
+ lookups = self.__lookups.get(class_name, 0)
207
+ if lookups >= SINGLE_LOOKUPS:
200
208
  return handle in self.__visible_handles(class_name)
201
- rows = self.__select_visible(class_name, EXTRA_COLUMNS.get(class_name), handle)
209
+ self.__lookups[class_name] = lookups + 1
210
+ rows = self.__select_visible(
211
+ class_name, EXTRA_COLUMNS.get(class_name), [handle]
212
+ )
202
213
  cache[handle] = bool(rows) and self.__row_visible(class_name, rows[0])
203
214
  return cache[handle]
204
215
 
216
+ def __check_visible_many(self, class_name: str, handles: Iterable[str]) -> None:
217
+ """Look up whether many handles are visible, a batch per query.
218
+
219
+ Afterwards, `is_visible` answers for them without a query.
220
+ """
221
+ if class_name == "Tag" or class_name in self.__visible:
222
+ return
223
+ cache = self.__single.setdefault(class_name, {})
224
+ todo = [handle for handle in dict.fromkeys(handles) if handle not in cache]
225
+ column = EXTRA_COLUMNS.get(class_name)
226
+ for start in range(0, len(todo), RAW_DATA_BATCH_SIZE):
227
+ batch = todo[start : start + RAW_DATA_BATCH_SIZE]
228
+ rows = self.__select_visible(class_name, column, batch)
229
+ if class_name == "Citation":
230
+ # their sources decide whether they are visible
231
+ self.__check_visible_many("Source", [row[1] for row in rows if row[1]])
232
+ visible = {row[0]: self.__row_visible(class_name, row) for row in rows}
233
+ for handle in batch:
234
+ cache[handle] = visible.get(handle, False)
235
+
205
236
  def __visible_handles(self, class_name: str) -> frozenset[str]:
206
237
  if class_name not in self.__visible:
207
238
  self.__visible[class_name] = frozenset(
@@ -233,16 +264,16 @@ class RestrictedDb(DbReadBase):
233
264
  self,
234
265
  class_name: str,
235
266
  column: Optional[str] = None,
236
- handle: Optional[str] = None,
267
+ handles: Optional[Sequence[str]] = None,
237
268
  ) -> list[Row]:
238
269
  """Return (handle, column) rows of objects that are visible on their own.
239
270
 
240
- Filters on the `private` secondary column, and on the handle if given.
241
- Without a column, the second value is None.
271
+ Filters on the `private` secondary column, and on the handles if
272
+ given. Without a column, the second value is None.
242
273
  """
243
274
  db = self.__db
244
275
  if not has_secondary_columns(db):
245
- return list(self.__select_visible_python(class_name, column, handle))
276
+ return list(self.__select_visible_python(class_name, column, handles))
246
277
  sql = (
247
278
  f"SELECT handle, {column or 'NULL'} FROM {TABLES[class_name]} "
248
279
  f"WHERE {self.__policy.sql_condition()}"
@@ -250,9 +281,11 @@ class RestrictedDb(DbReadBase):
250
281
  params: list[Union[str, int]] = (
251
282
  [f"%{LINK_PREFIX}%"] if column and "?" in column else []
252
283
  )
253
- if handle is not None:
254
- sql += " AND handle = ?"
255
- params.append(handle)
284
+ if handles is not None:
285
+ if not handles:
286
+ return []
287
+ sql += f" AND handle IN ({', '.join('?' * len(handles))})"
288
+ params.extend(handles)
256
289
  treeid = getattr(db.dbapi, "treeid", None)
257
290
  if treeid is not None:
258
291
  sql += " AND treeid = ?"
@@ -261,15 +294,14 @@ class RestrictedDb(DbReadBase):
261
294
  return db.dbapi.fetchall()
262
295
 
263
296
  def __select_visible_python(
264
- self, class_name: str, column: Optional[str], handle: Optional[str]
297
+ self, class_name: str, column: Optional[str], handles: Optional[Sequence[str]]
265
298
  ) -> Iterator[Row]:
266
299
  """Like `__select_visible`, for backends without SQL."""
267
300
  key = CLASS_TO_KEY_MAP[class_name]
268
- if handle is None:
269
- items = self.__db._iter_raw_data(key)
301
+ if handles is None:
302
+ items: Iterable[tuple[str, RawData]] = self.__db._iter_raw_data(key)
270
303
  else:
271
- data = self.__db._get_raw_data(key, handle)
272
- items = [] if data is None else [(handle, data)]
304
+ items = _raw_data_many(self.__db, key, handles)
273
305
  for item_handle, data in items:
274
306
  if not self.__policy.is_visible(data):
275
307
  continue
@@ -294,7 +326,7 @@ class RestrictedDb(DbReadBase):
294
326
  if class_name == "Note":
295
327
  # only the note's own privacy, to avoid cycles
296
328
  visible = bool(value) and bool(
297
- self.__select_visible("Note", handle=value)
329
+ self.__select_visible("Note", handles=[value or ""])
298
330
  )
299
331
  else:
300
332
  visible = self.is_visible(class_name, value)
@@ -364,9 +396,10 @@ class RestrictedDb(DbReadBase):
364
396
  """Whether the family's reference to the child isn't private."""
365
397
  cache = self.__single_child_refs
366
398
  if self.__child_refs is None and family_handle not in cache:
367
- if len(cache) >= SINGLE_LOOKUPS:
399
+ if self.__child_ref_lookups >= SINGLE_LOOKUPS:
368
400
  self.__load_child_refs()
369
401
  else:
402
+ self.__child_ref_lookups += 1
370
403
  family = self.__db._get_raw_data(
371
404
  CLASS_TO_KEY_MAP["Family"], family_handle
372
405
  )
@@ -377,6 +410,19 @@ class RestrictedDb(DbReadBase):
377
410
  return person_handle in self.__child_refs.get(family_handle, ())
378
411
  return person_handle in cache[family_handle]
379
412
 
413
+ def __check_child_refs_many(self, family_handles: Iterable[str]) -> None:
414
+ """Read the public child references of many families, a batch per query."""
415
+ if self.__child_refs is not None:
416
+ return
417
+ cache = self.__single_child_refs
418
+ todo = [
419
+ handle for handle in dict.fromkeys(family_handles) if handle not in cache
420
+ ]
421
+ for handle, data in _raw_data_many(self.__db, CLASS_TO_KEY_MAP["Family"], todo):
422
+ cache[handle] = _public_children(data)
423
+ for handle in todo:
424
+ cache.setdefault(handle, frozenset())
425
+
380
426
  def __load_child_refs(self) -> None:
381
427
  """Read the public child references of all families at once."""
382
428
  if self.__child_refs is None:
@@ -393,6 +439,51 @@ class RestrictedDb(DbReadBase):
393
439
  return None
394
440
  return self.__sanitize(class_name, data)
395
441
 
442
+ def __get_raw_many(
443
+ self, class_name: str, handles: Iterable[str]
444
+ ) -> Iterator[tuple[str, DataDict]]:
445
+ """Yield (handle, sanitized raw data) of the visible objects, in batches.
446
+
447
+ Whether the objects, and everything they reference, are visible is
448
+ looked up for a whole batch at once.
449
+ """
450
+ todo = [handle for handle in dict.fromkeys(handles) if handle]
451
+ self.__check_visible_many(class_name, todo)
452
+ visible = [handle for handle in todo if self.is_visible(class_name, handle)]
453
+ key = CLASS_TO_KEY_MAP[class_name]
454
+ for start in range(0, len(visible), RAW_DATA_BATCH_SIZE):
455
+ batch = list(
456
+ _raw_data_many(
457
+ self.__db, key, visible[start : start + RAW_DATA_BATCH_SIZE]
458
+ )
459
+ )
460
+ if not self.__policy.sees_everything:
461
+ self.__check_references_many(class_name, [data for _, data in batch])
462
+ for handle, data in batch:
463
+ yield handle, self.__sanitize(class_name, data)
464
+
465
+ def __check_references_many(self, class_name: str, items: list[RawData]) -> None:
466
+ """Look up whether everything the objects reference is visible."""
467
+ wanted: dict[str, list[str]] = {}
468
+
469
+ def record(target: str, handle: Optional[str]) -> bool:
470
+ if handle:
471
+ wanted.setdefault(target, []).append(handle)
472
+ # as if visible, so that everything that might be asked is seen
473
+ return True
474
+
475
+ for data in items:
476
+ sanitize(data, record)
477
+ for target, handles in wanted.items():
478
+ self.__check_visible_many(target, handles)
479
+ if class_name == "Person":
480
+ self.__check_child_refs_many(
481
+ handle
482
+ for data in items
483
+ for value in as_list(data["parent_family_list"])
484
+ if (handle := as_handle(value))
485
+ )
486
+
396
487
  def __get_object(
397
488
  self, class_name: str, handle: Optional[str]
398
489
  ) -> Optional[PrimaryObject]:
@@ -474,6 +565,10 @@ class RestrictedDb(DbReadBase):
474
565
  self.__visible_handles(class_name)
475
566
  ),
476
567
  }
568
+ if class_name in ("Person", "Family"):
569
+ methods[f"get_raw_{table}_data_many"] = partial(
570
+ self.__get_raw_many, class_name
571
+ )
477
572
  if class_name == "Media":
478
573
  # Gramps' name for `has_media_handle`
479
574
  methods["has_object_handle"] = methods["has_media_handle"]
@@ -708,6 +803,24 @@ class RestrictedDb(DbReadBase):
708
803
  close_db(self.__db)
709
804
 
710
805
 
806
+ def _raw_data_many(
807
+ db: DbReadBase, obj_key: int, handles: Iterable[str]
808
+ ) -> Iterator[tuple[str, RawData]]:
809
+ """Yield (handle, raw data) of the objects that exist, a batch per query.
810
+
811
+ Reads one by one if the database can't read many at once, which needs the
812
+ future_gramps patches.
813
+ """
814
+ read_many = getattr(db, "_get_raw_data_many", None)
815
+ if read_many is not None:
816
+ yield from read_many(obj_key, handles)
817
+ return
818
+ for handle in dict.fromkeys(handles):
819
+ data = db._get_raw_data(obj_key, handle)
820
+ if data is not None:
821
+ yield handle, data
822
+
823
+
711
824
  def _public_children(family: RawData) -> frozenset[str]:
712
825
  """Handles of the children whose reference in the family isn't private."""
713
826
  refs = [as_object(ref) for ref in as_list(family["child_ref_list"])]
@@ -145,8 +145,9 @@ def is_cacheable_response(rv) -> bool:
145
145
  """Only cache successful responses.
146
146
 
147
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.
148
+ well. An error can depend on the server rather than the tree or the file
149
+ (e.g. an addon or OpenCV that isn't installed yet), so it must not be served
150
+ until the tree changes, or for good from the thumbnail cache.
150
151
  The view may return something other than a `Response`, e.g. a string.
151
152
  """
152
153
  return getattr(rv, "status_code", 200) < 400
@@ -173,7 +174,12 @@ def request_cache_decorator(f: Callable) -> Callable:
173
174
  g.pop("request_cache_key", None)
174
175
  rv = cached_f(*args, **kwargs)
175
176
  cache_key = g.pop("request_cache_key", None)
176
- if cache_key and isinstance(rv, Response) and rv.status_code == 200:
177
+ if (
178
+ cache_key
179
+ and isinstance(rv, Response)
180
+ and rv.status_code == 200
181
+ and not getattr(rv, "_has_custom_etag", False)
182
+ ):
177
183
  rv.set_etag(hashlib.sha256(cache_key.encode()).hexdigest())
178
184
  return rv
179
185
 
@@ -181,7 +187,9 @@ def request_cache_decorator(f: Callable) -> Callable:
181
187
 
182
188
 
183
189
  thumbnail_cache_decorator = thumbnail_cache.cached(
184
- make_cache_key=make_cache_key_thumbnails, unless=skip_cache_missing_media
190
+ make_cache_key=make_cache_key_thumbnails,
191
+ unless=skip_cache_missing_media,
192
+ response_filter=is_cacheable_response,
185
193
  )
186
194
 
187
195
 
@@ -248,7 +256,9 @@ def make_cache_key_tiles(*args, **kwargs):
248
256
 
249
257
 
250
258
  tile_cache_decorator = thumbnail_cache.cached(
251
- make_cache_key=make_cache_key_tiles, unless=skip_cache_missing_media
259
+ make_cache_key=make_cache_key_tiles,
260
+ unless=skip_cache_missing_media,
261
+ response_filter=is_cacheable_response,
252
262
  )
253
263
 
254
264
 
@@ -271,7 +281,9 @@ def make_cache_key_face_detection(*args, **kwargs):
271
281
 
272
282
 
273
283
  face_detection_cache_decorator = thumbnail_cache.cached(
274
- make_cache_key=make_cache_key_face_detection, unless=skip_cache_missing_media
284
+ make_cache_key=make_cache_key_face_detection,
285
+ unless=skip_cache_missing_media,
286
+ response_filter=is_cacheable_response,
275
287
  )
276
288
 
277
289
 
@@ -0,0 +1,60 @@
1
+ #
2
+ # Gramps Web API - A RESTful API for the Gramps genealogy program
3
+ #
4
+ # Copyright (C) 2026 David Straub
5
+ #
6
+ # This program is free software; you can redistribute it and/or modify
7
+ # it under the terms of the GNU Affero General Public License as published by
8
+ # the Free Software Foundation; either version 3 of the License, or
9
+ # (at your option) any later version.
10
+ #
11
+ # This program is distributed in the hope that it will be useful,
12
+ # but WITHOUT ANY WARRANTY; without even the implied warranty of
13
+ # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14
+ # GNU Affero General Public License for more details.
15
+ #
16
+ # You should have received a copy of the GNU Affero General Public License
17
+ # along with this program. If not, see <https://www.gnu.org/licenses/>.
18
+ #
19
+
20
+ """Dry runs of database changes."""
21
+
22
+ from __future__ import annotations
23
+
24
+ from collections.abc import Callable
25
+
26
+ from gramps.gen.db import DbTxn
27
+ from gramps.gen.db.base import DbWriteBase
28
+
29
+ from ..types import TransactionJson
30
+ from .resources.util import transaction_to_json
31
+ from .util import close_db, get_db_outside_request
32
+
33
+
34
+ def dry_run(
35
+ tree: str,
36
+ user_id: str,
37
+ apply: Callable[[DbWriteBase, DbTxn], None],
38
+ ) -> TransactionJson:
39
+ """Apply changes in a transaction, roll it back and return it as JSON.
40
+
41
+ `apply` must not commit transactions itself (as importers do), as that
42
+ would commit the dry run too.
43
+
44
+ The result includes side effects, e.g. on the parents of a new family,
45
+ and private records; filter it for users who may not view these.
46
+
47
+ Uses its own database handle, closed without writing Gramps's in-memory
48
+ state (e.g. new custom types), which the rollback does not undo.
49
+ """
50
+ db = get_db_outside_request(
51
+ tree=tree, view_private=True, readonly=False, user_id=user_id
52
+ )
53
+ trans = DbTxn("Dry run", db)
54
+ db.transaction_begin(trans)
55
+ try:
56
+ apply(db, trans)
57
+ return transaction_to_json(trans)
58
+ finally:
59
+ db.transaction_abort(trans)
60
+ close_db(db, update=False)
@@ -26,7 +26,6 @@ from __future__ import annotations
26
26
  import mimetypes
27
27
  import os
28
28
  import uuid
29
- from pathlib import Path
30
29
  from typing import Callable, Dict, Optional
31
30
 
32
31
  import gramps_gedcom7
@@ -44,7 +43,6 @@ from gramps.gen.proxy import (
44
43
  ReferencedBySelectionProxyDb,
45
44
  )
46
45
  from gramps.gen.user import User
47
- from gramps.gen.utils.resourcepath import ResourcePath
48
46
 
49
47
  from ..const import DISABLED_EXPORTERS
50
48
  from .resources.util import truncate_import_report
@@ -305,8 +303,6 @@ def run_export(
305
303
  )
306
304
  file_name = f"{uuid.uuid4()}.{extension}"
307
305
  file_path = os.path.join(export_path, file_name)
308
- _resources = ResourcePath()
309
- os.environ["GRAMPS_RESOURCES"] = str(Path(_resources.data_dir).parent)
310
306
  filters.reload_custom_filters()
311
307
  plugin_manager = BasePluginManager.get_instance()
312
308
  for plugin in plugin_manager.get_export_plugins():
@@ -85,7 +85,11 @@ def detect_faces(stream: BinaryIO) -> list[tuple[float, float, float, float]]:
85
85
  import numpy as np
86
86
 
87
87
  file_bytes = np.asarray(bytearray(stream.read()), dtype=np.uint8)
88
- cv_image = cv2.imdecode(file_bytes, cv2.IMREAD_COLOR)
88
+ try:
89
+ cv_image = cv2.imdecode(file_bytes, cv2.IMREAD_COLOR)
90
+ except cv2.error:
91
+ # e.g. an empty file; other undecodable data returns None instead
92
+ cv_image = None
89
93
  if cv_image is None:
90
94
  abort_with_message(422, "File is not a valid image file")
91
95
  return detect_faces_in_array(cv_image)