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.
- {velocity_python-0.1.110/src/velocity_python.egg-info → velocity_python-0.1.112}/PKG-INFO +1 -1
- {velocity_python-0.1.110 → velocity_python-0.1.112}/pyproject.toml +1 -1
- {velocity_python-0.1.110 → velocity_python-0.1.112}/src/velocity/__init__.py +1 -1
- {velocity_python-0.1.110 → velocity_python-0.1.112}/src/velocity/aws/capabilities/base.py +14 -4
- {velocity_python-0.1.110 → velocity_python-0.1.112}/src/velocity/aws/capabilities/security.py +8 -1
- {velocity_python-0.1.110 → velocity_python-0.1.112}/src/velocity/aws/feature_flags.py +5 -1
- {velocity_python-0.1.110 → velocity_python-0.1.112}/src/velocity/aws/handlers/context.py +9 -3
- {velocity_python-0.1.110 → velocity_python-0.1.112}/src/velocity/aws/handlers/mixins/data_service.py +2 -1
- {velocity_python-0.1.110 → velocity_python-0.1.112}/src/velocity/aws/mirror.py +10 -4
- {velocity_python-0.1.110 → velocity_python-0.1.112}/src/velocity/cache.py +9 -3
- {velocity_python-0.1.110 → velocity_python-0.1.112}/src/velocity/db/core/table.py +3 -1
- {velocity_python-0.1.110 → velocity_python-0.1.112/src/velocity_python.egg-info}/PKG-INFO +1 -1
- {velocity_python-0.1.110 → velocity_python-0.1.112}/tests/test_capability_catalog.py +6 -1
- {velocity_python-0.1.110 → velocity_python-0.1.112}/tests/test_cognito_user_cache.py +15 -3
- {velocity_python-0.1.110 → velocity_python-0.1.112}/tests/test_mirror.py +35 -10
- {velocity_python-0.1.110 → velocity_python-0.1.112}/tests/test_table_find_cache.py +9 -3
- {velocity_python-0.1.110 → velocity_python-0.1.112}/LICENSE +0 -0
- {velocity_python-0.1.110 → velocity_python-0.1.112}/README.md +0 -0
- {velocity_python-0.1.110 → velocity_python-0.1.112}/setup.cfg +0 -0
- {velocity_python-0.1.110 → velocity_python-0.1.112}/src/velocity/aws/__init__.py +0 -0
- {velocity_python-0.1.110 → velocity_python-0.1.112}/src/velocity/aws/amplify.py +0 -0
- {velocity_python-0.1.110 → velocity_python-0.1.112}/src/velocity/aws/amplify_build.py +0 -0
- {velocity_python-0.1.110 → velocity_python-0.1.112}/src/velocity/aws/assets/__init__.py +0 -0
- {velocity_python-0.1.110 → velocity_python-0.1.112}/src/velocity/aws/assets/backfill.py +0 -0
- {velocity_python-0.1.110 → velocity_python-0.1.112}/src/velocity/aws/assets/indexing.py +0 -0
- {velocity_python-0.1.110 → velocity_python-0.1.112}/src/velocity/aws/assets/references.py +0 -0
- {velocity_python-0.1.110 → velocity_python-0.1.112}/src/velocity/aws/assets/service.py +0 -0
- {velocity_python-0.1.110 → velocity_python-0.1.112}/src/velocity/aws/assets/usage_index.py +0 -0
- {velocity_python-0.1.110 → velocity_python-0.1.112}/src/velocity/aws/blobs.py +0 -0
- {velocity_python-0.1.110 → velocity_python-0.1.112}/src/velocity/aws/capabilities/__init__.py +0 -0
- {velocity_python-0.1.110 → velocity_python-0.1.112}/src/velocity/aws/capabilities/dispatch.py +0 -0
- {velocity_python-0.1.110 → velocity_python-0.1.112}/src/velocity/aws/capabilities/infra.py +0 -0
- {velocity_python-0.1.110 → velocity_python-0.1.112}/src/velocity/aws/capabilities/jobs.py +0 -0
- {velocity_python-0.1.110 → velocity_python-0.1.112}/src/velocity/aws/capabilities/provisioning.py +0 -0
- {velocity_python-0.1.110 → velocity_python-0.1.112}/src/velocity/aws/capabilities/retention.py +0 -0
- {velocity_python-0.1.110 → velocity_python-0.1.112}/src/velocity/aws/capabilities/single_session.py +0 -0
- {velocity_python-0.1.110 → velocity_python-0.1.112}/src/velocity/aws/deploy/__init__.py +0 -0
- {velocity_python-0.1.110 → velocity_python-0.1.112}/src/velocity/aws/deploy/config.py +0 -0
- {velocity_python-0.1.110 → velocity_python-0.1.112}/src/velocity/aws/deploy/operations.py +0 -0
- {velocity_python-0.1.110 → velocity_python-0.1.112}/src/velocity/aws/deploy/policies.py +0 -0
- {velocity_python-0.1.110 → velocity_python-0.1.112}/src/velocity/aws/deploy/reconcile.py +0 -0
- {velocity_python-0.1.110 → velocity_python-0.1.112}/src/velocity/aws/deploy/targets.py +0 -0
- {velocity_python-0.1.110 → velocity_python-0.1.112}/src/velocity/aws/dirty_pipeline.py +0 -0
- {velocity_python-0.1.110 → velocity_python-0.1.112}/src/velocity/aws/email.py +0 -0
- {velocity_python-0.1.110 → velocity_python-0.1.112}/src/velocity/aws/handlers/__init__.py +0 -0
- {velocity_python-0.1.110 → velocity_python-0.1.112}/src/velocity/aws/handlers/base_handler.py +0 -0
- {velocity_python-0.1.110 → velocity_python-0.1.112}/src/velocity/aws/handlers/context_factory.py +0 -0
- {velocity_python-0.1.110 → velocity_python-0.1.112}/src/velocity/aws/handlers/exceptions.py +0 -0
- {velocity_python-0.1.110 → velocity_python-0.1.112}/src/velocity/aws/handlers/lambda_handler.py +0 -0
- {velocity_python-0.1.110 → velocity_python-0.1.112}/src/velocity/aws/handlers/masquerade.py +0 -0
- {velocity_python-0.1.110 → velocity_python-0.1.112}/src/velocity/aws/handlers/mixins/__init__.py +0 -0
- {velocity_python-0.1.110 → velocity_python-0.1.112}/src/velocity/aws/handlers/mixins/job_handler.py +0 -0
- {velocity_python-0.1.110 → velocity_python-0.1.112}/src/velocity/aws/handlers/mixins/session_control.py +0 -0
- {velocity_python-0.1.110 → velocity_python-0.1.112}/src/velocity/aws/handlers/mixins/web_handler.py +0 -0
- {velocity_python-0.1.110 → velocity_python-0.1.112}/src/velocity/aws/handlers/perf.py +0 -0
- {velocity_python-0.1.110 → velocity_python-0.1.112}/src/velocity/aws/handlers/response.py +0 -0
- {velocity_python-0.1.110 → velocity_python-0.1.112}/src/velocity/aws/handlers/sqs_handler.py +0 -0
- {velocity_python-0.1.110 → velocity_python-0.1.112}/src/velocity/aws/job_lifecycle.py +0 -0
- {velocity_python-0.1.110 → velocity_python-0.1.112}/src/velocity/aws/job_results.py +0 -0
- {velocity_python-0.1.110 → velocity_python-0.1.112}/src/velocity/aws/s3.py +0 -0
- {velocity_python-0.1.110 → velocity_python-0.1.112}/src/velocity/aws/sms.py +0 -0
- {velocity_python-0.1.110 → velocity_python-0.1.112}/src/velocity/aws/ssm_config.py +0 -0
- {velocity_python-0.1.110 → velocity_python-0.1.112}/src/velocity/aws/tests/__init__.py +0 -0
- {velocity_python-0.1.110 → velocity_python-0.1.112}/src/velocity/aws/tests/test_amplify_build_policy_size.py +0 -0
- {velocity_python-0.1.110 → velocity_python-0.1.112}/src/velocity/aws/tests/test_amplify_build_shim.py +0 -0
- {velocity_python-0.1.110 → velocity_python-0.1.112}/src/velocity/aws/tests/test_base_handler_error_response.py +0 -0
- {velocity_python-0.1.110 → velocity_python-0.1.112}/src/velocity/aws/tests/test_deploy_policies.py +0 -0
- {velocity_python-0.1.110 → velocity_python-0.1.112}/src/velocity/aws/tests/test_deploy_reconcile.py +0 -0
- {velocity_python-0.1.110 → velocity_python-0.1.112}/src/velocity/aws/tests/test_email.py +0 -0
- {velocity_python-0.1.110 → velocity_python-0.1.112}/src/velocity/aws/tests/test_lambda_handler_json_serialization.py +0 -0
- {velocity_python-0.1.110 → velocity_python-0.1.112}/src/velocity/aws/tests/test_response.py +0 -0
- {velocity_python-0.1.110 → velocity_python-0.1.112}/src/velocity/aws/tests/test_sms.py +0 -0
- {velocity_python-0.1.110 → velocity_python-0.1.112}/src/velocity/db/__init__.py +0 -0
- {velocity_python-0.1.110 → velocity_python-0.1.112}/src/velocity/db/core/__init__.py +0 -0
- {velocity_python-0.1.110 → velocity_python-0.1.112}/src/velocity/db/core/async_support.py +0 -0
- {velocity_python-0.1.110 → velocity_python-0.1.112}/src/velocity/db/core/column.py +0 -0
- {velocity_python-0.1.110 → velocity_python-0.1.112}/src/velocity/db/core/database.py +0 -0
- {velocity_python-0.1.110 → velocity_python-0.1.112}/src/velocity/db/core/decorators.py +0 -0
- {velocity_python-0.1.110 → velocity_python-0.1.112}/src/velocity/db/core/engine.py +0 -0
- {velocity_python-0.1.110 → velocity_python-0.1.112}/src/velocity/db/core/jsonproxy.py +0 -0
- {velocity_python-0.1.110 → velocity_python-0.1.112}/src/velocity/db/core/result.py +0 -0
- {velocity_python-0.1.110 → velocity_python-0.1.112}/src/velocity/db/core/row.py +0 -0
- {velocity_python-0.1.110 → velocity_python-0.1.112}/src/velocity/db/core/sequence.py +0 -0
- {velocity_python-0.1.110 → velocity_python-0.1.112}/src/velocity/db/core/transaction.py +0 -0
- {velocity_python-0.1.110 → velocity_python-0.1.112}/src/velocity/db/core/view.py +0 -0
- {velocity_python-0.1.110 → velocity_python-0.1.112}/src/velocity/db/exceptions.py +0 -0
- {velocity_python-0.1.110 → velocity_python-0.1.112}/src/velocity/db/maintenance.py +0 -0
- {velocity_python-0.1.110 → velocity_python-0.1.112}/src/velocity/db/migrations.py +0 -0
- {velocity_python-0.1.110 → velocity_python-0.1.112}/src/velocity/db/servers/__init__.py +0 -0
- {velocity_python-0.1.110 → velocity_python-0.1.112}/src/velocity/db/servers/base/__init__.py +0 -0
- {velocity_python-0.1.110 → velocity_python-0.1.112}/src/velocity/db/servers/base/initializer.py +0 -0
- {velocity_python-0.1.110 → velocity_python-0.1.112}/src/velocity/db/servers/base/operators.py +0 -0
- {velocity_python-0.1.110 → velocity_python-0.1.112}/src/velocity/db/servers/base/sql.py +0 -0
- {velocity_python-0.1.110 → velocity_python-0.1.112}/src/velocity/db/servers/base/types.py +0 -0
- {velocity_python-0.1.110 → velocity_python-0.1.112}/src/velocity/db/servers/mysql/__init__.py +0 -0
- {velocity_python-0.1.110 → velocity_python-0.1.112}/src/velocity/db/servers/mysql/operators.py +0 -0
- {velocity_python-0.1.110 → velocity_python-0.1.112}/src/velocity/db/servers/mysql/reserved.py +0 -0
- {velocity_python-0.1.110 → velocity_python-0.1.112}/src/velocity/db/servers/mysql/sql.py +0 -0
- {velocity_python-0.1.110 → velocity_python-0.1.112}/src/velocity/db/servers/mysql/types.py +0 -0
- {velocity_python-0.1.110 → velocity_python-0.1.112}/src/velocity/db/servers/postgres/__init__.py +0 -0
- {velocity_python-0.1.110 → velocity_python-0.1.112}/src/velocity/db/servers/postgres/operators.py +0 -0
- {velocity_python-0.1.110 → velocity_python-0.1.112}/src/velocity/db/servers/postgres/reserved.py +0 -0
- {velocity_python-0.1.110 → velocity_python-0.1.112}/src/velocity/db/servers/postgres/sql.py +0 -0
- {velocity_python-0.1.110 → velocity_python-0.1.112}/src/velocity/db/servers/postgres/types.py +0 -0
- {velocity_python-0.1.110 → velocity_python-0.1.112}/src/velocity/db/servers/sqlite/__init__.py +0 -0
- {velocity_python-0.1.110 → velocity_python-0.1.112}/src/velocity/db/servers/sqlite/operators.py +0 -0
- {velocity_python-0.1.110 → velocity_python-0.1.112}/src/velocity/db/servers/sqlite/reserved.py +0 -0
- {velocity_python-0.1.110 → velocity_python-0.1.112}/src/velocity/db/servers/sqlite/sql.py +0 -0
- {velocity_python-0.1.110 → velocity_python-0.1.112}/src/velocity/db/servers/sqlite/types.py +0 -0
- {velocity_python-0.1.110 → velocity_python-0.1.112}/src/velocity/db/servers/sqlserver/__init__.py +0 -0
- {velocity_python-0.1.110 → velocity_python-0.1.112}/src/velocity/db/servers/sqlserver/operators.py +0 -0
- {velocity_python-0.1.110 → velocity_python-0.1.112}/src/velocity/db/servers/sqlserver/reserved.py +0 -0
- {velocity_python-0.1.110 → velocity_python-0.1.112}/src/velocity/db/servers/sqlserver/sql.py +0 -0
- {velocity_python-0.1.110 → velocity_python-0.1.112}/src/velocity/db/servers/sqlserver/types.py +0 -0
- {velocity_python-0.1.110 → velocity_python-0.1.112}/src/velocity/db/servers/tablehelper.py +0 -0
- {velocity_python-0.1.110 → velocity_python-0.1.112}/src/velocity/db/tests/__init__.py +0 -0
- {velocity_python-0.1.110 → velocity_python-0.1.112}/src/velocity/db/tests/common_db_test.py +0 -0
- {velocity_python-0.1.110 → velocity_python-0.1.112}/src/velocity/db/tests/postgres/__init__.py +0 -0
- {velocity_python-0.1.110 → velocity_python-0.1.112}/src/velocity/db/tests/postgres/common.py +0 -0
- {velocity_python-0.1.110 → velocity_python-0.1.112}/src/velocity/db/tests/postgres/conftest.py +0 -0
- {velocity_python-0.1.110 → velocity_python-0.1.112}/src/velocity/db/tests/postgres/test_column.py +0 -0
- {velocity_python-0.1.110 → velocity_python-0.1.112}/src/velocity/db/tests/postgres/test_connections.py +0 -0
- {velocity_python-0.1.110 → velocity_python-0.1.112}/src/velocity/db/tests/postgres/test_database.py +0 -0
- {velocity_python-0.1.110 → velocity_python-0.1.112}/src/velocity/db/tests/postgres/test_engine.py +0 -0
- {velocity_python-0.1.110 → velocity_python-0.1.112}/src/velocity/db/tests/postgres/test_general_usage.py +0 -0
- {velocity_python-0.1.110 → velocity_python-0.1.112}/src/velocity/db/tests/postgres/test_imports.py +0 -0
- {velocity_python-0.1.110 → velocity_python-0.1.112}/src/velocity/db/tests/postgres/test_result.py +0 -0
- {velocity_python-0.1.110 → velocity_python-0.1.112}/src/velocity/db/tests/postgres/test_row.py +0 -0
- {velocity_python-0.1.110 → velocity_python-0.1.112}/src/velocity/db/tests/postgres/test_row_comprehensive.py +0 -0
- {velocity_python-0.1.110 → velocity_python-0.1.112}/src/velocity/db/tests/postgres/test_schema_locking.py +0 -0
- {velocity_python-0.1.110 → velocity_python-0.1.112}/src/velocity/db/tests/postgres/test_schema_locking_unit.py +0 -0
- {velocity_python-0.1.110 → velocity_python-0.1.112}/src/velocity/db/tests/postgres/test_sequence.py +0 -0
- {velocity_python-0.1.110 → velocity_python-0.1.112}/src/velocity/db/tests/postgres/test_sql_comprehensive.py +0 -0
- {velocity_python-0.1.110 → velocity_python-0.1.112}/src/velocity/db/tests/postgres/test_table.py +0 -0
- {velocity_python-0.1.110 → velocity_python-0.1.112}/src/velocity/db/tests/postgres/test_table_comprehensive.py +0 -0
- {velocity_python-0.1.110 → velocity_python-0.1.112}/src/velocity/db/tests/postgres/test_transaction.py +0 -0
- {velocity_python-0.1.110 → velocity_python-0.1.112}/src/velocity/db/tests/sql/__init__.py +0 -0
- {velocity_python-0.1.110 → velocity_python-0.1.112}/src/velocity/db/tests/sql/common.py +0 -0
- {velocity_python-0.1.110 → velocity_python-0.1.112}/src/velocity/db/tests/sql/test_postgres_select_advanced.py +0 -0
- {velocity_python-0.1.110 → velocity_python-0.1.112}/src/velocity/db/tests/sql/test_postgres_select_variances.py +0 -0
- {velocity_python-0.1.110 → velocity_python-0.1.112}/src/velocity/db/tests/test_cursor_rowcount_fix.py +0 -0
- {velocity_python-0.1.110 → velocity_python-0.1.112}/src/velocity/db/tests/test_db_utils.py +0 -0
- {velocity_python-0.1.110 → velocity_python-0.1.112}/src/velocity/db/tests/test_postgres.py +0 -0
- {velocity_python-0.1.110 → velocity_python-0.1.112}/src/velocity/db/tests/test_postgres_unchanged.py +0 -0
- {velocity_python-0.1.110 → velocity_python-0.1.112}/src/velocity/db/tests/test_process_error_robustness.py +0 -0
- {velocity_python-0.1.110 → velocity_python-0.1.112}/src/velocity/db/tests/test_result_caching.py +0 -0
- {velocity_python-0.1.110 → velocity_python-0.1.112}/src/velocity/db/tests/test_result_sql_aware.py +0 -0
- {velocity_python-0.1.110 → velocity_python-0.1.112}/src/velocity/db/tests/test_row_get_missing_column.py +0 -0
- {velocity_python-0.1.110 → velocity_python-0.1.112}/src/velocity/db/tests/test_schema_locking_initializers.py +0 -0
- {velocity_python-0.1.110 → velocity_python-0.1.112}/src/velocity/db/tests/test_schema_locking_simple.py +0 -0
- {velocity_python-0.1.110 → velocity_python-0.1.112}/src/velocity/db/tests/test_sql_builder.py +0 -0
- {velocity_python-0.1.110 → velocity_python-0.1.112}/src/velocity/db/tests/test_tablehelper.py +0 -0
- {velocity_python-0.1.110 → velocity_python-0.1.112}/src/velocity/db/tests/test_view_helper.py +0 -0
- {velocity_python-0.1.110 → velocity_python-0.1.112}/src/velocity/db/utils.py +0 -0
- {velocity_python-0.1.110 → velocity_python-0.1.112}/src/velocity/logging.py +0 -0
- {velocity_python-0.1.110 → velocity_python-0.1.112}/src/velocity/misc/__init__.py +0 -0
- {velocity_python-0.1.110 → velocity_python-0.1.112}/src/velocity/misc/conv/__init__.py +0 -0
- {velocity_python-0.1.110 → velocity_python-0.1.112}/src/velocity/misc/conv/iconv.py +0 -0
- {velocity_python-0.1.110 → velocity_python-0.1.112}/src/velocity/misc/conv/oconv.py +0 -0
- {velocity_python-0.1.110 → velocity_python-0.1.112}/src/velocity/misc/db.py +0 -0
- {velocity_python-0.1.110 → velocity_python-0.1.112}/src/velocity/misc/export.py +0 -0
- {velocity_python-0.1.110 → velocity_python-0.1.112}/src/velocity/misc/format.py +0 -0
- {velocity_python-0.1.110 → velocity_python-0.1.112}/src/velocity/misc/mail.py +0 -0
- {velocity_python-0.1.110 → velocity_python-0.1.112}/src/velocity/misc/merge.py +0 -0
- {velocity_python-0.1.110 → velocity_python-0.1.112}/src/velocity/misc/pdf.py +0 -0
- {velocity_python-0.1.110 → velocity_python-0.1.112}/src/velocity/misc/tests/__init__.py +0 -0
- {velocity_python-0.1.110 → velocity_python-0.1.112}/src/velocity/misc/tests/test_db.py +0 -0
- {velocity_python-0.1.110 → velocity_python-0.1.112}/src/velocity/misc/tests/test_fix.py +0 -0
- {velocity_python-0.1.110 → velocity_python-0.1.112}/src/velocity/misc/tests/test_format.py +0 -0
- {velocity_python-0.1.110 → velocity_python-0.1.112}/src/velocity/misc/tests/test_iconv.py +0 -0
- {velocity_python-0.1.110 → velocity_python-0.1.112}/src/velocity/misc/tests/test_mail_send.py +0 -0
- {velocity_python-0.1.110 → velocity_python-0.1.112}/src/velocity/misc/tests/test_merge.py +0 -0
- {velocity_python-0.1.110 → velocity_python-0.1.112}/src/velocity/misc/tests/test_oconv.py +0 -0
- {velocity_python-0.1.110 → velocity_python-0.1.112}/src/velocity/misc/tests/test_original_error.py +0 -0
- {velocity_python-0.1.110 → velocity_python-0.1.112}/src/velocity/misc/tests/test_timer.py +0 -0
- {velocity_python-0.1.110 → velocity_python-0.1.112}/src/velocity/misc/timer.py +0 -0
- {velocity_python-0.1.110 → velocity_python-0.1.112}/src/velocity/misc/tools.py +0 -0
- {velocity_python-0.1.110 → velocity_python-0.1.112}/src/velocity/nosql/__init__.py +0 -0
- {velocity_python-0.1.110 → velocity_python-0.1.112}/src/velocity/nosql/core/__init__.py +0 -0
- {velocity_python-0.1.110 → velocity_python-0.1.112}/src/velocity/nosql/core/capabilities.py +0 -0
- {velocity_python-0.1.110 → velocity_python-0.1.112}/src/velocity/nosql/core/store.py +0 -0
- {velocity_python-0.1.110 → velocity_python-0.1.112}/src/velocity/nosql/core/where.py +0 -0
- {velocity_python-0.1.110 → velocity_python-0.1.112}/src/velocity/nosql/exceptions.py +0 -0
- {velocity_python-0.1.110 → velocity_python-0.1.112}/src/velocity/nosql/servers/__init__.py +0 -0
- {velocity_python-0.1.110 → velocity_python-0.1.112}/src/velocity/nosql/servers/base/__init__.py +0 -0
- {velocity_python-0.1.110 → velocity_python-0.1.112}/src/velocity/nosql/servers/cassandra/__init__.py +0 -0
- {velocity_python-0.1.110 → velocity_python-0.1.112}/src/velocity/nosql/servers/cassandra/translation.py +0 -0
- {velocity_python-0.1.110 → velocity_python-0.1.112}/src/velocity/nosql/servers/couchbase/__init__.py +0 -0
- {velocity_python-0.1.110 → velocity_python-0.1.112}/src/velocity/nosql/servers/couchbase/translation.py +0 -0
- {velocity_python-0.1.110 → velocity_python-0.1.112}/src/velocity/nosql/servers/dynamodb/__init__.py +0 -0
- {velocity_python-0.1.110 → velocity_python-0.1.112}/src/velocity/nosql/servers/dynamodb/translation.py +0 -0
- {velocity_python-0.1.110 → velocity_python-0.1.112}/src/velocity/nosql/servers/elasticsearch/__init__.py +0 -0
- {velocity_python-0.1.110 → velocity_python-0.1.112}/src/velocity/nosql/servers/elasticsearch/translation.py +0 -0
- {velocity_python-0.1.110 → velocity_python-0.1.112}/src/velocity/nosql/servers/memory/__init__.py +0 -0
- {velocity_python-0.1.110 → velocity_python-0.1.112}/src/velocity/nosql/servers/mongodb/__init__.py +0 -0
- {velocity_python-0.1.110 → velocity_python-0.1.112}/src/velocity/nosql/servers/mongodb/translation.py +0 -0
- {velocity_python-0.1.110 → velocity_python-0.1.112}/src/velocity/nosql/servers/redis/__init__.py +0 -0
- {velocity_python-0.1.110 → velocity_python-0.1.112}/src/velocity/payment/__init__.py +0 -0
- {velocity_python-0.1.110 → velocity_python-0.1.112}/src/velocity/payment/authorizenet_adapter.py +0 -0
- {velocity_python-0.1.110 → velocity_python-0.1.112}/src/velocity/payment/authorizenet_mirror.py +0 -0
- {velocity_python-0.1.110 → velocity_python-0.1.112}/src/velocity/payment/base_adapter.py +0 -0
- {velocity_python-0.1.110 → velocity_python-0.1.112}/src/velocity/payment/braintree_adapter.py +0 -0
- {velocity_python-0.1.110 → velocity_python-0.1.112}/src/velocity/payment/braintree_mirror.py +0 -0
- {velocity_python-0.1.110 → velocity_python-0.1.112}/src/velocity/payment/charge_rules.py +0 -0
- {velocity_python-0.1.110 → velocity_python-0.1.112}/src/velocity/payment/stripe_adapter.py +0 -0
- {velocity_python-0.1.110 → velocity_python-0.1.112}/src/velocity/payment/stripe_mirror.py +0 -0
- {velocity_python-0.1.110 → velocity_python-0.1.112}/src/velocity_python.egg-info/SOURCES.txt +0 -0
- {velocity_python-0.1.110 → velocity_python-0.1.112}/src/velocity_python.egg-info/dependency_links.txt +0 -0
- {velocity_python-0.1.110 → velocity_python-0.1.112}/src/velocity_python.egg-info/entry_points.txt +0 -0
- {velocity_python-0.1.110 → velocity_python-0.1.112}/src/velocity_python.egg-info/requires.txt +0 -0
- {velocity_python-0.1.110 → velocity_python-0.1.112}/src/velocity_python.egg-info/top_level.txt +0 -0
- {velocity_python-0.1.110 → velocity_python-0.1.112}/tests/test_access_error_403.py +0 -0
- {velocity_python-0.1.110 → velocity_python-0.1.112}/tests/test_activity_tracking_aborted_tx.py +0 -0
- {velocity_python-0.1.110 → velocity_python-0.1.112}/tests/test_amplify_build.py +0 -0
- {velocity_python-0.1.110 → velocity_python-0.1.112}/tests/test_asset_indexing.py +0 -0
- {velocity_python-0.1.110 → velocity_python-0.1.112}/tests/test_asset_references.py +0 -0
- {velocity_python-0.1.110 → velocity_python-0.1.112}/tests/test_assets_service.py +0 -0
- {velocity_python-0.1.110 → velocity_python-0.1.112}/tests/test_async_support.py +0 -0
- {velocity_python-0.1.110 → velocity_python-0.1.112}/tests/test_batch_operations.py +0 -0
- {velocity_python-0.1.110 → velocity_python-0.1.112}/tests/test_blob_store.py +0 -0
- {velocity_python-0.1.110 → velocity_python-0.1.112}/tests/test_capabilities.py +0 -0
- {velocity_python-0.1.110 → velocity_python-0.1.112}/tests/test_column_tx_arg.py +0 -0
- {velocity_python-0.1.110 → velocity_python-0.1.112}/tests/test_concurrency_safety.py +0 -0
- {velocity_python-0.1.110 → velocity_python-0.1.112}/tests/test_connection_pool.py +0 -0
- {velocity_python-0.1.110 → velocity_python-0.1.112}/tests/test_connection_resilience.py +0 -0
- {velocity_python-0.1.110 → velocity_python-0.1.112}/tests/test_context_flags_loader.py +0 -0
- {velocity_python-0.1.110 → velocity_python-0.1.112}/tests/test_context_job_descriptions.py +0 -0
- {velocity_python-0.1.110 → velocity_python-0.1.112}/tests/test_data_service_query_cap.py +0 -0
- {velocity_python-0.1.110 → velocity_python-0.1.112}/tests/test_data_service_renumber.py +0 -0
- {velocity_python-0.1.110 → velocity_python-0.1.112}/tests/test_data_service_save_as.py +0 -0
- {velocity_python-0.1.110 → velocity_python-0.1.112}/tests/test_db_credentials_ssm_cascade.py +0 -0
- {velocity_python-0.1.110 → velocity_python-0.1.112}/tests/test_db_maintenance.py +0 -0
- {velocity_python-0.1.110 → velocity_python-0.1.112}/tests/test_decorators.py +0 -0
- {velocity_python-0.1.110 → velocity_python-0.1.112}/tests/test_delete_hook_fk_blocked.py +0 -0
- {velocity_python-0.1.110 → velocity_python-0.1.112}/tests/test_dirty_pipeline_fast_path.py +0 -0
- {velocity_python-0.1.110 → velocity_python-0.1.112}/tests/test_email_processing.py +0 -0
- {velocity_python-0.1.110 → velocity_python-0.1.112}/tests/test_enqueue_send_failures.py +0 -0
- {velocity_python-0.1.110 → velocity_python-0.1.112}/tests/test_feature_flags.py +0 -0
- {velocity_python-0.1.110 → velocity_python-0.1.112}/tests/test_get_cognito_user_provider.py +0 -0
- {velocity_python-0.1.110 → velocity_python-0.1.112}/tests/test_http_handler_rollback.py +0 -0
- {velocity_python-0.1.110 → velocity_python-0.1.112}/tests/test_iconv_money_to_cents.py +0 -0
- {velocity_python-0.1.110 → velocity_python-0.1.112}/tests/test_identifier_injection_guard.py +0 -0
- {velocity_python-0.1.110 → velocity_python-0.1.112}/tests/test_job_handler.py +0 -0
- {velocity_python-0.1.110 → velocity_python-0.1.112}/tests/test_job_lifecycle.py +0 -0
- {velocity_python-0.1.110 → velocity_python-0.1.112}/tests/test_job_results.py +0 -0
- {velocity_python-0.1.110 → velocity_python-0.1.112}/tests/test_json_columns.py +0 -0
- {velocity_python-0.1.110 → velocity_python-0.1.112}/tests/test_jsonb_dict_adapter.py +0 -0
- {velocity_python-0.1.110 → velocity_python-0.1.112}/tests/test_lambda_handler.py +0 -0
- {velocity_python-0.1.110 → velocity_python-0.1.112}/tests/test_lambda_handler_auth.py +0 -0
- {velocity_python-0.1.110 → velocity_python-0.1.112}/tests/test_lambda_handler_masquerade.py +0 -0
- {velocity_python-0.1.110 → velocity_python-0.1.112}/tests/test_lambda_handler_user_cache.py +0 -0
- {velocity_python-0.1.110 → velocity_python-0.1.112}/tests/test_masquerade_grant.py +0 -0
- {velocity_python-0.1.110 → velocity_python-0.1.112}/tests/test_mixins_import.py +0 -0
- {velocity_python-0.1.110 → velocity_python-0.1.112}/tests/test_n_plus_one.py +0 -0
- {velocity_python-0.1.110 → velocity_python-0.1.112}/tests/test_nosql_dynamodb.py +0 -0
- {velocity_python-0.1.110 → velocity_python-0.1.112}/tests/test_nosql_memory.py +0 -0
- {velocity_python-0.1.110 → velocity_python-0.1.112}/tests/test_nosql_mongodb.py +0 -0
- {velocity_python-0.1.110 → velocity_python-0.1.112}/tests/test_nosql_redis.py +0 -0
- {velocity_python-0.1.110 → velocity_python-0.1.112}/tests/test_nosql_translation.py +0 -0
- {velocity_python-0.1.110 → velocity_python-0.1.112}/tests/test_nosql_where.py +0 -0
- {velocity_python-0.1.110 → velocity_python-0.1.112}/tests/test_observability.py +0 -0
- {velocity_python-0.1.110 → velocity_python-0.1.112}/tests/test_on_commit.py +0 -0
- {velocity_python-0.1.110 → velocity_python-0.1.112}/tests/test_payment_authorizenet_adapter.py +0 -0
- {velocity_python-0.1.110 → velocity_python-0.1.112}/tests/test_payment_braintree_adapter.py +0 -0
- {velocity_python-0.1.110 → velocity_python-0.1.112}/tests/test_payment_braintree_mirror.py +0 -0
- {velocity_python-0.1.110 → velocity_python-0.1.112}/tests/test_payment_mirror_empty_table.py +0 -0
- {velocity_python-0.1.110 → velocity_python-0.1.112}/tests/test_payment_profile_sorting.py +0 -0
- {velocity_python-0.1.110 → velocity_python-0.1.112}/tests/test_payment_stripe_adapter.py +0 -0
- {velocity_python-0.1.110 → velocity_python-0.1.112}/tests/test_pdf.py +0 -0
- {velocity_python-0.1.110 → velocity_python-0.1.112}/tests/test_prepared_statements.py +0 -0
- {velocity_python-0.1.110 → velocity_python-0.1.112}/tests/test_psycopg3_upgrade.py +0 -0
- {velocity_python-0.1.110 → velocity_python-0.1.112}/tests/test_query_cache.py +0 -0
- {velocity_python-0.1.110 → velocity_python-0.1.112}/tests/test_query_missing_table_unlocked.py +0 -0
- {velocity_python-0.1.110 → velocity_python-0.1.112}/tests/test_read_cache.py +0 -0
- {velocity_python-0.1.110 → velocity_python-0.1.112}/tests/test_response.py +0 -0
- {velocity_python-0.1.110 → velocity_python-0.1.112}/tests/test_restricted_direct_tables.py +0 -0
- {velocity_python-0.1.110 → velocity_python-0.1.112}/tests/test_retry_side_effect_guard.py +0 -0
- {velocity_python-0.1.110 → velocity_python-0.1.112}/tests/test_return_default_safety.py +0 -0
- {velocity_python-0.1.110 → velocity_python-0.1.112}/tests/test_row_batch_update.py +0 -0
- {velocity_python-0.1.110 → velocity_python-0.1.112}/tests/test_row_cache_staleness.py +0 -0
- {velocity_python-0.1.110 → velocity_python-0.1.112}/tests/test_schema_migrations.py +0 -0
- {velocity_python-0.1.110 → velocity_python-0.1.112}/tests/test_security_capability.py +0 -0
- {velocity_python-0.1.110 → velocity_python-0.1.112}/tests/test_security_hardening.py +0 -0
- {velocity_python-0.1.110 → velocity_python-0.1.112}/tests/test_server_cursor.py +0 -0
- {velocity_python-0.1.110 → velocity_python-0.1.112}/tests/test_session_control.py +0 -0
- {velocity_python-0.1.110 → velocity_python-0.1.112}/tests/test_single_autocommit_safety.py +0 -0
- {velocity_python-0.1.110 → velocity_python-0.1.112}/tests/test_single_session_capability.py +0 -0
- {velocity_python-0.1.110 → velocity_python-0.1.112}/tests/test_spreadsheet_functions.py +0 -0
- {velocity_python-0.1.110 → velocity_python-0.1.112}/tests/test_sqlite_backend.py +0 -0
- {velocity_python-0.1.110 → velocity_python-0.1.112}/tests/test_sqs_per_record_transactions.py +0 -0
- {velocity_python-0.1.110 → velocity_python-0.1.112}/tests/test_ssm_config.py +0 -0
- {velocity_python-0.1.110 → velocity_python-0.1.112}/tests/test_store_user_data.py +0 -0
- {velocity_python-0.1.110 → velocity_python-0.1.112}/tests/test_sys_modified_count_postgres_demo.py +0 -0
- {velocity_python-0.1.110 → velocity_python-0.1.112}/tests/test_table_alter.py +0 -0
- {velocity_python-0.1.110 → velocity_python-0.1.112}/tests/test_table_purge.py +0 -0
- {velocity_python-0.1.110 → velocity_python-0.1.112}/tests/test_transaction_class_wrapping.py +0 -0
- {velocity_python-0.1.110 → velocity_python-0.1.112}/tests/test_transaction_commit_and_ownership.py +0 -0
- {velocity_python-0.1.110 → velocity_python-0.1.112}/tests/test_transaction_edge_cases.py +0 -0
- {velocity_python-0.1.110 → velocity_python-0.1.112}/tests/test_where_clause_validation.py +0 -0
- {velocity_python-0.1.110 → velocity_python-0.1.112}/tests/test_write_hook_create_flow.py +0 -0
|
@@ -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 = (
|
|
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(
|
|
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
|
|
{velocity_python-0.1.110 → velocity_python-0.1.112}/src/velocity/aws/capabilities/security.py
RENAMED
|
@@ -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(
|
|
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,
|
|
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)
|
|
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(
|
|
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(
|
|
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")
|
{velocity_python-0.1.110 → velocity_python-0.1.112}/src/velocity/aws/handlers/mixins/data_service.py
RENAMED
|
@@ -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()
|
|
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
|
|
44
|
-
``DBAlternate`` config key
|
|
45
|
-
|
|
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(
|
|
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(
|
|
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(
|
|
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(
|
|
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(
|
|
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
|
|
|
@@ -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": [
|
|
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 = {
|
|
25
|
+
event = {
|
|
26
|
+
"requestContext": {"identity": {"cognitoAuthenticationProvider": PROVIDER}}
|
|
27
|
+
}
|
|
26
28
|
ctx = Context(
|
|
27
|
-
aws_event=event,
|
|
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,
|
|
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
|
|
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
|
|
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,
|
|
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(
|
|
153
|
-
|
|
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"] == [
|
|
159
|
-
|
|
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 == [
|
|
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(
|
|
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 == [
|
|
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(
|
|
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__(
|
|
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(
|
|
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
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{velocity_python-0.1.110 → velocity_python-0.1.112}/src/velocity/aws/capabilities/__init__.py
RENAMED
|
File without changes
|
{velocity_python-0.1.110 → velocity_python-0.1.112}/src/velocity/aws/capabilities/dispatch.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
{velocity_python-0.1.110 → velocity_python-0.1.112}/src/velocity/aws/capabilities/provisioning.py
RENAMED
|
File without changes
|
{velocity_python-0.1.110 → velocity_python-0.1.112}/src/velocity/aws/capabilities/retention.py
RENAMED
|
File without changes
|
{velocity_python-0.1.110 → velocity_python-0.1.112}/src/velocity/aws/capabilities/single_session.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{velocity_python-0.1.110 → velocity_python-0.1.112}/src/velocity/aws/handlers/base_handler.py
RENAMED
|
File without changes
|
{velocity_python-0.1.110 → velocity_python-0.1.112}/src/velocity/aws/handlers/context_factory.py
RENAMED
|
File without changes
|
|
File without changes
|
{velocity_python-0.1.110 → velocity_python-0.1.112}/src/velocity/aws/handlers/lambda_handler.py
RENAMED
|
File without changes
|
|
File without changes
|
{velocity_python-0.1.110 → velocity_python-0.1.112}/src/velocity/aws/handlers/mixins/__init__.py
RENAMED
|
File without changes
|
{velocity_python-0.1.110 → velocity_python-0.1.112}/src/velocity/aws/handlers/mixins/job_handler.py
RENAMED
|
File without changes
|
|
File without changes
|
{velocity_python-0.1.110 → velocity_python-0.1.112}/src/velocity/aws/handlers/mixins/web_handler.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
{velocity_python-0.1.110 → velocity_python-0.1.112}/src/velocity/aws/handlers/sqs_handler.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{velocity_python-0.1.110 → velocity_python-0.1.112}/src/velocity/aws/tests/test_deploy_policies.py
RENAMED
|
File without changes
|
{velocity_python-0.1.110 → velocity_python-0.1.112}/src/velocity/aws/tests/test_deploy_reconcile.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{velocity_python-0.1.110 → velocity_python-0.1.112}/src/velocity/db/servers/base/__init__.py
RENAMED
|
File without changes
|
{velocity_python-0.1.110 → velocity_python-0.1.112}/src/velocity/db/servers/base/initializer.py
RENAMED
|
File without changes
|
{velocity_python-0.1.110 → velocity_python-0.1.112}/src/velocity/db/servers/base/operators.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
{velocity_python-0.1.110 → velocity_python-0.1.112}/src/velocity/db/servers/mysql/__init__.py
RENAMED
|
File without changes
|
{velocity_python-0.1.110 → velocity_python-0.1.112}/src/velocity/db/servers/mysql/operators.py
RENAMED
|
File without changes
|
{velocity_python-0.1.110 → velocity_python-0.1.112}/src/velocity/db/servers/mysql/reserved.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|