SQLAlchemy 2.0.45__py3-none-any.whl → 2.0.47__py3-none-any.whl

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 (262) hide show
  1. sqlalchemy/__init__.py +2 -2
  2. sqlalchemy/connectors/__init__.py +1 -1
  3. sqlalchemy/connectors/aioodbc.py +1 -1
  4. sqlalchemy/connectors/asyncio.py +2 -2
  5. sqlalchemy/connectors/pyodbc.py +1 -1
  6. sqlalchemy/cyextension/__init__.py +1 -1
  7. sqlalchemy/dialects/__init__.py +1 -1
  8. sqlalchemy/dialects/_typing.py +1 -1
  9. sqlalchemy/dialects/mssql/__init__.py +1 -1
  10. sqlalchemy/dialects/mssql/aioodbc.py +1 -1
  11. sqlalchemy/dialects/mssql/base.py +11 -7
  12. sqlalchemy/dialects/mssql/information_schema.py +1 -1
  13. sqlalchemy/dialects/mssql/json.py +1 -1
  14. sqlalchemy/dialects/mssql/provision.py +23 -6
  15. sqlalchemy/dialects/mssql/pymssql.py +1 -1
  16. sqlalchemy/dialects/mssql/pyodbc.py +1 -1
  17. sqlalchemy/dialects/mysql/__init__.py +1 -1
  18. sqlalchemy/dialects/mysql/aiomysql.py +1 -1
  19. sqlalchemy/dialects/mysql/asyncmy.py +1 -1
  20. sqlalchemy/dialects/mysql/base.py +24 -8
  21. sqlalchemy/dialects/mysql/cymysql.py +1 -1
  22. sqlalchemy/dialects/mysql/dml.py +1 -1
  23. sqlalchemy/dialects/mysql/enumerated.py +1 -1
  24. sqlalchemy/dialects/mysql/expression.py +1 -1
  25. sqlalchemy/dialects/mysql/json.py +1 -1
  26. sqlalchemy/dialects/mysql/mariadb.py +2 -3
  27. sqlalchemy/dialects/mysql/mariadbconnector.py +1 -1
  28. sqlalchemy/dialects/mysql/mysqlconnector.py +1 -1
  29. sqlalchemy/dialects/mysql/mysqldb.py +1 -1
  30. sqlalchemy/dialects/mysql/provision.py +8 -2
  31. sqlalchemy/dialects/mysql/pymysql.py +1 -1
  32. sqlalchemy/dialects/mysql/pyodbc.py +1 -1
  33. sqlalchemy/dialects/mysql/reflection.py +1 -1
  34. sqlalchemy/dialects/mysql/reserved_words.py +1 -1
  35. sqlalchemy/dialects/mysql/types.py +1 -1
  36. sqlalchemy/dialects/oracle/__init__.py +1 -1
  37. sqlalchemy/dialects/oracle/base.py +2 -2
  38. sqlalchemy/dialects/oracle/cx_oracle.py +1 -1
  39. sqlalchemy/dialects/oracle/dictionary.py +1 -1
  40. sqlalchemy/dialects/oracle/oracledb.py +2 -2
  41. sqlalchemy/dialects/oracle/provision.py +2 -2
  42. sqlalchemy/dialects/oracle/types.py +1 -1
  43. sqlalchemy/dialects/oracle/vector.py +4 -4
  44. sqlalchemy/dialects/postgresql/__init__.py +1 -1
  45. sqlalchemy/dialects/postgresql/_psycopg_common.py +1 -1
  46. sqlalchemy/dialects/postgresql/array.py +1 -1
  47. sqlalchemy/dialects/postgresql/asyncpg.py +2 -2
  48. sqlalchemy/dialects/postgresql/base.py +74 -24
  49. sqlalchemy/dialects/postgresql/dml.py +1 -1
  50. sqlalchemy/dialects/postgresql/ext.py +1 -1
  51. sqlalchemy/dialects/postgresql/hstore.py +1 -1
  52. sqlalchemy/dialects/postgresql/json.py +10 -1
  53. sqlalchemy/dialects/postgresql/named_types.py +1 -1
  54. sqlalchemy/dialects/postgresql/operators.py +1 -1
  55. sqlalchemy/dialects/postgresql/pg8000.py +1 -1
  56. sqlalchemy/dialects/postgresql/pg_catalog.py +1 -1
  57. sqlalchemy/dialects/postgresql/provision.py +11 -3
  58. sqlalchemy/dialects/postgresql/psycopg.py +1 -1
  59. sqlalchemy/dialects/postgresql/psycopg2.py +1 -1
  60. sqlalchemy/dialects/postgresql/psycopg2cffi.py +1 -1
  61. sqlalchemy/dialects/postgresql/ranges.py +1 -1
  62. sqlalchemy/dialects/postgresql/types.py +1 -1
  63. sqlalchemy/dialects/sqlite/__init__.py +1 -1
  64. sqlalchemy/dialects/sqlite/aiosqlite.py +40 -4
  65. sqlalchemy/dialects/sqlite/base.py +19 -8
  66. sqlalchemy/dialects/sqlite/dml.py +1 -1
  67. sqlalchemy/dialects/sqlite/json.py +1 -1
  68. sqlalchemy/dialects/sqlite/provision.py +8 -2
  69. sqlalchemy/dialects/sqlite/pysqlcipher.py +1 -1
  70. sqlalchemy/dialects/sqlite/pysqlite.py +2 -2
  71. sqlalchemy/engine/__init__.py +1 -1
  72. sqlalchemy/engine/_py_processors.py +1 -1
  73. sqlalchemy/engine/_py_row.py +1 -1
  74. sqlalchemy/engine/_py_util.py +1 -1
  75. sqlalchemy/engine/base.py +9 -1
  76. sqlalchemy/engine/characteristics.py +1 -1
  77. sqlalchemy/engine/create.py +1 -1
  78. sqlalchemy/engine/cursor.py +2 -2
  79. sqlalchemy/engine/default.py +1 -1
  80. sqlalchemy/engine/events.py +1 -1
  81. sqlalchemy/engine/interfaces.py +1 -1
  82. sqlalchemy/engine/mock.py +1 -1
  83. sqlalchemy/engine/processors.py +1 -1
  84. sqlalchemy/engine/reflection.py +1 -1
  85. sqlalchemy/engine/result.py +14 -2
  86. sqlalchemy/engine/row.py +1 -1
  87. sqlalchemy/engine/strategies.py +1 -1
  88. sqlalchemy/engine/url.py +1 -1
  89. sqlalchemy/engine/util.py +1 -1
  90. sqlalchemy/event/__init__.py +1 -1
  91. sqlalchemy/event/api.py +1 -1
  92. sqlalchemy/event/attr.py +1 -1
  93. sqlalchemy/event/base.py +1 -1
  94. sqlalchemy/event/legacy.py +1 -1
  95. sqlalchemy/event/registry.py +1 -1
  96. sqlalchemy/events.py +1 -1
  97. sqlalchemy/exc.py +1 -1
  98. sqlalchemy/ext/__init__.py +1 -1
  99. sqlalchemy/ext/associationproxy.py +3 -3
  100. sqlalchemy/ext/asyncio/__init__.py +1 -1
  101. sqlalchemy/ext/asyncio/base.py +2 -2
  102. sqlalchemy/ext/asyncio/engine.py +2 -2
  103. sqlalchemy/ext/asyncio/exc.py +1 -1
  104. sqlalchemy/ext/asyncio/result.py +1 -1
  105. sqlalchemy/ext/asyncio/scoping.py +1 -1
  106. sqlalchemy/ext/asyncio/session.py +1 -1
  107. sqlalchemy/ext/automap.py +1 -1
  108. sqlalchemy/ext/baked.py +1 -1
  109. sqlalchemy/ext/compiler.py +1 -1
  110. sqlalchemy/ext/declarative/__init__.py +1 -1
  111. sqlalchemy/ext/declarative/extensions.py +1 -1
  112. sqlalchemy/ext/horizontal_shard.py +2 -2
  113. sqlalchemy/ext/hybrid.py +4 -4
  114. sqlalchemy/ext/indexable.py +1 -1
  115. sqlalchemy/ext/instrumentation.py +1 -1
  116. sqlalchemy/ext/mutable.py +1 -1
  117. sqlalchemy/ext/mypy/__init__.py +1 -1
  118. sqlalchemy/ext/mypy/apply.py +1 -1
  119. sqlalchemy/ext/mypy/decl_class.py +1 -1
  120. sqlalchemy/ext/mypy/infer.py +1 -1
  121. sqlalchemy/ext/mypy/names.py +1 -1
  122. sqlalchemy/ext/mypy/plugin.py +1 -1
  123. sqlalchemy/ext/mypy/util.py +1 -1
  124. sqlalchemy/ext/orderinglist.py +1 -1
  125. sqlalchemy/ext/serializer.py +1 -1
  126. sqlalchemy/future/__init__.py +1 -1
  127. sqlalchemy/future/engine.py +1 -1
  128. sqlalchemy/inspection.py +1 -1
  129. sqlalchemy/log.py +1 -1
  130. sqlalchemy/orm/__init__.py +1 -1
  131. sqlalchemy/orm/_orm_constructors.py +2 -2
  132. sqlalchemy/orm/_typing.py +1 -1
  133. sqlalchemy/orm/attributes.py +1 -1
  134. sqlalchemy/orm/base.py +1 -1
  135. sqlalchemy/orm/bulk_persistence.py +3 -3
  136. sqlalchemy/orm/clsregistry.py +1 -1
  137. sqlalchemy/orm/collections.py +1 -1
  138. sqlalchemy/orm/context.py +1 -1
  139. sqlalchemy/orm/decl_api.py +3 -3
  140. sqlalchemy/orm/decl_base.py +1 -1
  141. sqlalchemy/orm/dependency.py +1 -1
  142. sqlalchemy/orm/descriptor_props.py +2 -2
  143. sqlalchemy/orm/dynamic.py +1 -1
  144. sqlalchemy/orm/evaluator.py +1 -1
  145. sqlalchemy/orm/events.py +1 -1
  146. sqlalchemy/orm/exc.py +1 -1
  147. sqlalchemy/orm/identity.py +1 -1
  148. sqlalchemy/orm/instrumentation.py +1 -1
  149. sqlalchemy/orm/interfaces.py +2 -2
  150. sqlalchemy/orm/loading.py +1 -1
  151. sqlalchemy/orm/mapped_collection.py +1 -1
  152. sqlalchemy/orm/mapper.py +2 -2
  153. sqlalchemy/orm/path_registry.py +1 -1
  154. sqlalchemy/orm/persistence.py +1 -1
  155. sqlalchemy/orm/properties.py +1 -1
  156. sqlalchemy/orm/query.py +3 -3
  157. sqlalchemy/orm/relationships.py +1 -1
  158. sqlalchemy/orm/scoping.py +2 -2
  159. sqlalchemy/orm/session.py +4 -4
  160. sqlalchemy/orm/state.py +1 -1
  161. sqlalchemy/orm/state_changes.py +3 -3
  162. sqlalchemy/orm/strategies.py +2 -2
  163. sqlalchemy/orm/strategy_options.py +2 -2
  164. sqlalchemy/orm/sync.py +1 -1
  165. sqlalchemy/orm/unitofwork.py +1 -1
  166. sqlalchemy/orm/util.py +1 -1
  167. sqlalchemy/orm/writeonly.py +1 -1
  168. sqlalchemy/pool/__init__.py +1 -1
  169. sqlalchemy/pool/base.py +10 -2
  170. sqlalchemy/pool/events.py +16 -13
  171. sqlalchemy/pool/impl.py +1 -1
  172. sqlalchemy/schema.py +1 -1
  173. sqlalchemy/sql/__init__.py +1 -1
  174. sqlalchemy/sql/_dml_constructors.py +1 -1
  175. sqlalchemy/sql/_elements_constructors.py +1 -1
  176. sqlalchemy/sql/_orm_types.py +1 -1
  177. sqlalchemy/sql/_py_util.py +1 -1
  178. sqlalchemy/sql/_selectable_constructors.py +1 -1
  179. sqlalchemy/sql/_typing.py +2 -1
  180. sqlalchemy/sql/annotation.py +1 -1
  181. sqlalchemy/sql/base.py +75 -1
  182. sqlalchemy/sql/cache_key.py +1 -1
  183. sqlalchemy/sql/coercions.py +1 -1
  184. sqlalchemy/sql/compiler.py +54 -7
  185. sqlalchemy/sql/crud.py +12 -4
  186. sqlalchemy/sql/ddl.py +1 -1
  187. sqlalchemy/sql/default_comparator.py +1 -1
  188. sqlalchemy/sql/dml.py +2 -2
  189. sqlalchemy/sql/elements.py +3 -3
  190. sqlalchemy/sql/events.py +1 -1
  191. sqlalchemy/sql/expression.py +1 -1
  192. sqlalchemy/sql/functions.py +26 -7
  193. sqlalchemy/sql/lambdas.py +2 -2
  194. sqlalchemy/sql/naming.py +1 -1
  195. sqlalchemy/sql/operators.py +1 -1
  196. sqlalchemy/sql/roles.py +1 -1
  197. sqlalchemy/sql/schema.py +2 -2
  198. sqlalchemy/sql/selectable.py +2 -2
  199. sqlalchemy/sql/sqltypes.py +2 -2
  200. sqlalchemy/sql/traversals.py +1 -1
  201. sqlalchemy/sql/type_api.py +1 -1
  202. sqlalchemy/sql/util.py +1 -1
  203. sqlalchemy/sql/visitors.py +2 -2
  204. sqlalchemy/testing/__init__.py +1 -1
  205. sqlalchemy/testing/assertions.py +1 -1
  206. sqlalchemy/testing/assertsql.py +1 -1
  207. sqlalchemy/testing/asyncio.py +1 -1
  208. sqlalchemy/testing/config.py +1 -1
  209. sqlalchemy/testing/engines.py +9 -4
  210. sqlalchemy/testing/entities.py +1 -1
  211. sqlalchemy/testing/exclusions.py +1 -1
  212. sqlalchemy/testing/fixtures/__init__.py +1 -1
  213. sqlalchemy/testing/fixtures/base.py +19 -1
  214. sqlalchemy/testing/fixtures/mypy.py +1 -1
  215. sqlalchemy/testing/fixtures/orm.py +1 -1
  216. sqlalchemy/testing/fixtures/sql.py +1 -1
  217. sqlalchemy/testing/pickleable.py +1 -1
  218. sqlalchemy/testing/plugin/__init__.py +1 -1
  219. sqlalchemy/testing/plugin/bootstrap.py +1 -1
  220. sqlalchemy/testing/plugin/plugin_base.py +2 -2
  221. sqlalchemy/testing/plugin/pytestplugin.py +1 -1
  222. sqlalchemy/testing/profiling.py +3 -1
  223. sqlalchemy/testing/provision.py +8 -2
  224. sqlalchemy/testing/requirements.py +6 -1
  225. sqlalchemy/testing/schema.py +1 -1
  226. sqlalchemy/testing/suite/__init__.py +1 -1
  227. sqlalchemy/testing/suite/test_cte.py +1 -1
  228. sqlalchemy/testing/suite/test_ddl.py +1 -1
  229. sqlalchemy/testing/suite/test_deprecations.py +1 -1
  230. sqlalchemy/testing/suite/test_dialect.py +1 -1
  231. sqlalchemy/testing/suite/test_insert.py +1 -1
  232. sqlalchemy/testing/suite/test_reflection.py +1 -1
  233. sqlalchemy/testing/suite/test_results.py +1 -1
  234. sqlalchemy/testing/suite/test_rowcount.py +1 -1
  235. sqlalchemy/testing/suite/test_select.py +1 -1
  236. sqlalchemy/testing/suite/test_sequence.py +1 -1
  237. sqlalchemy/testing/suite/test_types.py +1 -1
  238. sqlalchemy/testing/suite/test_unicode_ddl.py +1 -1
  239. sqlalchemy/testing/suite/test_update_delete.py +1 -1
  240. sqlalchemy/testing/util.py +1 -1
  241. sqlalchemy/testing/warnings.py +1 -1
  242. sqlalchemy/types.py +1 -1
  243. sqlalchemy/util/__init__.py +2 -2
  244. sqlalchemy/util/_collections.py +2 -7
  245. sqlalchemy/util/_concurrency_py3k.py +1 -1
  246. sqlalchemy/util/_has_cy.py +1 -1
  247. sqlalchemy/util/_py_collections.py +1 -1
  248. sqlalchemy/util/compat.py +108 -3
  249. sqlalchemy/util/concurrency.py +1 -1
  250. sqlalchemy/util/deprecations.py +1 -1
  251. sqlalchemy/util/langhelpers.py +1 -104
  252. sqlalchemy/util/preloaded.py +1 -1
  253. sqlalchemy/util/queue.py +1 -1
  254. sqlalchemy/util/tool_support.py +1 -1
  255. sqlalchemy/util/topological.py +1 -1
  256. sqlalchemy/util/typing.py +1 -1
  257. {sqlalchemy-2.0.45.dist-info → sqlalchemy-2.0.47.dist-info}/METADATA +1 -1
  258. sqlalchemy-2.0.47.dist-info/RECORD +269 -0
  259. {sqlalchemy-2.0.45.dist-info → sqlalchemy-2.0.47.dist-info}/WHEEL +1 -1
  260. {sqlalchemy-2.0.45.dist-info → sqlalchemy-2.0.47.dist-info}/licenses/LICENSE +1 -1
  261. sqlalchemy-2.0.45.dist-info/RECORD +0 -269
  262. {sqlalchemy-2.0.45.dist-info → sqlalchemy-2.0.47.dist-info}/top_level.txt +0 -0
sqlalchemy/__init__.py CHANGED
@@ -1,5 +1,5 @@
1
1
  # __init__.py
2
- # Copyright (C) 2005-2025 the SQLAlchemy authors and contributors
2
+ # Copyright (C) 2005-2026 the SQLAlchemy authors and contributors
3
3
  # <see AUTHORS file>
4
4
  #
5
5
  # This module is part of SQLAlchemy and is released under
@@ -269,7 +269,7 @@ from .types import Uuid as Uuid
269
269
  from .types import VARBINARY as VARBINARY
270
270
  from .types import VARCHAR as VARCHAR
271
271
 
272
- __version__ = "2.0.45"
272
+ __version__ = "2.0.47"
273
273
 
274
274
 
275
275
  def __go(lcls: Any) -> None:
@@ -1,5 +1,5 @@
1
1
  # connectors/__init__.py
2
- # Copyright (C) 2005-2025 the SQLAlchemy authors and contributors
2
+ # Copyright (C) 2005-2026 the SQLAlchemy authors and contributors
3
3
  # <see AUTHORS file>
4
4
  #
5
5
  # This module is part of SQLAlchemy and is released under
@@ -1,5 +1,5 @@
1
1
  # connectors/aioodbc.py
2
- # Copyright (C) 2005-2025 the SQLAlchemy authors and contributors
2
+ # Copyright (C) 2005-2026 the SQLAlchemy authors and contributors
3
3
  # <see AUTHORS file>
4
4
  #
5
5
  # This module is part of SQLAlchemy and is released under
@@ -1,5 +1,5 @@
1
1
  # connectors/asyncio.py
2
- # Copyright (C) 2005-2025 the SQLAlchemy authors and contributors
2
+ # Copyright (C) 2005-2026 the SQLAlchemy authors and contributors
3
3
  # <see AUTHORS file>
4
4
  #
5
5
  # This module is part of SQLAlchemy and is released under
@@ -270,7 +270,7 @@ class AsyncAdapt_dbapi_cursor:
270
270
  )
271
271
 
272
272
  def setinputsizes(self, *inputsizes: Any) -> None:
273
- # NOTE: this is overrridden in aioodbc due to
273
+ # NOTE: this is overridden in aioodbc due to
274
274
  # see https://github.com/aio-libs/aioodbc/issues/451
275
275
  # right now
276
276
 
@@ -1,5 +1,5 @@
1
1
  # connectors/pyodbc.py
2
- # Copyright (C) 2005-2025 the SQLAlchemy authors and contributors
2
+ # Copyright (C) 2005-2026 the SQLAlchemy authors and contributors
3
3
  # <see AUTHORS file>
4
4
  #
5
5
  # This module is part of SQLAlchemy and is released under
@@ -1,5 +1,5 @@
1
1
  # cyextension/__init__.py
2
- # Copyright (C) 2005-2025 the SQLAlchemy authors and contributors
2
+ # Copyright (C) 2005-2026 the SQLAlchemy authors and contributors
3
3
  # <see AUTHORS file>
4
4
  #
5
5
  # This module is part of SQLAlchemy and is released under
@@ -1,5 +1,5 @@
1
1
  # dialects/__init__.py
2
- # Copyright (C) 2005-2025 the SQLAlchemy authors and contributors
2
+ # Copyright (C) 2005-2026 the SQLAlchemy authors and contributors
3
3
  # <see AUTHORS file>
4
4
  #
5
5
  # This module is part of SQLAlchemy and is released under
@@ -1,5 +1,5 @@
1
1
  # dialects/_typing.py
2
- # Copyright (C) 2005-2025 the SQLAlchemy authors and contributors
2
+ # Copyright (C) 2005-2026 the SQLAlchemy authors and contributors
3
3
  # <see AUTHORS file>
4
4
  #
5
5
  # This module is part of SQLAlchemy and is released under
@@ -1,5 +1,5 @@
1
1
  # dialects/mssql/__init__.py
2
- # Copyright (C) 2005-2025 the SQLAlchemy authors and contributors
2
+ # Copyright (C) 2005-2026 the SQLAlchemy authors and contributors
3
3
  # <see AUTHORS file>
4
4
  #
5
5
  # This module is part of SQLAlchemy and is released under
@@ -1,5 +1,5 @@
1
1
  # dialects/mssql/aioodbc.py
2
- # Copyright (C) 2005-2025 the SQLAlchemy authors and contributors
2
+ # Copyright (C) 2005-2026 the SQLAlchemy authors and contributors
3
3
  # <see AUTHORS file>
4
4
  #
5
5
  # This module is part of SQLAlchemy and is released under
@@ -1,5 +1,5 @@
1
1
  # dialects/mssql/base.py
2
- # Copyright (C) 2005-2025 the SQLAlchemy authors and contributors
2
+ # Copyright (C) 2005-2026 the SQLAlchemy authors and contributors
3
3
  # <see AUTHORS file>
4
4
  #
5
5
  # This module is part of SQLAlchemy and is released under
@@ -984,6 +984,7 @@ import codecs
984
984
  import datetime
985
985
  import operator
986
986
  import re
987
+ from typing import Any
987
988
  from typing import overload
988
989
  from typing import TYPE_CHECKING
989
990
  from uuid import UUID as _python_UUID
@@ -1034,6 +1035,7 @@ from ...util import update_wrapper
1034
1035
  from ...util.typing import Literal
1035
1036
 
1036
1037
  if TYPE_CHECKING:
1038
+ from ...sql.ddl import DropIndex
1037
1039
  from ...sql.dml import DMLState
1038
1040
  from ...sql.selectable import TableClause
1039
1041
 
@@ -2064,8 +2066,8 @@ class MSSQLCompiler(compiler.SQLCompiler):
2064
2066
  def visit_aggregate_strings_func(self, fn, **kw):
2065
2067
  expr = fn.clauses.clauses[0]._compiler_dispatch(self, **kw)
2066
2068
  kw["literal_execute"] = True
2067
- delimeter = fn.clauses.clauses[1]._compiler_dispatch(self, **kw)
2068
- return f"string_agg({expr}, {delimeter})"
2069
+ delimiter = fn.clauses.clauses[1]._compiler_dispatch(self, **kw)
2070
+ return f"string_agg({expr}, {delimiter})"
2069
2071
 
2070
2072
  def visit_concat_op_expression_clauselist(
2071
2073
  self, clauselist, operator, **kw
@@ -2700,11 +2702,13 @@ class MSDDLCompiler(compiler.DDLCompiler):
2700
2702
 
2701
2703
  return text
2702
2704
 
2703
- def visit_drop_index(self, drop, **kw):
2704
- return "\nDROP INDEX %s ON %s" % (
2705
- self._prepared_index_name(drop.element, include_schema=False),
2706
- self.preparer.format_table(drop.element.table),
2705
+ def visit_drop_index(self, drop: DropIndex, **kw: Any) -> str:
2706
+ index_name = self._prepared_index_name(
2707
+ drop.element, include_schema=False
2707
2708
  )
2709
+ table_name = self.preparer.format_table(drop.element.table)
2710
+ if_exists = " IF EXISTS" if drop.if_exists else ""
2711
+ return f"\nDROP INDEX{if_exists} {index_name} ON {table_name}"
2708
2712
 
2709
2713
  def visit_primary_key_constraint(self, constraint, **kw):
2710
2714
  if len(constraint) == 0:
@@ -1,5 +1,5 @@
1
1
  # dialects/mssql/information_schema.py
2
- # Copyright (C) 2005-2025 the SQLAlchemy authors and contributors
2
+ # Copyright (C) 2005-2026 the SQLAlchemy authors and contributors
3
3
  # <see AUTHORS file>
4
4
  #
5
5
  # This module is part of SQLAlchemy and is released under
@@ -1,5 +1,5 @@
1
1
  # dialects/mssql/json.py
2
- # Copyright (C) 2005-2025 the SQLAlchemy authors and contributors
2
+ # Copyright (C) 2005-2026 the SQLAlchemy authors and contributors
3
3
  # <see AUTHORS file>
4
4
  #
5
5
  # This module is part of SQLAlchemy and is released under
@@ -1,5 +1,5 @@
1
1
  # dialects/mssql/provision.py
2
- # Copyright (C) 2005-2025 the SQLAlchemy authors and contributors
2
+ # Copyright (C) 2005-2026 the SQLAlchemy authors and contributors
3
3
  # <see AUTHORS file>
4
4
  #
5
5
  # This module is part of SQLAlchemy and is released under
@@ -137,11 +137,28 @@ def drop_all_schema_objects_pre_tables(cfg, eng):
137
137
  with eng.connect().execution_options(isolation_level="AUTOCOMMIT") as conn:
138
138
  inspector = inspect(conn)
139
139
 
140
- conn.exec_driver_sql(
141
- "IF EXISTS (SELECT 1 FROM sys.fulltext_catalogs "
142
- "WHERE name = 'Catalog') "
143
- "DROP FULLTEXT CATALOG Catalog"
144
- )
140
+ # Drop all full-text indexes before dropping catalogs
141
+ fulltext_indexes = conn.exec_driver_sql(
142
+ "SELECT OBJECT_SCHEMA_NAME(object_id) AS schema_name, "
143
+ "OBJECT_NAME(object_id) AS table_name "
144
+ "FROM sys.fulltext_indexes"
145
+ ).fetchall()
146
+
147
+ for schema_name, table_name in fulltext_indexes:
148
+ if schema_name:
149
+ qualified_name = f"[{schema_name}].[{table_name}]"
150
+ else:
151
+ qualified_name = f"[{table_name}]"
152
+ conn.exec_driver_sql(f"DROP FULLTEXT INDEX ON {qualified_name}")
153
+
154
+ # Now drop all full-text catalogs
155
+ fulltext_catalogs = conn.exec_driver_sql(
156
+ "SELECT name FROM sys.fulltext_catalogs"
157
+ ).fetchall()
158
+
159
+ for (catalog_name,) in fulltext_catalogs:
160
+ conn.exec_driver_sql(f"DROP FULLTEXT CATALOG [{catalog_name}]")
161
+
145
162
  for schema in (None, "dbo", cfg.test_schema, cfg.test_schema_2):
146
163
  for tname in inspector.get_table_names(schema=schema):
147
164
  tb = Table(
@@ -1,5 +1,5 @@
1
1
  # dialects/mssql/pymssql.py
2
- # Copyright (C) 2005-2025 the SQLAlchemy authors and contributors
2
+ # Copyright (C) 2005-2026 the SQLAlchemy authors and contributors
3
3
  # <see AUTHORS file>
4
4
  #
5
5
  # This module is part of SQLAlchemy and is released under
@@ -1,5 +1,5 @@
1
1
  # dialects/mssql/pyodbc.py
2
- # Copyright (C) 2005-2025 the SQLAlchemy authors and contributors
2
+ # Copyright (C) 2005-2026 the SQLAlchemy authors and contributors
3
3
  # <see AUTHORS file>
4
4
  #
5
5
  # This module is part of SQLAlchemy and is released under
@@ -1,5 +1,5 @@
1
1
  # dialects/mysql/__init__.py
2
- # Copyright (C) 2005-2025 the SQLAlchemy authors and contributors
2
+ # Copyright (C) 2005-2026 the SQLAlchemy authors and contributors
3
3
  # <see AUTHORS file>
4
4
  #
5
5
  # This module is part of SQLAlchemy and is released under
@@ -1,5 +1,5 @@
1
1
  # dialects/mysql/aiomysql.py
2
- # Copyright (C) 2005-2025 the SQLAlchemy authors and contributors <see AUTHORS
2
+ # Copyright (C) 2005-2026 the SQLAlchemy authors and contributors <see AUTHORS
3
3
  # file>
4
4
  #
5
5
  # This module is part of SQLAlchemy and is released under
@@ -1,5 +1,5 @@
1
1
  # dialects/mysql/asyncmy.py
2
- # Copyright (C) 2005-2025 the SQLAlchemy authors and contributors <see AUTHORS
2
+ # Copyright (C) 2005-2026 the SQLAlchemy authors and contributors <see AUTHORS
3
3
  # file>
4
4
  #
5
5
  # This module is part of SQLAlchemy and is released under
@@ -1,5 +1,5 @@
1
1
  # dialects/mysql/base.py
2
- # Copyright (C) 2005-2025 the SQLAlchemy authors and contributors
2
+ # Copyright (C) 2005-2026 the SQLAlchemy authors and contributors
3
3
  # <see AUTHORS file>
4
4
  #
5
5
  # This module is part of SQLAlchemy and is released under
@@ -1182,6 +1182,7 @@ if TYPE_CHECKING:
1182
1182
  from ...sql.functions import random
1183
1183
  from ...sql.functions import rollup
1184
1184
  from ...sql.functions import sysdate
1185
+ from ...sql.schema import IdentityOptions
1185
1186
  from ...sql.schema import Sequence as Sequence_SchemaItem
1186
1187
  from ...sql.type_api import TypeEngine
1187
1188
  from ...sql.visitors import ExternallyTraversible
@@ -1358,10 +1359,10 @@ class MySQLCompiler(compiler.SQLCompiler):
1358
1359
  def visit_aggregate_strings_func(
1359
1360
  self, fn: aggregate_strings, **kw: Any
1360
1361
  ) -> str:
1361
- expr, delimeter = (
1362
+ expr, delimiter = (
1362
1363
  elem._compiler_dispatch(self, **kw) for elem in fn.clauses
1363
1364
  )
1364
- return f"group_concat({expr} SEPARATOR {delimeter})"
1365
+ return f"group_concat({expr} SEPARATOR {delimiter})"
1365
1366
 
1366
1367
  def visit_sequence(self, sequence: sa_schema.Sequence, **kw: Any) -> str:
1367
1368
  return "nextval(%s)" % self.preparer.format_sequence(sequence)
@@ -2199,7 +2200,7 @@ class MySQLDDLCompiler(compiler.DDLCompiler):
2199
2200
  if index.unique:
2200
2201
  text += "UNIQUE "
2201
2202
 
2202
- index_prefix = index.kwargs.get("%s_prefix" % self.dialect.name, None)
2203
+ index_prefix = index.get_dialect_option(self.dialect, "prefix")
2203
2204
  if index_prefix:
2204
2205
  text += index_prefix + " "
2205
2206
 
@@ -2208,7 +2209,7 @@ class MySQLDDLCompiler(compiler.DDLCompiler):
2208
2209
  text += "IF NOT EXISTS "
2209
2210
  text += "%s ON %s " % (name, table)
2210
2211
 
2211
- length = index.dialect_options[self.dialect.name]["length"]
2212
+ length = index.get_dialect_option(self.dialect, "length")
2212
2213
  if length is not None:
2213
2214
  if isinstance(length, dict):
2214
2215
  # length value can be a (column_name --> integer value)
@@ -2236,11 +2237,15 @@ class MySQLDDLCompiler(compiler.DDLCompiler):
2236
2237
  columns_str = ", ".join(columns)
2237
2238
  text += "(%s)" % columns_str
2238
2239
 
2239
- parser = index.dialect_options["mysql"]["with_parser"]
2240
+ parser = index.get_dialect_option(
2241
+ self.dialect, "with_parser", deprecated_fallback="mysql"
2242
+ )
2240
2243
  if parser is not None:
2241
2244
  text += " WITH PARSER %s" % (parser,)
2242
2245
 
2243
- using = index.dialect_options["mysql"]["using"]
2246
+ using = index.get_dialect_option(
2247
+ self.dialect, "using", deprecated_fallback="mysql"
2248
+ )
2244
2249
  if using is not None:
2245
2250
  text += " USING %s" % (preparer.quote(using))
2246
2251
 
@@ -2250,7 +2255,9 @@ class MySQLDDLCompiler(compiler.DDLCompiler):
2250
2255
  self, constraint: sa_schema.PrimaryKeyConstraint, **kw: Any
2251
2256
  ) -> str:
2252
2257
  text = super().visit_primary_key_constraint(constraint)
2253
- using = constraint.dialect_options["mysql"]["using"]
2258
+ using = constraint.get_dialect_option(
2259
+ self.dialect, "using", deprecated_fallback="mysql"
2260
+ )
2254
2261
  if using:
2255
2262
  text += " USING %s" % (self.preparer.quote(using))
2256
2263
  return text
@@ -2330,6 +2337,15 @@ class MySQLDDLCompiler(compiler.DDLCompiler):
2330
2337
  self.get_column_specification(create.element),
2331
2338
  )
2332
2339
 
2340
+ def get_identity_options(self, identity_options: IdentityOptions) -> str:
2341
+ """mariadb-specific sequence option; this will move to a
2342
+ mariadb-specific module in 2.1
2343
+
2344
+ """
2345
+ text = super().get_identity_options(identity_options)
2346
+ text = text.replace("NO CYCLE", "NOCYCLE")
2347
+ return text
2348
+
2333
2349
 
2334
2350
  class MySQLTypeCompiler(compiler.GenericTypeCompiler):
2335
2351
  def _extend_numeric(self, type_: _NumericType, spec: str) -> str:
@@ -1,5 +1,5 @@
1
1
  # dialects/mysql/cymysql.py
2
- # Copyright (C) 2005-2025 the SQLAlchemy authors and contributors
2
+ # Copyright (C) 2005-2026 the SQLAlchemy authors and contributors
3
3
  # <see AUTHORS file>
4
4
  #
5
5
  # This module is part of SQLAlchemy and is released under
@@ -1,5 +1,5 @@
1
1
  # dialects/mysql/dml.py
2
- # Copyright (C) 2005-2025 the SQLAlchemy authors and contributors
2
+ # Copyright (C) 2005-2026 the SQLAlchemy authors and contributors
3
3
  # <see AUTHORS file>
4
4
  #
5
5
  # This module is part of SQLAlchemy and is released under
@@ -1,5 +1,5 @@
1
1
  # dialects/mysql/enumerated.py
2
- # Copyright (C) 2005-2025 the SQLAlchemy authors and contributors
2
+ # Copyright (C) 2005-2026 the SQLAlchemy authors and contributors
3
3
  # <see AUTHORS file>
4
4
  #
5
5
  # This module is part of SQLAlchemy and is released under
@@ -1,5 +1,5 @@
1
1
  # dialects/mysql/expression.py
2
- # Copyright (C) 2005-2025 the SQLAlchemy authors and contributors
2
+ # Copyright (C) 2005-2026 the SQLAlchemy authors and contributors
3
3
  # <see AUTHORS file>
4
4
  #
5
5
  # This module is part of SQLAlchemy and is released under
@@ -1,5 +1,5 @@
1
1
  # dialects/mysql/json.py
2
- # Copyright (C) 2005-2025 the SQLAlchemy authors and contributors
2
+ # Copyright (C) 2005-2026 the SQLAlchemy authors and contributors
3
3
  # <see AUTHORS file>
4
4
  #
5
5
  # This module is part of SQLAlchemy and is released under
@@ -1,5 +1,5 @@
1
1
  # dialects/mysql/mariadb.py
2
- # Copyright (C) 2005-2025 the SQLAlchemy authors and contributors
2
+ # Copyright (C) 2005-2026 the SQLAlchemy authors and contributors
3
3
  # <see AUTHORS file>
4
4
  #
5
5
  # This module is part of SQLAlchemy and is released under
@@ -8,7 +8,6 @@
8
8
  from __future__ import annotations
9
9
 
10
10
  from typing import Any
11
- from typing import Callable
12
11
 
13
12
  from .base import MariaDBIdentifierPreparer
14
13
  from .base import MySQLDialect
@@ -51,7 +50,7 @@ class MariaDBDialect(MySQLDialect):
51
50
  type_compiler_cls = MariaDBTypeCompiler
52
51
 
53
52
 
54
- def loader(driver: str) -> Callable[[], type[MariaDBDialect]]:
53
+ def loader(driver: str) -> type[MariaDBDialect]:
55
54
  dialect_mod = __import__(
56
55
  "sqlalchemy.dialects.mysql.%s" % driver
57
56
  ).dialects.mysql
@@ -1,5 +1,5 @@
1
1
  # dialects/mysql/mariadbconnector.py
2
- # Copyright (C) 2005-2025 the SQLAlchemy authors and contributors
2
+ # Copyright (C) 2005-2026 the SQLAlchemy authors and contributors
3
3
  # <see AUTHORS file>
4
4
  #
5
5
  # This module is part of SQLAlchemy and is released under
@@ -1,5 +1,5 @@
1
1
  # dialects/mysql/mysqlconnector.py
2
- # Copyright (C) 2005-2025 the SQLAlchemy authors and contributors
2
+ # Copyright (C) 2005-2026 the SQLAlchemy authors and contributors
3
3
  # <see AUTHORS file>
4
4
  #
5
5
  # This module is part of SQLAlchemy and is released under
@@ -1,5 +1,5 @@
1
1
  # dialects/mysql/mysqldb.py
2
- # Copyright (C) 2005-2025 the SQLAlchemy authors and contributors
2
+ # Copyright (C) 2005-2026 the SQLAlchemy authors and contributors
3
3
  # <see AUTHORS file>
4
4
  #
5
5
  # This module is part of SQLAlchemy and is released under
@@ -1,5 +1,5 @@
1
1
  # dialects/mysql/provision.py
2
- # Copyright (C) 2005-2025 the SQLAlchemy authors and contributors
2
+ # Copyright (C) 2005-2026 the SQLAlchemy authors and contributors
3
3
  # <see AUTHORS file>
4
4
  #
5
5
  # This module is part of SQLAlchemy and is released under
@@ -100,7 +100,13 @@ def _mysql_temp_table_keyword_args(cfg, eng):
100
100
 
101
101
  @upsert.for_db("mariadb")
102
102
  def _upsert(
103
- cfg, table, returning, *, set_lambda=None, sort_by_parameter_order=False
103
+ cfg,
104
+ table,
105
+ returning,
106
+ *,
107
+ set_lambda=None,
108
+ sort_by_parameter_order=False,
109
+ index_elements=None,
104
110
  ):
105
111
  from sqlalchemy.dialects.mysql import insert
106
112
 
@@ -1,5 +1,5 @@
1
1
  # dialects/mysql/pymysql.py
2
- # Copyright (C) 2005-2025 the SQLAlchemy authors and contributors
2
+ # Copyright (C) 2005-2026 the SQLAlchemy authors and contributors
3
3
  # <see AUTHORS file>
4
4
  #
5
5
  # This module is part of SQLAlchemy and is released under
@@ -1,5 +1,5 @@
1
1
  # dialects/mysql/pyodbc.py
2
- # Copyright (C) 2005-2025 the SQLAlchemy authors and contributors
2
+ # Copyright (C) 2005-2026 the SQLAlchemy authors and contributors
3
3
  # <see AUTHORS file>
4
4
  #
5
5
  # This module is part of SQLAlchemy and is released under
@@ -1,5 +1,5 @@
1
1
  # dialects/mysql/reflection.py
2
- # Copyright (C) 2005-2025 the SQLAlchemy authors and contributors
2
+ # Copyright (C) 2005-2026 the SQLAlchemy authors and contributors
3
3
  # <see AUTHORS file>
4
4
  #
5
5
  # This module is part of SQLAlchemy and is released under
@@ -1,5 +1,5 @@
1
1
  # dialects/mysql/reserved_words.py
2
- # Copyright (C) 2005-2025 the SQLAlchemy authors and contributors
2
+ # Copyright (C) 2005-2026 the SQLAlchemy authors and contributors
3
3
  # <see AUTHORS file>
4
4
  #
5
5
  # This module is part of SQLAlchemy and is released under
@@ -1,5 +1,5 @@
1
1
  # dialects/mysql/types.py
2
- # Copyright (C) 2005-2025 the SQLAlchemy authors and contributors
2
+ # Copyright (C) 2005-2026 the SQLAlchemy authors and contributors
3
3
  # <see AUTHORS file>
4
4
  #
5
5
  # This module is part of SQLAlchemy and is released under
@@ -1,5 +1,5 @@
1
1
  # dialects/oracle/__init__.py
2
- # Copyright (C) 2005-2025 the SQLAlchemy authors and contributors
2
+ # Copyright (C) 2005-2026 the SQLAlchemy authors and contributors
3
3
  # <see AUTHORS file>
4
4
  #
5
5
  # This module is part of SQLAlchemy and is released under
@@ -1,5 +1,5 @@
1
1
  # dialects/oracle/base.py
2
- # Copyright (C) 2005-2025 the SQLAlchemy authors and contributors
2
+ # Copyright (C) 2005-2026 the SQLAlchemy authors and contributors
3
3
  # <see AUTHORS file>
4
4
  #
5
5
  # This module is part of SQLAlchemy and is released under
@@ -2618,7 +2618,7 @@ class OracleDialect(default.DefaultDialect):
2618
2618
  and ObjectKind.TABLE in kind
2619
2619
  and ObjectKind.MATERIALIZED_VIEW not in kind
2620
2620
  ):
2621
- # cant use EXCEPT ALL / MINUS here because we don't have an
2621
+ # can't use EXCEPT ALL / MINUS here because we don't have an
2622
2622
  # excludable row vs. the query above
2623
2623
  # outerjoin + where null works better on oracle 21 but 11 does
2624
2624
  # not like it at all. this is the next best thing
@@ -1,5 +1,5 @@
1
1
  # dialects/oracle/cx_oracle.py
2
- # Copyright (C) 2005-2025 the SQLAlchemy authors and contributors
2
+ # Copyright (C) 2005-2026 the SQLAlchemy authors and contributors
3
3
  # <see AUTHORS file>
4
4
  #
5
5
  # This module is part of SQLAlchemy and is released under
@@ -1,5 +1,5 @@
1
1
  # dialects/oracle/dictionary.py
2
- # Copyright (C) 2005-2025 the SQLAlchemy authors and contributors
2
+ # Copyright (C) 2005-2026 the SQLAlchemy authors and contributors
3
3
  # <see AUTHORS file>
4
4
  #
5
5
  # This module is part of SQLAlchemy and is released under
@@ -1,5 +1,5 @@
1
1
  # dialects/oracle/oracledb.py
2
- # Copyright (C) 2005-2025 the SQLAlchemy authors and contributors
2
+ # Copyright (C) 2005-2026 the SQLAlchemy authors and contributors
3
3
  # <see AUTHORS file>
4
4
  #
5
5
  # This module is part of SQLAlchemy and is released under
@@ -112,7 +112,7 @@ python-oracledb documentation `Oracle Net Services Connection Strings
112
112
  For example to use an `Easy Connect string
113
113
  <https://download.oracle.com/ocomdocs/global/Oracle-Net-Easy-Connect-Plus.pdf>`_
114
114
  with a timeout to prevent connection establishment from hanging if the network
115
- transport to the database cannot be establishd in 30 seconds, and also setting
115
+ transport to the database cannot be established in 30 seconds, and also setting
116
116
  a keep-alive time of 60 seconds to stop idle network connections from being
117
117
  terminated by a firewall::
118
118
 
@@ -1,5 +1,5 @@
1
1
  # dialects/oracle/provision.py
2
- # Copyright (C) 2005-2025 the SQLAlchemy authors and contributors
2
+ # Copyright (C) 2005-2026 the SQLAlchemy authors and contributors
3
3
  # <see AUTHORS file>
4
4
  #
5
5
  # This module is part of SQLAlchemy and is released under
@@ -220,7 +220,7 @@ def _oracle_post_configure_engine(url, engine, follower_ident):
220
220
  # https://github.com/oracle/python-cx_Oracle/issues/519
221
221
  # TODO: oracledb claims to have this feature built in somehow,
222
222
  # see if that's in use and/or if it needs to be enabled
223
- # (or if this doesnt even apply to the newer oracle's we're using)
223
+ # (or if this doesn't even apply to the newer oracle's we're using)
224
224
  try:
225
225
  sc = dbapi_connection.stmtcachesize
226
226
  except:
@@ -1,5 +1,5 @@
1
1
  # dialects/oracle/types.py
2
- # Copyright (C) 2005-2025 the SQLAlchemy authors and contributors
2
+ # Copyright (C) 2005-2026 the SQLAlchemy authors and contributors
3
3
  # <see AUTHORS file>
4
4
  #
5
5
  # This module is part of SQLAlchemy and is released under
@@ -1,5 +1,5 @@
1
1
  # dialects/oracle/vector.py
2
- # Copyright (C) 2005-2025 the SQLAlchemy authors and contributors
2
+ # Copyright (C) 2005-2026 the SQLAlchemy authors and contributors
3
3
  # <see AUTHORS file>
4
4
  #
5
5
  # This module is part of SQLAlchemy and is released under
@@ -132,13 +132,13 @@ class VectorIndexConfig:
132
132
  :param distance: Enum value from :class:`.VectorDistanceType`
133
133
  specifies the metric for calculating distance between VECTORS.
134
134
 
135
- :param accuracy: interger. Should be in the range 0 to 100
135
+ :param accuracy: integer. Should be in the range 0 to 100
136
136
  Specifies the accuracy of the nearest neighbor search during
137
137
  query execution.
138
138
 
139
139
  :param parallel: integer. Specifies degree of parallelism.
140
140
 
141
- :param hnsw_neighbors: interger. Should be in the range 0 to
141
+ :param hnsw_neighbors: integer. Should be in the range 0 to
142
142
  2048. Specifies the number of nearest neighbors considered
143
143
  during the search. The attribute :attr:`.VectorIndexConfig.hnsw_neighbors`
144
144
  is HNSW index specific.
@@ -269,7 +269,7 @@ class VECTOR(types.TypeEngine):
269
269
  """
270
270
 
271
271
  if dim is not None and not isinstance(dim, int):
272
- raise TypeError("dim must be an interger")
272
+ raise TypeError("dim must be an integer")
273
273
  if storage_format is not None and not isinstance(
274
274
  storage_format, VectorStorageFormat
275
275
  ):
@@ -1,5 +1,5 @@
1
1
  # dialects/postgresql/__init__.py
2
- # Copyright (C) 2005-2025 the SQLAlchemy authors and contributors
2
+ # Copyright (C) 2005-2026 the SQLAlchemy authors and contributors
3
3
  # <see AUTHORS file>
4
4
  #
5
5
  # This module is part of SQLAlchemy and is released under
@@ -1,5 +1,5 @@
1
1
  # dialects/postgresql/_psycopg_common.py
2
- # Copyright (C) 2005-2025 the SQLAlchemy authors and contributors
2
+ # Copyright (C) 2005-2026 the SQLAlchemy authors and contributors
3
3
  # <see AUTHORS file>
4
4
  #
5
5
  # This module is part of SQLAlchemy and is released under
@@ -1,5 +1,5 @@
1
1
  # dialects/postgresql/array.py
2
- # Copyright (C) 2005-2025 the SQLAlchemy authors and contributors
2
+ # Copyright (C) 2005-2026 the SQLAlchemy authors and contributors
3
3
  # <see AUTHORS file>
4
4
  #
5
5
  # This module is part of SQLAlchemy and is released under