Commit Graph

2 Commits

Author SHA1 Message Date
Mike Bayer fbafc24d21 allow any key for naming_convention dict, typing is not possible
Fixed regression introduced in 2.0.20 via 🎫`9600` fix which
attempted to add more formal typing to
:paramref:`_schema.MetaData.naming_convention`. This change prevented basic
naming convention dictionaries from passing typing and has been adjusted so
that a plain dictionary of strings for keys as well as dictionaries that
use constraint types as keys or a mix of both, are again accepted.

As part of this change, lesser used forms of the naming convention
dictionary are also typed, including that it currently allows for
``Constraint`` type objects as keys as well.

Fixes: #9284
Fixes: #10264
Change-Id: Ic6561dd65058e4de3a7a393295b9863fc065db13
2023-09-12 12:50:19 -04:00
Federico Caselli 4cd3656a65 Fix type annotation of schema.MetaData.naming_convention
Fixed #9600
Closes: #9598
Pull-request: https://github.com/sqlalchemy/sqlalchemy/pull/9598
Pull-request-sha: d458e36242

Change-Id: I2290d1955c21f8d40765f78e486c739263f6e4ab
2023-08-08 21:22:06 +02:00