Commit acf7f6a
Document why supports_statement_cache must be redeclared on the async dialect
The async dialect subclass ostensibly duplicates the base dialect's
supports_statement_cache = True declaration, but the duplication is
actually load-bearing. SQLAlchemy reads this attribute via
``self.__class__.__dict__.get("supports_statement_cache")`` (in
engine/default.py::_supports_statement_cache), which is a single-class
lookup, not an MRO walk. Removing the subclass declaration silently
disables statement caching on the async dialect and emits a runtime
warning on every engine startup. Leave an inline comment pointing at
the SQLAlchemy code path so a future reader doesn't simplify this away.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>1 parent e5ad595 commit acf7f6a
1 file changed
Lines changed: 7 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
157 | 157 | | |
158 | 158 | | |
159 | 159 | | |
| 160 | + | |
| 161 | + | |
| 162 | + | |
| 163 | + | |
| 164 | + | |
| 165 | + | |
| 166 | + | |
160 | 167 | | |
161 | 168 | | |
162 | 169 | | |
| |||
0 commit comments