| number,title,url,primary_bucket,attention_score,attention_reason,maintainer_next_action,label_text,component_labels,linked_pr_numbers,referenced_issue_numbers,referenced_pr_numbers,primary_issue_collapse_group_key,issue_collapse_group_keys,relationship_edge_count,created_at,updated_at,stale_days,body_excerpt | |
| 13420,"oracledb async dialect enters cursors synchronously, silently breaking async cursor wrappers",https://github.com/sqlalchemy/sqlalchemy/issues/13420,has linked PR,44,"open PR references this issue; component labels: asyncio, oracle",review linked PR state before touching issue,"bug, task, oracle, asyncio","asyncio, oracle",13421,,,issue-collapse:f0c50bddefb35522,issue-collapse:f0c50bddefb35522,0,2026-07-07T15:15:50Z,2026-07-07T19:01:25Z,0,"### Describe the use case ### AsyncAdapt_oracledb_cursor._aenter_cursor uses sync __enter__() instead of async __aenter__() **Where:** https://github.com/sqlalchemy/sqlalchemy/blob/c8e26d5c9ffcde0a82b4b7fa5de27f0c6bc46bec/lib/sqlalchemy/dialects/oracle/oracledb.py#L754-L758 Compare to the base class it overrides, wh..." | |
| 13419,catastrophic regex backtracking in sqlite inline UNIQUE reflection (ReDoS on get_unique_constraints),https://github.com/sqlalchemy/sqlalchemy/issues/13419,has linked PR,44,open PR references this issue; component labels: reflection,review linked PR state before touching issue,"bug, reflection",reflection,13398,,13398,issue-collapse:276b40340ae28a96,issue-collapse:276b40340ae28a96,1,2026-07-06T23:42:58Z,2026-07-07T06:45:28Z,0,"### Describe the bug `get_unique_constraints` on the SQLite dialect scans the stored `CREATE TABLE` text (taken verbatim from `sqlite_master.sql`) with an inline-`UNIQUE` regex whose tail is `[\t ]+[a-z0-9_ ]+?[\t ]+UNIQUE`. The lazy middle class itself contains a space, so all three quantifiers can lay claim to the..." | |
| 13407,Cython batch instance processor — ~10–30% on most loads,https://github.com/sqlalchemy/sqlalchemy/issues/13407,has linked PR,44,"open PR references this issue; component labels: orm, performance",review linked PR state before touching issue,"orm, performance","orm, performance",13405,,,issue-collapse:3a489042976c92b9,issue-collapse:3a489042976c92b9,0,2026-06-30T20:40:17Z,2026-06-30T20:41:07Z,6,"### Discussed in https://github.com/sqlalchemy/sqlalchemy/discussions/13378 <div type='discussions-op-text'> <sup>Originally posted by **ollz272** June 16, 2026</sup> Add `orm/_loading_cy.py` with `_InstancesBatch`, a whole-chunk row processor built by `_instance_processor()` for the non-refresh, non-polymorphic loa..." | |
| 13406,use new _raw_all_tuples with subqueryloads,https://github.com/sqlalchemy/sqlalchemy/issues/13406,has linked PR,44,"open PR references this issue; component labels: orm, performance",review linked PR state before touching issue,"orm, performance","orm, performance",13404,,,issue-collapse:1057bc2c5756d700,issue-collapse:1057bc2c5756d700,0,2026-06-30T20:31:34Z,2026-06-30T20:40:43Z,6,"### Discussed in https://github.com/sqlalchemy/sqlalchemy/discussions/13375 <div type='discussions-op-text'> <sup>Originally posted by **ollz272** June 16, 2026</sup> `_SubqCollections._load` iterated the `Query`, which routes through `Query.__iter__ -> result.unique()` and builds a `Row` object (plus runs the uniqu..." | |
| 13357,Type check error when passing lists to `any_`/`all_`,https://github.com/sqlalchemy/sqlalchemy/issues/13357,needs maintainer decision,28,"open issue has no stronger automated bucket; component labels: documentation, functions, typing","decide whether this is bug, use case, docs, or support","documentation, functions, typing","documentation, functions, typing",,6810,,issue-collapse:542ae1425c0c9560,issue-collapse:542ae1425c0c9560,1,2026-06-08T09:15:50Z,2026-06-25T09:14:59Z,12,### Ensure stubs packages are not installed - [x] No sqlalchemy stub packages is installed (both `sqlalchemy-stubs` and `sqlalchemy2-stubs` are not compatible with v2) ### Verify if the api is typed - [x] The api is not in a module listed in [#6810](https://github.com/sqlalchemy/sqlalchemy/issues/6810) so it should... | |
| 13311,Provide a many-table version for has_table,https://github.com/sqlalchemy/sqlalchemy/issues/13311,needs maintainer decision,28,"open issue has no stronger automated bucket; component labels: performance, reflection","decide whether this is bug, use case, docs, or support","reflection, performance, use case","performance, reflection",,,,issue-collapse:ac9d8e3e101368f3,issue-collapse:ac9d8e3e101368f3,0,2026-05-19T21:50:31Z,2026-05-26T16:58:25Z,42,"### Describe the use case This could be used for example to speed-up the check done by the `create_all` metadata something similar to the multi-reflection api, the method could be called `has_multi_table` discussed in #13295 ### Databases / Backends / Drivers targeted any ### Example Use ```py inspect(conn).has_muti..." | |
| 13281,Modernize type annotations to PEP 604 union syntax,https://github.com/sqlalchemy/sqlalchemy/issues/13281,needs maintainer decision,28,open issue has no stronger automated bucket; component labels: typing,"decide whether this is bug, use case, docs, or support",typing,typing,,,,issue-collapse:9fb810a4618c44a8,issue-collapse:9fb810a4618c44a8,0,2026-05-07T23:28:04Z,2026-05-08T07:28:51Z,60,"## Summary SQLAlchemy now targets Python >= 3.10, so legacy `typing.Union` and `typing.Optional` annotations can be modernized to PEP 604 union syntax. Examples: - `Optional[T]` -> `T | None` - `Union[A, B]` -> `A | B` - `typing.Optional[T]` -> `T | None` - `typing.Union[A, B]` -> `A | B` ## Scope Audit and update P..." | |
| 13253,im not sure we can type hybrid_methods fully,https://github.com/sqlalchemy/sqlalchemy/issues/13253,needs maintainer decision,28,open issue has no stronger automated bucket; component labels: typing,"decide whether this is bug, use case, docs, or support","bug, quagmire, typing",typing,,,,issue-collapse:9fb810a4618c44a8,issue-collapse:9fb810a4618c44a8,0,2026-04-21T21:18:05Z,2026-04-21T22:03:38Z,76,"### Discussed in https://github.com/sqlalchemy/sqlalchemy/discussions/13249 trying to do this, cannot get any typing combination to be accepted by pyright much less mypy: ```py from typing import overload from sqlalchemy import func, Integer, column from sqlalchemy import select from sqlalchemy.ext.hybrid import hyb..." | |
| 13227,WriteOnlyMapped: default_factory=list broken in 2.1 due to new declarative_scan validation,https://github.com/sqlalchemy/sqlalchemy/issues/13227,has linked PR,44,open PR references this issue; component labels: orm,review linked PR state before touching issue,"orm, use case",orm,13289,12168,,issue-collapse:3edab8ed60233c59,issue-collapse:3edab8ed60233c59,1,2026-04-08T18:41:36Z,2026-04-09T16:43:38Z,89,### Describe the bug The new `default_factory` validation introduced in commit [95ad9fe](https://github.com/sqlalchemy/sqlalchemy/commit/95ad9fe42b888d7cdea60b7a71c833cbb8667887) (related to #12168) breaks `WriteOnlyMapped` relationships that use `default_factory=list` in Declarative Dataclass Mapping. ### Optional... | |
| 13212,Support for native JSON in mssql,https://github.com/sqlalchemy/sqlalchemy/issues/13212,needs maintainer decision,28,"open issue has no stronger automated bucket; component labels: datatypes, sql server","decide whether this is bug, use case, docs, or support","SQL Server, datatypes, use case","datatypes, sql server",,4384,,issue-collapse:ee243c4b836d5a96,issue-collapse:ee243c4b836d5a96,1,2026-03-31T08:27:37Z,2026-04-30T19:31:23Z,68,### Describe the use case Sql server 2025 seems to have added native json support https://learn.microsoft.com/en-us/sql/t-sql/data-types/json-data-type?view=sql-server-ver17 I guess we should decide what to do with the existing JSON type: https://docs.sqlalchemy.org/en/20/dialects/mssql.html#sqlalchemy.dialects.mssq... | |
| 13210,Applying a loader option to a parent relationship when using with_polymorphic does not work properly,https://github.com/sqlalchemy/sqlalchemy/issues/13210,needs maintainer decision,28,"open issue has no stronger automated bucket; component labels: loader options, orm","decide whether this is bug, use case, docs, or support","bug, orm, loader options","loader options, orm",,13193,,issue-collapse:13223437fee4bb91,issue-collapse:13223437fee4bb91,1,2026-03-29T19:26:19Z,2026-03-30T08:10:17Z,99,"> Asked claude to fuzz this and it did find a similar case, let me know if you prefer me to open another issue or if we should re-open this one. Seem very similar: it accesses the parent relationship via `poly.Cls.parent_rel` that's similar to what was fixed here `poly.Cls.cls_rel` > > while strange I think it shoul..." | |
| 13204,Immediateload fails to load when combined with inheritance,https://github.com/sqlalchemy/sqlalchemy/issues/13204,needs maintainer decision,28,"open issue has no stronger automated bucket; component labels: loader options, orm","decide whether this is bug, use case, docs, or support","bug, orm, loader options, fuzzer","loader options, orm",,"13193, 13202",,issue-collapse:13223437fee4bb91,issue-collapse:13223437fee4bb91,2,2026-03-27T21:52:11Z,2026-06-11T17:47:58Z,26,There are a couple of cases where immediateload fails when using inheritance on relationships: - loading using immediateload a relationship on an inheritance chain that's being loaded via eager loading: `select(Meta).option(anyloader(Meta.parent_cls).immediateload(ParentCls.relationship))` - loading using immediatel... | |
| 13169,Connection pool soft invalidation uses `time.time()` comparison that can silently fail on low-resolution clocks (e.g. Windows ~16 ms),https://github.com/sqlalchemy/sqlalchemy/issues/13169,has linked PR,44,open PR references this issue; component labels: connection pool,review linked PR state before touching issue,"connection pool, use case",connection pool,13288,,,issue-collapse:30b6115151f5426c,issue-collapse:30b6115151f5426c,0,2026-03-13T23:37:31Z,2026-03-20T01:18:50Z,109,"In `lib/sqlalchemy/pool/base.py`, `_ConnectionRecord.get_connection` detects soft invalidation via: ```python # base.py, line 852 elif self._soft_invalidate_time > self.starttime: do_connect = True ``` `_soft_invalidate_time` is set with `time.time()` (line 812) and `starttime` is also set with `time.time()` (line 8..." | |
| 13157,PostgreSQL check constraint reflection strips brackets naively,https://github.com/sqlalchemy/sqlalchemy/issues/13157,has linked PR,62,"open PR references this issue; label says issue is suitable for a scoped external contribution; component labels: postgresql, reflection",review linked PR state before touching issue,"bug, postgresql, reflection, great mcve","postgresql, reflection",13303,,13188,issue-collapse:fdcf9ec8b5e3f7ae,issue-collapse:fdcf9ec8b5e3f7ae,1,2026-03-06T11:07:58Z,2026-03-27T18:27:07Z,102,### Describe the bug Check constraint reflection strips brackets from some expressions such that they are syntactically invalid ### Optional link from https://docs.sqlalchemy.org which documents the behavior that is expected _No response_ ### SQLAlchemy Version in Use 2.0.48 ### DBAPI (i.e. the database driver) psyc... | |
| 13153,`composite` with in-place custom values getter,https://github.com/sqlalchemy/sqlalchemy/issues/13153,needs maintainer decision,28,open issue has no stronger automated bucket; component labels: orm,"decide whether this is bug, use case, docs, or support","orm, use case",orm,,,,issue-collapse:8a6b3a5513f8ab68,issue-collapse:8a6b3a5513f8ab68,0,2026-03-04T20:43:50Z,2026-03-05T09:05:37Z,124,"### Describe the use case Currently, nested composites or custom classes require implementing `__composite_values__`, which is not always an option. Internally there is `_generated_composite_accessor` which is generated if no such method provided. I suggest adding `values_getter` as an argument to `composite()` so i..." | |
| 13113,SQLite insert supports multiple on-conflict clauses in inserts,https://github.com/sqlalchemy/sqlalchemy/issues/13113,needs maintainer decision,28,"open issue has no stronger automated bucket; component labels: dml, sqlite","decide whether this is bug, use case, docs, or support","sqlite, use case, dml","dml, sqlite",,,,issue-collapse:74f3d35b048feb4d,issue-collapse:74f3d35b048feb4d,0,2026-02-06T20:07:38Z,2026-02-07T16:17:44Z,150,"### Describe the use case Apparently sqlite supports multiple on-conflict clauses in inserts: https://sqlite.org/lang_upsert.html > If the insert operation would cause the conflict target uniqueness constraint to fail, then the insert is omitted and the corresponding DO NOTHING or DO UPDATE operation is performed in..." | |
| 13049,Provide an implementation for avg / abs function with proper type,https://github.com/sqlalchemy/sqlalchemy/issues/13049,has linked PR,44,open PR references this issue; component labels: functions,review linked PR state before touching issue,"functions, use case",functions,13051,,,issue-collapse:714cc77564bc27d5,issue-collapse:714cc77564bc27d5,0,2025-12-22T14:07:02Z,2026-03-23T14:39:20Z,106,### Describe the use case Currently `avg` and `abs` do not have an implementation in the functions module Since these are fairly common i thing we could provide an implementation so that the correct type can be inferred. - avg is numeric (or Double) - abs instead derives its type from the input ### Databases / Backe... | |
| 13048,Add option for disabling automatic addition of constraint/indexes to the table,https://github.com/sqlalchemy/sqlalchemy/issues/13048,has linked PR,44,open PR references this issue; component labels: schema,review linked PR state before touching issue,"schema, use case",schema,13399,,,issue-collapse:0991f61963864c8e,issue-collapse:0991f61963864c8e,0,2025-12-20T16:27:42Z,2026-01-13T17:54:11Z,175,### Describe the use case Add a flag in the constraints and index to prevent them from automatically being added to the table collections. They can be added manually either by providing them to the table constructor or using the table methods to add constraints ### Databases / Backends / Drivers targeted Any ### Exa... | |
| 13007,Change the default to False of addconstraint / dropconstraint isolate_from_table,https://github.com/sqlalchemy/sqlalchemy/issues/13007,stale/low urgency,2,old update age or low-urgency/stale label; component labels: schema,scan when time allows,"schema, use case",schema,,13006,,issue-collapse:9cf7fea73ce1a582,issue-collapse:9cf7fea73ce1a582,1,2025-11-26T21:15:25Z,2025-11-26T21:15:50Z,222,Follow up of #13006 Set to False the default value and remove the warning | |
| 12972,Move asyncio out of ext into the library proper,https://github.com/sqlalchemy/sqlalchemy/issues/12972,stale/low urgency,2,old update age or low-urgency/stale label; component labels: asyncio,scan when time allows,"use case, asyncio",asyncio,,,,issue-collapse:bab30b1dc0288058,issue-collapse:bab30b1dc0288058,0,2025-11-08T22:23:50Z,2025-11-27T20:35:22Z,221,"a long term solution would be to pull the asyncio extension out of the .ext/ namespace so that the imports would be `from sqlalchemy.asyncio import create_async_engine` and `from sqlalchemy.orm.asycnio import AsyncSession`. Then `sqlalchemy.ext.asyncio` would be a compatibility shim that isn't needed, the same way D..." | |
| 12803,Expose Two Phase Transaction in async layer,https://github.com/sqlalchemy/sqlalchemy/issues/12803,stale/low urgency,2,old update age or low-urgency/stale label; component labels: asyncio,scan when time allows,"use case, asyncio",asyncio,,,,issue-collapse:bab30b1dc0288058,issue-collapse:bab30b1dc0288058,0,2025-08-14T15:25:34Z,2025-08-14T15:25:34Z,327,"### Discussed in https://github.com/sqlalchemy/sqlalchemy/discussions/12797 <div type='discussions-op-text'> <sup>Originally posted by **OscarRomaFever** August 12, 2025</sup> Hi! I would like to know if it is possible to manage a Two-Phase Commit (2PC) transaction using asynchronous connections with PostgreSQL in S..." | |
| 12710,add extra shielding to async connection create,https://github.com/sqlalchemy/sqlalchemy/issues/12710,stale/low urgency,2,"old update age or low-urgency/stale label; component labels: asyncio, engine",scan when time allows,"bug, engine, asyncio","asyncio, engine",,,,issue-collapse:bab30b1dc0288058,issue-collapse:bab30b1dc0288058,0,2025-07-02T02:21:00Z,2025-10-07T00:46:21Z,273,"### Discussed in https://github.com/sqlalchemy/sqlalchemy/discussions/12709 Locally I can only reproduce this using a trusted connection against a PG database running in a local container, which I can run like this: podman run -d --rm -e POSTGRES_HOST_AUTH_METHOD=trust -e POSTGRES_USER=postgres -e POSTGRES_PASSWORD=..." | |
| 12689,"WriteOnlyScalar companion to WriteOnlyMapped (which would be Collection?) , as WOM suits an async use case that applies to scalars as well",https://github.com/sqlalchemy/sqlalchemy/issues/12689,stale/low urgency,2,old update age or low-urgency/stale label; component labels: orm,scan when time allows,"orm, use case",orm,,,,issue-collapse:61c454c49a53cd0a,issue-collapse:61c454c49a53cd0a,0,2025-06-20T09:20:54Z,2025-06-20T13:56:35Z,382,"### Describe the use case Traditional strategies ('select', 'raise', 'subquery') for accessing a lazy-loaded relationship relationship don't work in an async context, as the database call loading the related instance yields to the event loop before a necessarily synchronous attribute access would otherwise return. T..." | |
| 12628,Add support for MariaDB Vector data type,https://github.com/sqlalchemy/sqlalchemy/issues/12628,stale/low urgency,2,"old update age or low-urgency/stale label; component labels: datatypes, mariadb, oracle",scan when time allows,"oracle, datatypes, use case, mariadb","datatypes, mariadb, oracle",,,,issue-collapse:b690d4054ae510c4,issue-collapse:b690d4054ae510c4,0,2025-05-28T19:59:07Z,2025-05-29T20:07:46Z,403,### Describe the use case MariaDB has introduced a new Vector data type in version 11.7. Details can be found here: https://mariadb.org/projects/mariadb-vector/ The main issue I'm running into now is that reflection fails when reflecting on any table that has a vector column. The reflection fails to retrieve the col... | |
| 12585,"support SQLite .autocommit=False mode, improve documentation",https://github.com/sqlalchemy/sqlalchemy/issues/12585,stale/low urgency,2,old update age or low-urgency/stale label; component labels: sqlite,scan when time allows,"task, sqlite, big job",sqlite,,8795,,issue-collapse:0d25313ef6ec934a,issue-collapse:0d25313ef6ec934a,1,2025-05-12T14:49:26Z,2025-06-19T15:21:20Z,383,"### Describe the use case see https://docs.python.org/3/library/sqlite3.html#sqlite3.Connection.autocommit for the new feature (which was many years in the making) from discussion at https://github.com/sqlalchemy/alembic/issues/1655 : 1. SQLAlchemy's documentation needs to be updated to reflect that the ""correct tra..." | |
| 12575,prefixing Composite Column Types,https://github.com/sqlalchemy/sqlalchemy/issues/12575,stale/low urgency,2,old update age or low-urgency/stale label; component labels: orm,scan when time allows,"orm, use case",orm,,,,issue-collapse:61c454c49a53cd0a,issue-collapse:61c454c49a53cd0a,0,2025-05-06T19:23:56Z,2025-08-14T15:23:09Z,327,"### Describe the use case ```python @dataclasses.dataclass class Person: first_name: int last_name: str # ... class Housing(Base): person: composite(Person, column_prefix='person') ``` would result in mapped column names `person_first_name` and `person_last_name` right now, the API is a bit verbose and hard to read:..." | |
| 12561,Recover two-phase in mysql is currently unusable since it uses a legacy row index method,https://github.com/sqlalchemy/sqlalchemy/issues/12561,stale/low urgency,2,"old update age or low-urgency/stale label; component labels: mariadb, mysql",scan when time allows,"bug, mysql, mariadb","mariadb, mysql",,,,issue-collapse:a415992bd34f94b3,issue-collapse:a415992bd34f94b3,0,2025-04-28T21:51:03Z,2025-04-28T21:51:34Z,434,This has likely been broken since v2 https://github.com/sqlalchemy/sqlalchemy/blob/a84444fca1c436179ad847ce99e8a013a84b5b33/lib/sqlalchemy/dialects/mysql/base.py#L2772-L2774 Apparently there is no test that covers this | |
| 12398,Add existing strategy to conflicting strategies error message,https://github.com/sqlalchemy/sqlalchemy/issues/12398,has linked PR,26,open PR references this issue; old update age or low-urgency/stale label; component labels: orm,review linked PR state before touching issue,"orm, use case",orm,12401,10668,,issue-collapse:7d31f4d72c8cb07d,issue-collapse:7d31f4d72c8cb07d,1,2025-03-05T11:01:36Z,2025-10-29T00:06:19Z,251,### Describe the use case I just received the following error of in my project and have an improvement request similar to #10668 : ``` sqlalchemy.exc.InvalidRequestError: Loader strategies for ORM Path[Mapper[Cable(cable)] -> Cable.cablesides -> Mapper[CadCableSide(cad_cable_side)]] conflict ``` While this tells me... | |
| 12341,Add dialect-specific support for Oracle's FETCH EXACT/APPROXIMATE,https://github.com/sqlalchemy/sqlalchemy/issues/12341,stale/low urgency,2,old update age or low-urgency/stale label; component labels: oracle,scan when time allows,"oracle, use case",oracle,,,,issue-collapse:8db1ea9dc9025a96,issue-collapse:8db1ea9dc9025a96,0,2025-02-12T20:49:45Z,2025-04-25T14:06:00Z,438,### Discussed in https://github.com/sqlalchemy/sqlalchemy/discussions/12337 support for FETCH EXACT/APPROXIMATE feature described at https://docs.oracle.com/en/database/oracle/oracle-database/23/sqlrf/SELECT.html#GUID-CFA006CA-6FF1-4972-821E-6996142A51C6__BABBADDD | |
| 12186,Improve `eager_default=True` behavior in insert / updates,https://github.com/sqlalchemy/sqlalchemy/issues/12186,stale/low urgency,2,old update age or low-urgency/stale label; component labels: orm,scan when time allows,"orm, unit of work, use case, eager_defaults",orm,,,,issue-collapse:61c454c49a53cd0a,issue-collapse:61c454c49a53cd0a,0,2024-12-17T20:45:10Z,2025-02-06T16:44:36Z,516,"## update Currently `eager_default=True` in case of an update of multiple rows does the following: - when the driver supports returning, runs single updates with returning, one for each row. Results in n queries - when the driver does not support returning, runs execute many updates and one select for each rows. Res..." | |
| 12101,Better support of locking clauses (FOR UPDATE/SHARE) when supported,https://github.com/sqlalchemy/sqlalchemy/issues/12101,needs maintainer decision,28,"open issue has no stronger automated bucket; component labels: oracle, postgresql","decide whether this is bug, use case, docs, or support","postgresql, oracle, use case","oracle, postgresql",,5583,,issue-collapse:1568de84f755ca85,issue-collapse:1568de84f755ca85,2,2024-11-14T21:23:30Z,2026-03-23T14:39:20Z,106,### Describe the use case The [Postgres docs](https://www.postgresql.org/docs/17/sql-select.html) specifically say that you should be able to have both a FOR UPDATE and a FOR SHARE in the same query: > Multiple locking clauses can be written if it is necessary to specify different locking behavior for different tabl... | |
| 12097,can't adapt type for enum in case(),https://github.com/sqlalchemy/sqlalchemy/issues/12097,stale/low urgency,2,old update age or low-urgency/stale label; component labels: documentation,scan when time allows,"question, documentation, expected behavior, law of twos",documentation,,6515,,issue-collapse:a1aa12528019a82d,issue-collapse:a1aa12528019a82d,1,2024-11-14T11:45:53Z,2024-11-21T16:37:47Z,593,### Describe the bug I can't use an enum type as part of a `case()` without casting. Looks very similar to https://github.com/sqlalchemy/sqlalchemy/issues/6515 ### Optional link from https://docs.sqlalchemy.org which documents the behavior that is expected _No response_ ### SQLAlchemy Version in Use 2.0.36 ### DBAPI... | |
| 12096,delete with join and returning clause doesn't work on SQLAlchemy 2,https://github.com/sqlalchemy/sqlalchemy/issues/12096,stale/low urgency,2,"old update age or low-urgency/stale label; component labels: dml, orm",scan when time allows,"bug, orm, hard orm, dml","dml, orm",,,,issue-collapse:f226fb654293c011,issue-collapse:f226fb654293c011,0,2024-11-14T11:12:52Z,2024-11-14T12:55:13Z,600,"### Describe the bug I have a statement like the following, which works on SQLAlchemy 1.4 but not on 2.0 ```python delete(Author).where(Author.id == Book.author_id).returning(Book.title) ``` ### Optional link from https://docs.sqlalchemy.org which documents the behavior that is expected https://docs.sqlalchemy.org/e..." | |
| 11686,Unexpected relationship kwarg with mypy from a mixin,https://github.com/sqlalchemy/sqlalchemy/issues/11686,stale/low urgency,2,old update age or low-urgency/stale label; component labels: typing,scan when time allows,"dataclasses, typing",typing,,6810,,issue-collapse:542ae1425c0c9560,issue-collapse:542ae1425c0c9560,1,2024-08-03T21:47:03Z,2024-08-10T03:30:06Z,696,### Ensure stubs packages are not installed - [X] No sqlalchemy stub packages is installed (both `sqlalchemy-stubs` and `sqlalchemy2-stubs` are not compatible with v2) ### Verify if the api is typed - [X] The api is not in a module listed in [#6810](https://github.com/sqlalchemy/sqlalchemy/issues/6810) so it should... | |
| 11677,SQLITE: SQLiteDialect.get_check_constraints incorrectly reflects multiline check constraints,https://github.com/sqlalchemy/sqlalchemy/issues/11677,stale/low urgency,2,"old update age or low-urgency/stale label; component labels: reflection, sqlite",scan when time allows,"bug, sqlite, reflection, quagmire, law of twos","reflection, sqlite",,,11678,issue-collapse:06a30ba7b2ea1a88,issue-collapse:06a30ba7b2ea1a88,1,2024-08-01T14:42:00Z,2024-09-06T12:08:19Z,669,"### Describe the bug The `get_check_constraints` method of SQLiteDialect, does not correctly handle multi line CHECK constraints in SQLAlchemy reflection. When performing a alembic batch_op for example, multi line check constraints will not be or wrongly reflected and can result in SQL errors. ### Optional link from..." | |
| 11623,omit column_property from rendering inside subquery() / CTE() ?,https://github.com/sqlalchemy/sqlalchemy/issues/11623,stale/low urgency,2,"old update age or low-urgency/stale label; component labels: orm, performance",scan when time allows,"orm, performance, expected behavior","orm, performance",,,,issue-collapse:61c454c49a53cd0a,issue-collapse:61c454c49a53cd0a,0,2024-07-19T16:17:25Z,2024-07-19T19:32:04Z,718,"### Describe the bug Given a model `A` with a column_property `B`, a query that loads an `aliased` of `A` will emit the `B` expression multiple times (exact number depends on the complexity of the query). ### Optional link from https://docs.sqlalchemy.org which documents the behavior that is expected _No response_ #..." | |
| 11620,"Deprecate MSSQL enable_identity_insert by default, gate it behind a flag",https://github.com/sqlalchemy/sqlalchemy/issues/11620,has linked PR,44,"open PR references this issue; label says issue is suitable for a scoped external contribution; old update age or low-urgency/stale label; component labels: sql, sql server",review linked PR state before touching issue,"sql, SQL Server, fairly easy","sql, sql server",12297,,12297,issue-collapse:803f7894103300d7,issue-collapse:803f7894103300d7,1,2024-07-19T12:19:46Z,2025-08-22T21:16:10Z,318,"Discussed in #11613 Add a boolean flag in the mssql dialect, the default will be set to `warn` meaning that a warning will be raised when `_enable_identity_insert` is detected set to true. User can opt into the current behaviour or disable it" | |
| 11597,sqltypes.Enum not generic enough,https://github.com/sqlalchemy/sqlalchemy/issues/11597,stale/low urgency,2,"old update age or low-urgency/stale label; component labels: datatypes, typing",scan when time allows,"bug, datatypes, typing","datatypes, typing",,,,issue-collapse:b690d4054ae510c4,issue-collapse:b690d4054ae510c4,0,2024-07-11T17:04:55Z,2024-07-11T17:04:55Z,726,### Discussed in https://github.com/sqlalchemy/sqlalchemy/discussions/11548 The generic type for `Enum` needs to be a typevar for pyright: ```py from __future__ import annotations import enum from sqlalchemy import Enum from sqlalchemy import func from sqlalchemy.orm import column_property from sqlalchemy.orm import... | |
| 11536,"support module-qualified paths inside of Mapped[], including with/without future mode / pep563 etc",https://github.com/sqlalchemy/sqlalchemy/issues/11536,stale/low urgency,2,old update age or low-urgency/stale label; component labels: orm,scan when time allows,"orm, use case, orm - annotated declarative",orm,,,,issue-collapse:61c454c49a53cd0a,issue-collapse:61c454c49a53cd0a,0,2024-06-26T12:33:06Z,2024-07-03T02:55:38Z,734,"### Describe the bug When using PEP563 postponed annotations (i.e. `from __future__ import annotations`), mapped classes with the same name in different modules cannot be used in relationships using type annotations alone. For example, if `mod1` and `mod2` both contain mapped classes called `Model`, then `attr: Mapp..." | |
| 11385,Add additional information to the `ReflectedColumn`,https://github.com/sqlalchemy/sqlalchemy/issues/11385,stale/low urgency,2,old update age or low-urgency/stale label; component labels: reflection,scan when time allows,"reflection, use case",reflection,,,,issue-collapse:149f56479891c459,issue-collapse:149f56479891c459,0,2024-05-14T12:36:15Z,2024-05-14T12:36:32Z,784,"The reflected column dict https://docs.sqlalchemy.org/en/20/core/reflection.html#sqlalchemy.engine.interfaces.ReflectedColumn includes only the already reflected type instance from the dialect. This means that for unknown sql types, the sqlalchemy nulltype is provided, losing any information about what was reflected..." | |
| 11312,reflecting oracle synonym of synonym over dblink,https://github.com/sqlalchemy/sqlalchemy/issues/11312,good volunteer slice,20,"label says issue is suitable for a scoped external contribution; old update age or low-urgency/stale label; component labels: oracle, reflection",scan when time allows,"oracle, reflection, PRs (with tests!) welcome","oracle, reflection",,,,issue-collapse:7fb90e49c9d4ad06,issue-collapse:7fb90e49c9d4ad06,0,2024-04-23T19:41:16Z,2024-05-08T15:03:57Z,790,"### Describe the bug I get a table not found error when trying to reflect a synonym of a synonym on a dblink. I try reflecting the table as such ``` self._engine = sql.create_engine(uri, echo='debug') sql.Table(table_name, self._metadata, schema=self._schema, autoload_with=self._engine, oracle_resolve_synonyms=True)..." | |
| 11284,Missing batch_op.f(),https://github.com/sqlalchemy/sqlalchemy/issues/11284,stale/low urgency,2,"old update age or low-urgency/stale label; component labels: documentation, schema, tests",scan when time allows,"bug, documentation, tests, schema","documentation, schema, tests",,,,issue-collapse:e55f86809746c7f8,issue-collapse:e55f86809746c7f8,0,2024-04-17T17:05:03Z,2025-08-03T20:03:58Z,337,"### Discussed in https://github.com/sqlalchemy/alembic/discussions/1458 the [conv](https://docs.sqlalchemy.org/en/20/core/constraints.html#sqlalchemy.schema.conv) construct applies truncation rules to identifiers, and users are using it this way. We can't change that, so document it and ensure unit tests are present..." | |
| 11136,Delete Propagation to Parent Table for Joined Table Inheritance,https://github.com/sqlalchemy/sqlalchemy/issues/11136,waiting on contributor,0,submitter information or reproducer is still needed; old update age or low-urgency/stale label,wait for contributor unless maintainer can reproduce independently,"awaiting info, use case",,,,,issue-collapse:6dc6d3c9472fea84,issue-collapse:6dc6d3c9472fea84,0,2024-03-11T15:46:34Z,2024-03-11T16:21:56Z,848,"### Describe the use case When a polymorphic table is created via joined table inheritance, I would expect that deleting a row in the subclass table would also delete the row in the parent table. I've found that when the subclass row is explicitly deleted, the delete propgates to the parent table as I would expect...." | |
| 11132,"MySQL DOUBLE accepts deprecated params that dont propagate from the base DOUBLE type, document this caveat",https://github.com/sqlalchemy/sqlalchemy/issues/11132,has linked PR,44,"open PR references this issue; label says issue is suitable for a scoped external contribution; old update age or low-urgency/stale label; component labels: datatypes, documentation, mysql",review linked PR state before touching issue,"documentation, mysql, datatypes, PRs (with tests!) welcome","datatypes, documentation, mysql",13368,,,issue-collapse:710c6c53334dc200,issue-collapse:710c6c53334dc200,0,2024-03-10T16:55:41Z,2024-04-12T07:40:07Z,816,"### Describe the bug Hi im trying to get startet with sql alchemy and alembic and just found a bug. during the translation of a double precision=17, and decimal_return_scale=7 into mysql i always get an exception. `sqlalchemy.exc.ArgumentError: You must specify both precision and scale or omit both altogether.` When..." | |
| 11122,"Postregresql create table add ""with"" argument",https://github.com/sqlalchemy/sqlalchemy/issues/11122,has linked PR,44,open PR references this issue; label says issue is suitable for a scoped external contribution; old update age or low-urgency/stale label; component labels: postgresql,review linked PR state before touching issue,"postgresql, PRs (with tests!) welcome, use case",postgresql,11296,,,issue-collapse:e7ed2a2a1b4e3872,issue-collapse:e7ed2a2a1b4e3872,0,2024-03-08T12:52:36Z,2024-03-08T12:56:46Z,851,"### Describe the use case In postgresql documentation (https://www.postgresql.org/docs/current/sql-createtable.html) create table have the ""with"" option that is not supported by sqlalchemy currently. The change is simple: https://github.com/sqlalchemy/sqlalchemy/commit/45b70d4e7c0ac31005f8a93253fe477dfc27afb4 ### Da..." | |
| 11062,Could not de-stringify annotation,https://github.com/sqlalchemy/sqlalchemy/issues/11062,stale/low urgency,2,"old update age or low-urgency/stale label; component labels: documentation, orm",scan when time allows,"documentation, orm, orm - annotated declarative","documentation, orm",,,,issue-collapse:e55f86809746c7f8,issue-collapse:e55f86809746c7f8,0,2024-02-27T05:53:05Z,2024-07-03T13:30:19Z,734,"### Describe the bug Hey, the following code raises an `NameError: Could not de-stringify annotation 'long str'`. But as soon as I changed `Annotated[str, ""long str""]` to `Annotated[str, ""long_str""]` it works. Any idea about what's going on here? fin swimmer ### Optional link from https://docs.sqlalchemy.org which d..." | |
| 10960,"""implicit combining column"" warning not emitting for two columns from two different aliases against same parent table",https://github.com/sqlalchemy/sqlalchemy/issues/10960,stale/low urgency,2,old update age or low-urgency/stale label; component labels: orm,scan when time allows,"bug, orm",orm,,,,issue-collapse:61c454c49a53cd0a,issue-collapse:61c454c49a53cd0a,0,2024-02-03T19:45:24Z,2024-02-04T05:48:30Z,884,"### Describe the bug ## Description The following code yields a strange result. I'm expecting `bar_1`, `bar_2`, and `bar_3` to be mapped as `CompositeBar(value_1=""a"", value_2=""b"")`, `CompositeBar(value_1=""c"", value_2=""d"")`, and `CompositeBar(value_1=""e"", value_2=""f"")` respectively, but actually it ended up with ever..." | |
| 10936,post_update double UPDATE on delete of object with bi-directional,https://github.com/sqlalchemy/sqlalchemy/issues/10936,stale/low urgency,2,old update age or low-urgency/stale label,scan when time allows,"bug, quagmire, unit of work, post-update",,,1063,,issue-collapse:8d4f8101ad61e9cf,issue-collapse:8d4f8101ad61e9cf,1,2024-01-29T14:17:47Z,2024-02-05T21:07:46Z,882,"### Discussed in https://github.com/sqlalchemy/sqlalchemy/discussions/10934 looks like this was never tested. might not have an immediate solution ```py def test_no_double_update_on_delete_bidirectional_post_update(self): person, ball, Ball, Person = ( self.tables.person, self.tables.ball, self.classes.Ball, self.cl..." | |
| 10888,OrderingList typing incorrect / incomplete and implementation doesn't accept non-int indices,https://github.com/sqlalchemy/sqlalchemy/issues/10888,good volunteer slice,20,label says issue is suitable for a scoped external contribution; old update age or low-urgency/stale label; component labels: typing,scan when time allows,"sqlalchemy.ext, PRs (with tests!) welcome, typing",typing,,6810,,issue-collapse:542ae1425c0c9560,issue-collapse:542ae1425c0c9560,1,2024-01-15T18:08:09Z,2024-01-23T19:35:24Z,896,"### Describe the bug There are a number of issues with the sqlalchemy.ext.orderinglist:OrderingList type hints and implementation: 1. The ordering function is documented as being allowed to return any type of object, and the tests demonstrate this by returning strings. The type annotation requires it to return integ..." | |
| 10859,"move lazy=""select"" to lazy=""mapper_default""; add mapper ""default_lazy""",https://github.com/sqlalchemy/sqlalchemy/issues/10859,stale/low urgency,2,old update age or low-urgency/stale label; component labels: orm,scan when time allows,"feature, orm",orm,,4641,,issue-collapse:abb31efb5c51b9fe,issue-collapse:abb31efb5c51b9fe,1,2024-01-10T14:32:08Z,2025-06-19T15:21:19Z,383,"this can come in alongside #4641 this would make a change to `relationship` such that it does not set up `strategy_key` until mapper config stage, where it gets a look at its parent mapper. should be mentioned in docs particularly here: https://github.com/sqlalchemy/sqlalchemy/blob/d9ed5cb521d5e7a2b62646b43eaebc1ccf..." | |
| 10835,sqlalchemy.util.OrderedSet does not work with v2 in ORM mappings,https://github.com/sqlalchemy/sqlalchemy/issues/10835,stale/low urgency,2,old update age or low-urgency/stale label,scan when time allows,"bug, cextensions, orm - annotated declarative",,,,,issue-collapse:280698ff2c895afa,issue-collapse:280698ff2c895afa,0,2024-01-06T17:31:09Z,2024-01-07T00:16:14Z,912,### Discussed in https://github.com/sqlalchemy/sqlalchemy/discussions/10833 This apparently was possible in 1.4 but not in 2.0 when cython extensions are built: ```py # sqlalchemy 2.0.25 from sqlalchemy import ForeignKey from sqlalchemy import inspect from sqlalchemy.orm import DeclarativeBase from sqlalchemy.orm im... | |
| 10780,name with flat for aliased(),https://github.com/sqlalchemy/sqlalchemy/issues/10780,stale/low urgency,2,old update age or low-urgency/stale label; component labels: sql,scan when time allows,"sql, use case",sql,,,,issue-collapse:3b982883f8781c22,issue-collapse:3b982883f8781c22,0,2023-12-19T18:26:30Z,2023-12-19T21:18:10Z,930,"### Describe the use case aliased() currently prohibits a name in conjunction with `flat=True`. Presumably this is because it would require some arbitrary naming convention. In reality, `flat=True` already has an arbitrary naming convention (suffix with numbers) which is useful for the query compiler, but not so muc..." | |
| 10748,schemes that attempt to reload modules are blocked by the inspection registry,https://github.com/sqlalchemy/sqlalchemy/issues/10748,has linked PR,62,open PR references this issue; label says issue is suitable for a scoped external contribution; component labels: orm,review linked PR state before touching issue,"bug, orm, PRs (with tests!) welcome, external library/application issues",orm,13402,,,issue-collapse:63d3b30a6535e10e,issue-collapse:63d3b30a6535e10e,0,2023-12-10T16:36:27Z,2026-06-29T09:40:42Z,8,"### Describe the bug There's a nasty interaction between the following: * some import-time caching in SQLAlchemy (in [`sqlalchemy.inspection._registrars`](https://github.com/sqlalchemy/sqlalchemy/blob/66be1482db06adb908432b2e3b41d9393d1319f7/lib/sqlalchemy/inspection.py#L53)), * the way Coverage.py handles editable..." | |
| 10742,Bad PrimaryKeyConstraint metadata for MSSQL temporary table,https://github.com/sqlalchemy/sqlalchemy/issues/10742,stale/low urgency,2,"old update age or low-urgency/stale label; component labels: reflection, sql server",scan when time allows,"bug, SQL Server, reflection","reflection, sql server",,,,issue-collapse:149f56479891c459,issue-collapse:149f56479891c459,0,2023-12-07T12:54:47Z,2023-12-07T22:03:48Z,942,"### Describe the bug If I create a temporary table (name starting with a `#`) using MSSQL, then inspect the table metadata, it has a constraint `{PrimaryKeyConstraint()}`. However, none of the columns are detected as primary keys and the primary key constraint has no name. The names of the primary key constraints ar..." | |
| 10680,"upgrade default driver for psycopg, oracledb",https://github.com/sqlalchemy/sqlalchemy/issues/10680,stale/low urgency,2,old update age or low-urgency/stale label; component labels: dialects,scan when time allows,"use case, dialects",dialects,,,,issue-collapse:2e2e29b28f7dbaf5,issue-collapse:2e2e29b28f7dbaf5,0,2023-11-23T07:19:12Z,2025-08-14T15:46:36Z,327,The current default drivers selection for some database is outdated or not really useful anymore. An idea for 2.1 is to start raising a deprecation warning when a default drivers is selected. Optionally the default behaviour is something that can be kept were it makes sense. In particular oracle and sqlite seem the... | |
| 10676,Add reasonable min version for the internal dialects packages / databases,https://github.com/sqlalchemy/sqlalchemy/issues/10676,needs maintainer decision,28,open issue has no stronger automated bucket,"decide whether this is bug, use case, docs, or support",setup,,,,,issue-collapse:670e3edf9a284937,issue-collapse:670e3edf9a284937,0,2023-11-22T20:31:17Z,2026-03-23T14:39:19Z,106,Will compile a table with min version. Let's target at least 2 years for dialect packages and something sensible for the databases Databases |db | best_effort | normal |full| notes | |---|-------------|--------|----|-------| |mssql|2005 -> 2008| - | -|remove warning on _setup_version_attributes| |mysql|5.0.2->5.1|-|... | |
| 10675,syntax error with mysql bulk update via INSERT ... SELECT ... ON DUPLICATE KEY UPDATE,https://github.com/sqlalchemy/sqlalchemy/issues/10675,good volunteer slice,38,"label says issue is suitable for a scoped external contribution; component labels: dml, mysql",scan when time allows,"bug, mysql, PRs (with tests!) welcome, dml","dml, mysql",,8626,,issue-collapse:50fe9fa3163782c0,issue-collapse:50fe9fa3163782c0,1,2023-11-22T19:55:10Z,2026-07-03T13:09:06Z,4,"### Discussed in https://github.com/sqlalchemy/sqlalchemy/discussions/10514 <div type='discussions-op-text'> <sup>Originally posted by **anentropic** October 20, 2023</sup> I am trying to bulk update via an insert on duplicate, but using `from_select` (instead of list of values as seen here https://github.com/sqlalc..." | |
| 10617,Improve how `Select.refresh` works with relationships,https://github.com/sqlalchemy/sqlalchemy/issues/10617,stale/low urgency,2,old update age or low-urgency/stale label; component labels: orm,scan when time allows,"orm, use case",orm,,,,issue-collapse:61c454c49a53cd0a,issue-collapse:61c454c49a53cd0a,0,2023-11-11T15:58:08Z,2025-06-25T13:11:43Z,377,"Since version 1.4 that added support for relationship refresh, the implementation is sub-optimal, since it will always perform a query to the model table, followed by a query to the related table. ```py from __future__ import annotations from sqlalchemy import create_engine from sqlalchemy import ForeignKey from sql..." | |
| 10544,pysqlcipher open fail with err: TypeError: function takes at most 3 arguments (4 given) in dbapi_connection.create_function,https://github.com/sqlalchemy/sqlalchemy/issues/10544,stale/low urgency,2,old update age or low-urgency/stale label; component labels: sqlite,scan when time allows,"bug, sqlite",sqlite,,,10545,issue-collapse:bc8022801416393d,issue-collapse:bc8022801416393d,1,2023-10-26T09:13:48Z,2023-10-30T14:45:46Z,981,### Describe the bug using windows and pysqlcipher in python 3.11 get error to create engine with very basic usage ### Optional link from https://docs.sqlalchemy.org which documents the behavior that is expected _No response_ ### SQLAlchemy Version in Use 2.0.22 ### DBAPI (i.e. the database driver) pysqlcipher ### D... | |
| 10541,Improve scalars performance by trying to avoid the creation of a Row,https://github.com/sqlalchemy/sqlalchemy/issues/10541,needs maintainer decision,28,open issue has no stronger automated bucket; component labels: performance,"decide whether this is bug, use case, docs, or support","performance, result fetching API improvements",performance,,,,issue-collapse:ac9d8e3e101368f3,issue-collapse:ac9d8e3e101368f3,0,2023-10-25T16:11:33Z,2026-03-23T14:39:18Z,106,"The current code when executing something like `conn.execute(...).scalars().all()` will create a Row object, at least in some cases, that is then discarded. The code should try to avoid doing the unnecessary row creation" | |
| 10531,Issue with relationship typing when using Declarative-Imparative Mapping,https://github.com/sqlalchemy/sqlalchemy/issues/10531,waiting on contributor,0,submitter information or reproducer is still needed; old update age or low-urgency/stale label; component labels: documentation,wait for contributor unless maintainer can reproduce independently,"bug, documentation, awaiting info, orm - annotated declarative",documentation,,,,issue-collapse:4b08a2d20c2bcc0f,issue-collapse:4b08a2d20c2bcc0f,0,2023-10-24T10:42:32Z,2023-10-24T12:00:42Z,987,"### Describe the bug Hi :wave: First of all thank you for the huge amount of work done on SQLAlchemy, I really enjoy using this library :rocket: I'm trying to implement a many-to-many relationship (like explained [here](https://docs.sqlalchemy.org/en/20/orm/basic_relationships.html#setting-bi-directional-many-to-man..." | |
| 10527,Wrong typing for `with_for_update()`'s `of` argument.,https://github.com/sqlalchemy/sqlalchemy/issues/10527,good volunteer slice,38,label says issue is suitable for a scoped external contribution; component labels: typing,scan when time allows,"bug, PRs (with tests!) welcome, typing",typing,,6810,,issue-collapse:542ae1425c0c9560,issue-collapse:542ae1425c0c9560,1,2023-10-23T11:21:33Z,2026-07-03T07:14:16Z,4,### Ensure stubs packages are not installed - [X] No sqlalchemy stub packages is installed (both `sqlalchemy-stubs` and `sqlalchemy2-stubs` are not compatible with v2) ### Verify if the api is typed - [X] The api is not in a module listed in [#6810](https://github.com/sqlalchemy/sqlalchemy/issues/6810) so it should... | |
| 10446,Support synonym with bulk_insert_mappings and insert,https://github.com/sqlalchemy/sqlalchemy/issues/10446,stale/low urgency,2,"old update age or low-urgency/stale label; component labels: dml, orm",scan when time allows,"orm, use case, dml","dml, orm",,,,issue-collapse:f226fb654293c011,issue-collapse:f226fb654293c011,0,2023-10-09T18:55:55Z,2024-02-19T03:57:42Z,869,"### Discussed in https://github.com/sqlalchemy/sqlalchemy/discussions/10439 <div type='discussions-op-text'> <sup>Originally posted by **flyly0755** October 9, 2023</sup> There is such a situation, data of different sources need to insert to one table, but the data column is a little different, for example: Data fro..." | |
| 10435,"sql server metadata.reflect() fails if your SQL Server connection uses ""tempdb"" as the primary connection's database",https://github.com/sqlalchemy/sqlalchemy/issues/10435,stale/low urgency,2,"old update age or low-urgency/stale label; component labels: reflection, sql server",scan when time allows,"SQL Server, reflection","reflection, sql server",,,,issue-collapse:149f56479891c459,issue-collapse:149f56479891c459,0,2023-10-06T09:09:40Z,2023-10-06T20:29:28Z,1004,### Describe the bug When trying to fetch all the tables from a MSSQL database (clean database via Docker https://hub.docker.com/_/microsoft-mssql-server) with the MetaData().reflect(bind=engine) it raises a NoSuchTableError on a temporary table (starting with a #) that indeed does not exist. This worked on SQLAlche... | |
| 10417,mypy: coerced legacy syntax with subquery can not be typed,https://github.com/sqlalchemy/sqlalchemy/issues/10417,stale/low urgency,2,old update age or low-urgency/stale label; component labels: typing,scan when time allows,"wontfix / out of scope, expected behavior, typing",typing,,,,issue-collapse:179a663236786745,issue-collapse:179a663236786745,0,2023-10-04T16:16:45Z,2023-10-06T20:30:38Z,1004,"### Describe the bug I found a typing oddity with 2.0 that is not in the guide. Legacy code utilizing a `Session().query().subquery()` will run fine (and emit warnings that is it making a coercion) - but does not pass mypy becauce of the coercion. I'm not sure if this is a typing bug or not, as the legacy format is..." | |
| 10380,Declaring Composite Column Types as Optional leads to NULL data type for constituent columns in table definition,https://github.com/sqlalchemy/sqlalchemy/issues/10380,stale/low urgency,2,old update age or low-urgency/stale label; component labels: orm,scan when time allows,"bug, orm, orm - annotated declarative",orm,,,,issue-collapse:61c454c49a53cd0a,issue-collapse:61c454c49a53cd0a,0,2023-09-21T18:25:56Z,2025-02-15T18:57:19Z,507,### Describe the bug I was going through the tutorial for adding composite column types where sets of columns can be associated with a single user-defined datatype (FYR https://docs.sqlalchemy.org/en/20/orm/composites.html#composite-column-types). I tweaked the example a bit to make the composite column types option... | |
| 10351,allow Nullable to be used with column_property(),https://github.com/sqlalchemy/sqlalchemy/issues/10351,stale/low urgency,2,"old update age or low-urgency/stale label; component labels: orm, typing",scan when time allows,"orm, use case, typing","orm, typing",,"6120, 6810",,issue-collapse:542ae1425c0c9560,issue-collapse:542ae1425c0c9560,2,2023-09-15T12:49:45Z,2024-04-28T06:55:47Z,800,### Ensure stubs packages are not installed - [X] No sqlalchemy stub packages is installed (both `sqlalchemy-stubs` and `sqlalchemy2-stubs` are not compatible with v2) ### Verify if the api is typed - [X] The api is not in a module listed in [#6810](https://github.com/sqlalchemy/sqlalchemy/issues/6810) so it should... | |
| 10341,add official API to have naming conventions work for alternate constraint types,https://github.com/sqlalchemy/sqlalchemy/issues/10341,good volunteer slice,20,label says issue is suitable for a scoped external contribution; old update age or low-urgency/stale label; component labels: schema,scan when time allows,"schema, naming conventions, PRs (with tests!) welcome",schema,,,,issue-collapse:cafd00d7c2b2730c,issue-collapse:cafd00d7c2b2730c,0,2023-09-12T14:07:48Z,2025-11-04T20:48:56Z,244,Using them is poorly tested and the use case seems quite limited. | |
| 10335,Support `Final[Mapped[...]]` in the ORM,https://github.com/sqlalchemy/sqlalchemy/issues/10335,good volunteer slice,20,label says issue is suitable for a scoped external contribution; old update age or low-urgency/stale label; component labels: orm,scan when time allows,"orm, PRs (with tests!) welcome, orm - annotated declarative",orm,,,,issue-collapse:1f9551b78d3888a8,issue-collapse:1f9551b78d3888a8,0,2023-09-10T17:22:55Z,2024-10-15T00:52:30Z,630,"In some cases generics are consired invariant since the mapped descriptors are not declared as final. While this use case for this is likely very small, it should not be too hard to support the following form: ```py from sqlalchemy import ForeignKey from sqlalchemy.orm import DeclarativeBase, Mapped, mapped_column,..." | |
| 10326,Allow InstrumentedAttribute in corresponding_column,https://github.com/sqlalchemy/sqlalchemy/issues/10326,stale/low urgency,2,old update age or low-urgency/stale label; component labels: sql,scan when time allows,"sql, use case",sql,,,,issue-collapse:3b982883f8781c22,issue-collapse:3b982883f8781c22,0,2023-09-08T22:18:34Z,2023-09-08T22:18:49Z,1032,"### Discussed in https://github.com/sqlalchemy/sqlalchemy/discussions/10325 <div type='discussions-op-text'> <sup>Originally posted by **CaselIT** September 8, 2023</sup> Currently InstrumentedAttribute is not a KeyedColumnElement so trying to use `corresponding_column` and similar raises a typing error This does no..." | |
| 10310,Select Values in Mysql,https://github.com/sqlalchemy/sqlalchemy/issues/10310,good volunteer slice,20,"label says issue is suitable for a scoped external contribution; old update age or low-urgency/stale label; component labels: mysql, sql",scan when time allows,"mysql, sql, PRs (with tests!) welcome, use case","mysql, sql",,,,issue-collapse:9a2824867b1de657,issue-collapse:9a2824867b1de657,0,2023-09-04T12:00:08Z,2023-09-04T12:00:52Z,1037,"### Discussed in https://github.com/sqlalchemy/sqlalchemy/discussions/10309 <div type='discussions-op-text'> <sup>Originally posted by **RasulGafarov** September 4, 2023</sup> The following code: ``` my_select = select( Values( sqlalchemy.column(""column_1"", String), sqlalchemy.column(""column_1"", String), name=""temp_..." | |
| 10116,re-entrant handle_error call if an exception is raised in result.all() within a DML process,https://github.com/sqlalchemy/sqlalchemy/issues/10116,stale/low urgency,2,"old update age or low-urgency/stale label; component labels: documentation, engine",scan when time allows,"bug, documentation, engine","documentation, engine",,,,issue-collapse:e55f86809746c7f8,issue-collapse:e55f86809746c7f8,0,2023-07-18T13:43:12Z,2023-08-01T12:08:04Z,1071,"this is from https://review.opendev.org/c/openstack/oslo.db/+/888580 so far, the reproducer so far is this docker container: ``` FROM ubuntu:22.04 SHELL [""/bin/bash"", ""-c""] RUN apt-get update && apt-get install -y python3 tox git WORKDIR /root RUN git clone --depth 1 https://opendev.org/openstack/barbican WORKDIR /r..." | |
| 10094,document asyncio gotchas so far,https://github.com/sqlalchemy/sqlalchemy/issues/10094,stale/low urgency,2,"old update age or low-urgency/stale label; component labels: asyncio, documentation",scan when time allows,"documentation, asyncio","asyncio, documentation",,"5811, 9410",,issue-collapse:3edab8ed60233c59,issue-collapse:3edab8ed60233c59,2,2023-07-11T19:15:04Z,2025-04-10T22:26:27Z,452,- gether is messy to use with multiple sessions not created inside the task. Ref https://github.com/sqlalchemy/sqlalchemy/discussions/9312#discussioncomment-6419638 | |
| 10064,"MappedAsDataclass, prohibit constructor use and/or creation for non-mapped classes, abstract, mixins",https://github.com/sqlalchemy/sqlalchemy/issues/10064,stale/low urgency,2,old update age or low-urgency/stale label,scan when time allows,"bug, dataclasses, orm - annotated declarative",,,,,issue-collapse:280698ff2c895afa,issue-collapse:280698ff2c895afa,0,2023-07-05T12:05:36Z,2023-07-20T14:29:42Z,1083,"see #10027. MappedAsDataclass basically cannot support the dataclass ""init"" feature on a class that isn't mapped, and likely can't support *any* dataclass features on such a class as instantiated. Propose instantiation of mixins / abstract emit a warning if they are also ""dataclass"" produced under 2.0, error in 2.1." | |
| 9944,Reflect don't recognize foreign tables in postgresql,https://github.com/sqlalchemy/sqlalchemy/issues/9944,stale/low urgency,2,"old update age or low-urgency/stale label; component labels: postgresql, reflection, schema",scan when time allows,"postgresql, schema, reflection, use case","postgresql, reflection, schema",,,,issue-collapse:2b24b3a4b515b378,issue-collapse:2b24b3a4b515b378,0,2023-06-13T21:06:09Z,2024-11-21T21:10:21Z,592,"### Describe the use case Currently, when I call the MetaData().reflect() function, the foreign tables are not reflected. It would be interesting to have an argument in the function to be able to search for foreign tables as well. This way facilitates DML operations on foreign tables. ### Databases / Backends / Driv..." | |
| 9930,need docs /warnings that `__init__` is not called on load,https://github.com/sqlalchemy/sqlalchemy/issues/9930,high-priority/blocker,52,"high-priority/blocker/regression label present; old update age or low-urgency/stale label; component labels: documentation, orm",review early; this can change release or regression risk,"documentation, high priority, orm","documentation, orm",,,,issue-collapse:3edab8ed60233c59,issue-collapse:3edab8ed60233c59,0,2023-06-10T14:40:13Z,2023-07-20T14:29:14Z,1083,### Discussed in https://github.com/sqlalchemy/sqlalchemy/discussions/9928 since we retired https://docs.sqlalchemy.org/en/20/orm/constructors.html#mapping-constructors this information has been lost. also update links to that page such as https://docs.sqlalchemy.org/en/20/orm/events.html#sqlalchemy.orm.InstanceEven... | |
| 9839,document network-related caveats for insertmanyvalues,https://github.com/sqlalchemy/sqlalchemy/issues/9839,stale/low urgency,2,"old update age or low-urgency/stale label; component labels: documentation, performance, sql server",scan when time allows,"documentation, SQL Server, performance, insertmanyvalues","documentation, performance, sql server",,"9586, 9603, 9618",,issue-collapse:333919c0a89010c3,issue-collapse:333919c0a89010c3,7,2023-05-25T14:49:56Z,2023-06-01T12:24:52Z,1132,### Describe the bug We upgraded our sql alchemy version and observed a massive spike in execution time on the database. We are bulk uploading several 100k rows. We are using sql server on azure and pyodbc. We believe it relates to changes made in https://github.com/sqlalchemy/sqlalchemy/issues/9603 or https://githu... | |
| 9833,Ignore classvar attributes defined in declarative classes,https://github.com/sqlalchemy/sqlalchemy/issues/9833,stale/low urgency,2,old update age or low-urgency/stale label; component labels: orm,scan when time allows,"orm, use case, orm - annotated declarative",orm,,,,issue-collapse:61c454c49a53cd0a,issue-collapse:61c454c49a53cd0a,0,2023-05-24T19:49:58Z,2023-07-20T14:30:36Z,1083,"Something that certainly **should** work, but does not, is to declare the type as a ``ClassVar[]``, since we scan these also in declarative: ```py class AlertItem2(Base): __tablename__ = ""alert_items2"" id = Column(BigInteger, primary_key=True, autoincrement=True) signature = Column(String) data_source_model_id = Col..." | |
| 9693,Text type columns using schema qualified collations compile a quoted DDL statement on Postgres,https://github.com/sqlalchemy/sqlalchemy/issues/9693,has linked PR,44,"open PR references this issue; label says issue is suitable for a scoped external contribution; old update age or low-urgency/stale label; component labels: datatypes, postgresql, schema",review linked PR state before touching issue,"postgresql, schema, datatypes, PRs (with tests!) welcome, use case","datatypes, postgresql, schema","12697, 13418",,,issue-collapse:c957bcabf1904e15,issue-collapse:c957bcabf1904e15,0,2023-04-22T22:44:28Z,2025-12-09T13:59:44Z,210,"### Describe the bug If you use a `Text` type that includes a fully schema qualified collation (ie. `Text(collation=""my_schema.my_collation"")`), the DDL statement created when running `metadata.create_all()` is incorrect for Postgres. The statement created presently is: `TEXT COLLATE ""my_schema.my_collation""` Which..." | |
| 9690,reroute group_by coercion to expand fromclause using ORM-enabled plugin points,https://github.com/sqlalchemy/sqlalchemy/issues/9690,stale/low urgency,2,"old update age or low-urgency/stale label; component labels: orm, sql",scan when time allows,"orm, sql, use case","orm, sql",,8285,,issue-collapse:0fdb0440dac30dee,issue-collapse:0fdb0440dac30dee,1,2023-04-21T22:31:33Z,2023-04-22T13:48:36Z,1172,### Describe the bug What I want to do is to associate an ORM entity _USER_ with columns of FromClause produced by subquery() as described in tutorial. But when I use associated \<AliasedClass\> instance in group_by() of new _stmt_ it 'unpacks' all columns that are selected in a subquery instead of unpacking just Us... | |
| 9587,Use python type in Mapped to boolean expression catching thinks like `Mapped[int] == 'a string'`,https://github.com/sqlalchemy/sqlalchemy/issues/9587,stale/low urgency,2,old update age or low-urgency/stale label; component labels: typing,scan when time allows,"use case, typing",typing,,6810,,issue-collapse:542ae1425c0c9560,issue-collapse:542ae1425c0c9560,1,2023-04-02T07:44:56Z,2023-04-02T15:50:04Z,1192,### Ensure stubs packages are not installed - [X] No sqlalchemy stub packages is installed (both `sqlalchemy-stubs` and `sqlalchemy2-stubs` are not compatible with v2) ### Verify if the api is typed - [X] The api is not in a module listed in [#6810](https://github.com/sqlalchemy/sqlalchemy/issues/6810) so it should... | |
| 9548,"relationship loader options do a ""recursive"" thing inconsistently",https://github.com/sqlalchemy/sqlalchemy/issues/9548,high-priority/blocker,52,"high-priority/blocker/regression label present; old update age or low-urgency/stale label; component labels: loader options, orm",review early; this can change release or regression risk,"bug, high priority, orm, loader options","loader options, orm",,,,issue-collapse:93ac0789bad58d3b,issue-collapse:93ac0789bad58d3b,0,2023-03-26T16:12:34Z,2023-03-30T16:41:15Z,1195,### Discussed in https://github.com/sqlalchemy/sqlalchemy/discussions/9528 the wildcard option '*' acts recursively in some sitiuations (with no way to not be recursive) and non-recursively in others: ```py from sqlalchemy import Column from sqlalchemy import create_engine from sqlalchemy import ForeignKey from sqla... | |
| 9493,"MappedAsDataclass inherits dataclasses attributes, while the spec says they don't",https://github.com/sqlalchemy/sqlalchemy/issues/9493,good volunteer slice,20,label says issue is suitable for a scoped external contribution; old update age or low-urgency/stale label; component labels: orm,scan when time allows,"bug, orm, PRs (with tests!) welcome, dataclasses, orm - annotated declarative",orm,,"9350, 9410",,issue-collapse:3edab8ed60233c59,issue-collapse:3edab8ed60233c59,2,2023-03-15T19:12:03Z,2024-11-27T15:41:00Z,587,"We also seem to make inherit dataclasses attributes, while we probably should not. Not sure if it's connected to this other issue #9350 ```py from dataclasses import dataclass import sqlalchemy as sa import sqlalchemy.orm as sao import inspect class Base(sao.MappedAsDataclass, sao.DeclarativeBase, kw_only=True): pas..." | |
| 9468,Implementation for get_unique_constraints for MS SQL Server,https://github.com/sqlalchemy/sqlalchemy/issues/9468,needs maintainer decision,28,"open issue has no stronger automated bucket; component labels: reflection, sql server","decide whether this is bug, use case, docs, or support","SQL Server, reflection, use case","reflection, sql server",,,,issue-collapse:5551fd0942f3ff53,issue-collapse:5551fd0942f3ff53,0,2023-03-10T20:42:00Z,2026-02-23T14:17:21Z,134,### Describe the use case It would be useful to have the method [Inspector.get_unique_constraints](https://github.com/sqlalchemy/sqlalchemy/blob/rel_2_0_5/lib/sqlalchemy/engine/interfaces.py#L1562) implemented for SQL Server. My immediate use case is that alembic [uses this method](https://github.com/sqlalchemy/alem... | |
| 9425,tighten up compoundselect + textualselect use cases,https://github.com/sqlalchemy/sqlalchemy/issues/9425,stale/low urgency,2,old update age or low-urgency/stale label; component labels: sql,scan when time allows,"bug, sql",sql,,,,issue-collapse:3b982883f8781c22,issue-collapse:3b982883f8781c22,0,2023-03-04T20:26:32Z,2023-03-05T17:11:17Z,1220,"The following is not allowed ```py t = sa.Table( ""x"", sa.MetaData(), sa.Column(""a"", sa.Integer), sa.Column(""b"", sa.Integer) ) sql = """""" SELECT 1 as x, 2 as y UNION ALL SELECT 3, 4 """""" q = sa.select(t).union_all(sa.text(sql)) ``` but it seems to render correctly if the coerce is removed for debug" | |
| 9410,document dataclass gotchas so far,https://github.com/sqlalchemy/sqlalchemy/issues/9410,good volunteer slice,20,label says issue is suitable for a scoped external contribution; old update age or low-urgency/stale label; component labels: documentation,scan when time allows,"documentation, PRs (with tests!) welcome, dataclasses",documentation,,"9350, 9563, 9785, 9927, 9930, 12168",,issue-collapse:3edab8ed60233c59,issue-collapse:3edab8ed60233c59,10,2023-03-02T20:39:58Z,2025-06-20T17:58:07Z,382,"1. relationship = None issue : #9383 , #9856 - issue created: https://github.com/sqlalchemy/sqlalchemy/issues/12168 2. declared_attr on a mixin w/ dataclasses: #9408 3. order matters regarding the default value and init generated. this all comes from dataclasses, but it may be worth reiterate that 4. mention that al..." | |
| 9370,Create a way to run all the examples in the pipeline,https://github.com/sqlalchemy/sqlalchemy/issues/9370,stale/low urgency,2,old update age or low-urgency/stale label; component labels: tests,scan when time allows,"bug, tests",tests,,,,issue-collapse:1f1acca0882aecdb,issue-collapse:1f1acca0882aecdb,0,2023-02-24T20:29:09Z,2023-02-24T20:30:24Z,1228,"There are some examples that are not compatible with 2.0, like nested sets https://github.com/sqlalchemy/sqlalchemy/blob/8b108297d075ae68178cd18a9cb4d06feee7e075/examples/nested_sets/nested_sets.py#L56-L73 Creating a way of running the tests as part of the pipeline work help avoiding having old examples laying around" | |
| 9369,allow_unmapped seems to not be honored in all cases,https://github.com/sqlalchemy/sqlalchemy/issues/9369,stale/low urgency,2,old update age or low-urgency/stale label; component labels: orm,scan when time allows,"bug, orm, orm - annotated declarative",orm,,,,issue-collapse:80185a4d43909a75,issue-collapse:80185a4d43909a75,0,2023-02-24T16:55:53Z,2023-04-10T14:00:51Z,1184,"### Discussed in https://github.com/sqlalchemy/sqlalchemy/discussions/9368 ```py from typing import List from sqlalchemy import Column, ForeignKey from sqlalchemy.orm import relationship from sqlalchemy.types import Integer from sqlalchemy.orm import declarative_base # qualify the base with __allow_unmapped__. Can a..." | |
| 9348,modify expunge() operation in uow to cascade along delete-orphan in addition to expunge,https://github.com/sqlalchemy/sqlalchemy/issues/9348,stale/low urgency,2,old update age or low-urgency/stale label; component labels: orm,scan when time allows,"bug, orm, unit of work",orm,,,,issue-collapse:61c454c49a53cd0a,issue-collapse:61c454c49a53cd0a,0,2023-02-22T20:31:07Z,2025-08-14T15:11:55Z,327,"### Describe the bug In SQLAlchemy, when adding new objects to relationship with default cascades and then deleting them, they are kept inside session and then inserted on flush. But when having delete-orphan cascade, the desired behavior is to remove relative object from session as it is removed from relationship c..." | |
| 9301,Support mapped attributes that have deferred definitions,https://github.com/sqlalchemy/sqlalchemy/issues/9301,stale/low urgency,2,"old update age or low-urgency/stale label; component labels: documentation, orm, typing",scan when time allows,"documentation, orm, use case, typing","documentation, orm, typing",,6120,,issue-collapse:542ae1425c0c9560,issue-collapse:542ae1425c0c9560,2,2023-02-13T22:01:56Z,2023-02-14T07:01:36Z,1239,"### Describe the use case In multiple cases it may be required to assign to a mapped class an attribute after the class definition, to for example break circular imports or similar, that is usually done by assigning the attribute to the class `ModelCls.attribute_lazy = ...` This is currently a bit awkward to impleme..." | |
| 9233,Expression index does not list all the columns,https://github.com/sqlalchemy/sqlalchemy/issues/9233,stale/low urgency,2,old update age or low-urgency/stale label; component labels: schema,scan when time allows,"bug, schema",schema,,,,issue-collapse:cfb6b9b21f10b075,issue-collapse:cfb6b9b21f10b075,0,2023-02-03T22:16:19Z,2023-02-08T20:11:30Z,1244,"### Describe the bug Only the first column in an expression is considered ### To Reproduce ```python import sqlalchemy as sa def go(idx): sa.Table( ""x"", sa.MetaData(), sa.Column(""x"", sa.Integer), sa.Column(""y"", sa.Integer), idx, ) print([str(c) for c in idx.columns]) go(sa.Index(""x"", sa.func.div(sa.column(""x""), sa.c..." | |
| 9213,document `@classmethod` add for all `@declared_attr` to work w/ typing,https://github.com/sqlalchemy/sqlalchemy/issues/9213,stale/low urgency,2,"old update age or low-urgency/stale label; component labels: documentation, typing",scan when time allows,"documentation, typing","documentation, typing",,,,issue-collapse:ffb0b91982e2572d,issue-collapse:ffb0b91982e2572d,0,2023-02-01T18:02:22Z,2023-02-01T18:54:07Z,1252,"### Describe the typing issue Next issue, it seems I get an error when using a `Mapped` class attribute in `Index`. ### To Reproduce Stripped down version of what I'm running: ```python @sa.orm.declarative_mixin class _Rhyme: __tablename__: str ph1: Mapped[int] ph2: Mapped[Optional[int]] @sa.orm.declared_attr def __..." | |
| 9212,"add additional type migration section to whatsnew detailing declared_attr format changes, others",https://github.com/sqlalchemy/sqlalchemy/issues/9212,good volunteer slice,20,"label says issue is suitable for a scoped external contribution; old update age or low-urgency/stale label; component labels: documentation, orm, typing",scan when time allows,"documentation, orm, PRs (with tests!) welcome, typing","documentation, orm, typing",,9213,,issue-collapse:ffb0b91982e2572d,issue-collapse:ffb0b91982e2572d,2,2023-02-01T17:51:08Z,2023-02-02T19:07:38Z,1251,"### Describe the typing issue I'm going through a small project with strict type checking, so will probably end up opening a few nitpick issues. It still seems difficult to me at the moment, to figure out what types should be used for certain annotations. Maybe a new page in the docs could be added to list these typ..." | |
| 9197,Support for mapping frozen dataclasses,https://github.com/sqlalchemy/sqlalchemy/issues/9197,stale/low urgency,2,old update age or low-urgency/stale label; component labels: orm,scan when time allows,"orm, use case, dataclasses",orm,,,,issue-collapse:61c454c49a53cd0a,issue-collapse:61c454c49a53cd0a,0,2023-01-31T11:05:50Z,2025-09-24T20:34:30Z,285,"### Discussed in https://github.com/sqlalchemy/sqlalchemy/discussions/9192 Using frozen dataclasses may be useful in some cases, but implementing it will be non trivial. See mike [reply in the discussion](https://github.com/sqlalchemy/sqlalchemy/discussions/9192#discussioncomment-4820606)" | |
| 9154,11 test failures with PyPy3.9 7.3.11 in 2.0.0 (and git main),https://github.com/sqlalchemy/sqlalchemy/issues/9154,needs maintainer decision,28,open issue has no stronger automated bucket; component labels: tests,"decide whether this is bug, use case, docs, or support","tests, pypy",tests,,8762,,issue-collapse:3b0bbeb9a9416c2c,issue-collapse:3b0bbeb9a9416c2c,1,2023-01-27T08:57:32Z,2026-05-08T15:22:08Z,60,"### Describe the bug When running the test suite (as of 6779fa861d11668f67d780d77e4ae76965cee6f7) under PyPy3.9 7.3.11, I get the following test failures: ``` FAILED test/ext/test_associationproxy.py::DictOfTupleUpdateTest::test_update_multi_elem_varg - AssertionError: 'update expected at most 1 arguments?, got 2' !..." | |
| 9147,declarative builds permanent strong ref to classes that use declare_first or declare_last,https://github.com/sqlalchemy/sqlalchemy/issues/9147,stale/low urgency,2,"old update age or low-urgency/stale label; component labels: declarative, orm",scan when time allows,"bug, orm, declarative","declarative, orm",,9832,,issue-collapse:cdadd8c1a79d0254,issue-collapse:cdadd8c1a79d0254,2,2023-01-25T20:43:11Z,2025-08-31T20:46:20Z,309,"the event hook here: https://github.com/sqlalchemy/sqlalchemy/blob/689ebc30dcd6b9cedf01d729f748b31826720b5c/lib/sqlalchemy/orm/decl_base.py#L567-L582 that's making a global event against Mapper. Declarative should make at most just *one* event hook against Mapper, then use its own collections to locate classes for w..." | |
| 9082,eager_defaults shouldn't be needed for pk returning even if cols are not actual pks,https://github.com/sqlalchemy/sqlalchemy/issues/9082,stale/low urgency,2,old update age or low-urgency/stale label; component labels: orm,scan when time allows,"bug, orm, eager_defaults",orm,,8889,,issue-collapse:4ff4d199fdc0c116,issue-collapse:4ff4d199fdc0c116,1,2023-01-10T23:29:43Z,2024-12-17T20:48:46Z,566,### Discussed in https://github.com/sqlalchemy/sqlalchemy/discussions/9080 simple case can be reproduced on sqlite w/ new returning support ```py from sqlalchemy import Column from sqlalchemy import create_engine from sqlalchemy import DateTime from sqlalchemy import func from sqlalchemy import String from sqlalchem... | |
| 9078,[2.0] Classes which are generics should document their type parameters,https://github.com/sqlalchemy/sqlalchemy/issues/9078,good volunteer slice,20,"label says issue is suitable for a scoped external contribution; old update age or low-urgency/stale label; component labels: documentation, typing",scan when time allows,"task, documentation, PRs (with tests!) welcome, typing","documentation, typing",,,,issue-collapse:919e78f633b3da06,issue-collapse:919e78f633b3da06,0,2023-01-10T17:54:37Z,2023-01-27T13:39:52Z,1257,### Describe the use case I'm working on a test branch for sqlalchemy 2.0 in a codebase which uses `mypy --strict`. This means that custom subclasses of generic types must provide type parameters (`--disallow-any-generics`). But it isn't clear what the type parameters are or mean in the 2.0 documentation branch. ###... | |
| 8992,tuple expanding params do not render bind_expression() for elements,https://github.com/sqlalchemy/sqlalchemy/issues/8992,has linked PR,94,open PR references this issue; high-priority/blocker/regression label present; component labels: sql,review early; this can change release or regression risk,"bug, high priority, sql",sql,13323,8989,,issue-collapse:20b17ea0e67b3653,issue-collapse:20b17ea0e67b3653,1,2022-12-15T14:53:06Z,2026-05-12T13:10:18Z,56,"discovered during #8989, this is simply not implemented at all and the bind expression is ignored when it's an element of a tuple. Also, the impl of a TupleType() is not getting the internal types propagated along, which is part of what would be needed for this to work ```py from sqlalchemy import Column from sqlalc..." | |
| 8936,Make the new PG Range aware of the its bounds data type,https://github.com/sqlalchemy/sqlalchemy/issues/8936,stale/low urgency,2,"old update age or low-urgency/stale label; component labels: datatypes, postgresql",scan when time allows,"postgresql, datatypes, use case","datatypes, postgresql",,,,issue-collapse:b690d4054ae510c4,issue-collapse:b690d4054ae510c4,0,2022-12-06T08:42:29Z,2023-01-27T13:38:35Z,1257,"### Describe the use case The SA Range does not have an exact notion of its ""type"", i.e. there is no way to determine the data type of an empty or infinite range. ### Databases / Backends / Drivers targeted The `Range` class is specific to PostgreSQL, but is driver-agnostic. ### Example Use For example, my app shows..." | |
| 8909,using @declared_attr does not recognize method as a classmethod unless one writes @classmethod explicitly (hence the workaround),https://github.com/sqlalchemy/sqlalchemy/issues/8909,stale/low urgency,2,old update age or low-urgency/stale label; component labels: typing,scan when time allows,"help wanted, quagmire, typing",typing,,,,issue-collapse:179a663236786745,issue-collapse:179a663236786745,0,2022-12-01T01:06:15Z,2022-12-01T14:26:42Z,1314,### Describe the bug Further typing refinement is required for `sqlalchemy.orm.has_inherited_table` as PyCharm currently complains when it's used both directly inside the `DeclarativeBase` class and in Mixin classes (as the [2.0 docs suggest](https://docs.sqlalchemy.org/en/20/orm/declarative_mixins.html#using-orm-de... | |
| 8894,"Improve documentation to make classes use the ""public"" module",https://github.com/sqlalchemy/sqlalchemy/issues/8894,stale/low urgency,2,old update age or low-urgency/stale label; component labels: documentation,scan when time allows,documentation,documentation,,,,issue-collapse:e55f86809746c7f8,issue-collapse:e55f86809746c7f8,0,2022-11-29T11:31:24Z,2023-01-27T13:38:34Z,1257,"Discussed in #8893 Currently it seems that sphinx uses a different path than the one of the definition, but it's still not the most common one for some classes. For example `Column` is documented as `sqlalchemy.schema.Column`, while the most common one is `sqlalchemy.Column`. In all cases the internal `sqlalchemy.sq..." | |
| 8805,Some tests for dialect ignores lack of support of CHECK CONSTRAINT,https://github.com/sqlalchemy/sqlalchemy/issues/8805,stale/low urgency,2,old update age or low-urgency/stale label; component labels: tests,scan when time allows,"bug, tests",tests,,,,issue-collapse:1f1acca0882aecdb,issue-collapse:1f1acca0882aecdb,0,2022-11-15T07:29:45Z,2022-11-17T08:52:39Z,1328,"### Describe the bug Faced during the development of a new Dialect https://github.com/caretdev/sqlalchemy-iris/ for instance `sqlalchemy/testing/suite/test_reflection.py` - `QuotedNameArgumentTest` Uses CheckConstraint unconditionally ### To Reproduce ```python @property def check_constraint_reflection(self): """"""tar..." | |
| 8795,support sqlite .autocommit parameter (Python 3.12),https://github.com/sqlalchemy/sqlalchemy/issues/8795,stale/low urgency,2,old update age or low-urgency/stale label; component labels: sqlite,scan when time allows,"task, sqlite, python3.12",sqlite,,,,issue-collapse:0d25313ef6ec934a,issue-collapse:0d25313ef6ec934a,0,2022-11-12T14:07:51Z,2022-11-12T14:07:51Z,1333,see https://github.com/python/cpython/pull/93823. change will be something equivalent towards: ```diff diff --git a/lib/sqlalchemy/dialects/sqlite/pysqlite.py b/lib/sqlalchemy/dialects/sqlite/pysqlite.py index 19949441fb..fe0627a1ab 100644 --- a/lib/sqlalchemy/dialects/sqlite/pysqlite.py +++ b/lib/sqlalchemy/dialect... | |
| 8693,sp_reset_connection not called on reused connections in pool. (MSSQL),https://github.com/sqlalchemy/sqlalchemy/issues/8693,stale/low urgency,2,"old update age or low-urgency/stale label; component labels: connection pool, documentation, sql server",scan when time allows,"help wanted, documentation, connection pool, SQL Server, use case","connection pool, documentation, sql server",,,,issue-collapse:59106bdcf9e49cb2,issue-collapse:59106bdcf9e49cb2,0,2022-10-21T05:12:44Z,2022-12-04T16:04:04Z,1311,"### Describe the bug [Per documentation](https://learn.microsoft.com/en-us/sql/connect/odbc/linux-mac/using-integrated-authentication?view=sql-server-ver16#tracking-access-to-a-database): ""Before [connection] reuse, an application must reset pooled connections by executing sp_reset_connection."" It is not called in s..." | |
| 8680,Better organize pep 484 types in the packages,https://github.com/sqlalchemy/sqlalchemy/issues/8680,stale/low urgency,2,"old update age or low-urgency/stale label; component labels: public api, typing",scan when time allows,"public api, typing","public api, typing",,,,issue-collapse:5a0208e5ff5fcb1f,issue-collapse:5a0208e5ff5fcb1f,0,2022-10-19T19:49:54Z,2023-03-08T16:04:16Z,1217,"Since people will probably want to use some of the type alias defined by sqlalchemy we should probably better organize them and decide what are public and what are not Currently some are defined in `_typing` files, others in `interfaces` other in the module that uses it." | |
| 8457,Support MySQL Multi-Valued Indexes,https://github.com/sqlalchemy/sqlalchemy/issues/8457,good volunteer slice,20,"label says issue is suitable for a scoped external contribution; old update age or low-urgency/stale label; component labels: mysql, reflection, schema",scan when time allows,"schema, mysql, reflection, PRs (with tests!) welcome","mysql, reflection, schema",,,,issue-collapse:9a2824867b1de657,issue-collapse:9a2824867b1de657,0,2022-08-29T16:59:13Z,2022-09-13T19:30:54Z,1393,"mysql 8.0.17 added this feature detailed at https://programmer.ink/think/mysql8.0.17-introduction-to-multi-valued-indexes.html and https://dev.mysql.com/doc/refman/8.0/en/create-index.html#create-index-multi-valued The support here is mainly for reflection, since it should already be possible to create them using a..." | |
| 8431,implement include_join=False for selectin_polymorphic,https://github.com/sqlalchemy/sqlalchemy/issues/8431,stale/low urgency,2,"old update age or low-urgency/stale label; component labels: loader options, orm, performance",scan when time allows,"bug, orm, loader options, performance","loader options, orm, performance",,4340,,issue-collapse:ca8d76ffecbf8718,issue-collapse:ca8d76ffecbf8718,1,2022-08-24T19:51:24Z,2022-08-24T19:51:24Z,1412,"in #4340 21fbb5e38f04affb8ac4502428672b3a629c we implemented ""omit_join"" behavior for the selectinload loader strategy. We currently don't have this feature available for selectin_polymorphic. propose ""omit_join"" behavior should be implemented for this loader as well. I'd like if it were automatic although there is..." | |
| 8352,Named window functions,https://github.com/sqlalchemy/sqlalchemy/issues/8352,good volunteer slice,20,label says issue is suitable for a scoped external contribution; old update age or low-urgency/stale label; component labels: sql,scan when time allows,"sql, PRs (with tests!) welcome, use case",sql,,,,issue-collapse:07694d785cbaf743,issue-collapse:07694d785cbaf743,0,2022-08-04T19:57:06Z,2022-09-13T19:32:16Z,1393,"### Discussed in https://github.com/sqlalchemy/sqlalchemy/discussions/8350 support ""window"" as stated at https://www.postgresql.org/docs/current/sql-select.html#SQL-WINDOW supported dbs: - postgresql (forever, before 9) https://www.postgresql.org/docs/current/sql-select.html#SQL-WINDOW - oracle (21 not sure if also..." | |
| 8341,support MySQL 8.0.13's new magical syntax for function server defaults,https://github.com/sqlalchemy/sqlalchemy/issues/8341,good volunteer slice,38,"label says issue is suitable for a scoped external contribution; component labels: mysql, schema",scan when time allows,"schema, mysql, fairly easy, PRs (with tests!) welcome","mysql, schema",,,,issue-collapse:9a2824867b1de657,issue-collapse:9a2824867b1de657,0,2022-08-03T13:30:58Z,2026-07-03T07:14:15Z,4,"This would have to be in the compiler for MySQL and may or may not need to be switched on version, perhaps ""is_mariadb"" being false. in column DDL, when we render a DEFAULT expression: * if the expression is a clause_element, and the expression is NOT CURRENT_TIMESTAMP, then we render parenthesis around the DDL port..." | |
| 8326,support TextualSelect with ORM mappings,https://github.com/sqlalchemy/sqlalchemy/issues/8326,good volunteer slice,20,label says issue is suitable for a scoped external contribution; old update age or low-urgency/stale label; component labels: orm,scan when time allows,"orm, PRs (with tests!) welcome, use case",orm,,,,issue-collapse:1f9551b78d3888a8,issue-collapse:1f9551b78d3888a8,0,2022-08-02T05:21:41Z,2024-01-30T12:58:15Z,889,"### Describe the bug Declarative class based on a TextualSelect object throws an error in the following script. I am aware that there are better ways to achieve what this script seems to achieve; this is a contrived example. Note that error is only thrown at the call to `print(q)`; if this is omitted, the script com..." | |
| 8321,Unify INSERT ... ON CONFLICT / UPSERT / MERGE functionality in single implementation,https://github.com/sqlalchemy/sqlalchemy/issues/8321,stale/low urgency,2,"old update age or low-urgency/stale label; component labels: dialects, sql",scan when time allows,"sql, use case, upserts, dialects","dialects, sql",,,,issue-collapse:2e2e29b28f7dbaf5,issue-collapse:2e2e29b28f7dbaf5,0,2022-08-01T13:41:59Z,2025-09-08T22:30:21Z,301,The current support for insert on conflict requires the use of an `insert()` function from the specific dialect package. This is inconvenient since it's make it hard to port the code from one dialect to another. Since the functionality is similar we could have a single implementation and dialect that do not support... | |
| 8311,add with_hint() method to the exists() construct,https://github.com/sqlalchemy/sqlalchemy/issues/8311,good volunteer slice,20,label says issue is suitable for a scoped external contribution; old update age or low-urgency/stale label; component labels: orm,scan when time allows,"orm, PRs (with tests!) welcome, use case",orm,,,,issue-collapse:74ae355a7c50b557,issue-collapse:74ae355a7c50b557,0,2022-07-30T17:12:57Z,2023-01-24T20:18:04Z,1259,"### Discussed in https://github.com/sqlalchemy/sqlalchemy/discussions/8305 so that hints can be added to exists(), any(), has(), etc." | |
| 8070,add Session method .expire_on_criteria(),https://github.com/sqlalchemy/sqlalchemy/issues/8070,stale/low urgency,2,old update age or low-urgency/stale label; component labels: orm,scan when time allows,"orm, use case, upserts",orm,,,,issue-collapse:74ae355a7c50b557,issue-collapse:74ae355a7c50b557,0,2022-05-29T15:31:59Z,2025-08-14T15:12:05Z,327,"since I've decided we are going all in on [upsert statements](https://docs.sqlalchemy.org/en/14/orm/persistence_techniques.html#using-insert-update-and-on-conflict-i-e-upsert-to-return-orm-objects), to suit MySQL and other databases that don't support RETURNING, and just to add more flexibility to this approach, the..." | |
| 7732,"add new execution option ""log_note"", implement for ORM queries",https://github.com/sqlalchemy/sqlalchemy/issues/7732,good volunteer slice,20,label says issue is suitable for a scoped external contribution; old update age or low-urgency/stale label; component labels: orm,scan when time allows,"feature, orm, fairly easy",orm,,,,issue-collapse:f6eb9fca0ae38eb1,issue-collapse:f6eb9fca0ae38eb1,0,2022-02-18T13:49:22Z,2025-06-19T15:21:18Z,383,"there are two parts to this: 1. at Core, a new execution option log_note is added , allowing arbitrary text to be emitted next to the caching badge: conn.execute(stmt, execution_options={""log_note"": ""foobar""}) showing logging like: ``` 2022-02-18 08:45:04,380 INFO sqlalchemy.engine.Engine [generated in 0.00028s] [fo..." | |
| 7718,create oracle_dblink table option,https://github.com/sqlalchemy/sqlalchemy/issues/7718,stale/low urgency,2,"old update age or low-urgency/stale label; component labels: oracle, reflection, schema, sql",scan when time allows,"feature, schema, sql, oracle, reflection, use case","oracle, reflection, schema, sql",,4379,,issue-collapse:2e4d4f90e8316c97,issue-collapse:2e4d4f90e8316c97,1,2022-02-15T14:04:08Z,2022-06-07T19:10:43Z,1491,### Discussed in https://github.com/sqlalchemy/sqlalchemy/discussions/7717 this is very trivial and I think we will be able to make use of it for #4379 in any case: ```py from sqlalchemy import Column from sqlalchemy import DateTime from sqlalchemy import MetaData from sqlalchemy import String from sqlalchemy import... | |
| 7604,add execution option for asyncpg_timeout,https://github.com/sqlalchemy/sqlalchemy/issues/7604,good volunteer slice,20,"label says issue is suitable for a scoped external contribution; old update age or low-urgency/stale label; component labels: asyncio, postgresql",scan when time allows,"postgresql, PRs (with tests!) welcome, use case, asyncio","asyncio, postgresql",,,,issue-collapse:52ca4806dda5c6f4,issue-collapse:52ca4806dda5c6f4,0,2022-01-23T18:19:12Z,2025-01-15T14:10:39Z,538,"### Describe the use case In our company we use PostgreSQL, one of the tables that is quite big with over 1.5B records. We have few queries constructed with SQLAlchemy Core which we use on it and with help of indexes they're usually quite fast (100's of milliseconds at most). Lately we have discovered and issue with..." | |
| 7517,Better document `expanding=True` on a bind parameter,https://github.com/sqlalchemy/sqlalchemy/issues/7517,stale/low urgency,2,"old update age or low-urgency/stale label; component labels: documentation, sql",scan when time allows,"bug, documentation, sql, statement caching","documentation, sql",,,,issue-collapse:e55f86809746c7f8,issue-collapse:e55f86809746c7f8,0,2021-12-30T14:38:14Z,2023-01-27T16:45:42Z,1257,"From empirical testing, the new caching added in 1.4 does not seem to make use of the `expanding` argument on bind parameter. This should be verified and the documentation updated and/or the parameter marked as legacy in the docs (I don't think we would need to deprecate it now, at least for the moment) Example test..." | |
| 7475,Support for postgresql aggregate options,https://github.com/sqlalchemy/sqlalchemy/issues/7475,stale/low urgency,2,"old update age or low-urgency/stale label; component labels: postgresql, sql",scan when time allows,"postgresql, sql, use case","postgresql, sql",,8574,,issue-collapse:e60a866083039066,issue-collapse:e60a866083039066,1,2021-12-18T16:57:59Z,2022-10-10T17:45:45Z,1366,"### Describe the use case Postgresql supports many options for aggregate functions, like distinct, filter, etc. Documentation at https://www.postgresql.org/docs/current/sql-expressions.html#SYNTAX-AGGREGATES There is currently support for - distinct using [distinct](https://docs.sqlalchemy.org/en/14/core/sqlelement...." | |
| 7426,targeting of highly self-referential id column within a subquery w contains_eager,https://github.com/sqlalchemy/sqlalchemy/issues/7426,stale/low urgency,2,"old update age or low-urgency/stale label; component labels: loader options, orm",scan when time allows,"bug, orm, loader options, hard orm","loader options, orm",,,,issue-collapse:d575fd58d4aa1a77,issue-collapse:d575fd58d4aa1a77,0,2021-12-09T17:09:00Z,2023-01-24T20:18:03Z,1259,```py from sqlalchemy import alias from sqlalchemy import Column from sqlalchemy import create_engine from sqlalchemy import ForeignKey from sqlalchemy import Integer from sqlalchemy import select from sqlalchemy import String from sqlalchemy.orm import aliased from sqlalchemy.orm import backref from sqlalchemy.orm... | |
| 7366,"extend_existing will add copies of indexes, constraints, etc. as there is no deduplication on name",https://github.com/sqlalchemy/sqlalchemy/issues/7366,needs maintainer decision,28,open issue has no stronger automated bucket; component labels: reflection,"decide whether this is bug, use case, docs, or support","bug, reflection, quagmire",reflection,,"3861, 8925",,issue-collapse:ed50509854cfb994,issue-collapse:ed50509854cfb994,2,2021-11-25T00:51:18Z,2026-03-12T14:05:33Z,117,### Describe the bug I'm getting duplicated index objects in the `MetaData` when using `DeferredReflection`. I think a similar issue might've been fixed in https://github.com/sqlalchemy/sqlalchemy/issues/3861. Similar problem has been reported in https://stackoverflow.com/questions/55271904/sqlalchemy-with-multiple-... | |
| 7360,"replace use of the term ""primary key identifier"" with ""identity key"" for ORM documentation / methods that refer to the identity map",https://github.com/sqlalchemy/sqlalchemy/issues/7360,stale/low urgency,2,"old update age or low-urgency/stale label; component labels: documentation, orm",scan when time allows,"bug, documentation, orm","documentation, orm",,,,issue-collapse:e55f86809746c7f8,issue-collapse:e55f86809746c7f8,0,2021-11-23T22:47:30Z,2024-06-23T18:18:41Z,744,"### Discussed in https://github.com/sqlalchemy/sqlalchemy/discussions/7357 add a glossary entry for it as well as see if there's a good place to introduce it in the ORM docs, like where identity map is discussed (should be cross-linked with identity map). ""identity key"" should replace ""primary key identifier"" in any..." | |
| 7309,"sqlalchemy.orm.relationship: ""overlaps"" errors and behavior are confusing",https://github.com/sqlalchemy/sqlalchemy/issues/7309,stale/low urgency,2,old update age or low-urgency/stale label; component labels: orm,scan when time allows,"orm, use case, code review in progress",orm,,,,issue-collapse:80185a4d43909a75,issue-collapse:80185a4d43909a75,0,2021-11-10T19:01:18Z,2023-01-27T13:38:31Z,1257,"### Describe the bug In the attached example, multiple classes have an overlapping `sa.orm.relationship` to the class `RevisionTrackedHistory`. As SQLAlchemy discovers the overlaps, the suggested fixes in the error message iteratively build up: * To silence this warning, add the parameter 'overlaps=""revision_tracked..." | |
| 7228,Incorrect code for sa.values on SQLite and MariaDB,https://github.com/sqlalchemy/sqlalchemy/issues/7228,stale/low urgency,2,"old update age or low-urgency/stale label; component labels: mariadb, sqlite",scan when time allows,"feature, sqlite, mariadb","mariadb, sqlite",,,,issue-collapse:a415992bd34f94b3,issue-collapse:a415992bd34f94b3,0,2021-10-23T16:04:54Z,2023-10-28T19:12:03Z,983,"### Describe the bug SQLAlchemy generates incorrect SQL for Values queries on SQLite and MariaDB. The code example is for SQLite. ### To Reproduce ```python import sqlalchemy as sa myvalues = sa.values(sa.column('x'), name='myvalues').data([(7,)]) stmt = sa.select(myvalues) engine = sa.create_engine(""sqlite+pysqlite..." | |
| 7223,unified approach for Emulated (was: Interval type should not subclass from `TypeDecorator`),https://github.com/sqlalchemy/sqlalchemy/issues/7223,stale/low urgency,2,"old update age or low-urgency/stale label; component labels: datatypes, sql",scan when time allows,"sql, datatypes","datatypes, sql",,7212,,issue-collapse:de210e2e65b72b3a,issue-collapse:de210e2e65b72b3a,1,2021-10-22T15:35:20Z,2025-06-17T13:42:21Z,385,"Interval is an emulated type, that also subclasses `TypeDecorator`: https://github.com/sqlalchemy/sqlalchemy/blob/7f8bf038b753d3f250e0e974102c16037d1aea5d/lib/sqlalchemy/sql/sqltypes.py#L2026 This is different from the other emulated types, like Boolean and Enum, so for v2 it should not subclass it any-more, _Origin..." | |
| 7149,Automap: prefer snake_case over lower() for relationship attribute names,https://github.com/sqlalchemy/sqlalchemy/issues/7149,good volunteer slice,20,label says issue is suitable for a scoped external contribution; old update age or low-urgency/stale label,scan when time allows,"feature, sqlalchemy.ext, fairly easy",,,,,issue-collapse:f3d4caa59d130850,issue-collapse:f3d4caa59d130850,0,2021-10-05T22:52:09Z,2022-10-10T17:45:43Z,1366,### Describe the use case Converting from PascalCase to snake_case when converting class names to database column names and vice versa seems to be common in ORM world and more appropriate than simple lowercase class name substitution. I'd like to suggest changing the standard implementation for the `name_for_scalar_... | |
| 7135,mysql/test_for_update is very slow on ci,https://github.com/sqlalchemy/sqlalchemy/issues/7135,stale/low urgency,2,old update age or low-urgency/stale label; component labels: tests,scan when time allows,"bug, tests",tests,,,,issue-collapse:1f1acca0882aecdb,issue-collapse:1f1acca0882aecdb,0,2021-10-02T14:23:03Z,2023-01-27T13:44:25Z,1257,due to many different backends. see if timings here can be reduced. | |
| 7113,"Rename/Replace ""with_hint()"" to ""with_table_criteria()""",https://github.com/sqlalchemy/sqlalchemy/issues/7113,stale/low urgency,2,old update age or low-urgency/stale label; component labels: sql,scan when time allows,"sql, use case",sql,,"4797, 6040",,issue-collapse:154f18de7e338a43,issue-collapse:154f18de7e338a43,3,2021-09-29T18:36:30Z,2025-06-19T15:14:25Z,383,"i mean also, ""with_hint()"" is badly named. ""with_table_criteria()"" is a better name _Originally posted by @zzzeek in https://github.com/sqlalchemy/sqlalchemy/issues/4797#issuecomment-930432024_ perhaps we can generalize with_hint() into with_table_criteria() and then introduce a hint() construct, like with_table_cri..." | |
| 7035,Use innodb in the test suite when using mysql/mariadb,https://github.com/sqlalchemy/sqlalchemy/issues/7035,stale/low urgency,2,old update age or low-urgency/stale label; component labels: tests,scan when time allows,tests,tests,,,7009,issue-collapse:4e5d02239a149c7c,issue-collapse:4e5d02239a149c7c,1,2021-09-16T15:25:57Z,2023-01-27T13:44:24Z,1257,"Sqlalchemy uses by default myisam, but the default for both db is InnoDB for a while. @grooverdan do you have some stats on the usages of the various storage engine? Is InnoDb the most used?" | |
| 6997,investigate very intricate correlation / any() / self referential case,https://github.com/sqlalchemy/sqlalchemy/issues/6997,stale/low urgency,2,old update age or low-urgency/stale label; component labels: orm,scan when time allows,"bug, orm, hard orm",orm,,6550,,issue-collapse:e67acfe1373001c0,issue-collapse:e67acfe1373001c0,1,2021-09-07T19:06:08Z,2023-01-25T01:53:24Z,1259,### Describe the bug We have a model with a self referential relationship whose primaryjoin condition compares the same column_property (which is a select from another table) on both sides of the relationship against another value. Since version 1.4.16 it isn't being correlated correctly in the subquery of the colum... | |
| 6874,Please work harder to figure out parameter types for sequences,https://github.com/sqlalchemy/sqlalchemy/issues/6874,stale/low urgency,2,"old update age or low-urgency/stale label; component labels: datatypes, sql",scan when time allows,"bug, sql, datatypes","datatypes, sql",,,,issue-collapse:b690d4054ae510c4,issue-collapse:b690d4054ae510c4,0,2021-08-10T14:44:40Z,2023-01-24T20:18:01Z,1259,"### Describe the use case BigQuery needs to know parameter types, even for `None`/`null`. When passing a sequence of values: ``` >>> sqlalchemy.bindparam(""foo"", value=(1, None), expanding=True) BindParameter('foo', (1, None), type_=Integer()) >>> sqlalchemy.bindparam(""foo"", value=(None, 1), expanding=True) BindParam..." | |
| 6860,smoother with_parent() failure modes,https://github.com/sqlalchemy/sqlalchemy/issues/6860,stale/low urgency,2,old update age or low-urgency/stale label; component labels: orm,scan when time allows,"bug, orm",orm,,,,issue-collapse:80185a4d43909a75,issue-collapse:80185a4d43909a75,0,2021-08-06T14:32:08Z,2023-01-24T20:18:00Z,1259,"### Describe the bug see #6859 where we had some confusion and with_parent() should do a better job reporting on failure modes, here are some: ### To Reproduce ```python from sqlalchemy import Column from sqlalchemy import create_engine from sqlalchemy import ForeignKey from sqlalchemy import Integer from sqlalchemy..." | |
| 6810,Complete SQLAlchemy inline pep484 typing,https://github.com/sqlalchemy/sqlalchemy/issues/6810,good volunteer slice,20,label says issue is suitable for a scoped external contribution; old update age or low-urgency/stale label; component labels: typing,scan when time allows,"help wanted, big job, time consuming / tedious, PRs (with tests!) welcome, Epic, typing, code review in progress",typing,,"7519, 7535, 7555, 7562, 7774","12384, 12707, 12759",issue-collapse:542ae1425c0c9560,issue-collapse:542ae1425c0c9560,8,2021-07-24T17:01:59Z,2025-10-08T18:01:27Z,272,"<sub>_Status as of 2023-02_<sub> Most of the library is typed, but some modules/packages that are still work in progress. # Modules / packages that still require work - `sqlalchemy.engine` - [ ] `cursor` - passes omitting non-typed functions - internal module - [ ] `default` - passes omitting non-typed functions - i..." | |
| 6700,Improve creation of custom select object,https://github.com/sqlalchemy/sqlalchemy/issues/6700,stale/low urgency,2,old update age or low-urgency/stale label; component labels: sql,scan when time allows,"sql, use case",sql,,,,issue-collapse:3b982883f8781c22,issue-collapse:3b982883f8781c22,0,2021-06-30T16:31:39Z,2023-01-27T13:45:38Z,1257,"### Discussed in https://github.com/sqlalchemy/sqlalchemy/discussions/6693 <div type='discussions-op-text'> <sup>Originally posted by **ShmuelTreiger** June 30, 2021</sup> Now that session.query isn't recommended, is there a way to create a custom Select object? Similar to this stackoverflow question: https://stacko..." | |
| 6612,Cannot build SQL expression NOT(x IS NULL) on Postgres,https://github.com/sqlalchemy/sqlalchemy/issues/6612,stale/low urgency,2,"old update age or low-urgency/stale label; component labels: postgresql, sql",scan when time allows,"postgresql, sql, use case","postgresql, sql",,"3566, 5256",,issue-collapse:0e749e7cf38c163e,issue-collapse:0e749e7cf38c163e,5,2021-06-10T11:33:07Z,2023-01-24T20:00:06Z,1259,"I am on Postgres 12 (via psycopg) on SQLAlchemy 1.4.15, but I don't think this is too relevant. I want to create the expression `NOT (x IS NULL)`, but I always get `x IS NOT NULL`. Example code (even without DB connection, so not Postgres-specific): ``` import sqlalchemy as sa t = sa.table(""tbl"", sa.column(""x"")) pri..." | |
| 6511,add support for reflection of collation in types,https://github.com/sqlalchemy/sqlalchemy/issues/6511,good volunteer slice,20,"label says issue is suitable for a scoped external contribution; old update age or low-urgency/stale label; component labels: datatypes, reflection",scan when time allows,"reflection, datatypes, fairly easy, PRs (with tests!) welcome, use case","datatypes, reflection",,,12510,issue-collapse:c957bcabf1904e15,issue-collapse:c957bcabf1904e15,1,2021-05-19T14:42:12Z,2025-10-10T20:26:16Z,269,Poster at #6507 requested PostgreSQL however this can be implemented for as many backends as is feasible. | |
| 6505,Always include where cluases in delete statements -- at least in test cleanup,https://github.com/sqlalchemy/sqlalchemy/issues/6505,stale/low urgency,2,old update age or low-urgency/stale label; component labels: tests,scan when time allows,"tests, use case",tests,,,,issue-collapse:1f1acca0882aecdb,issue-collapse:1f1acca0882aecdb,0,2021-05-18T18:52:43Z,2023-01-27T13:45:37Z,1257,"BigQuery doesn't allow a `DELETE` without a `WHERE`. Including _at least_ a `WHERE true` (or maybe `WHERE 1=1`) in all deletes seems harmless. For the BigQuery compliance tests, I overrode `visit_delete` in tests to provide a `where` clause when it was missing: https://github.com/googleapis/python-bigquery-sqlalchem..." | |
| 6489,support autocommit w/ explicit isolation levels,https://github.com/sqlalchemy/sqlalchemy/issues/6489,stale/low urgency,2,old update age or low-urgency/stale label; component labels: engine,scan when time allows,"engine, use case",engine,,3357,,issue-collapse:15153158044a399f,issue-collapse:15153158044a399f,1,2021-05-14T13:34:15Z,2026-01-08T05:17:12Z,180,"as discussed at #3357, an additional execution option `dbapi_autocommit=True` that sets autocommit independently of setting an explicit isolation level would be potentially useful, although there has been no demand for this. see the example at https://github.com/sqlalchemy/sqlalchemy/issues/3357#issuecomment-4419283..." | |
| 6468,test_limit_render_multiple_times needs order by and seems to be the only union type test.,https://github.com/sqlalchemy/sqlalchemy/issues/6468,stale/low urgency,2,old update age or low-urgency/stale label; component labels: tests,scan when time allows,"bug, tests",tests,,,,issue-collapse:1f1acca0882aecdb,issue-collapse:1f1acca0882aecdb,0,2021-05-11T13:25:45Z,2023-01-27T13:45:37Z,1257,"This line: https://github.com/sqlalchemy/sqlalchemy/blob/e064ca8bc9e9a79f766acda9d718a96929400674/lib/sqlalchemy/testing/suite/test_select.py#L228 is missing an `order_by`. The test assumes select ordering. I'm maintaining the Google BigQuery dialect and this test failed as written because the result was `[(4,)]` wi..." | |
| 6411,"add new attribute_declared event for decalrative, intercepts all declared attrs but particularly Column",https://github.com/sqlalchemy/sqlalchemy/issues/6411,stale/low urgency,2,old update age or low-urgency/stale label; component labels: declarative,scan when time allows,"declarative, use case",declarative,,,,issue-collapse:a30765ab929b9d7a,issue-collapse:a30765ab929b9d7a,0,2021-04-30T21:48:33Z,2022-10-10T17:49:35Z,1366,"When a declarative class attribute is assigned a `Column` with a `name` that differs from the class attribute name, but with its `key` left unspecified, I expect to find that `Column` in `MyClass.__table__.c` under the same key as it was given in the class itself (which the mapper then reassigns to an `InstrumentedA..." | |
| 6336,consider if update() / insert() can infer datatypes from values() when columns have no type,https://github.com/sqlalchemy/sqlalchemy/issues/6336,stale/low urgency,2,old update age or low-urgency/stale label; component labels: sql,scan when time allows,"sql, use case",sql,,,,issue-collapse:3b982883f8781c22,issue-collapse:3b982883f8781c22,0,2021-04-21T16:45:17Z,2023-01-25T01:53:24Z,1259,"**Describe the bug** <!-- A clear and concise description of what the bug is. --> Prior to SQLAlchemy 1.4, simple `table` and `column` objects could be used to render statements without providing types to `column`, but this now produces an error. ```python my_table = table('my_table', column('i')) def upgrade(): op...." | |
| 6332,"Documentation: use ORM declarative attributes in .values instead of kwargs in ""ORM-enabled UPDATE statements""?",https://github.com/sqlalchemy/sqlalchemy/issues/6332,stale/low urgency,2,"old update age or low-urgency/stale label; component labels: documentation, typing",scan when time allows,"documentation, SQLA mypy plugin, typing","documentation, typing",,,,issue-collapse:e55f86809746c7f8,issue-collapse:e55f86809746c7f8,0,2021-04-21T14:21:48Z,2025-08-01T21:21:28Z,339,**Describe your question** I noticed that in documentation for ORM-enabled UPDATE statement mention the keyword argument based `.values()`. Shouldn't these places be used to show the ORM style `.values`? Now it uses the same methodology as the core expression language. For example: ```py >>> session.execute( ... upd... | |
| 6274,Fix the error message when aliased() is invoked against a select() or union() and do legacy coercion,https://github.com/sqlalchemy/sqlalchemy/issues/6274,high-priority/blocker,52,high-priority/blocker/regression label present; old update age or low-urgency/stale label; component labels: orm,review early; this can change release or regression risk,"bug, orm, regression",orm,,,,issue-collapse:4d99e261e8c611ed,issue-collapse:4d99e261e8c611ed,0,2021-04-15T00:18:16Z,2023-04-10T14:01:36Z,1184,"**Describe the bug** Calling aliased(union(Query, Query)) gives the error 'CompoundSelect' object has no attribute 'mapper' **Expected behavior** I expect it to return something that represents the SQL AS construct. **To Reproduce** ```py class SQLAlchemyTest(TestCase): def test_sqlalchemy(self): engine = create_eng..." | |
| 6137,support for a m2m relationship that back populates to itself?,https://github.com/sqlalchemy/sqlalchemy/issues/6137,stale/low urgency,2,old update age or low-urgency/stale label; component labels: orm,scan when time allows,"question, orm, use case, super secondary relationships",orm,,,,issue-collapse:61c454c49a53cd0a,issue-collapse:61c454c49a53cd0a,0,2021-03-26T02:14:37Z,2024-02-06T13:25:50Z,882,"**Describe the bug** For an ORM mapper (name it `Node`), and an ORM relationship (`Node.neighbors`) that is - a many-to-many self-referential relationship `Node.neighbors -> Node`; - implemented using a secondary join table having `FOREIGN KEY`s to the table mapped by `Node`; - set up to back populate, such that for..." | |
| 6121,SQLAlchemy Runtime Inspection API doesn't support `AsyncEngine`,https://github.com/sqlalchemy/sqlalchemy/issues/6121,stale/low urgency,2,"old update age or low-urgency/stale label; component labels: asyncio, engine, reflection",scan when time allows,"engine, reflection, use case, asyncio","asyncio, engine, reflection",,,,issue-collapse:bab30b1dc0288058,issue-collapse:bab30b1dc0288058,0,2021-03-23T22:37:04Z,2022-10-10T17:45:42Z,1366,"The title pretty much describes this feature request. I would greatly appreciate if SQLAlchemy would support the Runtime Inspection API with a `AsyncEngine` much in the same way that it does with normal `Engine` objects. I know that the SQLAlchemy devs are very busy atm, so please don't feel any pressure to implemen..." | |
| 6120,Support lambdas in `column_property`,https://github.com/sqlalchemy/sqlalchemy/issues/6120,stale/low urgency,2,old update age or low-urgency/stale label; component labels: orm,scan when time allows,"orm, use case",orm,,"3050, 3150",,issue-collapse:542ae1425c0c9560,issue-collapse:542ae1425c0c9560,2,2021-03-23T22:20:15Z,2023-02-13T23:55:16Z,1239,"**Is your feature request related to a problem? Please describe.** It would be nice to be able to use lambdas to define `column_properties` inline with the model definition. **Describe the solution you'd like** Example: ```py class X(Base): __tablename__ = 'foo' id = sa.Column(sa.Integer, primary_key=True) cp = sa.o..." | |
| 6084,"version_id_col should accept string attr name like polymorphic_on does, make sure all mapper args that point to a column can work like this",https://github.com/sqlalchemy/sqlalchemy/issues/6084,good volunteer slice,20,label says issue is suitable for a scoped external contribution; old update age or low-urgency/stale label; component labels: orm,scan when time allows,"orm, fairly easy, use case",orm,,,,issue-collapse:f6eb9fca0ae38eb1,issue-collapse:f6eb9fca0ae38eb1,0,2021-03-18T02:46:57Z,2022-07-19T17:18:26Z,1449,**Describe the bug** The special version_id_col mapper arg doesn't work by assigning the property in `__mapper_args__` because it accesses the outer field object instead of the inner Column object when trying to look up the object on the ColumnMapping: https://github.com/sqlalchemy/sqlalchemy/blob/b646c1e65df05210b7... | |
| 6080,implement decent inspection API for registry -> mapped classes,https://github.com/sqlalchemy/sqlalchemy/issues/6080,stale/low urgency,2,old update age or low-urgency/stale label; component labels: orm,scan when time allows,"feature, orm",orm,,,,issue-collapse:61c454c49a53cd0a,issue-collapse:61c454c49a53cd0a,0,2021-03-17T14:32:29Z,2024-01-18T15:13:41Z,901,In 1.4 when I call `Base._decl_class_registry.values()` to get the list of classes associated with that Base I get `AttributeError: type object 'Base' has no attribute '_decl_class_registry'`. It worked in 1.3.X and I was wondering if there is an alternative way to get the list of classes in 1.4. Thanks for all the... | |
| 6040,allow clauseelements in hint text,https://github.com/sqlalchemy/sqlalchemy/issues/6040,stale/low urgency,2,old update age or low-urgency/stale label; component labels: sql,scan when time allows,"sql, use case, temporal table modifiers",sql,,,,issue-collapse:154f18de7e338a43,issue-collapse:154f18de7e338a43,0,2021-03-13T14:25:42Z,2022-07-19T17:18:26Z,1449,"hinttext is assumed to be a string, this should come in as coerce to text(), and also set up cache state appropraitely, so that I can do this: ```python from sqlalchemy import table, column, select, text, bindparam, Date from sqlalchemy.dialects import mssql t1 = table(""SomeTable"", column(""a""), column(""b"")) stmt = s..." | |
| 5999,"Type annotations are not preserved by `declared_attr`, `hybrid_property`, and potentially other decorators",https://github.com/sqlalchemy/sqlalchemy/issues/5999,waiting on contributor,0,"submitter information or reproducer is still needed; old update age or low-urgency/stale label; component labels: orm, typing",wait for contributor unless maintainer can reproduce independently,"help wanted, orm, awaiting info, use case, typing","orm, typing",,,,issue-collapse:ccb5c95b2ffe6297,issue-collapse:ccb5c95b2ffe6297,0,2021-03-03T22:01:11Z,2022-06-15T15:45:12Z,1483,"First of all, thanks a ton for SQLAlchemy -- it's been absolutely invaluable to my work. **Describe the bug** I'm using `declared_attr` and `hybrid_property` throughout one of my codebases. That codebase is automatically documented using Sphinx + `sphinx-apidoc`, which includes type annotations (via `thing.__annotat..." | |
| 5964,"implement ""sticky"" option for load_only / defer (persists after expiration?)",https://github.com/sqlalchemy/sqlalchemy/issues/5964,stale/low urgency,2,"old update age or low-urgency/stale label; component labels: loader options, orm",scan when time allows,"orm, loader options, use case","loader options, orm",,,,issue-collapse:d575fd58d4aa1a77,issue-collapse:d575fd58d4aa1a77,0,2021-02-21T14:59:25Z,2022-07-19T15:05:11Z,1449,"**Describe your question** Executing the code below, sqlalchemy will relaod all column after session commit, i hope that it only reload `avatar` and `corp_id`. ```python from app.base import db from app.models.wx_user import WxUser from sqlalchemy.orm import load_only u = WxUser.query.options(load_only(WxUser.corp_i..." | |
| 5846,Support reverse bitwise operations,https://github.com/sqlalchemy/sqlalchemy/issues/5846,good volunteer slice,20,label says issue is suitable for a scoped external contribution; old update age or low-urgency/stale label; component labels: sql,scan when time allows,"sql, fairly easy",sql,,,,issue-collapse:07694d785cbaf743,issue-collapse:07694d785cbaf743,0,2021-01-15T20:43:06Z,2023-01-24T14:26:52Z,1260,**Is your feature request related to a problem? Please describe.** I can use ``table.c.some_col & True`` but not ``True & table.c.some_col``. Same for ``|``. TypeError: unsupported operand type(s) for &: 'bool' and 'ColumnClause' TypeError: unsupported operand type(s) for |: 'bool' and 'ColumnClause' **Describe the... | |
| 5815,"Support transaction read only access mode API, implement for MySQL, PostgreSQL, Oracle, others",https://github.com/sqlalchemy/sqlalchemy/issues/5815,stale/low urgency,2,old update age or low-urgency/stale label; component labels: engine,scan when time allows,"engine, use case",engine,,,,issue-collapse:3e75d8c240a41579,issue-collapse:3e75d8c240a41579,0,2021-01-05T09:37:40Z,2025-01-28T09:17:21Z,525,"Hi, Our team wanted to start working on high availability for our MariaDB. To do that we planned to use Maxscale that configured to split reads to the replicas (slaves) and writes to the primary (master). Since we are using SQLalchemy all our queries are now executed in a read-write transaction, so we cannot benefit..." | |
| 5806,"favor module names over table names when looking at the class target of a relationship, or dot separated names ? unsure",https://github.com/sqlalchemy/sqlalchemy/issues/5806,stale/low urgency,2,old update age or low-urgency/stale label; component labels: declarative,scan when time allows,"bug, declarative, quagmire",declarative,,,,issue-collapse:a30765ab929b9d7a,issue-collapse:a30765ab929b9d7a,0,2020-12-30T01:04:57Z,2022-07-19T17:18:25Z,1449,**Describe the bug** When I use dot-separated names as relationship targets and the models are in different files it raises an error **Expected behavior** Doesn't raise an error and works the same way as when models are defined in the same file **To Reproduce** base.py ```py from sqlalchemy.ext.declarative.api impor... | |
| 5583,Improve SQLAlchemy consistency regarding database specific supported constructs,https://github.com/sqlalchemy/sqlalchemy/issues/5583,stale/low urgency,2,"old update age or low-urgency/stale label; component labels: documentation, sql",scan when time allows,"documentation, sql, big job, use case","documentation, sql",,5578,,issue-collapse:1568de84f755ca85,issue-collapse:1568de84f755ca85,1,2020-09-14T21:47:47Z,2022-07-19T17:18:24Z,1449,"From Mike: this is not a v2 thing, this is all a right now thing. 1. all backends should be raising an error when a user behavioral intent that cannot be fulfilled is received by a dialect, so first off, the for_update_clause() in compiler.py should be looking at all of these for_update flags and raising, that is, t..." | |
| 5564,"add limit() / offset() to CTE, as CTE.union() produces a CTE and not a CompoundSelect",https://github.com/sqlalchemy/sqlalchemy/issues/5564,good volunteer slice,20,label says issue is suitable for a scoped external contribution; old update age or low-urgency/stale label; component labels: sql,scan when time allows,"sql, fairly easy, use case",sql,,,,issue-collapse:07694d785cbaf743,issue-collapse:07694d785cbaf743,0,2020-09-07T20:25:02Z,2023-03-10T15:45:03Z,1215,**Describe the bug** SQLAlchemy produces unwanted parentheses `()` when using `UNION ALL` which causes syntax errors in SQLite. **Expected behavior** `UNION ALL` clause produced without extra/wrapping parentheses. **To Reproduce** ```py q = select([0]).union_all(select([0]).limit(30)) ``` Produces: ```sql SELECT ? U... | |
| 5541,some means of applying SQL functions to association proxy,https://github.com/sqlalchemy/sqlalchemy/issues/5541,stale/low urgency,2,old update age or low-urgency/stale label; component labels: orm,scan when time allows,"orm, sqlalchemy.ext, use case, association proxy",orm,,,,issue-collapse:80185a4d43909a75,issue-collapse:80185a4d43909a75,0,2020-08-27T19:41:07Z,2022-07-19T13:29:44Z,1449,given: ``` from sqlalchemy import Column from sqlalchemy import ForeignKey from sqlalchemy import func from sqlalchemy import Integer from sqlalchemy import String from sqlalchemy.ext.associationproxy import association_proxy from sqlalchemy.ext.declarative import declarative_base from sqlalchemy.orm import relation... | |
| 5352,Can not select negated boolean column in MS SQL Server,https://github.com/sqlalchemy/sqlalchemy/issues/5352,stale/low urgency,2,old update age or low-urgency/stale label; component labels: sql server,scan when time allows,"SQL Server, use case",sql server,,4250,,issue-collapse:cfecd892c9fa03ec,issue-collapse:cfecd892c9fa03ec,2,2020-05-27T11:05:41Z,2022-07-19T17:18:24Z,1449,I would like negate a column of `BIT` type and use the resulting column in a select query. To do this I use the invert `~` operator from sqlalchemy. The code below demonstrates this bug. The second statement is compiled into `SELECT a.flag = 0 AS anon_1 FROM a` which can not execute and throws the error `SQL Error [... | |
| 5350,`NoReferencedColumnError` when using `referred_column_0[[_]N]_name` in FK naming convention,https://github.com/sqlalchemy/sqlalchemy/issues/5350,good volunteer slice,20,label says issue is suitable for a scoped external contribution; old update age or low-urgency/stale label; component labels: schema,scan when time allows,"bug, schema, naming conventions, PRs (with tests!) welcome",schema,,"3989, 7706",,issue-collapse:cd0e171aa0d9618d,issue-collapse:cd0e171aa0d9618d,2,2020-05-24T17:58:30Z,2023-01-25T01:53:23Z,1259,"I've read https://github.com/sqlalchemy/sqlalchemy/issues/3989 but this seems unrelated. When defining a `ForeignKey` on a SQLAlchemy model, if the referenced column is given as a string (`{table_name}.{column_name}`) and the `Base.metadata` has been setup with a naming convention that uses any of the`referred_colum..." | |
| 5235,Coordinating Changelog info,https://github.com/sqlalchemy/sqlalchemy/issues/5235,stale/low urgency,2,old update age or low-urgency/stale label; component labels: documentation,scan when time allows,documentation,documentation,,,,issue-collapse:e55f86809746c7f8,issue-collapse:e55f86809746c7f8,0,2020-04-06T18:53:11Z,2022-08-12T09:37:50Z,1425,Coordinat Changelog info/updates with sqlalchemyorg website. See https://github.com/sqlalchemyorg/sqlalchemyorg/pull/5 | |
| 5174,Move testing requirements to the dialects,https://github.com/sqlalchemy/sqlalchemy/issues/5174,stale/low urgency,2,old update age or low-urgency/stale label; component labels: tests,scan when time allows,"tests, third party integration issues",tests,,,,issue-collapse:1f1acca0882aecdb,issue-collapse:1f1acca0882aecdb,0,2020-02-27T19:26:14Z,2023-01-24T14:26:52Z,1260,"The testing framework used in sqlalchemy requires that some tests are only run on particular database backend, since not all features are supported by every db. Currently this functionality is obtained using the file `test/requirement.py` and `lib/sqlalchemy/testing/requirements.py` To improve the experience for cli..." | |
| 5139,Document how to add dialect keywords get_columns() column information,https://github.com/sqlalchemy/sqlalchemy/issues/5139,good volunteer slice,20,label says issue is suitable for a scoped external contribution; old update age or low-urgency/stale label; component labels: documentation,scan when time allows,"documentation, third party integration issues, PRs (with tests!) welcome",documentation,,,,issue-collapse:919e78f633b3da06,issue-collapse:919e78f633b3da06,0,2020-02-08T00:39:59Z,2022-10-10T17:45:41Z,1366,Currently sqlalchemy supports `dialect.get_columns()` returning dialect keywords via the `dialect_options` key in the form `<dialect_name>_<argument_name>`. See the [mssql dialect implementation](https://github.com/sqlalchemy/sqlalchemy/blob/47202abbf9823e1058e0b88ce64ffd3b88027e96/lib/sqlalchemy/dialects/mssql/base... | |
| 5133,Add APPLY operator support for mssql,https://github.com/sqlalchemy/sqlalchemy/issues/5133,good volunteer slice,20,"label says issue is suitable for a scoped external contribution; old update age or low-urgency/stale label; component labels: oracle, sql, sql server",scan when time allows,"sql, oracle, SQL Server, PRs (with tests!) welcome, use case, patch provided","oracle, sql, sql server",,,,issue-collapse:7fb90e49c9d4ad06,issue-collapse:7fb90e49c9d4ad06,0,2020-02-04T14:34:31Z,2025-10-03T20:00:22Z,276,The [APPLY operator](https://docs.microsoft.com/en-us/sql/t-sql/queries/from-transact-sql?view=sql-server-ver15) in mssql is somewhat akin to a JOIN LATERAL in postgresql and allows referencing columns from the left side of the FROM clause on the right side of the operand. The goal is that ```python from sqlalchemy... | |
| 5123,apply informative re-raise if a result processor function fails,https://github.com/sqlalchemy/sqlalchemy/issues/5123,good volunteer slice,20,label says issue is suitable for a scoped external contribution; old update age or low-urgency/stale label; component labels: engine,scan when time allows,"low priority, engine, PRs (with tests!) welcome, use case",engine,,3692,,issue-collapse:d3a72b81d56248b2,issue-collapse:d3a72b81d56248b2,1,2020-01-28T17:33:54Z,2025-06-25T13:10:24Z,377,"I have a `Session` model with a `hash` column of the `Binary` type, and a `User` model with a relationship of `sessions`. If I get attributes through `inspect(user).attrs`, calling `attr.load_history()` on the `sessions` attribute will cause this [string argument without an encoding](https://github.com/sqlalchemy/sq..." | |
| 5006,support for unusual function namespace separators,https://github.com/sqlalchemy/sqlalchemy/issues/5006,stale/low urgency,2,"old update age or low-urgency/stale label; component labels: functions, sql server",scan when time allows,"SQL Server, functions, use case","functions, sql server",,,,issue-collapse:7dc84638f97835f7,issue-collapse:7dc84638f97835f7,0,2019-11-27T15:13:25Z,2022-10-10T17:45:40Z,1366,"SQL Server's geom functions use a ""::"" operator that is only vaguely defined in places like https://docs.microsoft.com/en-us/sql/t-sql/language-elements/scope-resolution-operator-transact-sql?view=sql-server-ver15 , example: https://docs.microsoft.com/en-us/sql/t-sql/spatial-geography/stastext-geography-data-type?vi..." | |
| 5005,"alter ORM-level ""returned rows"" checks to only warn if driver returns -1 or None",https://github.com/sqlalchemy/sqlalchemy/issues/5005,stale/low urgency,2,"old update age or low-urgency/stale label; component labels: orm, sql server",scan when time allows,"orm, SQL Server, external driver issues, use case","orm, sql server",,5068,,issue-collapse:9a42900619c3a8ed,issue-collapse:9a42900619c3a8ed,1,2019-11-27T06:27:01Z,2022-10-10T17:45:39Z,1366,"I'm using flask-sqlalchemy to update mssql record,but returns -1. ### Library versions SQLAlchemy 1.3.11 Flask-SQLAlchemy 2.4.1 pyodbc 4.0.27 flask 1.1.1 ### code1 `ret = db.session.query(XXX).filter_by(id=1).update({""xxx"": ""xxxx""})` `print(""ret"", ret)` `db.session.commit()` The ret is -1, but the record has been mo..." | |
| 4855,instance_state can't raise an informative exception due to performance concerns. write C function?,https://github.com/sqlalchemy/sqlalchemy/issues/4855,stale/low urgency,2,old update age or low-urgency/stale label; component labels: performance,scan when time allows,"bug, performance, quagmire",performance,,,,issue-collapse:e4d718b980efdf08,issue-collapse:e4d718b980efdf08,0,2019-09-10T20:10:30Z,2022-07-19T17:18:23Z,1449,"If I pass a primitive type where the ORM is expecting a Model instance, it gives this difficult error message. Especially when I have a complicated object, I have to go hunting for where I passed the wrong object in. I wonder if it could tell me which model and which field got the wrong type argument. There's a popu..." | |
| 4790,Improve error messages on create_table,https://github.com/sqlalchemy/sqlalchemy/issues/4790,stale/low urgency,2,old update age or low-urgency/stale label; component labels: sql,scan when time allows,"bug, sql, naming conventions",sql,,4784,,issue-collapse:c7371e5fb3d5b546,issue-collapse:c7371e5fb3d5b546,3,2019-08-01T19:01:49Z,2022-08-12T09:36:04Z,1425,There are a handful of messages that could be improved. 1. `sqlalchemy.exc.InvalidRequestError: Naming convention including %(constraint_name)s token requires that constraint is explicitly named.` This doesn't give much of a context. Suggestion for improvement: Extend message with debug info such as: Naming conventi... | |
| 4784,Default MetaData kwarg naming_convention can create issues with certain databases,https://github.com/sqlalchemy/sqlalchemy/issues/4784,stale/low urgency,2,old update age or low-urgency/stale label; component labels: documentation,scan when time allows,documentation,documentation,,5151,,issue-collapse:c7371e5fb3d5b546,issue-collapse:c7371e5fb3d5b546,1,2019-07-26T18:04:06Z,2022-08-12T09:35:36Z,1425,"* this is a docs ticket; assign to @jvanasco * reference group discussion: https://groups.google.com/forum/#!topic/sqlalchemy/8xOu-Mlcobo The alembic docs reference this naming convention: https://alembic.sqlalchemy.org/en/latest/naming.html ``` convention = { ""ix"": ""ix_%(column_0_label)s"", ""uq"": ""uq_%(table_name)s_..." | |
| 4706,synonym descriptors automatically blend existing properties - undocumented?,https://github.com/sqlalchemy/sqlalchemy/issues/4706,stale/low urgency,2,old update age or low-urgency/stale label; component labels: documentation,scan when time allows,"documentation, classical mapping",documentation,,,,issue-collapse:e55f86809746c7f8,issue-collapse:e55f86809746c7f8,0,2019-06-02T16:19:21Z,2022-10-10T17:45:38Z,1366,"While migration from classical to declarative mapping, I've run across this feature in SQLAlchemy which are are using - but I can't find it in the documentation. Basically, we have a property ```python @property def foo(self): return self._foo @foo.setter def foo(self, value): # Validation code self._foo = value ```..." | |
| 4652,Unclear How to Properly Include an ON UPDATE Clause in DDL for Column,https://github.com/sqlalchemy/sqlalchemy/issues/4652,stale/low urgency,2,"old update age or low-urgency/stale label; component labels: datatypes, mysql, schema",scan when time allows,"schema, mysql, datatypes, use case","datatypes, mysql, schema",,"3155, 3444",,issue-collapse:99d2be15ed2544bf,issue-collapse:99d2be15ed2544bf,4,2019-05-02T00:14:24Z,2023-01-24T14:26:51Z,1260,"After reviewing the documentation for [Column](https://docs.sqlalchemy.org/en/13/core/metadata.html#sqlalchemy.schema.Column.params.server_default) and a couple issues here (#3155,#3444), it's still unclear how to ""correctly"" include an explicit ""ON UPDATE"" clause. The only solution I have come to so far was specifi..." | |
| 4641,add feature to mapper registry to allow for mapper_args that take place by default,https://github.com/sqlalchemy/sqlalchemy/issues/4641,stale/low urgency,2,old update age or low-urgency/stale label; component labels: orm,scan when time allows,"feature, orm",orm,,4640,,issue-collapse:abb31efb5c51b9fe,issue-collapse:abb31efb5c51b9fe,1,2019-04-27T15:54:37Z,2025-06-19T15:21:18Z,383,with #4640 we are going to start adding mapper flags that folks will want to be able to apply across the board. so to make this easier without the need to build out a mixin for `__mapper_args__` add `default_mapper_args` parameter to declarative base | |
| 4567,SQLite on_conflict not working with ORM,https://github.com/sqlalchemy/sqlalchemy/issues/4567,stale/low urgency,2,"old update age or low-urgency/stale label; component labels: documentation, sql, sqlite",scan when time allows,"documentation, sqlite, sql","documentation, sql, sqlite",,4360,,issue-collapse:45d939b1923cd32f,issue-collapse:45d939b1923cd32f,1,2019-03-25T10:02:36Z,2023-01-27T16:45:41Z,1257,"I've tried several different versions of this code to try to get primary key conflicts to be ignored on the table slippy_tiles but nothing seems to take when creating the schema from ORM, even though it is supposedly fixed in #4360 I've tried renaming the kwarg in the column definitions to sqlite_on_conflict_primary..." | |
| 4434,Support for functions in UniqueConstraint,https://github.com/sqlalchemy/sqlalchemy/issues/4434,good volunteer slice,20,"label says issue is suitable for a scoped external contribution; old update age or low-urgency/stale label; component labels: postgresql, schema",scan when time allows,"postgresql, feature, schema, PRs (with tests!) welcome","postgresql, schema",,,,issue-collapse:43bcbec88b5d7cfb,issue-collapse:43bcbec88b5d7cfb,0,2019-01-09T09:38:54Z,2022-10-10T17:43:04Z,1366,"Some databases support using functions on indexes values (e.g. PostgreSQL) but UniqueContraint doesn't permit to use functions at the moment. Index does, so we can instead use that: ``` class A(Base): __tablename__ = 'a' id = Column(Integer, primary_key=True) foobar_id = Column(Integer) deleted = Column(Boolean) __t..." | |
| 4289,support None for index name,https://github.com/sqlalchemy/sqlalchemy/issues/4289,stale/low urgency,2,"old update age or low-urgency/stale label; component labels: postgresql, schema",scan when time allows,"postgresql, feature, schema, naming conventions","postgresql, schema",,3989,,issue-collapse:cd0e171aa0d9618d,issue-collapse:cd0e171aa0d9618d,1,2018-06-26T09:34:45Z,2023-12-28T10:35:28Z,922,"**Migrated issue, originally created by Aurélien Campéas ([@auc](https://github.com/auc))** sqlalchemy 1.3.0b1, postgres 10, psycopg 2.7.4 ``` from sqlalchemy import create_engine, MetaData, Table, Column, Integer, ForeignKey from sqlalchemy.dialects.postgresql import TIMESTAMP name = 'gas.lng.country.trinidad_and_t..." | |
| 4272,suport MySQL inline indexes e.g. KEY(col) in DDL,https://github.com/sqlalchemy/sqlalchemy/issues/4272,stale/low urgency,2,"old update age or low-urgency/stale label; component labels: mysql, schema",scan when time allows,"feature, schema, mysql","mysql, schema",,,,issue-collapse:ee4eeb168b7f20de,issue-collapse:ee4eeb168b7f20de,0,2018-06-07T15:17:36Z,2023-01-24T14:26:49Z,1260,"**Migrated issue, originally created by Rishi Sharma ([@rishirishi](https://github.com/rishirishi))** **Database**: MySQL 5.6 **SQLAlchemy**: 1.1 Using an example model definition as follows: ``` class Page(base): __tablename__ = 'page' __table_args__ = ( PrimaryKeyConstraint('book_id', 'page_id'), ) book_id = Colum..." | |
| 3458,super-self-referential m2m joins need to use annotations,https://github.com/sqlalchemy/sqlalchemy/issues/3458,stale/low urgency,2,old update age or low-urgency/stale label; component labels: orm,scan when time allows,"bug, orm, super secondary relationships",orm,,,,issue-collapse:80185a4d43909a75,issue-collapse:80185a4d43909a75,0,2015-06-18T15:23:28Z,2022-10-27T12:53:29Z,1349,"**Migrated issue, originally created by Michael Bayer ([@zzzeek](https://github.com/zzzeek))** e.g. ""node.id == node.id"" essentially, one side is on the secondary, we need to make use of remote() annotations on ""secondary"" for this case. just need to re-review how the annotation/join thing works and add it here. ```..." | |
| 3037,support setting load options on instances,https://github.com/sqlalchemy/sqlalchemy/issues/3037,stale/low urgency,2,"old update age or low-urgency/stale label; component labels: loader options, orm",scan when time allows,"feature, orm, loader options","loader options, orm",,,,issue-collapse:d575fd58d4aa1a77,issue-collapse:d575fd58d4aa1a77,0,2014-04-28T17:40:04Z,2023-01-24T14:26:47Z,1260,"**Migrated issue, originally created by Michael Bayer ([@zzzeek](https://github.com/zzzeek))** proof of concept ``` from sqlalchemy import * from sqlalchemy.orm import * from sqlalchemy.ext.declarative import declarative_base Base = declarative_base() class A(Base): __tablename__ = 'a' id = Column(Integer, primary_k..." | |
| 2943,@validates on inherited subclasses,https://github.com/sqlalchemy/sqlalchemy/issues/2943,good volunteer slice,20,label says issue is suitable for a scoped external contribution; old update age or low-urgency/stale label; component labels: orm,scan when time allows,"feature, orm, fairly easy, inheritance",orm,,,,issue-collapse:961923bdf1380b27,issue-collapse:961923bdf1380b27,0,2014-02-07T12:50:01Z,2025-01-23T16:24:20Z,530,"**Migrated issue, originally created by Michael Bayer ([@zzzeek](https://github.com/zzzeek))** #!python from sqlalchemy import * from sqlalchemy.orm import * from sqlalchemy.ext.declarative import declarative_base Base = declarative_base() class A(Base): __tablename__ = 'a' id = Column(Integer, primary_key=True) dat..." | |
| 2814,support for overriding existing @compiles directives,https://github.com/sqlalchemy/sqlalchemy/issues/2814,stale/low urgency,2,old update age or low-urgency/stale label,scan when time allows,"feature, sqlalchemy.ext",,,,,issue-collapse:5afe3c434683d6f1,issue-collapse:5afe3c434683d6f1,0,2013-08-27T11:21:04Z,2022-10-10T17:45:34Z,1366,"**Migrated issue, originally created by Michael Bayer ([@zzzeek](https://github.com/zzzeek))** perhaps sending it in as a **kw. from sqlalchemy.ext.compiler import compiles from alembic.ddl.base import AddColumn # ideally, the @compiles system would have some way of getting # us the ""existing"" @compiles decorator, s..." | |
| 2792,settable polymorphic identity,https://github.com/sqlalchemy/sqlalchemy/issues/2792,stale/low urgency,2,old update age or low-urgency/stale label; component labels: orm,scan when time allows,"low priority, feature, orm, inheritance",orm,,,,issue-collapse:80185a4d43909a75,issue-collapse:80185a4d43909a75,0,2013-07-31T10:38:27Z,2023-01-24T14:26:47Z,1260,"**Migrated issue, originally created by Michael Bayer ([@zzzeek](https://github.com/zzzeek))** this would need to be a new feature # -*- coding: utf-8 -*- from sqlalchemy import * from sqlalchemy.orm import * from sqlalchemy.ext.declarative import declarative_base DYNAMIC = True #DYNAMIC = False Base = declarative_b..." | |
| 2501,the DELETE before INSERT problem,https://github.com/sqlalchemy/sqlalchemy/issues/2501,stale/low urgency,2,old update age or low-urgency/stale label; component labels: orm,scan when time allows,"bug, low priority, orm, unit of work",orm,,,,issue-collapse:61c454c49a53cd0a,issue-collapse:61c454c49a53cd0a,0,2012-06-09T12:09:32Z,2023-11-07T12:49:11Z,973,"**Migrated issue, originally created by Michael Bayer ([@zzzeek](https://github.com/zzzeek))** this would be another semi-rewrite of the UOW. Basically we'd need to remove the hard dependency on ""saves"" before ""deletes"". We might even need to break ""saves"" into INSERT and UPDATE separately, and maybe that's a good i..." | |
| 1909,"reflection issue with mysql, url with no schema failure",https://github.com/sqlalchemy/sqlalchemy/issues/1909,stale/low urgency,2,"old update age or low-urgency/stale label; component labels: mysql, reflection",scan when time allows,"bug, mysql, reflection, quagmire","mysql, reflection",,,,issue-collapse:ee4eeb168b7f20de,issue-collapse:ee4eeb168b7f20de,0,2010-09-10T06:21:31Z,2022-12-08T18:24:24Z,1307,"**Migrated issue, originally created by Chris Withers ([@chrisw](https://github.com/chrisw))** code: from sqlalchemy import create_engine,MetaData engine = create_engine('mysql://user:pass@server') metadata = MetaData(engine,reflect=True) gives: metadata = MetaData(engine,reflect=True) File ""/opt/buildout-eggs/SQLAl..." | |
| 1452,mysql update... order by,https://github.com/sqlalchemy/sqlalchemy/issues/1452,stale/low urgency,2,old update age or low-urgency/stale label; component labels: sql,scan when time allows,"low priority, feature, sql",sql,,,,issue-collapse:3b982883f8781c22,issue-collapse:3b982883f8781c22,0,2009-06-22T11:58:46Z,2014-02-14T00:20:55Z,4526,"**Migrated issue, originally created by Anonymous** Some time, we need update a column with unique index. For example: ""update tree set lft = lft + 2 where lft > 0"". If the lft column is: ""1, 2, 3, ..."" MySQL will throw an duplication error. To solve the problem, a clause "" order by lft DESC"" need to be added. But t..." | |
| 1140,implement in_() for relations,https://github.com/sqlalchemy/sqlalchemy/issues/1140,stale/low urgency,2,old update age or low-urgency/stale label; component labels: orm,scan when time allows,"feature, orm",orm,,,,issue-collapse:80185a4d43909a75,issue-collapse:80185a4d43909a75,0,2008-08-16T09:50:20Z,2023-01-24T14:26:46Z,1260,"**Migrated issue, originally created by Anonymous** This would have to build upon the ""optimized_compare"" logic so that a JOIN would not be needed for the primary use case of a many-to-one check for a set of foreign key identifiers." | |
| 1063,self-referential / mutually dependent FK flush() should not require post_update for an UPDATE only query,https://github.com/sqlalchemy/sqlalchemy/issues/1063,stale/low urgency,2,old update age or low-urgency/stale label; component labels: orm,scan when time allows,"bug, orm, quagmire, unit of work, post-update",orm,,"3496, 3990",,issue-collapse:8d4f8101ad61e9cf,issue-collapse:8d4f8101ad61e9cf,2,2008-05-28T20:56:19Z,2024-02-05T20:49:35Z,882,"**Migrated issue, originally created by Michael Bayer ([@zzzeek](https://github.com/zzzeek))** i.e. when doing ""whos-dependent-on-who"", if both instances are already persistent, there should be no dependency between them and post_update should not be needed. ex: from sqlalchemy import * from sqlalchemy.orm import *..." | |