simple-module-db 0.0.46__tar.gz → 0.0.47__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 (140) hide show
  1. {simple_module_db-0.0.46 → simple_module_db-0.0.47}/PKG-INFO +2 -2
  2. {simple_module_db-0.0.46 → simple_module_db-0.0.47}/pyproject.toml +2 -2
  3. {simple_module_db-0.0.46 → simple_module_db-0.0.47}/simple_module_db/migration_portability.py +29 -0
  4. {simple_module_db-0.0.46 → simple_module_db-0.0.47}/simple_module_db/migrations.py +2 -0
  5. simple_module_db-0.0.47/tests/test_db_expression_index_library_warnings.py +51 -0
  6. {simple_module_db-0.0.46 → simple_module_db-0.0.47}/.gitignore +0 -0
  7. {simple_module_db-0.0.46 → simple_module_db-0.0.47}/LICENSE +0 -0
  8. {simple_module_db-0.0.46 → simple_module_db-0.0.47}/README.md +0 -0
  9. {simple_module_db-0.0.46 → simple_module_db-0.0.47}/simple_module_db/__init__.py +0 -0
  10. {simple_module_db-0.0.46 → simple_module_db-0.0.47}/simple_module_db/_bulk_audit_records.py +0 -0
  11. {simple_module_db-0.0.46 → simple_module_db-0.0.47}/simple_module_db/_bulk_pk_update.py +0 -0
  12. {simple_module_db-0.0.46 → simple_module_db-0.0.47}/simple_module_db/_core_joins.py +0 -0
  13. {simple_module_db-0.0.46 → simple_module_db-0.0.47}/simple_module_db/_core_walk.py +0 -0
  14. {simple_module_db-0.0.46 → simple_module_db-0.0.47}/simple_module_db/_engine_policies.py +0 -0
  15. {simple_module_db-0.0.46 → simple_module_db-0.0.47}/simple_module_db/_entity_selectables.py +0 -0
  16. {simple_module_db-0.0.46 → simple_module_db-0.0.47}/simple_module_db/_migration_render.py +0 -0
  17. {simple_module_db-0.0.46 → simple_module_db-0.0.47}/simple_module_db/_outer_joins.py +0 -0
  18. {simple_module_db-0.0.46 → simple_module_db-0.0.47}/simple_module_db/_persisted_owner.py +0 -0
  19. {simple_module_db-0.0.46 → simple_module_db-0.0.47}/simple_module_db/_secondary_scope.py +0 -0
  20. {simple_module_db-0.0.46 → simple_module_db-0.0.47}/simple_module_db/_sqlite_index_compare.py +0 -0
  21. {simple_module_db-0.0.46 → simple_module_db-0.0.47}/simple_module_db/admission.py +0 -0
  22. {simple_module_db-0.0.46 → simple_module_db-0.0.47}/simple_module_db/audit.py +0 -0
  23. {simple_module_db-0.0.46 → simple_module_db-0.0.47}/simple_module_db/audit_redaction.py +0 -0
  24. {simple_module_db-0.0.46 → simple_module_db-0.0.47}/simple_module_db/audit_sinks.py +0 -0
  25. {simple_module_db-0.0.46 → simple_module_db-0.0.47}/simple_module_db/base.py +0 -0
  26. {simple_module_db-0.0.46 → simple_module_db-0.0.47}/simple_module_db/bulk_audit.py +0 -0
  27. {simple_module_db-0.0.46 → simple_module_db-0.0.47}/simple_module_db/bulk_audit_targets.py +0 -0
  28. {simple_module_db-0.0.46 → simple_module_db-0.0.47}/simple_module_db/bulk_guard.py +0 -0
  29. {simple_module_db-0.0.46 → simple_module_db-0.0.47}/simple_module_db/callbacks.py +0 -0
  30. {simple_module_db-0.0.46 → simple_module_db-0.0.47}/simple_module_db/core_scope.py +0 -0
  31. {simple_module_db-0.0.46 → simple_module_db-0.0.47}/simple_module_db/data_compatibility.py +0 -0
  32. {simple_module_db-0.0.46 → simple_module_db-0.0.47}/simple_module_db/deps.py +0 -0
  33. {simple_module_db-0.0.46 → simple_module_db-0.0.47}/simple_module_db/engine_options.py +0 -0
  34. {simple_module_db-0.0.46 → simple_module_db-0.0.47}/simple_module_db/extensions.py +0 -0
  35. {simple_module_db-0.0.46 → simple_module_db-0.0.47}/simple_module_db/flush_guard.py +0 -0
  36. {simple_module_db-0.0.46 → simple_module_db-0.0.47}/simple_module_db/independent.py +0 -0
  37. {simple_module_db-0.0.46 → simple_module_db-0.0.47}/simple_module_db/insert_guard.py +0 -0
  38. {simple_module_db-0.0.46 → simple_module_db-0.0.47}/simple_module_db/insert_scope.py +0 -0
  39. {simple_module_db-0.0.46 → simple_module_db-0.0.47}/simple_module_db/leases.py +0 -0
  40. {simple_module_db-0.0.46 → simple_module_db-0.0.47}/simple_module_db/listeners.py +0 -0
  41. {simple_module_db-0.0.46 → simple_module_db-0.0.47}/simple_module_db/migration_state.py +0 -0
  42. {simple_module_db-0.0.46 → simple_module_db-0.0.47}/simple_module_db/mixins.py +0 -0
  43. {simple_module_db-0.0.46 → simple_module_db-0.0.47}/simple_module_db/model_registry.py +0 -0
  44. {simple_module_db-0.0.46 → simple_module_db-0.0.47}/simple_module_db/pagination.py +0 -0
  45. {simple_module_db-0.0.46 → simple_module_db-0.0.47}/simple_module_db/provider.py +0 -0
  46. {simple_module_db-0.0.46 → simple_module_db-0.0.47}/simple_module_db/py.typed +0 -0
  47. {simple_module_db-0.0.46 → simple_module_db-0.0.47}/simple_module_db/query_filter.py +0 -0
  48. {simple_module_db-0.0.46 → simple_module_db-0.0.47}/simple_module_db/query_stats.py +0 -0
  49. {simple_module_db-0.0.46 → simple_module_db-0.0.47}/simple_module_db/resource_policy.py +0 -0
  50. {simple_module_db-0.0.46 → simple_module_db-0.0.47}/simple_module_db/scope_predicates.py +0 -0
  51. {simple_module_db-0.0.46 → simple_module_db-0.0.47}/simple_module_db/search.py +0 -0
  52. {simple_module_db-0.0.46 → simple_module_db-0.0.47}/simple_module_db/session.py +0 -0
  53. {simple_module_db-0.0.46 → simple_module_db-0.0.47}/simple_module_db/stored_settings.py +0 -0
  54. {simple_module_db-0.0.46 → simple_module_db-0.0.47}/simple_module_db/tenancy.py +0 -0
  55. {simple_module_db-0.0.46 → simple_module_db-0.0.47}/simple_module_db/tenant_cleanup.py +0 -0
  56. {simple_module_db-0.0.46 → simple_module_db-0.0.47}/simple_module_db/transaction.py +0 -0
  57. {simple_module_db-0.0.46 → simple_module_db-0.0.47}/simple_module_db/types.py +0 -0
  58. {simple_module_db-0.0.46 → simple_module_db-0.0.47}/simple_module_db/user_directory_sql.py +0 -0
  59. {simple_module_db-0.0.46 → simple_module_db-0.0.47}/simple_module_db/writes.py +0 -0
  60. {simple_module_db-0.0.46 → simple_module_db-0.0.47}/tests/_alembic_project.py +0 -0
  61. {simple_module_db-0.0.46 → simple_module_db-0.0.47}/tests/_audit_models.py +0 -0
  62. {simple_module_db-0.0.46 → simple_module_db-0.0.47}/tests/_bulk_audit_support.py +0 -0
  63. {simple_module_db-0.0.46 → simple_module_db-0.0.47}/tests/_core_scope_models.py +0 -0
  64. {simple_module_db-0.0.46 → simple_module_db-0.0.47}/tests/_db_dml_scope_models.py +0 -0
  65. {simple_module_db-0.0.46 → simple_module_db-0.0.47}/tests/_db_read_scope_models.py +0 -0
  66. {simple_module_db-0.0.46 → simple_module_db-0.0.47}/tests/_db_shape_matrix.py +0 -0
  67. {simple_module_db-0.0.46 → simple_module_db-0.0.47}/tests/_models.py +0 -0
  68. {simple_module_db-0.0.46 → simple_module_db-0.0.47}/tests/conftest.py +0 -0
  69. {simple_module_db-0.0.46 → simple_module_db-0.0.47}/tests/test_audit.py +0 -0
  70. {simple_module_db-0.0.46 → simple_module_db-0.0.47}/tests/test_audit_per_engine.py +0 -0
  71. {simple_module_db-0.0.46 → simple_module_db-0.0.47}/tests/test_aware_datetime.py +0 -0
  72. {simple_module_db-0.0.46 → simple_module_db-0.0.47}/tests/test_base.py +0 -0
  73. {simple_module_db-0.0.46 → simple_module_db-0.0.47}/tests/test_db_aliased_join_text_scope.py +0 -0
  74. {simple_module_db-0.0.46 → simple_module_db-0.0.47}/tests/test_db_aliased_selectable_scope.py +0 -0
  75. {simple_module_db-0.0.46 → simple_module_db-0.0.47}/tests/test_db_audit_regressions.py +0 -0
  76. {simple_module_db-0.0.46 → simple_module_db-0.0.47}/tests/test_db_bulk_audit.py +0 -0
  77. {simple_module_db-0.0.46 → simple_module_db-0.0.47}/tests/test_db_bulk_audit_targets.py +0 -0
  78. {simple_module_db-0.0.46 → simple_module_db-0.0.47}/tests/test_db_connection_policy.py +0 -0
  79. {simple_module_db-0.0.46 → simple_module_db-0.0.47}/tests/test_db_core_full_setup_join.py +0 -0
  80. {simple_module_db-0.0.46 → simple_module_db-0.0.47}/tests/test_db_core_in_orm_select.py +0 -0
  81. {simple_module_db-0.0.46 → simple_module_db-0.0.47}/tests/test_db_core_join_scope.py +0 -0
  82. {simple_module_db-0.0.46 → simple_module_db-0.0.47}/tests/test_db_core_nested_scope.py +0 -0
  83. {simple_module_db-0.0.46 → simple_module_db-0.0.47}/tests/test_db_credential_audit.py +0 -0
  84. {simple_module_db-0.0.46 → simple_module_db-0.0.47}/tests/test_db_credential_log_masking.py +0 -0
  85. {simple_module_db-0.0.46 → simple_module_db-0.0.47}/tests/test_db_data_compatibility_doctor.py +0 -0
  86. {simple_module_db-0.0.46 → simple_module_db-0.0.47}/tests/test_db_dml_target_scope.py +0 -0
  87. {simple_module_db-0.0.46 → simple_module_db-0.0.47}/tests/test_db_doctor_session_filters.py +0 -0
  88. {simple_module_db-0.0.46 → simple_module_db-0.0.47}/tests/test_db_engine_options.py +0 -0
  89. {simple_module_db-0.0.46 → simple_module_db-0.0.47}/tests/test_db_engine_policy_resolution.py +0 -0
  90. {simple_module_db-0.0.46 → simple_module_db-0.0.47}/tests/test_db_expression_index_warning_scope.py +0 -0
  91. {simple_module_db-0.0.46 → simple_module_db-0.0.47}/tests/test_db_extensions.py +0 -0
  92. {simple_module_db-0.0.46 → simple_module_db-0.0.47}/tests/test_db_extensions_pg.py +0 -0
  93. {simple_module_db-0.0.46 → simple_module_db-0.0.47}/tests/test_db_flush_persisted_owner.py +0 -0
  94. {simple_module_db-0.0.46 → simple_module_db-0.0.47}/tests/test_db_independent_checkpoint.py +0 -0
  95. {simple_module_db-0.0.46 → simple_module_db-0.0.47}/tests/test_db_insert_select_tenant.py +0 -0
  96. {simple_module_db-0.0.46 → simple_module_db-0.0.47}/tests/test_db_insert_value_subqueries.py +0 -0
  97. {simple_module_db-0.0.46 → simple_module_db-0.0.47}/tests/test_db_lease_lock_wait.py +0 -0
  98. {simple_module_db-0.0.46 → simple_module_db-0.0.47}/tests/test_db_listeners_attach.py +0 -0
  99. {simple_module_db-0.0.46 → simple_module_db-0.0.47}/tests/test_db_logging.py +0 -0
  100. {simple_module_db-0.0.46 → simple_module_db-0.0.47}/tests/test_db_migration_doctor.py +0 -0
  101. {simple_module_db-0.0.46 → simple_module_db-0.0.47}/tests/test_db_migration_review_regressions.py +0 -0
  102. {simple_module_db-0.0.46 → simple_module_db-0.0.47}/tests/test_db_migration_state.py +0 -0
  103. {simple_module_db-0.0.46 → simple_module_db-0.0.47}/tests/test_db_nested_dml_and_bulk_api.py +0 -0
  104. {simple_module_db-0.0.46 → simple_module_db-0.0.47}/tests/test_db_pagination.py +0 -0
  105. {simple_module_db-0.0.46 → simple_module_db-0.0.47}/tests/test_db_pagination_options.py +0 -0
  106. {simple_module_db-0.0.46 → simple_module_db-0.0.47}/tests/test_db_query_stats.py +0 -0
  107. {simple_module_db-0.0.46 → simple_module_db-0.0.47}/tests/test_db_relationship_loader_scope.py +0 -0
  108. {simple_module_db-0.0.46 → simple_module_db-0.0.47}/tests/test_db_response_finalization.py +0 -0
  109. {simple_module_db-0.0.46 → simple_module_db-0.0.47}/tests/test_db_savepoint_callbacks.py +0 -0
  110. {simple_module_db-0.0.46 → simple_module_db-0.0.47}/tests/test_db_secondary_scope_execution.py +0 -0
  111. {simple_module_db-0.0.46 → simple_module_db-0.0.47}/tests/test_db_shape_matrix_dml.py +0 -0
  112. {simple_module_db-0.0.46 → simple_module_db-0.0.47}/tests/test_db_shape_matrix_joins.py +0 -0
  113. {simple_module_db-0.0.46 → simple_module_db-0.0.47}/tests/test_db_shape_matrix_selects.py +0 -0
  114. {simple_module_db-0.0.46 → simple_module_db-0.0.47}/tests/test_db_sqlite_admission_lock.py +0 -0
  115. {simple_module_db-0.0.46 → simple_module_db-0.0.47}/tests/test_db_sqlite_savepoint.py +0 -0
  116. {simple_module_db-0.0.46 → simple_module_db-0.0.47}/tests/test_db_sqlite_wal_switch.py +0 -0
  117. {simple_module_db-0.0.46 → simple_module_db-0.0.47}/tests/test_db_stored_settings.py +0 -0
  118. {simple_module_db-0.0.46 → simple_module_db-0.0.47}/tests/test_db_strict_insert_context.py +0 -0
  119. {simple_module_db-0.0.46 → simple_module_db-0.0.47}/tests/test_db_tenant_cleanup.py +0 -0
  120. {simple_module_db-0.0.46 → simple_module_db-0.0.47}/tests/test_db_tenant_upsert_guard.py +0 -0
  121. {simple_module_db-0.0.46 → simple_module_db-0.0.47}/tests/test_db_user_directory_sql.py +0 -0
  122. {simple_module_db-0.0.46 → simple_module_db-0.0.47}/tests/test_db_write_marks.py +0 -0
  123. {simple_module_db-0.0.46 → simple_module_db-0.0.47}/tests/test_default_tenant.py +0 -0
  124. {simple_module_db-0.0.46 → simple_module_db-0.0.47}/tests/test_independent_session.py +0 -0
  125. {simple_module_db-0.0.46 → simple_module_db-0.0.47}/tests/test_migration_portability.py +0 -0
  126. {simple_module_db-0.0.46 → simple_module_db-0.0.47}/tests/test_migrations.py +0 -0
  127. {simple_module_db-0.0.46 → simple_module_db-0.0.47}/tests/test_migrations_sqlite_index_compare.py +0 -0
  128. {simple_module_db-0.0.46 → simple_module_db-0.0.47}/tests/test_mixins.py +0 -0
  129. {simple_module_db-0.0.46 → simple_module_db-0.0.47}/tests/test_multi_tenancy.py +0 -0
  130. {simple_module_db-0.0.46 → simple_module_db-0.0.47}/tests/test_query_filter_outer_joins.py +0 -0
  131. {simple_module_db-0.0.46 → simple_module_db-0.0.47}/tests/test_query_filter_rel_outer_joins.py +0 -0
  132. {simple_module_db-0.0.46 → simple_module_db-0.0.47}/tests/test_query_filters.py +0 -0
  133. {simple_module_db-0.0.46 → simple_module_db-0.0.47}/tests/test_rollback_logging.py +0 -0
  134. {simple_module_db-0.0.46 → simple_module_db-0.0.47}/tests/test_session.py +0 -0
  135. {simple_module_db-0.0.46 → simple_module_db-0.0.47}/tests/test_soft_delete_shapes.py +0 -0
  136. {simple_module_db-0.0.46 → simple_module_db-0.0.47}/tests/test_tenant_dml.py +0 -0
  137. {simple_module_db-0.0.46 → simple_module_db-0.0.47}/tests/test_tenant_shapes.py +0 -0
  138. {simple_module_db-0.0.46 → simple_module_db-0.0.47}/tests/test_tenant_strict.py +0 -0
  139. {simple_module_db-0.0.46 → simple_module_db-0.0.47}/tests/test_transaction.py +0 -0
  140. {simple_module_db-0.0.46 → simple_module_db-0.0.47}/tests/test_writes.py +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.5
2
2
  Name: simple_module_db
3
- Version: 0.0.46
3
+ Version: 0.0.47
4
4
  Summary: Per-module SQLModel Base, async session, standard mixins (Audit, SoftDelete, MultiTenant, Versioned) for simple_module
5
5
  Project-URL: Homepage, https://github.com/antosubash/simple_module_python
6
6
  Project-URL: Repository, https://github.com/antosubash/simple_module_python
@@ -25,7 +25,7 @@ Requires-Dist: aiosqlite<0.23,>=0.20
25
25
  Requires-Dist: alembic<2,>=1.16.3
26
26
  Requires-Dist: asyncpg<0.33,>=0.30
27
27
  Requires-Dist: psycopg2-binary<3,>=2.9
28
- Requires-Dist: simple-module-core==0.0.46
28
+ Requires-Dist: simple-module-core==0.0.47
29
29
  Requires-Dist: sqlalchemy[asyncio]<3,>=2.0.2
30
30
  Requires-Dist: sqlmodel<0.1,>=0.0.22
31
31
  Description-Content-Type: text/markdown
@@ -1,6 +1,6 @@
1
1
  [project]
2
2
  name = "simple_module_db"
3
- version = "0.0.46"
3
+ version = "0.0.47"
4
4
  description = "Per-module SQLModel Base, async session, standard mixins (Audit, SoftDelete, MultiTenant, Versioned) for simple_module"
5
5
  readme = "README.md"
6
6
  license = "MIT"
@@ -28,7 +28,7 @@ dependencies = [
28
28
  # The async app code goes through asyncpg; migration env.py rewrites the
29
29
  # URL to +psycopg2 because Alembic's online migrations are sync-only.
30
30
  "psycopg2-binary>=2.9,<3",
31
- "simple_module_core==0.0.46",
31
+ "simple_module_core==0.0.47",
32
32
  "sqlalchemy[asyncio]>=2.0.2,<3",
33
33
  "sqlmodel>=0.0.22,<0.1",
34
34
  ]
@@ -20,6 +20,8 @@ or never sees, and neither ``alembic check`` nor the boot check notices:
20
20
  from __future__ import annotations
21
21
 
22
22
  import logging
23
+ import re
24
+ import warnings
23
25
  from collections.abc import Iterator
24
26
  from typing import Any
25
27
 
@@ -30,6 +32,7 @@ from simple_module_core.diagnostics._expression_index import (
30
32
  find_expression_indexes,
31
33
  )
32
34
  from sqlalchemy.dialects import postgresql
35
+ from sqlalchemy.exc import SAWarning
33
36
  from sqlalchemy.schema import DefaultClause
34
37
  from sqlalchemy.sql.elements import ColumnElement, False_, TextClause, True_
35
38
 
@@ -120,6 +123,32 @@ def rewrite_boolean_defaults(upgrade_ops: Any) -> None:
120
123
  column.server_default = DefaultClause(replacement)
121
124
 
122
125
 
126
+ def silence_expression_index_reflection_warnings(metadata: sa.MetaData) -> None:
127
+ """Ignore the library warnings about expression indexes the models declare (GH #933).
128
+
129
+ On SQLite, SQLAlchemy warns that it skipped reflecting each expression index
130
+ and Alembic that it skipped comparing it, on every autogenerate. For an
131
+ index in ``metadata`` the revision hook already covers both cases: it
132
+ re-emits the index for a new table and :func:`warn_unverifiable_expression_indexes`
133
+ names one the database lacks. Indexes the models do not declare still warn.
134
+ """
135
+ names = [index for _, index in find_expression_indexes(metadata.tables.values())]
136
+ if not names:
137
+ return
138
+ alternatives = "|".join(re.escape(name) for name in names)
139
+ warnings.filterwarnings(
140
+ "ignore",
141
+ message=rf"Skipped unsupported reflection of expression-based index ({alternatives})$",
142
+ category=SAWarning,
143
+ )
144
+ warnings.filterwarnings(
145
+ "ignore",
146
+ message=rf"autogenerate skipping metadata-specified expression-based index "
147
+ rf"'({alternatives})';",
148
+ category=UserWarning,
149
+ )
150
+
151
+
123
152
  def warn_unverifiable_expression_indexes(
124
153
  dialect_name: str | None,
125
154
  metadata: sa.MetaData,
@@ -36,6 +36,7 @@ from simple_module_db.extensions import ( # noqa: F401 (ensure_db_extensions r
36
36
  from simple_module_db.migration_portability import (
37
37
  iter_ops_recursive,
38
38
  rewrite_boolean_defaults,
39
+ silence_expression_index_reflection_warnings,
39
40
  sqlite_index_names,
40
41
  warn_unverifiable_expression_indexes,
41
42
  )
@@ -207,6 +208,7 @@ def make_process_revision_directives(
207
208
  process_revision_directives=make_process_revision_directives(target_metadata),
208
209
  )
209
210
  """
211
+ silence_expression_index_reflection_warnings(metadata)
210
212
  expression_indexes: dict[str, list[Index]] = {}
211
213
  for table in metadata.tables.values():
212
214
  for index in table.indexes:
@@ -0,0 +1,51 @@
1
+ """SQLAlchemy's and Alembic's SQLite expression-index warnings are quiet (GH #933).
2
+
3
+ The revision hook re-emits the models' expression indexes for new tables and
4
+ names the ones the database lacks, so the two library warnings about the same
5
+ index told a fresh app nothing it could act on, on every `make migration`.
6
+ """
7
+
8
+ from __future__ import annotations
9
+
10
+ import warnings
11
+
12
+ import sqlalchemy as sa
13
+ from alembic.autogenerate import produce_migrations
14
+ from alembic.runtime.migration import MigrationContext
15
+ from simple_module_db.migrations import make_process_revision_directives, render_item
16
+
17
+
18
+ def _metadata() -> sa.MetaData:
19
+ md = sa.MetaData()
20
+ sa.Table(
21
+ "people",
22
+ md,
23
+ sa.Column("id", sa.Integer, primary_key=True),
24
+ sa.Column("email", sa.String),
25
+ sa.Index("ix_people_email_lower", sa.text("lower(email)"), unique=True),
26
+ )
27
+ return md
28
+
29
+
30
+ def _autogenerate_warnings(*, undeclared_index: bool = False) -> list[str]:
31
+ target = _metadata()
32
+ engine = sa.create_engine("sqlite://")
33
+ with warnings.catch_warnings(record=True) as caught:
34
+ warnings.simplefilter("always")
35
+ hook = make_process_revision_directives(target)
36
+ with engine.connect() as conn:
37
+ _metadata().create_all(conn)
38
+ if undeclared_index:
39
+ conn.execute(sa.text("CREATE INDEX ix_people_abs_id ON people (abs(id))"))
40
+ ctx = MigrationContext.configure(conn, opts={"render_item": render_item})
41
+ hook(ctx, None, [produce_migrations(ctx, target)])
42
+ return [str(w.message) for w in caught]
43
+
44
+
45
+ def test_declared_expression_indexes_raise_no_library_warnings() -> None:
46
+ assert not [m for m in _autogenerate_warnings() if "ix_people_email_lower" in m]
47
+
48
+
49
+ def test_an_index_the_models_do_not_declare_still_warns() -> None:
50
+ messages = _autogenerate_warnings(undeclared_index=True)
51
+ assert any("ix_people_abs_id" in m for m in messages)