rel_2_1_0b2
📦 sqlalchemyView on GitHub →
✨ 2 features🐛 5 fixes🔧 22 symbols
Summary
This release introduces support for the mssql-python driver and JSON types in Oracle, refactors ColumnCollection for cleaner attribute access, and includes several typing improvements, particularly around PEP 646 and JSON types.
Migration Steps
- If relying on mutation methods on ReadOnlyColumnCollection attributes (e.g., table.c.add), note that these methods are now only available on WriteableColumnCollection and DedupeColumnCollection subclasses; access them via the appropriate collection if mutation is required.
✨ New Features
- Added support for the mssql-python driver for SQL Server.
- Added support for the _sqltypes.JSON datatype with the Oracle dialect, enabling serialization/deserialization strategies for Oracle's native JSON type (21c+).
🐛 Bug Fixes
- A warning is now emitted when using standalone _sql.distinct() in a _sql.select() columns list outside of an aggregate function.
- Improved TypeDecorator repr() output for schema types like Enum and Boolean to correctly include relevant arguments for Alembic autogeneration.
- Amended the repr() output for Enum to suppress MetaData display, preventing interference with Alembic-autogenerated migration scripts.
- Fixed typing issue related to PEP 646 support where scalar methods (Connection.scalar(), Result.scalar(), Session.scalar(), and async versions) did not apply correct types when originating select columns were typed as Any.
- Improved typing for _sqltypes.JSON and dialect-specific variants (e.g., _postgresql.JSON) to support parameterization for content types (e.g., JSONB[list[str]]()).
Affected Symbols
_sql.overColumnCollectionWriteableColumnCollectionDedupeColumnCollectionReadOnlyColumnCollectionTable.c_sql.distinct()TypeDecoratorTypeEngine_sql.FromClause_schema.TypedColumns_schema.Table_sql.Join_sql.Subquery_sql.CTEEnumBooleanConnection.scalar()Result.scalar()_orm.Session.scalar()_sqltypes.JSON_postgresql.JSON