velocity-python 0.1.110__tar.gz → 0.1.112__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 (300) hide show
  1. {velocity_python-0.1.110/src/velocity_python.egg-info → velocity_python-0.1.112}/PKG-INFO +1 -1
  2. {velocity_python-0.1.110 → velocity_python-0.1.112}/pyproject.toml +1 -1
  3. {velocity_python-0.1.110 → velocity_python-0.1.112}/src/velocity/__init__.py +1 -1
  4. {velocity_python-0.1.110 → velocity_python-0.1.112}/src/velocity/aws/capabilities/base.py +14 -4
  5. {velocity_python-0.1.110 → velocity_python-0.1.112}/src/velocity/aws/capabilities/security.py +8 -1
  6. {velocity_python-0.1.110 → velocity_python-0.1.112}/src/velocity/aws/feature_flags.py +5 -1
  7. {velocity_python-0.1.110 → velocity_python-0.1.112}/src/velocity/aws/handlers/context.py +9 -3
  8. {velocity_python-0.1.110 → velocity_python-0.1.112}/src/velocity/aws/handlers/mixins/data_service.py +2 -1
  9. {velocity_python-0.1.110 → velocity_python-0.1.112}/src/velocity/aws/mirror.py +10 -4
  10. {velocity_python-0.1.110 → velocity_python-0.1.112}/src/velocity/cache.py +9 -3
  11. {velocity_python-0.1.110 → velocity_python-0.1.112}/src/velocity/db/core/table.py +3 -1
  12. {velocity_python-0.1.110 → velocity_python-0.1.112/src/velocity_python.egg-info}/PKG-INFO +1 -1
  13. {velocity_python-0.1.110 → velocity_python-0.1.112}/tests/test_capability_catalog.py +6 -1
  14. {velocity_python-0.1.110 → velocity_python-0.1.112}/tests/test_cognito_user_cache.py +15 -3
  15. {velocity_python-0.1.110 → velocity_python-0.1.112}/tests/test_mirror.py +35 -10
  16. {velocity_python-0.1.110 → velocity_python-0.1.112}/tests/test_table_find_cache.py +9 -3
  17. {velocity_python-0.1.110 → velocity_python-0.1.112}/LICENSE +0 -0
  18. {velocity_python-0.1.110 → velocity_python-0.1.112}/README.md +0 -0
  19. {velocity_python-0.1.110 → velocity_python-0.1.112}/setup.cfg +0 -0
  20. {velocity_python-0.1.110 → velocity_python-0.1.112}/src/velocity/aws/__init__.py +0 -0
  21. {velocity_python-0.1.110 → velocity_python-0.1.112}/src/velocity/aws/amplify.py +0 -0
  22. {velocity_python-0.1.110 → velocity_python-0.1.112}/src/velocity/aws/amplify_build.py +0 -0
  23. {velocity_python-0.1.110 → velocity_python-0.1.112}/src/velocity/aws/assets/__init__.py +0 -0
  24. {velocity_python-0.1.110 → velocity_python-0.1.112}/src/velocity/aws/assets/backfill.py +0 -0
  25. {velocity_python-0.1.110 → velocity_python-0.1.112}/src/velocity/aws/assets/indexing.py +0 -0
  26. {velocity_python-0.1.110 → velocity_python-0.1.112}/src/velocity/aws/assets/references.py +0 -0
  27. {velocity_python-0.1.110 → velocity_python-0.1.112}/src/velocity/aws/assets/service.py +0 -0
  28. {velocity_python-0.1.110 → velocity_python-0.1.112}/src/velocity/aws/assets/usage_index.py +0 -0
  29. {velocity_python-0.1.110 → velocity_python-0.1.112}/src/velocity/aws/blobs.py +0 -0
  30. {velocity_python-0.1.110 → velocity_python-0.1.112}/src/velocity/aws/capabilities/__init__.py +0 -0
  31. {velocity_python-0.1.110 → velocity_python-0.1.112}/src/velocity/aws/capabilities/dispatch.py +0 -0
  32. {velocity_python-0.1.110 → velocity_python-0.1.112}/src/velocity/aws/capabilities/infra.py +0 -0
  33. {velocity_python-0.1.110 → velocity_python-0.1.112}/src/velocity/aws/capabilities/jobs.py +0 -0
  34. {velocity_python-0.1.110 → velocity_python-0.1.112}/src/velocity/aws/capabilities/provisioning.py +0 -0
  35. {velocity_python-0.1.110 → velocity_python-0.1.112}/src/velocity/aws/capabilities/retention.py +0 -0
  36. {velocity_python-0.1.110 → velocity_python-0.1.112}/src/velocity/aws/capabilities/single_session.py +0 -0
  37. {velocity_python-0.1.110 → velocity_python-0.1.112}/src/velocity/aws/deploy/__init__.py +0 -0
  38. {velocity_python-0.1.110 → velocity_python-0.1.112}/src/velocity/aws/deploy/config.py +0 -0
  39. {velocity_python-0.1.110 → velocity_python-0.1.112}/src/velocity/aws/deploy/operations.py +0 -0
  40. {velocity_python-0.1.110 → velocity_python-0.1.112}/src/velocity/aws/deploy/policies.py +0 -0
  41. {velocity_python-0.1.110 → velocity_python-0.1.112}/src/velocity/aws/deploy/reconcile.py +0 -0
  42. {velocity_python-0.1.110 → velocity_python-0.1.112}/src/velocity/aws/deploy/targets.py +0 -0
  43. {velocity_python-0.1.110 → velocity_python-0.1.112}/src/velocity/aws/dirty_pipeline.py +0 -0
  44. {velocity_python-0.1.110 → velocity_python-0.1.112}/src/velocity/aws/email.py +0 -0
  45. {velocity_python-0.1.110 → velocity_python-0.1.112}/src/velocity/aws/handlers/__init__.py +0 -0
  46. {velocity_python-0.1.110 → velocity_python-0.1.112}/src/velocity/aws/handlers/base_handler.py +0 -0
  47. {velocity_python-0.1.110 → velocity_python-0.1.112}/src/velocity/aws/handlers/context_factory.py +0 -0
  48. {velocity_python-0.1.110 → velocity_python-0.1.112}/src/velocity/aws/handlers/exceptions.py +0 -0
  49. {velocity_python-0.1.110 → velocity_python-0.1.112}/src/velocity/aws/handlers/lambda_handler.py +0 -0
  50. {velocity_python-0.1.110 → velocity_python-0.1.112}/src/velocity/aws/handlers/masquerade.py +0 -0
  51. {velocity_python-0.1.110 → velocity_python-0.1.112}/src/velocity/aws/handlers/mixins/__init__.py +0 -0
  52. {velocity_python-0.1.110 → velocity_python-0.1.112}/src/velocity/aws/handlers/mixins/job_handler.py +0 -0
  53. {velocity_python-0.1.110 → velocity_python-0.1.112}/src/velocity/aws/handlers/mixins/session_control.py +0 -0
  54. {velocity_python-0.1.110 → velocity_python-0.1.112}/src/velocity/aws/handlers/mixins/web_handler.py +0 -0
  55. {velocity_python-0.1.110 → velocity_python-0.1.112}/src/velocity/aws/handlers/perf.py +0 -0
  56. {velocity_python-0.1.110 → velocity_python-0.1.112}/src/velocity/aws/handlers/response.py +0 -0
  57. {velocity_python-0.1.110 → velocity_python-0.1.112}/src/velocity/aws/handlers/sqs_handler.py +0 -0
  58. {velocity_python-0.1.110 → velocity_python-0.1.112}/src/velocity/aws/job_lifecycle.py +0 -0
  59. {velocity_python-0.1.110 → velocity_python-0.1.112}/src/velocity/aws/job_results.py +0 -0
  60. {velocity_python-0.1.110 → velocity_python-0.1.112}/src/velocity/aws/s3.py +0 -0
  61. {velocity_python-0.1.110 → velocity_python-0.1.112}/src/velocity/aws/sms.py +0 -0
  62. {velocity_python-0.1.110 → velocity_python-0.1.112}/src/velocity/aws/ssm_config.py +0 -0
  63. {velocity_python-0.1.110 → velocity_python-0.1.112}/src/velocity/aws/tests/__init__.py +0 -0
  64. {velocity_python-0.1.110 → velocity_python-0.1.112}/src/velocity/aws/tests/test_amplify_build_policy_size.py +0 -0
  65. {velocity_python-0.1.110 → velocity_python-0.1.112}/src/velocity/aws/tests/test_amplify_build_shim.py +0 -0
  66. {velocity_python-0.1.110 → velocity_python-0.1.112}/src/velocity/aws/tests/test_base_handler_error_response.py +0 -0
  67. {velocity_python-0.1.110 → velocity_python-0.1.112}/src/velocity/aws/tests/test_deploy_policies.py +0 -0
  68. {velocity_python-0.1.110 → velocity_python-0.1.112}/src/velocity/aws/tests/test_deploy_reconcile.py +0 -0
  69. {velocity_python-0.1.110 → velocity_python-0.1.112}/src/velocity/aws/tests/test_email.py +0 -0
  70. {velocity_python-0.1.110 → velocity_python-0.1.112}/src/velocity/aws/tests/test_lambda_handler_json_serialization.py +0 -0
  71. {velocity_python-0.1.110 → velocity_python-0.1.112}/src/velocity/aws/tests/test_response.py +0 -0
  72. {velocity_python-0.1.110 → velocity_python-0.1.112}/src/velocity/aws/tests/test_sms.py +0 -0
  73. {velocity_python-0.1.110 → velocity_python-0.1.112}/src/velocity/db/__init__.py +0 -0
  74. {velocity_python-0.1.110 → velocity_python-0.1.112}/src/velocity/db/core/__init__.py +0 -0
  75. {velocity_python-0.1.110 → velocity_python-0.1.112}/src/velocity/db/core/async_support.py +0 -0
  76. {velocity_python-0.1.110 → velocity_python-0.1.112}/src/velocity/db/core/column.py +0 -0
  77. {velocity_python-0.1.110 → velocity_python-0.1.112}/src/velocity/db/core/database.py +0 -0
  78. {velocity_python-0.1.110 → velocity_python-0.1.112}/src/velocity/db/core/decorators.py +0 -0
  79. {velocity_python-0.1.110 → velocity_python-0.1.112}/src/velocity/db/core/engine.py +0 -0
  80. {velocity_python-0.1.110 → velocity_python-0.1.112}/src/velocity/db/core/jsonproxy.py +0 -0
  81. {velocity_python-0.1.110 → velocity_python-0.1.112}/src/velocity/db/core/result.py +0 -0
  82. {velocity_python-0.1.110 → velocity_python-0.1.112}/src/velocity/db/core/row.py +0 -0
  83. {velocity_python-0.1.110 → velocity_python-0.1.112}/src/velocity/db/core/sequence.py +0 -0
  84. {velocity_python-0.1.110 → velocity_python-0.1.112}/src/velocity/db/core/transaction.py +0 -0
  85. {velocity_python-0.1.110 → velocity_python-0.1.112}/src/velocity/db/core/view.py +0 -0
  86. {velocity_python-0.1.110 → velocity_python-0.1.112}/src/velocity/db/exceptions.py +0 -0
  87. {velocity_python-0.1.110 → velocity_python-0.1.112}/src/velocity/db/maintenance.py +0 -0
  88. {velocity_python-0.1.110 → velocity_python-0.1.112}/src/velocity/db/migrations.py +0 -0
  89. {velocity_python-0.1.110 → velocity_python-0.1.112}/src/velocity/db/servers/__init__.py +0 -0
  90. {velocity_python-0.1.110 → velocity_python-0.1.112}/src/velocity/db/servers/base/__init__.py +0 -0
  91. {velocity_python-0.1.110 → velocity_python-0.1.112}/src/velocity/db/servers/base/initializer.py +0 -0
  92. {velocity_python-0.1.110 → velocity_python-0.1.112}/src/velocity/db/servers/base/operators.py +0 -0
  93. {velocity_python-0.1.110 → velocity_python-0.1.112}/src/velocity/db/servers/base/sql.py +0 -0
  94. {velocity_python-0.1.110 → velocity_python-0.1.112}/src/velocity/db/servers/base/types.py +0 -0
  95. {velocity_python-0.1.110 → velocity_python-0.1.112}/src/velocity/db/servers/mysql/__init__.py +0 -0
  96. {velocity_python-0.1.110 → velocity_python-0.1.112}/src/velocity/db/servers/mysql/operators.py +0 -0
  97. {velocity_python-0.1.110 → velocity_python-0.1.112}/src/velocity/db/servers/mysql/reserved.py +0 -0
  98. {velocity_python-0.1.110 → velocity_python-0.1.112}/src/velocity/db/servers/mysql/sql.py +0 -0
  99. {velocity_python-0.1.110 → velocity_python-0.1.112}/src/velocity/db/servers/mysql/types.py +0 -0
  100. {velocity_python-0.1.110 → velocity_python-0.1.112}/src/velocity/db/servers/postgres/__init__.py +0 -0
  101. {velocity_python-0.1.110 → velocity_python-0.1.112}/src/velocity/db/servers/postgres/operators.py +0 -0
  102. {velocity_python-0.1.110 → velocity_python-0.1.112}/src/velocity/db/servers/postgres/reserved.py +0 -0
  103. {velocity_python-0.1.110 → velocity_python-0.1.112}/src/velocity/db/servers/postgres/sql.py +0 -0
  104. {velocity_python-0.1.110 → velocity_python-0.1.112}/src/velocity/db/servers/postgres/types.py +0 -0
  105. {velocity_python-0.1.110 → velocity_python-0.1.112}/src/velocity/db/servers/sqlite/__init__.py +0 -0
  106. {velocity_python-0.1.110 → velocity_python-0.1.112}/src/velocity/db/servers/sqlite/operators.py +0 -0
  107. {velocity_python-0.1.110 → velocity_python-0.1.112}/src/velocity/db/servers/sqlite/reserved.py +0 -0
  108. {velocity_python-0.1.110 → velocity_python-0.1.112}/src/velocity/db/servers/sqlite/sql.py +0 -0
  109. {velocity_python-0.1.110 → velocity_python-0.1.112}/src/velocity/db/servers/sqlite/types.py +0 -0
  110. {velocity_python-0.1.110 → velocity_python-0.1.112}/src/velocity/db/servers/sqlserver/__init__.py +0 -0
  111. {velocity_python-0.1.110 → velocity_python-0.1.112}/src/velocity/db/servers/sqlserver/operators.py +0 -0
  112. {velocity_python-0.1.110 → velocity_python-0.1.112}/src/velocity/db/servers/sqlserver/reserved.py +0 -0
  113. {velocity_python-0.1.110 → velocity_python-0.1.112}/src/velocity/db/servers/sqlserver/sql.py +0 -0
  114. {velocity_python-0.1.110 → velocity_python-0.1.112}/src/velocity/db/servers/sqlserver/types.py +0 -0
  115. {velocity_python-0.1.110 → velocity_python-0.1.112}/src/velocity/db/servers/tablehelper.py +0 -0
  116. {velocity_python-0.1.110 → velocity_python-0.1.112}/src/velocity/db/tests/__init__.py +0 -0
  117. {velocity_python-0.1.110 → velocity_python-0.1.112}/src/velocity/db/tests/common_db_test.py +0 -0
  118. {velocity_python-0.1.110 → velocity_python-0.1.112}/src/velocity/db/tests/postgres/__init__.py +0 -0
  119. {velocity_python-0.1.110 → velocity_python-0.1.112}/src/velocity/db/tests/postgres/common.py +0 -0
  120. {velocity_python-0.1.110 → velocity_python-0.1.112}/src/velocity/db/tests/postgres/conftest.py +0 -0
  121. {velocity_python-0.1.110 → velocity_python-0.1.112}/src/velocity/db/tests/postgres/test_column.py +0 -0
  122. {velocity_python-0.1.110 → velocity_python-0.1.112}/src/velocity/db/tests/postgres/test_connections.py +0 -0
  123. {velocity_python-0.1.110 → velocity_python-0.1.112}/src/velocity/db/tests/postgres/test_database.py +0 -0
  124. {velocity_python-0.1.110 → velocity_python-0.1.112}/src/velocity/db/tests/postgres/test_engine.py +0 -0
  125. {velocity_python-0.1.110 → velocity_python-0.1.112}/src/velocity/db/tests/postgres/test_general_usage.py +0 -0
  126. {velocity_python-0.1.110 → velocity_python-0.1.112}/src/velocity/db/tests/postgres/test_imports.py +0 -0
  127. {velocity_python-0.1.110 → velocity_python-0.1.112}/src/velocity/db/tests/postgres/test_result.py +0 -0
  128. {velocity_python-0.1.110 → velocity_python-0.1.112}/src/velocity/db/tests/postgres/test_row.py +0 -0
  129. {velocity_python-0.1.110 → velocity_python-0.1.112}/src/velocity/db/tests/postgres/test_row_comprehensive.py +0 -0
  130. {velocity_python-0.1.110 → velocity_python-0.1.112}/src/velocity/db/tests/postgres/test_schema_locking.py +0 -0
  131. {velocity_python-0.1.110 → velocity_python-0.1.112}/src/velocity/db/tests/postgres/test_schema_locking_unit.py +0 -0
  132. {velocity_python-0.1.110 → velocity_python-0.1.112}/src/velocity/db/tests/postgres/test_sequence.py +0 -0
  133. {velocity_python-0.1.110 → velocity_python-0.1.112}/src/velocity/db/tests/postgres/test_sql_comprehensive.py +0 -0
  134. {velocity_python-0.1.110 → velocity_python-0.1.112}/src/velocity/db/tests/postgres/test_table.py +0 -0
  135. {velocity_python-0.1.110 → velocity_python-0.1.112}/src/velocity/db/tests/postgres/test_table_comprehensive.py +0 -0
  136. {velocity_python-0.1.110 → velocity_python-0.1.112}/src/velocity/db/tests/postgres/test_transaction.py +0 -0
  137. {velocity_python-0.1.110 → velocity_python-0.1.112}/src/velocity/db/tests/sql/__init__.py +0 -0
  138. {velocity_python-0.1.110 → velocity_python-0.1.112}/src/velocity/db/tests/sql/common.py +0 -0
  139. {velocity_python-0.1.110 → velocity_python-0.1.112}/src/velocity/db/tests/sql/test_postgres_select_advanced.py +0 -0
  140. {velocity_python-0.1.110 → velocity_python-0.1.112}/src/velocity/db/tests/sql/test_postgres_select_variances.py +0 -0
  141. {velocity_python-0.1.110 → velocity_python-0.1.112}/src/velocity/db/tests/test_cursor_rowcount_fix.py +0 -0
  142. {velocity_python-0.1.110 → velocity_python-0.1.112}/src/velocity/db/tests/test_db_utils.py +0 -0
  143. {velocity_python-0.1.110 → velocity_python-0.1.112}/src/velocity/db/tests/test_postgres.py +0 -0
  144. {velocity_python-0.1.110 → velocity_python-0.1.112}/src/velocity/db/tests/test_postgres_unchanged.py +0 -0
  145. {velocity_python-0.1.110 → velocity_python-0.1.112}/src/velocity/db/tests/test_process_error_robustness.py +0 -0
  146. {velocity_python-0.1.110 → velocity_python-0.1.112}/src/velocity/db/tests/test_result_caching.py +0 -0
  147. {velocity_python-0.1.110 → velocity_python-0.1.112}/src/velocity/db/tests/test_result_sql_aware.py +0 -0
  148. {velocity_python-0.1.110 → velocity_python-0.1.112}/src/velocity/db/tests/test_row_get_missing_column.py +0 -0
  149. {velocity_python-0.1.110 → velocity_python-0.1.112}/src/velocity/db/tests/test_schema_locking_initializers.py +0 -0
  150. {velocity_python-0.1.110 → velocity_python-0.1.112}/src/velocity/db/tests/test_schema_locking_simple.py +0 -0
  151. {velocity_python-0.1.110 → velocity_python-0.1.112}/src/velocity/db/tests/test_sql_builder.py +0 -0
  152. {velocity_python-0.1.110 → velocity_python-0.1.112}/src/velocity/db/tests/test_tablehelper.py +0 -0
  153. {velocity_python-0.1.110 → velocity_python-0.1.112}/src/velocity/db/tests/test_view_helper.py +0 -0
  154. {velocity_python-0.1.110 → velocity_python-0.1.112}/src/velocity/db/utils.py +0 -0
  155. {velocity_python-0.1.110 → velocity_python-0.1.112}/src/velocity/logging.py +0 -0
  156. {velocity_python-0.1.110 → velocity_python-0.1.112}/src/velocity/misc/__init__.py +0 -0
  157. {velocity_python-0.1.110 → velocity_python-0.1.112}/src/velocity/misc/conv/__init__.py +0 -0
  158. {velocity_python-0.1.110 → velocity_python-0.1.112}/src/velocity/misc/conv/iconv.py +0 -0
  159. {velocity_python-0.1.110 → velocity_python-0.1.112}/src/velocity/misc/conv/oconv.py +0 -0
  160. {velocity_python-0.1.110 → velocity_python-0.1.112}/src/velocity/misc/db.py +0 -0
  161. {velocity_python-0.1.110 → velocity_python-0.1.112}/src/velocity/misc/export.py +0 -0
  162. {velocity_python-0.1.110 → velocity_python-0.1.112}/src/velocity/misc/format.py +0 -0
  163. {velocity_python-0.1.110 → velocity_python-0.1.112}/src/velocity/misc/mail.py +0 -0
  164. {velocity_python-0.1.110 → velocity_python-0.1.112}/src/velocity/misc/merge.py +0 -0
  165. {velocity_python-0.1.110 → velocity_python-0.1.112}/src/velocity/misc/pdf.py +0 -0
  166. {velocity_python-0.1.110 → velocity_python-0.1.112}/src/velocity/misc/tests/__init__.py +0 -0
  167. {velocity_python-0.1.110 → velocity_python-0.1.112}/src/velocity/misc/tests/test_db.py +0 -0
  168. {velocity_python-0.1.110 → velocity_python-0.1.112}/src/velocity/misc/tests/test_fix.py +0 -0
  169. {velocity_python-0.1.110 → velocity_python-0.1.112}/src/velocity/misc/tests/test_format.py +0 -0
  170. {velocity_python-0.1.110 → velocity_python-0.1.112}/src/velocity/misc/tests/test_iconv.py +0 -0
  171. {velocity_python-0.1.110 → velocity_python-0.1.112}/src/velocity/misc/tests/test_mail_send.py +0 -0
  172. {velocity_python-0.1.110 → velocity_python-0.1.112}/src/velocity/misc/tests/test_merge.py +0 -0
  173. {velocity_python-0.1.110 → velocity_python-0.1.112}/src/velocity/misc/tests/test_oconv.py +0 -0
  174. {velocity_python-0.1.110 → velocity_python-0.1.112}/src/velocity/misc/tests/test_original_error.py +0 -0
  175. {velocity_python-0.1.110 → velocity_python-0.1.112}/src/velocity/misc/tests/test_timer.py +0 -0
  176. {velocity_python-0.1.110 → velocity_python-0.1.112}/src/velocity/misc/timer.py +0 -0
  177. {velocity_python-0.1.110 → velocity_python-0.1.112}/src/velocity/misc/tools.py +0 -0
  178. {velocity_python-0.1.110 → velocity_python-0.1.112}/src/velocity/nosql/__init__.py +0 -0
  179. {velocity_python-0.1.110 → velocity_python-0.1.112}/src/velocity/nosql/core/__init__.py +0 -0
  180. {velocity_python-0.1.110 → velocity_python-0.1.112}/src/velocity/nosql/core/capabilities.py +0 -0
  181. {velocity_python-0.1.110 → velocity_python-0.1.112}/src/velocity/nosql/core/store.py +0 -0
  182. {velocity_python-0.1.110 → velocity_python-0.1.112}/src/velocity/nosql/core/where.py +0 -0
  183. {velocity_python-0.1.110 → velocity_python-0.1.112}/src/velocity/nosql/exceptions.py +0 -0
  184. {velocity_python-0.1.110 → velocity_python-0.1.112}/src/velocity/nosql/servers/__init__.py +0 -0
  185. {velocity_python-0.1.110 → velocity_python-0.1.112}/src/velocity/nosql/servers/base/__init__.py +0 -0
  186. {velocity_python-0.1.110 → velocity_python-0.1.112}/src/velocity/nosql/servers/cassandra/__init__.py +0 -0
  187. {velocity_python-0.1.110 → velocity_python-0.1.112}/src/velocity/nosql/servers/cassandra/translation.py +0 -0
  188. {velocity_python-0.1.110 → velocity_python-0.1.112}/src/velocity/nosql/servers/couchbase/__init__.py +0 -0
  189. {velocity_python-0.1.110 → velocity_python-0.1.112}/src/velocity/nosql/servers/couchbase/translation.py +0 -0
  190. {velocity_python-0.1.110 → velocity_python-0.1.112}/src/velocity/nosql/servers/dynamodb/__init__.py +0 -0
  191. {velocity_python-0.1.110 → velocity_python-0.1.112}/src/velocity/nosql/servers/dynamodb/translation.py +0 -0
  192. {velocity_python-0.1.110 → velocity_python-0.1.112}/src/velocity/nosql/servers/elasticsearch/__init__.py +0 -0
  193. {velocity_python-0.1.110 → velocity_python-0.1.112}/src/velocity/nosql/servers/elasticsearch/translation.py +0 -0
  194. {velocity_python-0.1.110 → velocity_python-0.1.112}/src/velocity/nosql/servers/memory/__init__.py +0 -0
  195. {velocity_python-0.1.110 → velocity_python-0.1.112}/src/velocity/nosql/servers/mongodb/__init__.py +0 -0
  196. {velocity_python-0.1.110 → velocity_python-0.1.112}/src/velocity/nosql/servers/mongodb/translation.py +0 -0
  197. {velocity_python-0.1.110 → velocity_python-0.1.112}/src/velocity/nosql/servers/redis/__init__.py +0 -0
  198. {velocity_python-0.1.110 → velocity_python-0.1.112}/src/velocity/payment/__init__.py +0 -0
  199. {velocity_python-0.1.110 → velocity_python-0.1.112}/src/velocity/payment/authorizenet_adapter.py +0 -0
  200. {velocity_python-0.1.110 → velocity_python-0.1.112}/src/velocity/payment/authorizenet_mirror.py +0 -0
  201. {velocity_python-0.1.110 → velocity_python-0.1.112}/src/velocity/payment/base_adapter.py +0 -0
  202. {velocity_python-0.1.110 → velocity_python-0.1.112}/src/velocity/payment/braintree_adapter.py +0 -0
  203. {velocity_python-0.1.110 → velocity_python-0.1.112}/src/velocity/payment/braintree_mirror.py +0 -0
  204. {velocity_python-0.1.110 → velocity_python-0.1.112}/src/velocity/payment/charge_rules.py +0 -0
  205. {velocity_python-0.1.110 → velocity_python-0.1.112}/src/velocity/payment/stripe_adapter.py +0 -0
  206. {velocity_python-0.1.110 → velocity_python-0.1.112}/src/velocity/payment/stripe_mirror.py +0 -0
  207. {velocity_python-0.1.110 → velocity_python-0.1.112}/src/velocity_python.egg-info/SOURCES.txt +0 -0
  208. {velocity_python-0.1.110 → velocity_python-0.1.112}/src/velocity_python.egg-info/dependency_links.txt +0 -0
  209. {velocity_python-0.1.110 → velocity_python-0.1.112}/src/velocity_python.egg-info/entry_points.txt +0 -0
  210. {velocity_python-0.1.110 → velocity_python-0.1.112}/src/velocity_python.egg-info/requires.txt +0 -0
  211. {velocity_python-0.1.110 → velocity_python-0.1.112}/src/velocity_python.egg-info/top_level.txt +0 -0
  212. {velocity_python-0.1.110 → velocity_python-0.1.112}/tests/test_access_error_403.py +0 -0
  213. {velocity_python-0.1.110 → velocity_python-0.1.112}/tests/test_activity_tracking_aborted_tx.py +0 -0
  214. {velocity_python-0.1.110 → velocity_python-0.1.112}/tests/test_amplify_build.py +0 -0
  215. {velocity_python-0.1.110 → velocity_python-0.1.112}/tests/test_asset_indexing.py +0 -0
  216. {velocity_python-0.1.110 → velocity_python-0.1.112}/tests/test_asset_references.py +0 -0
  217. {velocity_python-0.1.110 → velocity_python-0.1.112}/tests/test_assets_service.py +0 -0
  218. {velocity_python-0.1.110 → velocity_python-0.1.112}/tests/test_async_support.py +0 -0
  219. {velocity_python-0.1.110 → velocity_python-0.1.112}/tests/test_batch_operations.py +0 -0
  220. {velocity_python-0.1.110 → velocity_python-0.1.112}/tests/test_blob_store.py +0 -0
  221. {velocity_python-0.1.110 → velocity_python-0.1.112}/tests/test_capabilities.py +0 -0
  222. {velocity_python-0.1.110 → velocity_python-0.1.112}/tests/test_column_tx_arg.py +0 -0
  223. {velocity_python-0.1.110 → velocity_python-0.1.112}/tests/test_concurrency_safety.py +0 -0
  224. {velocity_python-0.1.110 → velocity_python-0.1.112}/tests/test_connection_pool.py +0 -0
  225. {velocity_python-0.1.110 → velocity_python-0.1.112}/tests/test_connection_resilience.py +0 -0
  226. {velocity_python-0.1.110 → velocity_python-0.1.112}/tests/test_context_flags_loader.py +0 -0
  227. {velocity_python-0.1.110 → velocity_python-0.1.112}/tests/test_context_job_descriptions.py +0 -0
  228. {velocity_python-0.1.110 → velocity_python-0.1.112}/tests/test_data_service_query_cap.py +0 -0
  229. {velocity_python-0.1.110 → velocity_python-0.1.112}/tests/test_data_service_renumber.py +0 -0
  230. {velocity_python-0.1.110 → velocity_python-0.1.112}/tests/test_data_service_save_as.py +0 -0
  231. {velocity_python-0.1.110 → velocity_python-0.1.112}/tests/test_db_credentials_ssm_cascade.py +0 -0
  232. {velocity_python-0.1.110 → velocity_python-0.1.112}/tests/test_db_maintenance.py +0 -0
  233. {velocity_python-0.1.110 → velocity_python-0.1.112}/tests/test_decorators.py +0 -0
  234. {velocity_python-0.1.110 → velocity_python-0.1.112}/tests/test_delete_hook_fk_blocked.py +0 -0
  235. {velocity_python-0.1.110 → velocity_python-0.1.112}/tests/test_dirty_pipeline_fast_path.py +0 -0
  236. {velocity_python-0.1.110 → velocity_python-0.1.112}/tests/test_email_processing.py +0 -0
  237. {velocity_python-0.1.110 → velocity_python-0.1.112}/tests/test_enqueue_send_failures.py +0 -0
  238. {velocity_python-0.1.110 → velocity_python-0.1.112}/tests/test_feature_flags.py +0 -0
  239. {velocity_python-0.1.110 → velocity_python-0.1.112}/tests/test_get_cognito_user_provider.py +0 -0
  240. {velocity_python-0.1.110 → velocity_python-0.1.112}/tests/test_http_handler_rollback.py +0 -0
  241. {velocity_python-0.1.110 → velocity_python-0.1.112}/tests/test_iconv_money_to_cents.py +0 -0
  242. {velocity_python-0.1.110 → velocity_python-0.1.112}/tests/test_identifier_injection_guard.py +0 -0
  243. {velocity_python-0.1.110 → velocity_python-0.1.112}/tests/test_job_handler.py +0 -0
  244. {velocity_python-0.1.110 → velocity_python-0.1.112}/tests/test_job_lifecycle.py +0 -0
  245. {velocity_python-0.1.110 → velocity_python-0.1.112}/tests/test_job_results.py +0 -0
  246. {velocity_python-0.1.110 → velocity_python-0.1.112}/tests/test_json_columns.py +0 -0
  247. {velocity_python-0.1.110 → velocity_python-0.1.112}/tests/test_jsonb_dict_adapter.py +0 -0
  248. {velocity_python-0.1.110 → velocity_python-0.1.112}/tests/test_lambda_handler.py +0 -0
  249. {velocity_python-0.1.110 → velocity_python-0.1.112}/tests/test_lambda_handler_auth.py +0 -0
  250. {velocity_python-0.1.110 → velocity_python-0.1.112}/tests/test_lambda_handler_masquerade.py +0 -0
  251. {velocity_python-0.1.110 → velocity_python-0.1.112}/tests/test_lambda_handler_user_cache.py +0 -0
  252. {velocity_python-0.1.110 → velocity_python-0.1.112}/tests/test_masquerade_grant.py +0 -0
  253. {velocity_python-0.1.110 → velocity_python-0.1.112}/tests/test_mixins_import.py +0 -0
  254. {velocity_python-0.1.110 → velocity_python-0.1.112}/tests/test_n_plus_one.py +0 -0
  255. {velocity_python-0.1.110 → velocity_python-0.1.112}/tests/test_nosql_dynamodb.py +0 -0
  256. {velocity_python-0.1.110 → velocity_python-0.1.112}/tests/test_nosql_memory.py +0 -0
  257. {velocity_python-0.1.110 → velocity_python-0.1.112}/tests/test_nosql_mongodb.py +0 -0
  258. {velocity_python-0.1.110 → velocity_python-0.1.112}/tests/test_nosql_redis.py +0 -0
  259. {velocity_python-0.1.110 → velocity_python-0.1.112}/tests/test_nosql_translation.py +0 -0
  260. {velocity_python-0.1.110 → velocity_python-0.1.112}/tests/test_nosql_where.py +0 -0
  261. {velocity_python-0.1.110 → velocity_python-0.1.112}/tests/test_observability.py +0 -0
  262. {velocity_python-0.1.110 → velocity_python-0.1.112}/tests/test_on_commit.py +0 -0
  263. {velocity_python-0.1.110 → velocity_python-0.1.112}/tests/test_payment_authorizenet_adapter.py +0 -0
  264. {velocity_python-0.1.110 → velocity_python-0.1.112}/tests/test_payment_braintree_adapter.py +0 -0
  265. {velocity_python-0.1.110 → velocity_python-0.1.112}/tests/test_payment_braintree_mirror.py +0 -0
  266. {velocity_python-0.1.110 → velocity_python-0.1.112}/tests/test_payment_mirror_empty_table.py +0 -0
  267. {velocity_python-0.1.110 → velocity_python-0.1.112}/tests/test_payment_profile_sorting.py +0 -0
  268. {velocity_python-0.1.110 → velocity_python-0.1.112}/tests/test_payment_stripe_adapter.py +0 -0
  269. {velocity_python-0.1.110 → velocity_python-0.1.112}/tests/test_pdf.py +0 -0
  270. {velocity_python-0.1.110 → velocity_python-0.1.112}/tests/test_prepared_statements.py +0 -0
  271. {velocity_python-0.1.110 → velocity_python-0.1.112}/tests/test_psycopg3_upgrade.py +0 -0
  272. {velocity_python-0.1.110 → velocity_python-0.1.112}/tests/test_query_cache.py +0 -0
  273. {velocity_python-0.1.110 → velocity_python-0.1.112}/tests/test_query_missing_table_unlocked.py +0 -0
  274. {velocity_python-0.1.110 → velocity_python-0.1.112}/tests/test_read_cache.py +0 -0
  275. {velocity_python-0.1.110 → velocity_python-0.1.112}/tests/test_response.py +0 -0
  276. {velocity_python-0.1.110 → velocity_python-0.1.112}/tests/test_restricted_direct_tables.py +0 -0
  277. {velocity_python-0.1.110 → velocity_python-0.1.112}/tests/test_retry_side_effect_guard.py +0 -0
  278. {velocity_python-0.1.110 → velocity_python-0.1.112}/tests/test_return_default_safety.py +0 -0
  279. {velocity_python-0.1.110 → velocity_python-0.1.112}/tests/test_row_batch_update.py +0 -0
  280. {velocity_python-0.1.110 → velocity_python-0.1.112}/tests/test_row_cache_staleness.py +0 -0
  281. {velocity_python-0.1.110 → velocity_python-0.1.112}/tests/test_schema_migrations.py +0 -0
  282. {velocity_python-0.1.110 → velocity_python-0.1.112}/tests/test_security_capability.py +0 -0
  283. {velocity_python-0.1.110 → velocity_python-0.1.112}/tests/test_security_hardening.py +0 -0
  284. {velocity_python-0.1.110 → velocity_python-0.1.112}/tests/test_server_cursor.py +0 -0
  285. {velocity_python-0.1.110 → velocity_python-0.1.112}/tests/test_session_control.py +0 -0
  286. {velocity_python-0.1.110 → velocity_python-0.1.112}/tests/test_single_autocommit_safety.py +0 -0
  287. {velocity_python-0.1.110 → velocity_python-0.1.112}/tests/test_single_session_capability.py +0 -0
  288. {velocity_python-0.1.110 → velocity_python-0.1.112}/tests/test_spreadsheet_functions.py +0 -0
  289. {velocity_python-0.1.110 → velocity_python-0.1.112}/tests/test_sqlite_backend.py +0 -0
  290. {velocity_python-0.1.110 → velocity_python-0.1.112}/tests/test_sqs_per_record_transactions.py +0 -0
  291. {velocity_python-0.1.110 → velocity_python-0.1.112}/tests/test_ssm_config.py +0 -0
  292. {velocity_python-0.1.110 → velocity_python-0.1.112}/tests/test_store_user_data.py +0 -0
  293. {velocity_python-0.1.110 → velocity_python-0.1.112}/tests/test_sys_modified_count_postgres_demo.py +0 -0
  294. {velocity_python-0.1.110 → velocity_python-0.1.112}/tests/test_table_alter.py +0 -0
  295. {velocity_python-0.1.110 → velocity_python-0.1.112}/tests/test_table_purge.py +0 -0
  296. {velocity_python-0.1.110 → velocity_python-0.1.112}/tests/test_transaction_class_wrapping.py +0 -0
  297. {velocity_python-0.1.110 → velocity_python-0.1.112}/tests/test_transaction_commit_and_ownership.py +0 -0
  298. {velocity_python-0.1.110 → velocity_python-0.1.112}/tests/test_transaction_edge_cases.py +0 -0
  299. {velocity_python-0.1.110 → velocity_python-0.1.112}/tests/test_where_clause_validation.py +0 -0
  300. {velocity_python-0.1.110 → velocity_python-0.1.112}/tests/test_write_hook_create_flow.py +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: velocity-python
3
- Version: 0.1.110
3
+ Version: 0.1.112
4
4
  Summary: A rapid application development library for interfacing with data storage
5
5
  Author-email: Velocity Team <info@codeclubs.org>
6
6
  License-Expression: MIT
@@ -4,7 +4,7 @@ build-backend = "setuptools.build_meta"
4
4
 
5
5
  [project]
6
6
  name = "velocity-python"
7
- version = "0.1.110"
7
+ version = "0.1.112"
8
8
  authors = [
9
9
  { name="Velocity Team", email="info@codeclubs.org" },
10
10
  ]
@@ -1,4 +1,4 @@
1
- __version__ = version = "0.1.110"
1
+ __version__ = version = "0.1.112"
2
2
 
3
3
  import importlib as _importlib
4
4
 
@@ -55,7 +55,16 @@ TEXT = "text"
55
55
  BOOLEAN = "boolean"
56
56
  CHOICE = "choice" # one of `options`
57
57
  LIST = "list" # free strings
58
- POLICY_KINDS = (CIDR_LIST, COUNTRY_LIST, TABLE_DAYS, NUMBER, TEXT, BOOLEAN, CHOICE, LIST)
58
+ POLICY_KINDS = (
59
+ CIDR_LIST,
60
+ COUNTRY_LIST,
61
+ TABLE_DAYS,
62
+ NUMBER,
63
+ TEXT,
64
+ BOOLEAN,
65
+ CHOICE,
66
+ LIST,
67
+ )
59
68
 
60
69
  IDENTIFIER = re.compile(r"^[a-z_][a-z0-9_]*$")
61
70
  COUNTRY_CODE = re.compile(r"^[A-Z]{2}$")
@@ -145,7 +154,9 @@ def describe(cap) -> dict:
145
154
  def catalog() -> list:
146
155
  """Every registered capability, described, ordered by label — the
147
156
  pick-list an admin UI shows."""
148
- return sorted((describe(cap) for cap in REGISTRY.values()), key=lambda d: d["label"])
157
+ return sorted(
158
+ (describe(cap) for cap in REGISTRY.values()), key=lambda d: d["label"]
159
+ )
149
160
 
150
161
 
151
162
  def load_config(raw) -> dict:
@@ -232,8 +243,7 @@ def validate_policy(name, config) -> list:
232
243
  if value in (None, "", [], {}):
233
244
  continue
234
245
  problems.extend(
235
- f"{field['label']}: {problem}"
236
- for problem in _check_field(field, value)
246
+ f"{field['label']}: {problem}" for problem in _check_field(field, value)
237
247
  )
238
248
  return problems
239
249
 
@@ -62,6 +62,7 @@ KNOBS = {
62
62
  "security_events_days": "90",
63
63
  }
64
64
 
65
+
65
66
  def clear_cache():
66
67
  """Forget the cached site row AND the shared flags row (tests)."""
67
68
  read_cache.invalidate(SITE_TABLE)
@@ -173,7 +174,13 @@ def check_rate(tx, bucket, *, limit, now, table=RATE_TABLE):
173
174
  def _cached(key, loader, *, now=None):
174
175
  """The process read cache (velocity.cache), tagged with the site table
175
176
  so provisioning's own writes to it in this process drop the entry."""
176
- return memo(("security",) + tuple(key), loader, CACHE_TTL_SECONDS, tables=(SITE_TABLE,), now=now)
177
+ return memo(
178
+ ("security",) + tuple(key),
179
+ loader,
180
+ CACHE_TTL_SECONDS,
181
+ tables=(SITE_TABLE,),
182
+ now=now,
183
+ )
177
184
 
178
185
 
179
186
  def _site_row(tx):
@@ -109,7 +109,11 @@ def clear_cache(table: str = DEFAULT_TABLE) -> None:
109
109
 
110
110
 
111
111
  def get_cached(
112
- tx, system: str | None = None, *, table: str = DEFAULT_TABLE, now: float | None = None
112
+ tx,
113
+ system: str | None = None,
114
+ *,
115
+ table: str = DEFAULT_TABLE,
116
+ now: float | None = None,
113
117
  ) -> dict:
114
118
  """:func:`get` through the process read cache (:mod:`velocity.cache`)
115
119
  — the hot-path reader.
@@ -102,7 +102,9 @@ def user_cache_seconds() -> float:
102
102
  raw = None
103
103
  try:
104
104
  _user_cache_seconds = (
105
- float(raw) if raw not in (None, "") else float(DEFAULT_USER_CACHE_SECONDS)
105
+ float(raw)
106
+ if raw not in (None, "")
107
+ else float(DEFAULT_USER_CACHE_SECONDS)
106
108
  )
107
109
  except (TypeError, ValueError):
108
110
  _user_cache_seconds = float(DEFAULT_USER_CACHE_SECONDS)
@@ -861,7 +863,9 @@ class Context:
861
863
  )
862
864
  self.perf.log("cognito list_users")
863
865
  except ClientError as exc:
864
- message = exc.response.get("Error", {}).get("Message", "Unknown error")
866
+ message = exc.response.get("Error", {}).get(
867
+ "Message", "Unknown error"
868
+ )
865
869
  raise AlertError(
866
870
  f"Failed to search Cognito user by sub: {message}"
867
871
  ) from None
@@ -882,7 +886,9 @@ class Context:
882
886
  resolved_username = response.get("Username")
883
887
  except ClientError as exc:
884
888
  message = exc.response.get("Error", {}).get("Message", "Unknown error")
885
- raise AlertError(f"Failed to retrieve Cognito user: {message}") from None
889
+ raise AlertError(
890
+ f"Failed to retrieve Cognito user: {message}"
891
+ ) from None
886
892
 
887
893
  attributes = {
888
894
  attr["Name"]: attr.get("Value")
@@ -558,7 +558,8 @@ class DataServiceMixin:
558
558
  requested_cols = _extract_requested_column_names(params.get("columns"))
559
559
  if requested_cols:
560
560
  available_cols = {
561
- c.lower() for c in tx.table(obj).sys_columns(cache_ttl=SCHEMA_CACHE_SECONDS)
561
+ c.lower()
562
+ for c in tx.table(obj).sys_columns(cache_ttl=SCHEMA_CACHE_SECONDS)
562
563
  }
563
564
  missing = sorted(
564
565
  {c for c in requested_cols if c.lower() not in available_cols},
@@ -40,9 +40,13 @@ def alternate_engine(alternate_db: str | None = None):
40
40
  """Engine for the alternate database — same instance, other ``database``.
41
41
 
42
42
  Host/port/user/password are inherited from the running config, so no
43
- separate credentials are needed; only the database name changes (the
44
- ``DBAlternate`` config key by default). Cached per database name so
45
- repeated mirrors in one process reuse the connection.
43
+ separate credentials are needed; only the database name changes: the
44
+ ``DBAlternate`` config key, which the site factory's
45
+ ``provision-capabilities`` derives on every deploy-backend from the
46
+ sibling environment's ``DBDatabase`` (``/{Project}/{env}/DBAlternate`` =
47
+ the other stage's database) — nothing to declare by hand inside the
48
+ factory. Cached per database name so repeated mirrors in one process
49
+ reuse the connection.
46
50
  """
47
51
  from velocity.aws import ssm_config
48
52
  from velocity.db.servers import postgres
@@ -176,7 +180,9 @@ def _run(operation, context, what, verbs, notify):
176
180
  except MirrorSkip as skip:
177
181
  log.warning("%s not %s the alternate database: %s", what, done, skip)
178
182
  if notify:
179
- toast(context, f"{what} {undone} the alternate database: {skip}.", "warning")
183
+ toast(
184
+ context, f"{what} {undone} the alternate database: {skip}.", "warning"
185
+ )
180
186
  return None
181
187
  except Exception as exc: # never block the local write
182
188
  log.warning("%s: mirror to the alternate database failed", what, exc_info=True)
@@ -87,7 +87,9 @@ class ReadCache:
87
87
  self.hits += 1
88
88
  return True, value
89
89
 
90
- def put(self, key, value, ttl: float, *, tables=(), now: float | None = None) -> None:
90
+ def put(
91
+ self, key, value, ttl: float, *, tables=(), now: float | None = None
92
+ ) -> None:
91
93
  if not self.enabled() or ttl is None or ttl <= 0:
92
94
  return
93
95
  now = time.monotonic() if now is None else now
@@ -102,7 +104,9 @@ class ReadCache:
102
104
  oldest, _ = self._entries.popitem(last=False)
103
105
  self._untag(oldest)
104
106
 
105
- def memo(self, key, loader, ttl: float, *, tables=(), cache_none: bool = True, now=None):
107
+ def memo(
108
+ self, key, loader, ttl: float, *, tables=(), cache_none: bool = True, now=None
109
+ ):
106
110
  """``loader()`` once per ``ttl`` for ``key``. ``cache_none=False`` never
107
111
  stores a ``None`` result (a "not found" that may exist a moment later)."""
108
112
  hit, value = self.get(key, now=now)
@@ -166,7 +170,9 @@ read_cache = ReadCache()
166
170
 
167
171
  def memo(key, loader, ttl: float, *, tables=(), cache_none: bool = True, now=None):
168
172
  """Module-level shortcut for :meth:`ReadCache.memo` on the shared store."""
169
- return read_cache.memo(key, loader, ttl, tables=tables, cache_none=cache_none, now=now)
173
+ return read_cache.memo(
174
+ key, loader, ttl, tables=tables, cache_none=cache_none, now=now
175
+ )
170
176
 
171
177
 
172
178
  def db_identity(engine) -> str:
@@ -1852,7 +1852,9 @@ class Table:
1852
1852
  return None
1853
1853
  if len(rows) > 1:
1854
1854
  sql = self.select("sys_id", sql_only=True, where=lookup, lock=lock)
1855
- raise exceptions.DuplicateRowsFoundError(f"More than one entry found. {sql}")
1855
+ raise exceptions.DuplicateRowsFoundError(
1856
+ f"More than one entry found. {sql}"
1857
+ )
1856
1858
  # a copy: the Row's write-through cache must never alias a cached entry
1857
1859
  return Row._from_data(self, dict(rows[0]))
1858
1860
 
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: velocity-python
3
- Version: 0.1.110
3
+ Version: 0.1.112
4
4
  Summary: A rapid application development library for interfacing with data storage
5
5
  Author-email: Velocity Team <info@codeclubs.org>
6
6
  License-Expression: MIT
@@ -169,7 +169,12 @@ def test_summarize_policy_reads_the_same_for_every_capability():
169
169
  summary = caps.summarize_policy(
170
170
  "security",
171
171
  {
172
- "ip_denylist": ["203.0.113.0/24", "198.51.100.1", "198.51.100.2", "198.51.100.3"],
172
+ "ip_denylist": [
173
+ "203.0.113.0/24",
174
+ "198.51.100.1",
175
+ "198.51.100.2",
176
+ "198.51.100.3",
177
+ ],
173
178
  "blocked_countries": ["KP"],
174
179
  "legacy": 1,
175
180
  },
@@ -22,9 +22,16 @@ RESPONSE = {
22
22
 
23
23
 
24
24
  def _ctx():
25
- event = {"requestContext": {"identity": {"cognitoAuthenticationProvider": PROVIDER}}}
25
+ event = {
26
+ "requestContext": {"identity": {"cognitoAuthenticationProvider": PROVIDER}}
27
+ }
26
28
  ctx = Context(
27
- aws_event=event, aws_context=None, args={}, postdata={}, response=None, session={}
29
+ aws_event=event,
30
+ aws_context=None,
31
+ args={},
32
+ postdata={},
33
+ response=None,
34
+ session={},
28
35
  )
29
36
  return ctx, event
30
37
 
@@ -45,7 +52,12 @@ class TestCognitoUserCache(unittest.TestCase):
45
52
  mock_cognito.admin_get_user.return_value = RESPONSE
46
53
  first = ctx.get_cognito_user(event)
47
54
  second = Context(
48
- aws_event=event, aws_context=None, args={}, postdata={}, response=None, session={}
55
+ aws_event=event,
56
+ aws_context=None,
57
+ args={},
58
+ postdata={},
59
+ response=None,
60
+ session={},
49
61
  ).get_cognito_user(event)
50
62
  mock_cognito.admin_get_user.assert_called_once()
51
63
  self.assertEqual(first["email"], "user@example.com")
@@ -114,12 +114,17 @@ def test_mirror_row_translates_and_upserts_by_natural_key():
114
114
  assert pk == {"site_sys_id": 2002, "env_name": "demo", "capability": "retention"}
115
115
  data, merged_pk = alt.table("site_capabilities").merges[0]
116
116
  assert merged_pk == pk
117
- assert data["site_sys_id"] == 2002 and "sys_id" not in data and "sys_dirty" not in data
117
+ assert (
118
+ data["site_sys_id"] == 2002 and "sys_id" not in data and "sys_dirty" not in data
119
+ )
118
120
 
119
121
 
120
122
  def test_mirror_row_skips_keyless_and_translate_none():
121
123
  alt = FakeDb()
122
- assert mirror.mirror_row({"sys_id": 1, "x": 1}, table="t", key=("k",), engine=alt) is None
124
+ assert (
125
+ mirror.mirror_row({"sys_id": 1, "x": 1}, table="t", key=("k",), engine=alt)
126
+ is None
127
+ )
123
128
  assert (
124
129
  mirror.mirror_row(
125
130
  {"k": 1}, table="t", key=("k",), engine=alt, translate=lambda *_: None
@@ -134,7 +139,12 @@ def test_mirror_skip_propagates_from_translate():
134
139
  alt.tables["sites"].rows.clear()
135
140
  with pytest.raises(mirror.MirrorSkip, match="not in the alternate"):
136
141
  mirror.mirror_row(
137
- ROW, table="site_capabilities", key=KEY, engine=alt, translate=by_slug, tx=src
142
+ ROW,
143
+ table="site_capabilities",
144
+ key=KEY,
145
+ engine=alt,
146
+ translate=by_slug,
147
+ tx=src,
138
148
  )
139
149
 
140
150
 
@@ -149,14 +159,23 @@ def test_delete_mirror_removes_the_counterpart():
149
159
 
150
160
  def test_reconcile_mirrors_every_row_it_can_and_reports_the_rest():
151
161
  src, alt = dbs()
152
- src.tables["site_capabilities"].rows.append({"sys_id": 6, "site_sys_id": 1001, "env_name": ""})
153
- src.tables["site_capabilities"].rows.append({"sys_id": 7, "site_sys_id": 3, "env_name": "demo", "capability": "jobs"})
162
+ src.tables["site_capabilities"].rows.append(
163
+ {"sys_id": 6, "site_sys_id": 1001, "env_name": ""}
164
+ )
165
+ src.tables["site_capabilities"].rows.append(
166
+ {"sys_id": 7, "site_sys_id": 3, "env_name": "demo", "capability": "jobs"}
167
+ )
154
168
  src.tables["sites"].rows.append({"sys_id": 3, "slug": "nowhere"})
155
169
  result = mirror.reconcile(
156
170
  src, table="site_capabilities", key=KEY, engine=alt, translate=by_slug
157
171
  )
158
- assert result["synced"] == [{"site_sys_id": 2002, "env_name": "demo", "capability": "retention"}]
159
- assert result["skipped"] == [6, 7] # keyless, and MirrorSkip (site not in alternate)
172
+ assert result["synced"] == [
173
+ {"site_sys_id": 2002, "env_name": "demo", "capability": "retention"}
174
+ ]
175
+ assert result["skipped"] == [
176
+ 6,
177
+ 7,
178
+ ] # keyless, and MirrorSkip (site not in alternate)
160
179
 
161
180
 
162
181
  # ── hooks ────────────────────────────────────────────────────────────────
@@ -171,14 +190,18 @@ def test_write_hook_mirrors_and_toasts_success(monkeypatch):
171
190
  ctx = FakeContext()
172
191
  hook(src, "site_capabilities", 5, ROW, ctx)
173
192
  assert alt.table("site_capabilities").merges[0][1]["site_sys_id"] == 2002
174
- assert ctx.toasts == [("Site capability mirrored to the alternate database.", "success")]
193
+ assert ctx.toasts == [
194
+ ("Site capability mirrored to the alternate database.", "success")
195
+ ]
175
196
 
176
197
 
177
198
  def test_write_hook_turns_a_skip_into_a_warning(monkeypatch):
178
199
  src, alt = dbs()
179
200
  alt.tables["sites"].rows.clear()
180
201
  monkeypatch.setattr(mirror, "alternate_engine", lambda *a, **k: alt)
181
- hook = mirror.make_mirror_hook(table="site_capabilities", key=KEY, translate=by_slug)
202
+ hook = mirror.make_mirror_hook(
203
+ table="site_capabilities", key=KEY, translate=by_slug
204
+ )
182
205
  ctx = FakeContext()
183
206
  hook(src, "site_capabilities", 5, ROW, ctx) # must not raise
184
207
  (message, level) = ctx.toasts[0]
@@ -220,7 +243,9 @@ def test_delete_hook_reads_the_row_first_and_removes_the_counterpart(monkeypatch
220
243
  assert alt.table("site_capabilities").deletes == [
221
244
  {"site_sys_id": 2002, "env_name": "demo", "capability": "retention"}
222
245
  ]
223
- assert ctx.toasts == [("Site capability removed from the alternate database.", "success")]
246
+ assert ctx.toasts == [
247
+ ("Site capability removed from the alternate database.", "success")
248
+ ]
224
249
  # unknown row / no tx: nothing happens, nothing raised
225
250
  hook(src, "site_capabilities", 999, ctx)
226
251
  hook(None, "site_capabilities", 5, ctx)
@@ -117,7 +117,9 @@ def test_find_none_and_duplicates():
117
117
  with pytest.raises(LookupError):
118
118
  T(FakeTx(), []).find({"email_address": "x@example.com"}, raise_if_missing=True)
119
119
  with pytest.raises(exceptions.DuplicateRowsFoundError):
120
- T(FakeTx(), [ROW, {**ROW, "sys_id": 8}]).find({"email_address": "a@example.com"})
120
+ T(FakeTx(), [ROW, {**ROW, "sys_id": 8}]).find(
121
+ {"email_address": "a@example.com"}
122
+ )
121
123
 
122
124
 
123
125
  def test_find_with_cache_ttl_is_served_from_the_process_cache():
@@ -140,7 +142,9 @@ def test_find_hands_out_a_copy_not_the_cached_entry():
140
142
  t = T(FakeTx(), [ROW])
141
143
  where = {"email_address": "a@example.com"}
142
144
  first = t.find(where, cache_ttl=60)
143
- object.__setattr__(first, "_cache", {**first._cache, "sys_id": 99}) # poke the Row only
145
+ object.__setattr__(
146
+ first, "_cache", {**first._cache, "sys_id": 99}
147
+ ) # poke the Row only
144
148
  assert t.find(where, cache_ttl=60)["sys_id"] == 7
145
149
 
146
150
 
@@ -166,7 +170,9 @@ def test_exists_and_sys_columns_cache_the_schema():
166
170
  def test_cache_keys_include_the_database():
167
171
  a = T(FakeTx(), [ROW])
168
172
  b = T(FakeTx(), [{**ROW, "sys_id": 8}])
169
- b.tx.engine = type("E", (), {"config": {"host": "h", "dbname": "other"}, "sql": FakeSQL()})()
173
+ b.tx.engine = type(
174
+ "E", (), {"config": {"host": "h", "dbname": "other"}, "sql": FakeSQL()}
175
+ )()
170
176
  where = {"email_address": "a@example.com"}
171
177
  assert a.find(where, cache_ttl=60)["sys_id"] == 7
172
178
  assert b.find(where, cache_ttl=60)["sys_id"] == 8 # not a's cached row