diff options
author | Stephen Finucane <stephenfin@redhat.com> | 2023-04-05 13:19:34 +0100 |
---|---|---|
committer | Stephen Finucane <stephenfin@redhat.com> | 2023-04-06 14:54:40 +0100 |
commit | 1f003bcb0b74cecbfe24f52402328b76a07c9983 (patch) | |
tree | 8a1ca406db245f51d7ecebf6f61a39f8172b8dec /releasenotes | |
parent | da4f13e7345653eba8aab5b8aceeaeff7367989e (diff) | |
download | oslo-db-1f003bcb0b74cecbfe24f52402328b76a07c9983.tar.gz |
Get test suite to full pass with SQLAlchemy 2.0
Remaining issues encountered when running with SQLAlchemy 2.0 for real:
* Never call str() on a URL and expect it to be meaningful anymore.
The password is aggressively obfuscated now (users absolultely
wouldn't let us leave it as is)
* More utilities and fixtures that were calling begin() within a
block that would have already begun
* isnot is now called is_not; mocking "isnot" leads into too many
weird compat layers
* ORM InstrumentedAttribute and internals use __slots__ now, mock
seems to not be able to patch methods. Ideally these tests would use
a comparator subclass or something
* Connection.connection.connection is now called driver_connection,
SQLAlchemy keeps the old name available however oslo.db test suite
does not appear to tolerate the deprecation warning emitted,
so add a compat layer
* mapper() is fully removed from 2.0, not sure if there is another
not-yet-committed gerrit that removes mapper()
[1] https://docs.sqlalchemy.org/en/20/core/engines.html#sqlalchemy.create_engine.params.pool_pre_ping
[2] https://docs.sqlalchemy.org/en/20/changelog/changelog_20.html#change-2fe37eaf2295cebd3bb4ee8e5b8c575c
[3] https://github.com/sqlalchemy/sqlalchemy/issues/5648
Change-Id: Ifaca67c07f008d8bc0febeecd3e200cc7ee7a4b0
Diffstat (limited to 'releasenotes')
-rw-r--r-- | releasenotes/notes/sqlalchemy-20-0a193a01c70f805a.yaml | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/releasenotes/notes/sqlalchemy-20-0a193a01c70f805a.yaml b/releasenotes/notes/sqlalchemy-20-0a193a01c70f805a.yaml new file mode 100644 index 0000000..b2c8d62 --- /dev/null +++ b/releasenotes/notes/sqlalchemy-20-0a193a01c70f805a.yaml @@ -0,0 +1,11 @@ +--- +features: + - | + oslo.db now supports SQLAlchemy 2.0. + - | + A new ``oslo_db.compat`` module has been added. This provides a number of + shims for handling differences between SQLAlchemy 1.x and 2.x. +upgrade: + - | + The ability to create engine facades that used autocommit, first deprecated + in 12.1.0, has now been removed. This is not supported in SQLAlchemy 2.x. |