News and Updates

SQLAlchemy 1.4.42 Released
permalink

SQLAlchemy 1.4.42 is now available.

Release 1.4.42 includes a variety of bug fixes mostly in the area of ORM related use cases. Two new ORM related configurational warnings are added as well, indicating situations that can otherwise lead to confusing behavior in some cases when the incorrect mappings are used. While it's likely that some existing setups may have either of these patterns in place and will see the new warnings, these mis-configuration patterns have been possible for many years and don't indicate any new issue for existing applications.

Additionally fixed ongoing regressions regarding the MSSQL dialect in attempting to connect to various forms of Azure cloud databases, where fixes for one type of Azure database then introduce new problems connecting to another kind. The SQLAlchemy project doesn't have direct testing resources for these databases so we can only rely upon user feedback to know what's working, however it's very likely the issues are finally resolved in this release.

The complete changelog for 1.4.42 is at Changelog.

SQLAlchemy 1.4.42 is available on the Download Page.

SQLAlchemy 2.0.0b1 Released
permalink

We are pleased to announce that the first beta release of SQLAlchemy 2.0 is now available.

The 2.0 series represents over three years of effort towards updating SQLAlchemy's usage model and architectures for modern Python use. The update's origins lie within the three major Python paradigms that came into existence well after SQLAlchemy's first releases in 2006: Python 3, pep-484 typing support, and asyncio. It's also in response to the changing nature of the Python programming community, vastly larger and home to many new developers with higher standards for strictness, ease of use and documentation than was the case sixteen years ago.

While the SQLAlchemy 1.4 series introduced the major architectural changes to internals, including the integration of Core SQL constructs within the ORM, full SQL caching support, and asyncio support, the SQLAlchemy 2.0 series now capitalizes on this architecture within many areas, including most prominently:

  • Complete pep-484 typing support and native compatibility with typing tools such as mypy, pylance, including annotation-based Declarative models and fully typed SQL statements (make sure you uninstall all sqlalchemy-stubs, sqlalchemy2-stubs packages)
  • Vastly more performant INSERT behavior within the ORM
  • Vastly more performant table reflection architecture
  • Integration of pure SELECT, INSERT, UPDATE, DELETE statements including RETURNING of objects, upsert within normal ORM use

SQLAlchemy 2.0 also finalizes a very large number of API changes first introduced in 1.4. As such, even though SQLAlchemy 1.4 provided a very comprehensive upgrade path, we expect there to be lots of issues within the beginning of the series, both as projects accommodate the changes as well as for users of the new features, in particular the Declarative annotation support. We therefore hope that the beta series will have lots of testing done, and we will likely move from beta releases into release candidates as well, anticipating a 2.0 final release after some months.

For an overview of whats new in SQLAlchemy 2.0, see the Whats New in SQLAlchemy 2.0? document.

Links to the detailed changelog for 2.0.0b1 is at Changelog.

SQLAlchemy 2.0.0b1 is available on the Download Page.

SQLAlchemy 1.4.41 Released
permalink

SQLAlchemy 1.4.41 is now available.

Release 1.4.41 includes a variety of bug fixes including an improvement to the asyncpg dialect implementation regarding how invalid or stale database connections are released, as well as a series of small ORM fixes.

The complete changelog for 1.4.41 is at Changelog.

SQLAlchemy 1.4.41 is available on the Download Page.

SQLAlchemy 1.4.40 Released
permalink

SQLAlchemy 1.4.40 is now available.

Release 1.4.40 fixes a variety of less common issues, and also adds an improved API for using server side cursors with Connection objects.

The complete changelog for 1.4.40 is at Changelog.

SQLAlchemy 1.4.40 is available on the Download Page.

SQLAlchemy 1.4.39 Released
permalink

SQLAlchemy 1.4.39 is now available.

Release 1.4.39 fixes a single issue in 1.4.38 which is that a fix to the sqlalchemy.ext.mutable extension involving pickling failed to accommodate for the previous pickling format, which would impact an in-place upgrade of SQLAlchemy from 1.4.37 to 1.4.38 in an application that refers to existing pickled ORM objects, such as if they were stored in a cache. As SQLAlchemy's creator has at times been hit with this issue in production in days very long ago, we are rushing out a fix in 1.4.39 so that the legacy format for the "mutable" construct will remain consumable.

The complete changelog for 1.4.39 is at Changelog.

SQLAlchemy 1.4.39 is available on the Download Page.