matrx-orm 3.1.34__tar.gz → 3.1.35__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.
- {matrx_orm-3.1.34 → matrx_orm-3.1.35}/CLAUDE.md +1 -0
- {matrx_orm-3.1.34 → matrx_orm-3.1.35}/PKG-INFO +1 -1
- {matrx_orm-3.1.34 → matrx_orm-3.1.35}/matrx_orm/core/async_db_manager.py +31 -4
- {matrx_orm-3.1.34 → matrx_orm-3.1.35}/pyproject.toml +1 -1
- {matrx_orm-3.1.34 → matrx_orm-3.1.35}/tests/level1/test_bulk_upsert_increment_set_fields.py +2 -2
- matrx_orm-3.1.35/tests/level1/test_pool_loop_recreation.py +57 -0
- {matrx_orm-3.1.34 → matrx_orm-3.1.35}/.gitignore +0 -0
- {matrx_orm-3.1.34 → matrx_orm-3.1.35}/AGENTS.md +0 -0
- {matrx_orm-3.1.34 → matrx_orm-3.1.35}/BASE_CLASS_METHODS.md +0 -0
- {matrx_orm-3.1.34 → matrx_orm-3.1.35}/MODEL_API.md +0 -0
- {matrx_orm-3.1.34 → matrx_orm-3.1.35}/README.md +0 -0
- {matrx_orm-3.1.34 → matrx_orm-3.1.35}/database/orm/extended/managers/ai_model_base.py +0 -0
- {matrx_orm-3.1.34 → matrx_orm-3.1.35}/docs/migrations.md +0 -0
- {matrx_orm-3.1.34 → matrx_orm-3.1.35}/matrx_orm/MODULE_README.md +0 -0
- {matrx_orm-3.1.34 → matrx_orm-3.1.35}/matrx_orm/__init__.py +0 -0
- {matrx_orm-3.1.34 → matrx_orm-3.1.35}/matrx_orm/adapters/MODULE_README.md +0 -0
- {matrx_orm-3.1.34 → matrx_orm-3.1.35}/matrx_orm/adapters/__init__.py +0 -0
- {matrx_orm-3.1.34 → matrx_orm-3.1.35}/matrx_orm/adapters/async_postgresql.py +0 -0
- {matrx_orm-3.1.34 → matrx_orm-3.1.35}/matrx_orm/adapters/base_adapter.py +0 -0
- {matrx_orm-3.1.34 → matrx_orm-3.1.35}/matrx_orm/adapters/postgresql.py +0 -0
- {matrx_orm-3.1.34 → matrx_orm-3.1.35}/matrx_orm/adapters/postgrest_client_adapter.py +0 -0
- {matrx_orm-3.1.34 → matrx_orm-3.1.35}/matrx_orm/adapters/supabase_adapter.py +0 -0
- {matrx_orm-3.1.34 → matrx_orm-3.1.35}/matrx_orm/admin/__init__.py +0 -0
- {matrx_orm-3.1.34 → matrx_orm-3.1.35}/matrx_orm/admin/router.py +0 -0
- {matrx_orm-3.1.34 → matrx_orm-3.1.35}/matrx_orm/api/__init__.py +0 -0
- {matrx_orm-3.1.34 → matrx_orm-3.1.35}/matrx_orm/api/auth.py +0 -0
- {matrx_orm-3.1.34 → matrx_orm-3.1.35}/matrx_orm/api/config.py +0 -0
- {matrx_orm-3.1.34 → matrx_orm-3.1.35}/matrx_orm/api/handlers.py +0 -0
- {matrx_orm-3.1.34 → matrx_orm-3.1.35}/matrx_orm/api/protocol.py +0 -0
- {matrx_orm-3.1.34 → matrx_orm-3.1.35}/matrx_orm/api/server.py +0 -0
- {matrx_orm-3.1.34 → matrx_orm-3.1.35}/matrx_orm/associations.py +0 -0
- {matrx_orm-3.1.34 → matrx_orm-3.1.35}/matrx_orm/cache_debug.py +0 -0
- {matrx_orm-3.1.34 → matrx_orm-3.1.35}/matrx_orm/catalog.py +0 -0
- {matrx_orm-3.1.34 → matrx_orm-3.1.35}/matrx_orm/client/MODULE_README.md +0 -0
- {matrx_orm-3.1.34 → matrx_orm-3.1.35}/matrx_orm/client/__init__.py +0 -0
- {matrx_orm-3.1.34 → matrx_orm-3.1.35}/matrx_orm/client/postgres_connection.py +0 -0
- {matrx_orm-3.1.34 → matrx_orm-3.1.35}/matrx_orm/client/postgrest.py +0 -0
- {matrx_orm-3.1.34 → matrx_orm-3.1.35}/matrx_orm/client/supabase_auth.py +0 -0
- {matrx_orm-3.1.34 → matrx_orm-3.1.35}/matrx_orm/client/supabase_config.py +0 -0
- {matrx_orm-3.1.34 → matrx_orm-3.1.35}/matrx_orm/client/supabase_manager.py +0 -0
- {matrx_orm-3.1.34 → matrx_orm-3.1.35}/matrx_orm/core/EXTENDED-TASK.md +0 -0
- {matrx_orm-3.1.34 → matrx_orm-3.1.35}/matrx_orm/core/MODULE_README.md +0 -0
- {matrx_orm-3.1.34 → matrx_orm-3.1.35}/matrx_orm/core/RELATIONS-TASKS.md +0 -0
- {matrx_orm-3.1.34 → matrx_orm-3.1.35}/matrx_orm/core/TASKS.md +0 -0
- {matrx_orm-3.1.34 → matrx_orm-3.1.35}/matrx_orm/core/__init__.py +0 -0
- {matrx_orm-3.1.34 → matrx_orm-3.1.35}/matrx_orm/core/base.py +0 -0
- {matrx_orm-3.1.34 → matrx_orm-3.1.35}/matrx_orm/core/config.py +0 -0
- {matrx_orm-3.1.34 → matrx_orm-3.1.35}/matrx_orm/core/connections.py +0 -0
- {matrx_orm-3.1.34 → matrx_orm-3.1.35}/matrx_orm/core/db_function.py +0 -0
- {matrx_orm-3.1.34 → matrx_orm-3.1.35}/matrx_orm/core/diagnostics.py +0 -0
- {matrx_orm-3.1.34 → matrx_orm-3.1.35}/matrx_orm/core/expressions.py +0 -0
- {matrx_orm-3.1.34 → matrx_orm-3.1.35}/matrx_orm/core/extended.py +0 -0
- {matrx_orm-3.1.34 → matrx_orm-3.1.35}/matrx_orm/core/fields.py +0 -0
- {matrx_orm-3.1.34 → matrx_orm-3.1.35}/matrx_orm/core/introspection.py +0 -0
- {matrx_orm-3.1.34 → matrx_orm-3.1.35}/matrx_orm/core/listen.py +0 -0
- {matrx_orm-3.1.34 → matrx_orm-3.1.35}/matrx_orm/core/loop_filters.py +0 -0
- {matrx_orm-3.1.34 → matrx_orm-3.1.35}/matrx_orm/core/model_dto.py +0 -0
- {matrx_orm-3.1.34 → matrx_orm-3.1.35}/matrx_orm/core/model_view.py +0 -0
- {matrx_orm-3.1.34 → matrx_orm-3.1.35}/matrx_orm/core/paginator.py +0 -0
- {matrx_orm-3.1.34 → matrx_orm-3.1.35}/matrx_orm/core/pool_maintenance.py +0 -0
- {matrx_orm-3.1.34 → matrx_orm-3.1.35}/matrx_orm/core/pydantic_bridge.py +0 -0
- {matrx_orm-3.1.34 → matrx_orm-3.1.35}/matrx_orm/core/registry.py +0 -0
- {matrx_orm-3.1.34 → matrx_orm-3.1.35}/matrx_orm/core/relations.py +0 -0
- {matrx_orm-3.1.34 → matrx_orm-3.1.35}/matrx_orm/core/resilience.py +0 -0
- {matrx_orm-3.1.34 → matrx_orm-3.1.35}/matrx_orm/core/rls_session.py +0 -0
- {matrx_orm-3.1.34 → matrx_orm-3.1.35}/matrx_orm/core/signals.py +0 -0
- {matrx_orm-3.1.34 → matrx_orm-3.1.35}/matrx_orm/core/tls.py +0 -0
- {matrx_orm-3.1.34 → matrx_orm-3.1.35}/matrx_orm/core/transaction.py +0 -0
- {matrx_orm-3.1.34 → matrx_orm-3.1.35}/matrx_orm/core/types.py +0 -0
- {matrx_orm-3.1.34 → matrx_orm-3.1.35}/matrx_orm/core/write_queue.py +0 -0
- {matrx_orm-3.1.34 → matrx_orm-3.1.35}/matrx_orm/entity.py +0 -0
- {matrx_orm-3.1.34 → matrx_orm-3.1.35}/matrx_orm/error_handling.py +0 -0
- {matrx_orm-3.1.34 → matrx_orm-3.1.35}/matrx_orm/exceptions.py +0 -0
- {matrx_orm-3.1.34 → matrx_orm-3.1.35}/matrx_orm/extended/__init__.py +0 -0
- {matrx_orm-3.1.34 → matrx_orm-3.1.35}/matrx_orm/extended/app_error_handler.py +0 -0
- {matrx_orm-3.1.34 → matrx_orm-3.1.35}/matrx_orm/identity_rule.py +0 -0
- {matrx_orm-3.1.34 → matrx_orm-3.1.35}/matrx_orm/middleware/__init__.py +0 -0
- {matrx_orm-3.1.34 → matrx_orm-3.1.35}/matrx_orm/middleware/base.py +0 -0
- {matrx_orm-3.1.34 → matrx_orm-3.1.35}/matrx_orm/migrations/MODULE_README.md +0 -0
- {matrx_orm-3.1.34 → matrx_orm-3.1.35}/matrx_orm/migrations/__init__.py +0 -0
- {matrx_orm-3.1.34 → matrx_orm-3.1.35}/matrx_orm/migrations/cli.py +0 -0
- {matrx_orm-3.1.34 → matrx_orm-3.1.35}/matrx_orm/migrations/ddl.py +0 -0
- {matrx_orm-3.1.34 → matrx_orm-3.1.35}/matrx_orm/migrations/diff.py +0 -0
- {matrx_orm-3.1.34 → matrx_orm-3.1.35}/matrx_orm/migrations/executor.py +0 -0
- {matrx_orm-3.1.34 → matrx_orm-3.1.35}/matrx_orm/migrations/integration.py +0 -0
- {matrx_orm-3.1.34 → matrx_orm-3.1.35}/matrx_orm/migrations/loader.py +0 -0
- {matrx_orm-3.1.34 → matrx_orm-3.1.35}/matrx_orm/migrations/operations.py +0 -0
- {matrx_orm-3.1.34 → matrx_orm-3.1.35}/matrx_orm/migrations/state.py +0 -0
- {matrx_orm-3.1.34 → matrx_orm-3.1.35}/matrx_orm/migrations/table_filter.py +0 -0
- {matrx_orm-3.1.34 → matrx_orm-3.1.35}/matrx_orm/operations/MODULE_README.md +0 -0
- {matrx_orm-3.1.34 → matrx_orm-3.1.35}/matrx_orm/operations/__init__.py +0 -0
- {matrx_orm-3.1.34 → matrx_orm-3.1.35}/matrx_orm/operations/bulk_update_values.py +0 -0
- {matrx_orm-3.1.34 → matrx_orm-3.1.35}/matrx_orm/operations/conflict.py +0 -0
- {matrx_orm-3.1.34 → matrx_orm-3.1.35}/matrx_orm/operations/conflict_writes.py +0 -0
- {matrx_orm-3.1.34 → matrx_orm-3.1.35}/matrx_orm/operations/create.py +0 -0
- {matrx_orm-3.1.34 → matrx_orm-3.1.35}/matrx_orm/operations/db_functions.py +0 -0
- {matrx_orm-3.1.34 → matrx_orm-3.1.35}/matrx_orm/operations/delete.py +0 -0
- {matrx_orm-3.1.34 → matrx_orm-3.1.35}/matrx_orm/operations/dynamic_admin.py +0 -0
- {matrx_orm-3.1.34 → matrx_orm-3.1.35}/matrx_orm/operations/dynamic_crud.py +0 -0
- {matrx_orm-3.1.34 → matrx_orm-3.1.35}/matrx_orm/operations/graph_walk.py +0 -0
- {matrx_orm-3.1.34 → matrx_orm-3.1.35}/matrx_orm/operations/latest_rows.py +0 -0
- {matrx_orm-3.1.34 → matrx_orm-3.1.35}/matrx_orm/operations/queue_claim.py +0 -0
- {matrx_orm-3.1.34 → matrx_orm-3.1.35}/matrx_orm/operations/read.py +0 -0
- {matrx_orm-3.1.34 → matrx_orm-3.1.35}/matrx_orm/operations/relational_backfill.py +0 -0
- {matrx_orm-3.1.34 → matrx_orm-3.1.35}/matrx_orm/operations/staging_load.py +0 -0
- {matrx_orm-3.1.34 → matrx_orm-3.1.35}/matrx_orm/operations/update.py +0 -0
- {matrx_orm-3.1.34 → matrx_orm-3.1.35}/matrx_orm/py.typed +0 -0
- {matrx_orm-3.1.34 → matrx_orm-3.1.35}/matrx_orm/python_sql/MODULE_README.md +0 -0
- {matrx_orm-3.1.34 → matrx_orm-3.1.35}/matrx_orm/python_sql/__init__.py +0 -0
- {matrx_orm-3.1.34 → matrx_orm-3.1.35}/matrx_orm/python_sql/db_objects.py +0 -0
- {matrx_orm-3.1.34 → matrx_orm-3.1.35}/matrx_orm/python_sql/table_detailed_relationships.py +0 -0
- {matrx_orm-3.1.34 → matrx_orm-3.1.35}/matrx_orm/python_sql/table_typescript_relationship.py +0 -0
- {matrx_orm-3.1.34 → matrx_orm-3.1.35}/matrx_orm/query/MODULE_README.md +0 -0
- {matrx_orm-3.1.34 → matrx_orm-3.1.35}/matrx_orm/query/__init__.py +0 -0
- {matrx_orm-3.1.34 → matrx_orm-3.1.35}/matrx_orm/query/builder.py +0 -0
- {matrx_orm-3.1.34 → matrx_orm-3.1.35}/matrx_orm/query/executor.py +0 -0
- {matrx_orm-3.1.34 → matrx_orm-3.1.35}/matrx_orm/schema_builder/MODULE_README.md +0 -0
- {matrx_orm-3.1.34 → matrx_orm-3.1.35}/matrx_orm/schema_builder/__init__.py +0 -0
- {matrx_orm-3.1.34 → matrx_orm-3.1.35}/matrx_orm/schema_builder/code_handler.py +0 -0
- {matrx_orm-3.1.34 → matrx_orm-3.1.35}/matrx_orm/schema_builder/codegen_writer.py +0 -0
- {matrx_orm-3.1.34 → matrx_orm-3.1.35}/matrx_orm/schema_builder/columns.py +0 -0
- {matrx_orm-3.1.34 → matrx_orm-3.1.35}/matrx_orm/schema_builder/common.py +0 -0
- {matrx_orm-3.1.34 → matrx_orm-3.1.35}/matrx_orm/schema_builder/diff_preview.py +0 -0
- {matrx_orm-3.1.34 → matrx_orm-3.1.35}/matrx_orm/schema_builder/entity_capabilities.py +0 -0
- {matrx_orm-3.1.34 → matrx_orm-3.1.35}/matrx_orm/schema_builder/generator.py +0 -0
- {matrx_orm-3.1.34 → matrx_orm-3.1.35}/matrx_orm/schema_builder/helpers/__init__.py +0 -0
- {matrx_orm-3.1.34 → matrx_orm-3.1.35}/matrx_orm/schema_builder/helpers/base_generators.py +0 -0
- {matrx_orm-3.1.34 → matrx_orm-3.1.35}/matrx_orm/schema_builder/helpers/entity_generators.py +0 -0
- {matrx_orm-3.1.34 → matrx_orm-3.1.35}/matrx_orm/schema_builder/helpers/git_checker.py +0 -0
- {matrx_orm-3.1.34 → matrx_orm-3.1.35}/matrx_orm/schema_builder/package_wiring.py +0 -0
- {matrx_orm-3.1.34 → matrx_orm-3.1.35}/matrx_orm/schema_builder/relationships.py +0 -0
- {matrx_orm-3.1.34 → matrx_orm-3.1.35}/matrx_orm/schema_builder/runner.py +0 -0
- {matrx_orm-3.1.34 → matrx_orm-3.1.35}/matrx_orm/schema_builder/schema.py +0 -0
- {matrx_orm-3.1.34 → matrx_orm-3.1.35}/matrx_orm/schema_builder/schema_manager.py +0 -0
- {matrx_orm-3.1.34 → matrx_orm-3.1.35}/matrx_orm/schema_builder/tables.py +0 -0
- {matrx_orm-3.1.34 → matrx_orm-3.1.35}/matrx_orm/schema_builder/views.py +0 -0
- {matrx_orm-3.1.34 → matrx_orm-3.1.35}/matrx_orm/secrets_battery/FEATURE.md +0 -0
- {matrx_orm-3.1.34 → matrx_orm-3.1.35}/matrx_orm/secrets_battery/__init__.py +0 -0
- {matrx_orm-3.1.34 → matrx_orm-3.1.35}/matrx_orm/secrets_battery/crypto.py +0 -0
- {matrx_orm-3.1.34 → matrx_orm-3.1.35}/matrx_orm/secrets_battery/items.py +0 -0
- {matrx_orm-3.1.34 → matrx_orm-3.1.35}/matrx_orm/secrets_battery/model.py +0 -0
- {matrx_orm-3.1.34 → matrx_orm-3.1.35}/matrx_orm/secrets_battery/org_service.py +0 -0
- {matrx_orm-3.1.34 → matrx_orm-3.1.35}/matrx_orm/secrets_battery/service.py +0 -0
- {matrx_orm-3.1.34 → matrx_orm-3.1.35}/matrx_orm/session/README.md +0 -0
- {matrx_orm-3.1.34 → matrx_orm-3.1.35}/matrx_orm/session/__init__.py +0 -0
- {matrx_orm-3.1.34 → matrx_orm-3.1.35}/matrx_orm/session/coalesce.py +0 -0
- {matrx_orm-3.1.34 → matrx_orm-3.1.35}/matrx_orm/session/dag.py +0 -0
- {matrx_orm-3.1.34 → matrx_orm-3.1.35}/matrx_orm/session/errors.py +0 -0
- {matrx_orm-3.1.34 → matrx_orm-3.1.35}/matrx_orm/session/fallback.py +0 -0
- {matrx_orm-3.1.34 → matrx_orm-3.1.35}/matrx_orm/session/flush.py +0 -0
- {matrx_orm-3.1.34 → matrx_orm-3.1.35}/matrx_orm/session/lifecycle.py +0 -0
- {matrx_orm-3.1.34 → matrx_orm-3.1.35}/matrx_orm/session/managed.py +0 -0
- {matrx_orm-3.1.34 → matrx_orm-3.1.35}/matrx_orm/session/op.py +0 -0
- {matrx_orm-3.1.34 → matrx_orm-3.1.35}/matrx_orm/session/reads.py +0 -0
- {matrx_orm-3.1.34 → matrx_orm-3.1.35}/matrx_orm/session/session.py +0 -0
- {matrx_orm-3.1.34 → matrx_orm-3.1.35}/matrx_orm/session/telemetry.py +0 -0
- {matrx_orm-3.1.34 → matrx_orm-3.1.35}/matrx_orm/sql_executor/MODULE_README.md +0 -0
- {matrx_orm-3.1.34 → matrx_orm-3.1.35}/matrx_orm/sql_executor/__init__.py +0 -0
- {matrx_orm-3.1.34 → matrx_orm-3.1.35}/matrx_orm/sql_executor/executor.py +0 -0
- {matrx_orm-3.1.34 → matrx_orm-3.1.35}/matrx_orm/sql_executor/queries.py +0 -0
- {matrx_orm-3.1.34 → matrx_orm-3.1.35}/matrx_orm/sql_executor/registry.py +0 -0
- {matrx_orm-3.1.34 → matrx_orm-3.1.35}/matrx_orm/sql_executor/types.py +0 -0
- {matrx_orm-3.1.34 → matrx_orm-3.1.35}/matrx_orm/sql_executor/utils.py +0 -0
- {matrx_orm-3.1.34 → matrx_orm-3.1.35}/matrx_orm/state.py +0 -0
- {matrx_orm-3.1.34 → matrx_orm-3.1.35}/matrx_orm/utils/__init__.py +0 -0
- {matrx_orm-3.1.34 → matrx_orm-3.1.35}/matrx_orm/utils/sql_utils.py +0 -0
- {matrx_orm-3.1.34 → matrx_orm-3.1.35}/matrx_orm/utils/type_converters.py +0 -0
- {matrx_orm-3.1.34 → matrx_orm-3.1.35}/scripts/git-branches.sh +0 -0
- {matrx_orm-3.1.34 → matrx_orm-3.1.35}/scripts/publish.sh +0 -0
- {matrx_orm-3.1.34 → matrx_orm-3.1.35}/scripts/release.sh +0 -0
- {matrx_orm-3.1.34 → matrx_orm-3.1.35}/tests/MODULE_README.md +0 -0
- {matrx_orm-3.1.34 → matrx_orm-3.1.35}/tests/__init__.py +0 -0
- {matrx_orm-3.1.34 → matrx_orm-3.1.35}/tests/conftest.py +0 -0
- {matrx_orm-3.1.34 → matrx_orm-3.1.35}/tests/level1/MODULE_README.md +0 -0
- {matrx_orm-3.1.34 → matrx_orm-3.1.35}/tests/level1/__init__.py +0 -0
- {matrx_orm-3.1.34 → matrx_orm-3.1.35}/tests/level1/test_admin_db_columns.py +0 -0
- {matrx_orm-3.1.34 → matrx_orm-3.1.35}/tests/level1/test_admin_search_negation.py +0 -0
- {matrx_orm-3.1.34 → matrx_orm-3.1.35}/tests/level1/test_admin_search_sentinels.py +0 -0
- {matrx_orm-3.1.34 → matrx_orm-3.1.35}/tests/level1/test_advisory_lock.py +0 -0
- {matrx_orm-3.1.34 → matrx_orm-3.1.35}/tests/level1/test_agent_message.py +0 -0
- {matrx_orm-3.1.34 → matrx_orm-3.1.35}/tests/level1/test_api_auth.py +0 -0
- {matrx_orm-3.1.34 → matrx_orm-3.1.35}/tests/level1/test_api_config.py +0 -0
- {matrx_orm-3.1.34 → matrx_orm-3.1.35}/tests/level1/test_api_handlers.py +0 -0
- {matrx_orm-3.1.34 → matrx_orm-3.1.35}/tests/level1/test_api_protocol.py +0 -0
- {matrx_orm-3.1.34 → matrx_orm-3.1.35}/tests/level1/test_array_agg_order_by.py +0 -0
- {matrx_orm-3.1.34 → matrx_orm-3.1.35}/tests/level1/test_associations.py +0 -0
- {matrx_orm-3.1.34 → matrx_orm-3.1.35}/tests/level1/test_bulk_update_by_pk.py +0 -0
- {matrx_orm-3.1.34 → matrx_orm-3.1.35}/tests/level1/test_cache_debug.py +0 -0
- {matrx_orm-3.1.34 → matrx_orm-3.1.35}/tests/level1/test_call_function.py +0 -0
- {matrx_orm-3.1.34 → matrx_orm-3.1.35}/tests/level1/test_case_when.py +0 -0
- {matrx_orm-3.1.34 → matrx_orm-3.1.35}/tests/level1/test_catalog.py +0 -0
- {matrx_orm-3.1.34 → matrx_orm-3.1.35}/tests/level1/test_composite_pk_filter.py +0 -0
- {matrx_orm-3.1.34 → matrx_orm-3.1.35}/tests/level1/test_composite_pk_write_paths.py +0 -0
- {matrx_orm-3.1.34 → matrx_orm-3.1.35}/tests/level1/test_config.py +0 -0
- {matrx_orm-3.1.34 → matrx_orm-3.1.35}/tests/level1/test_conflict_target.py +0 -0
- {matrx_orm-3.1.34 → matrx_orm-3.1.35}/tests/level1/test_conflict_writes.py +0 -0
- {matrx_orm-3.1.34 → matrx_orm-3.1.35}/tests/level1/test_connection_codecs.py +0 -0
- {matrx_orm-3.1.34 → matrx_orm-3.1.35}/tests/level1/test_connection_poison_guard.py +0 -0
- {matrx_orm-3.1.34 → matrx_orm-3.1.35}/tests/level1/test_connection_primitives.py +0 -0
- {matrx_orm-3.1.34 → matrx_orm-3.1.35}/tests/level1/test_count_composite_distinct.py +0 -0
- {matrx_orm-3.1.34 → matrx_orm-3.1.35}/tests/level1/test_db_function_field.py +0 -0
- {matrx_orm-3.1.34 → matrx_orm-3.1.35}/tests/level1/test_ddl_generator.py +0 -0
- {matrx_orm-3.1.34 → matrx_orm-3.1.35}/tests/level1/test_derived_table.py +0 -0
- {matrx_orm-3.1.34 → matrx_orm-3.1.35}/tests/level1/test_dirty_tracking.py +0 -0
- {matrx_orm-3.1.34 → matrx_orm-3.1.35}/tests/level1/test_dynamic_crud.py +0 -0
- {matrx_orm-3.1.34 → matrx_orm-3.1.35}/tests/level1/test_exceptions.py +0 -0
- {matrx_orm-3.1.34 → matrx_orm-3.1.35}/tests/level1/test_expression_primitives.py +0 -0
- {matrx_orm-3.1.34 → matrx_orm-3.1.35}/tests/level1/test_fields.py +0 -0
- {matrx_orm-3.1.34 → matrx_orm-3.1.35}/tests/level1/test_filter_jsonb_agg_array_index.py +0 -0
- {matrx_orm-3.1.34 → matrx_orm-3.1.35}/tests/level1/test_from_alias.py +0 -0
- {matrx_orm-3.1.34 → matrx_orm-3.1.35}/tests/level1/test_fts.py +0 -0
- {matrx_orm-3.1.34 → matrx_orm-3.1.35}/tests/level1/test_func_expression_args.py +0 -0
- {matrx_orm-3.1.34 → matrx_orm-3.1.35}/tests/level1/test_graph_walk.py +0 -0
- {matrx_orm-3.1.34 → matrx_orm-3.1.35}/tests/level1/test_having_annotate_alias.py +0 -0
- {matrx_orm-3.1.34 → matrx_orm-3.1.35}/tests/level1/test_insert_ignore_and_admin_primitives.py +0 -0
- {matrx_orm-3.1.34 → matrx_orm-3.1.35}/tests/level1/test_introspect_rls_policies.py +0 -0
- {matrx_orm-3.1.34 → matrx_orm-3.1.35}/tests/level1/test_join_and_aggregate.py +0 -0
- {matrx_orm-3.1.34 → matrx_orm-3.1.35}/tests/level1/test_latest_rows.py +0 -0
- {matrx_orm-3.1.34 → matrx_orm-3.1.35}/tests/level1/test_listen_notify.py +0 -0
- {matrx_orm-3.1.34 → matrx_orm-3.1.35}/tests/level1/test_managed_write_guard.py +0 -0
- {matrx_orm-3.1.34 → matrx_orm-3.1.35}/tests/level1/test_matrx_entity.py +0 -0
- {matrx_orm-3.1.34 → matrx_orm-3.1.35}/tests/level1/test_migration_diff_types.py +0 -0
- {matrx_orm-3.1.34 → matrx_orm-3.1.35}/tests/level1/test_migration_loader.py +0 -0
- {matrx_orm-3.1.34 → matrx_orm-3.1.35}/tests/level1/test_model_instance.py +0 -0
- {matrx_orm-3.1.34 → matrx_orm-3.1.35}/tests/level1/test_model_meta.py +0 -0
- {matrx_orm-3.1.34 → matrx_orm-3.1.35}/tests/level1/test_order_by_expression.py +0 -0
- {matrx_orm-3.1.34 → matrx_orm-3.1.35}/tests/level1/test_patch_jsonb_path.py +0 -0
- {matrx_orm-3.1.34 → matrx_orm-3.1.35}/tests/level1/test_pool_maintenance.py +0 -0
- {matrx_orm-3.1.34 → matrx_orm-3.1.35}/tests/level1/test_postgrest_filters.py +0 -0
- {matrx_orm-3.1.34 → matrx_orm-3.1.35}/tests/level1/test_pydantic_bridge.py +0 -0
- {matrx_orm-3.1.34 → matrx_orm-3.1.35}/tests/level1/test_query_builder.py +0 -0
- {matrx_orm-3.1.34 → matrx_orm-3.1.35}/tests/level1/test_query_error_detail.py +0 -0
- {matrx_orm-3.1.34 → matrx_orm-3.1.35}/tests/level1/test_query_executor_sql.py +0 -0
- {matrx_orm-3.1.34 → matrx_orm-3.1.35}/tests/level1/test_query_timeout.py +0 -0
- {matrx_orm-3.1.34 → matrx_orm-3.1.35}/tests/level1/test_querybuilder_clone_semantics.py +0 -0
- {matrx_orm-3.1.34 → matrx_orm-3.1.35}/tests/level1/test_queue_claim.py +0 -0
- {matrx_orm-3.1.34 → matrx_orm-3.1.35}/tests/level1/test_registry.py +0 -0
- {matrx_orm-3.1.34 → matrx_orm-3.1.35}/tests/level1/test_registry_multi_database.py +0 -0
- {matrx_orm-3.1.34 → matrx_orm-3.1.35}/tests/level1/test_registry_multi_schema.py +0 -0
- {matrx_orm-3.1.34 → matrx_orm-3.1.35}/tests/level1/test_relational_backfill.py +0 -0
- {matrx_orm-3.1.34 → matrx_orm-3.1.35}/tests/level1/test_relations.py +0 -0
- {matrx_orm-3.1.34 → matrx_orm-3.1.35}/tests/level1/test_resilience.py +0 -0
- {matrx_orm-3.1.34 → matrx_orm-3.1.35}/tests/level1/test_schema_exists.py +0 -0
- {matrx_orm-3.1.34 → matrx_orm-3.1.35}/tests/level1/test_session_advisory_lock.py +0 -0
- {matrx_orm-3.1.34 → matrx_orm-3.1.35}/tests/level1/test_state_cache.py +0 -0
- {matrx_orm-3.1.34 → matrx_orm-3.1.35}/tests/level1/test_subquery_filter_raw.py +0 -0
- {matrx_orm-3.1.34 → matrx_orm-3.1.35}/tests/level1/test_subquery_in_filter.py +0 -0
- {matrx_orm-3.1.34 → matrx_orm-3.1.35}/tests/level1/test_supabase_auth.py +0 -0
- {matrx_orm-3.1.34 → matrx_orm-3.1.35}/tests/level1/test_supabase_config.py +0 -0
- {matrx_orm-3.1.34 → matrx_orm-3.1.35}/tests/level1/test_tls.py +0 -0
- {matrx_orm-3.1.34 → matrx_orm-3.1.35}/tests/level1/test_typed_join_projection.py +0 -0
- {matrx_orm-3.1.34 → matrx_orm-3.1.35}/tests/level1/test_typed_predicates.py +0 -0
- {matrx_orm-3.1.34 → matrx_orm-3.1.35}/tests/level1/test_update_case_expression.py +0 -0
- {matrx_orm-3.1.34 → matrx_orm-3.1.35}/tests/level1/test_update_subquery.py +0 -0
- {matrx_orm-3.1.34 → matrx_orm-3.1.35}/tests/level1/test_upsert_default_leak.py +0 -0
- {matrx_orm-3.1.34 → matrx_orm-3.1.35}/tests/level1/test_upsert_with_conflict.py +0 -0
- {matrx_orm-3.1.34 → matrx_orm-3.1.35}/tests/level1/test_values_jsonb_decode.py +0 -0
- {matrx_orm-3.1.34 → matrx_orm-3.1.35}/tests/level1/test_watched_lifecycle.py +0 -0
- {matrx_orm-3.1.34 → matrx_orm-3.1.35}/tests/level1/test_write_retry_semantics.py +0 -0
- {matrx_orm-3.1.34 → matrx_orm-3.1.35}/tests/level2/MODULE_README.md +0 -0
- {matrx_orm-3.1.34 → matrx_orm-3.1.35}/tests/level2/__init__.py +0 -0
- {matrx_orm-3.1.34 → matrx_orm-3.1.35}/tests/level2/conftest.py +0 -0
- {matrx_orm-3.1.34 → matrx_orm-3.1.35}/tests/level2/test_bulk_ops.py +0 -0
- {matrx_orm-3.1.34 → matrx_orm-3.1.35}/tests/level2/test_cache_integration.py +0 -0
- {matrx_orm-3.1.34 → matrx_orm-3.1.35}/tests/level2/test_crud.py +0 -0
- {matrx_orm-3.1.34 → matrx_orm-3.1.35}/tests/level2/test_foreign_keys.py +0 -0
- {matrx_orm-3.1.34 → matrx_orm-3.1.35}/tests/level2/test_m2m.py +0 -0
- {matrx_orm-3.1.34 → matrx_orm-3.1.35}/tests/level2/test_manager.py +0 -0
- {matrx_orm-3.1.34 → matrx_orm-3.1.35}/tests/level2/test_migrations_live.py +0 -0
- {matrx_orm-3.1.34 → matrx_orm-3.1.35}/tests/level2/test_query_execution.py +0 -0
- {matrx_orm-3.1.34 → matrx_orm-3.1.35}/tests/level2/test_schema_diff.py +0 -0
- {matrx_orm-3.1.34 → matrx_orm-3.1.35}/tests/sample_project/.env.example +0 -0
- {matrx_orm-3.1.34 → matrx_orm-3.1.35}/tests/sample_project/README.md +0 -0
- {matrx_orm-3.1.34 → matrx_orm-3.1.35}/tests/sample_project/__init__.py +0 -0
- {matrx_orm-3.1.34 → matrx_orm-3.1.35}/tests/sample_project/generate.py +0 -0
- {matrx_orm-3.1.34 → matrx_orm-3.1.35}/tests/sample_project/generated/.gitkeep +0 -0
- {matrx_orm-3.1.34 → matrx_orm-3.1.35}/tests/sample_project/matrx_orm.yaml +0 -0
- {matrx_orm-3.1.34 → matrx_orm-3.1.35}/tests/sample_project/test_schema_generation.py +0 -0
- {matrx_orm-3.1.34 → matrx_orm-3.1.35}/tests/sample_project_desktop/.env.example +0 -0
- {matrx_orm-3.1.34 → matrx_orm-3.1.35}/tests/sample_project_desktop/README.md +0 -0
- {matrx_orm-3.1.34 → matrx_orm-3.1.35}/tests/sample_project_desktop/__init__.py +0 -0
- {matrx_orm-3.1.34 → matrx_orm-3.1.35}/tests/sample_project_desktop/client_example.py +0 -0
- {matrx_orm-3.1.34 → matrx_orm-3.1.35}/tests/sample_project_desktop/client_example.ts +0 -0
- {matrx_orm-3.1.34 → matrx_orm-3.1.35}/tests/sample_project_desktop/client_supabase_example.py +0 -0
- {matrx_orm-3.1.34 → matrx_orm-3.1.35}/tests/sample_project_desktop/server.py +0 -0
- {matrx_orm-3.1.34 → matrx_orm-3.1.35}/tests/schema/entity_tests.py +0 -0
- {matrx_orm-3.1.34 → matrx_orm-3.1.35}/tests/schema/test_base_generation.py +0 -0
- {matrx_orm-3.1.34 → matrx_orm-3.1.35}/tests/schema/test_composite_pk_fk_generation.py +0 -0
- {matrx_orm-3.1.34 → matrx_orm-3.1.35}/tests/schema/test_composite_unique_generation.py +0 -0
- {matrx_orm-3.1.34 → matrx_orm-3.1.35}/tests/schema/test_dto_identity_generation.py +0 -0
- {matrx_orm-3.1.34 → matrx_orm-3.1.35}/tests/schema/test_entity_capability_generation.py +0 -0
- {matrx_orm-3.1.34 → matrx_orm-3.1.35}/tests/schema/test_generate_schema.py +0 -0
- {matrx_orm-3.1.34 → matrx_orm-3.1.35}/tests/schema/test_junction_analysis.py +0 -0
- {matrx_orm-3.1.34 → matrx_orm-3.1.35}/tests/schema/test_multi_schema_output.py +0 -0
- {matrx_orm-3.1.34 → matrx_orm-3.1.35}/tests/schema/test_sql_expression_defaults.py +0 -0
- {matrx_orm-3.1.34 → matrx_orm-3.1.35}/tests/schema/test_view_generation.py +0 -0
- {matrx_orm-3.1.34 → matrx_orm-3.1.35}/tests/schema_builder/test_focused_generation_plan.py +0 -0
- {matrx_orm-3.1.34 → matrx_orm-3.1.35}/tests/session/__init__.py +0 -0
- {matrx_orm-3.1.34 → matrx_orm-3.1.35}/tests/session/conftest.py +0 -0
- {matrx_orm-3.1.34 → matrx_orm-3.1.35}/tests/session/test_capture_poison_proof.py +0 -0
- {matrx_orm-3.1.34 → matrx_orm-3.1.35}/tests/session/test_coalesce.py +0 -0
- {matrx_orm-3.1.34 → matrx_orm-3.1.35}/tests/session/test_dag.py +0 -0
- {matrx_orm-3.1.34 → matrx_orm-3.1.35}/tests/session/test_disk_spill_fallback.py +0 -0
- {matrx_orm-3.1.34 → matrx_orm-3.1.35}/tests/session/test_flush_individual_fallback.py +0 -0
- {matrx_orm-3.1.34 → matrx_orm-3.1.35}/tests/session/test_governed_write.py +0 -0
- {matrx_orm-3.1.34 → matrx_orm-3.1.35}/tests/session/test_managed.py +0 -0
- {matrx_orm-3.1.34 → matrx_orm-3.1.35}/tests/session/test_op_enqueue_site.py +0 -0
- {matrx_orm-3.1.34 → matrx_orm-3.1.35}/tests/session/test_reads.py +0 -0
- {matrx_orm-3.1.34 → matrx_orm-3.1.35}/tests/session/test_session.py +0 -0
- {matrx_orm-3.1.34 → matrx_orm-3.1.35}/tests/test_database_name_alias.py +0 -0
- {matrx_orm-3.1.34 → matrx_orm-3.1.35}/tests/test_db_functions.py +0 -0
- {matrx_orm-3.1.34 → matrx_orm-3.1.35}/tests/test_model_cls_refactor.py +0 -0
- {matrx_orm-3.1.34 → matrx_orm-3.1.35}/tests/test_no_blocking_asyncpg_tls.py +0 -0
- {matrx_orm-3.1.34 → matrx_orm-3.1.35}/tests/test_secrets_battery.py +0 -0
- {matrx_orm-3.1.34 → matrx_orm-3.1.35}/tests/test_sql_param_casts.py +0 -0
- {matrx_orm-3.1.34 → matrx_orm-3.1.35}/tests/test_sync_twins_guard.py +0 -0
|
@@ -26,6 +26,7 @@ Every table that becomes a Model needs row identity: a single-column primary key
|
|
|
26
26
|
- **Upsert writes only what the caller supplied.** `upsert` / `bulk_upsert` / `upsert_with_conflict` materialize every field's Python default so the **INSERT** half is complete — but `ON CONFLICT DO UPDATE SET` covers **only the columns present in the caller's `data`** (an explicit `update_fields` still wins). Letting defaults reach the UPDATE half silently RESET every defaulted column on each re-upsert of an existing row: it once reset scraped-and-analyzed `research.rs_source` rows to `scrape_status='pending', server_attempts=0` (a watchdog then finalized them `'failed'`) and undid users' manual `is_included=false`. A caller-supplied `None` is excluded too — it is dropped from the INSERT, and `EXCLUDED.<col>` on an omitted column resolves to that column's **DEFAULT**. An upsert of only conflict keys means "ensure this row exists" and reconciles to a no-op self-assignment, never a raise (a bare `DO NOTHING` would break `RETURNING *`). Pinned by `tests/level1/test_upsert_default_leak.py`.
|
|
27
27
|
- **Read-only models** (`_read_only = True`): a model that can be queried but NEVER written through the ORM — every write path raises `ReadOnlyModelError` (enforced at `QueryExecutor.insert/bulk_insert/upsert/update/delete`, so it covers all of `create`/`save`/`update`/`delete`/`update_where`/`delete_where`/`upsert`/`bulk_*`). Used for DB-managed tables the app must not mutate. The canonical **`auth.users`** model is baked into the schema generator (`get_string_user_model`) as the full, curated Supabase auth schema (safe columns only — no password/token fields), `_read_only`, bound per-database. Read a user's profile/metadata there; mutate users only through Supabase Auth (GoTrue).
|
|
28
28
|
- **Connection-level type codecs** (`async_db_manager._init_connection_default`): every pooled connection decodes **uuid → `str`**, **vector → `list[float]`**, and **json/jsonb → `dict`/`list`** at the driver boundary — the TYPE decides the decode, never the call path. So `call_function` scalar/rows, raw fetches, and field hydration all agree; a caller must **never `json.loads` a fetched json/jsonb value** (it's already decoded; the 2026-07-13 `build_agent_context` crash was a jsonb RPC fetched pre-codec as a raw string). Encoding: a pre-serialised JSON `str` passes through untouched; a native dict/list is dumped (`_encode_json`). Pinned by `tests/level1/test_connection_codecs.py`.
|
|
29
|
+
- **Connection pools are event-loop-owned.** `AsyncDatabaseManager.get_pool()` recreates a pool when a caller arrives on a different loop. If the former owner loop is already closed, stale-pool termination and cleanup discard that pool without trying to schedule callbacks onto the dead loop; unrelated runtime errors still raise. Pinned by `tests/level1/test_pool_loop_recreation.py`.
|
|
29
30
|
- **Query layer**: `QueryBuilder`, typed predicates/projections (`F`, `Q`,
|
|
30
31
|
`Predicate`, `Projection`), window functions, QueryBuilder-backed CTEs, and
|
|
31
32
|
subqueries. SQL-shaped strings fail closed: plain strings name validated
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: matrx-orm
|
|
3
|
-
Version: 3.1.
|
|
3
|
+
Version: 3.1.35
|
|
4
4
|
Summary: Async-first PostgreSQL ORM with bidirectional migrations, schema introspection, many-to-many relationships, and built-in state caching
|
|
5
5
|
Project-URL: Homepage, https://github.com/AI-Matrix-Engine/aidream-current
|
|
6
6
|
Project-URL: Repository, https://github.com/AI-Matrix-Engine/aidream-current
|
|
@@ -39,6 +39,18 @@ from matrx_orm.exceptions import (
|
|
|
39
39
|
logger = logging.getLogger("matrx_orm.async_db_manager")
|
|
40
40
|
|
|
41
41
|
|
|
42
|
+
def _terminate_pool_after_loop_change(pool: Any, config_name: str) -> None:
|
|
43
|
+
try:
|
|
44
|
+
pool.terminate()
|
|
45
|
+
except RuntimeError as exc:
|
|
46
|
+
if "event loop is closed" not in str(exc).lower():
|
|
47
|
+
raise
|
|
48
|
+
logger.warning(
|
|
49
|
+
"[matrx_orm] Discarded stale pool for '%s' after its owner event loop closed",
|
|
50
|
+
config_name,
|
|
51
|
+
)
|
|
52
|
+
|
|
53
|
+
|
|
42
54
|
# asyncpg SQLSTATE class 42 "undefined …" — the SQL named something the live DB
|
|
43
55
|
# does not have. All siblings of SyntaxOrAccessError; PostgresSyntaxError is
|
|
44
56
|
# caught separately (it's an ORM-bug shape, not a schema-drift shape). These map
|
|
@@ -323,15 +335,15 @@ class AsyncDatabaseManager:
|
|
|
323
335
|
|
|
324
336
|
def _dispose_old_pool() -> None:
|
|
325
337
|
old_task.cancel()
|
|
326
|
-
old_pool
|
|
338
|
+
_terminate_pool_after_loop_change(old_pool, config_name)
|
|
327
339
|
|
|
328
340
|
owner_loop.call_soon_threadsafe(_dispose_old_pool)
|
|
329
341
|
else:
|
|
330
|
-
old_pool
|
|
342
|
+
_terminate_pool_after_loop_change(old_pool, config_name)
|
|
331
343
|
except RuntimeError:
|
|
332
|
-
old_pool
|
|
344
|
+
_terminate_pool_after_loop_change(old_pool, config_name)
|
|
333
345
|
else:
|
|
334
|
-
old_pool
|
|
346
|
+
_terminate_pool_after_loop_change(old_pool, config_name)
|
|
335
347
|
|
|
336
348
|
# Remove the old pool so we can create a new one
|
|
337
349
|
del cls._pools[config_name]
|
|
@@ -1116,6 +1128,21 @@ class AsyncDatabaseManager:
|
|
|
1116
1128
|
for config_name, pool in list(cls._pools.items()):
|
|
1117
1129
|
try:
|
|
1118
1130
|
await pool.close()
|
|
1131
|
+
except RuntimeError as e:
|
|
1132
|
+
if "event loop is closed" in str(e).lower():
|
|
1133
|
+
logger.warning(
|
|
1134
|
+
"[matrx_orm] Discarded stale pool for '%s' during cleanup "
|
|
1135
|
+
"after its owner event loop closed",
|
|
1136
|
+
config_name,
|
|
1137
|
+
)
|
|
1138
|
+
continue
|
|
1139
|
+
raise StateError(
|
|
1140
|
+
model=None,
|
|
1141
|
+
operation="cleanup_pools",
|
|
1142
|
+
reason=f"Failed to close pool for {config_name}",
|
|
1143
|
+
details={"config_name": config_name},
|
|
1144
|
+
original_error=e,
|
|
1145
|
+
) from e
|
|
1119
1146
|
except Exception as e:
|
|
1120
1147
|
raise StateError(
|
|
1121
1148
|
model=None,
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
[project]
|
|
2
2
|
name = "matrx-orm"
|
|
3
|
-
version = "3.1.
|
|
3
|
+
version = "3.1.35"
|
|
4
4
|
description = "Async-first PostgreSQL ORM with bidirectional migrations, schema introspection, many-to-many relationships, and built-in state caching"
|
|
5
5
|
readme = "README.md"
|
|
6
6
|
license = { text = "MIT" }
|
|
@@ -23,10 +23,10 @@ No DB needed — a stub ``connection``/execute_write captures the rendered SQL
|
|
|
23
23
|
|
|
24
24
|
from __future__ import annotations
|
|
25
25
|
|
|
26
|
+
from datetime import timedelta
|
|
26
27
|
from typing import Any
|
|
27
28
|
|
|
28
29
|
import pytest
|
|
29
|
-
from matrx_orm import Now
|
|
30
30
|
from matrx_orm.core.base import Model, ModelMeta
|
|
31
31
|
from matrx_orm.core.expressions import Case, Compare, Excluded, F, Interval, Is, Now, When
|
|
32
32
|
from matrx_orm.core.fields import DateTimeField, FloatField, UUIDField
|
|
@@ -138,7 +138,7 @@ async def test_window_roll_case_set_fields_shifts_params_past_values() -> None:
|
|
|
138
138
|
assert f"({table}.cost_used_usd + $" in sql
|
|
139
139
|
assert "updated_at = NOW()" in sql
|
|
140
140
|
assert len(params) == 8
|
|
141
|
-
assert params[4:6] == (
|
|
141
|
+
assert params[4:6] == (timedelta(hours=24), timedelta(hours=24))
|
|
142
142
|
assert params[6:] == (2.5, 2.5)
|
|
143
143
|
|
|
144
144
|
|
|
@@ -0,0 +1,57 @@
|
|
|
1
|
+
from __future__ import annotations
|
|
2
|
+
|
|
3
|
+
from typing import Any
|
|
4
|
+
|
|
5
|
+
import pytest
|
|
6
|
+
|
|
7
|
+
from matrx_orm.core.async_db_manager import (
|
|
8
|
+
AsyncDatabaseManager,
|
|
9
|
+
_terminate_pool_after_loop_change,
|
|
10
|
+
)
|
|
11
|
+
|
|
12
|
+
|
|
13
|
+
class _ClosedLoopPool:
|
|
14
|
+
def __init__(self) -> None:
|
|
15
|
+
self.terminate_calls = 0
|
|
16
|
+
self.close_calls = 0
|
|
17
|
+
|
|
18
|
+
def terminate(self) -> None:
|
|
19
|
+
self.terminate_calls += 1
|
|
20
|
+
raise RuntimeError("Event loop is closed")
|
|
21
|
+
|
|
22
|
+
async def close(self) -> None:
|
|
23
|
+
self.close_calls += 1
|
|
24
|
+
raise RuntimeError("Event loop is closed")
|
|
25
|
+
|
|
26
|
+
|
|
27
|
+
def test_stale_pool_termination_tolerates_closed_owner_loop() -> None:
|
|
28
|
+
pool = _ClosedLoopPool()
|
|
29
|
+
|
|
30
|
+
_terminate_pool_after_loop_change(pool, "main")
|
|
31
|
+
|
|
32
|
+
assert pool.terminate_calls == 1
|
|
33
|
+
|
|
34
|
+
|
|
35
|
+
def test_stale_pool_termination_preserves_other_runtime_errors() -> None:
|
|
36
|
+
class _BrokenPool:
|
|
37
|
+
def terminate(self) -> None:
|
|
38
|
+
raise RuntimeError("unexpected pool corruption")
|
|
39
|
+
|
|
40
|
+
with pytest.raises(RuntimeError, match="unexpected pool corruption"):
|
|
41
|
+
_terminate_pool_after_loop_change(_BrokenPool(), "main")
|
|
42
|
+
|
|
43
|
+
|
|
44
|
+
@pytest.mark.asyncio
|
|
45
|
+
async def test_cleanup_discards_pool_owned_by_closed_loop(monkeypatch: Any) -> None:
|
|
46
|
+
pool = _ClosedLoopPool()
|
|
47
|
+
monkeypatch.setattr(AsyncDatabaseManager, "_pools", {"main": pool})
|
|
48
|
+
monkeypatch.setattr(AsyncDatabaseManager, "_pool_loops", {"main": 1})
|
|
49
|
+
monkeypatch.setattr(AsyncDatabaseManager, "_locks", {"main": object()})
|
|
50
|
+
monkeypatch.setattr(AsyncDatabaseManager, "_growth_locks", {"main": object()})
|
|
51
|
+
monkeypatch.setattr(AsyncDatabaseManager, "_keepalive_tasks", {})
|
|
52
|
+
|
|
53
|
+
await AsyncDatabaseManager.cleanup()
|
|
54
|
+
|
|
55
|
+
assert pool.close_calls == 1
|
|
56
|
+
assert AsyncDatabaseManager._pools == {}
|
|
57
|
+
assert AsyncDatabaseManager._pool_loops == {}
|
|
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
|
|
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
|
|
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
|
|
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
|
|
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
|
|
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
|
|
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
|
|
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
|