Get the latest tech news
What's New in SQLAlchemy 2.1?
Documentation SQLAlchemy 2.1 Documentation in development Home | Download this Documentation Changes and Migration - What’s New in SQLAlchemy 2.1?¶ - 2.1 Changelog - 2.0 Changelog - 1.4 Changelog - 1.3 Changelog - 1.2 Changelog - 1.1 Changelog - 1.0 Changelog - 0.9 Changelog - 0.8 Changelog - 0.7 Changelog - 0.6 Changelog - 0.5 Changelog - 0.4 Changelog - 0.3 Changelog - 0.2 Changelog - 0.1 Changelog - SQLAlchemy 2.0 - Major Migration Guide - What’s New in SQLAlchemy 2.0? - What’s New in SQLAlchemy 1.4? - What’s New in SQLAlchemy 1.3? - What’s New in SQLAlchemy 1.2? - What’s New in SQLAlchemy 1.1? - What’s New in SQLAlchemy 1.0? - What’s New in SQLAlchemy 0.9? - What’s New in SQLAlchemy 0.8? - What’s New in SQLAlchemy 0.7? - What’s New in SQLAlchemy 0.6? - What’s new in SQLAlchemy 0.5? - What’s new in SQLAlchemy 0.4? Project Versions - Previous: Changes and Migration - Next: 2.1 Changelog - Up: Home - On this page: What’s New in SQLAlchemy 2.1?¶ About this Document This document describes changes between SQLAlchemy version 2.0 and version 2.1. Row now represents individual column types directly without Tuple¶ SQLAlchemy 2.0 implemented a broad array of PEP 484 typing throughout all components, including a new ability for row-returning statements such as select() to maintain track of individual column types, which were then passed through the execution phase onto the Result object and then to the individual Row objects.
Not yet solved by pep-646 or any other pep is the ability for an arbitrary number of expressions within and others to be mapped to row objects, without stating each argument position explicitly within typing annotations. SQLAlchemy 1.4 and 2.0 used a complex expression to determine if the greenlet dependency, needed by the asyncio extension, could be installed from pypi using a pre-built wheel instead of having to build from source. To help produce code that is more amenable to IDE-level linting and type checking, the parameter now accepts both direct references to a class-bound attribute as well as lambdas which do the same:
Or read this on Hacker News