SQLAlchemy 2.0 breaks package sqlalchemy-migrate.
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
OpenStack Compute (nova) |
Triaged
|
Undecided
|
Unassigned |
Bug Description
Description
===========
The SQLAlchemy package has recently had a major update, moving its version up to 2.0. Problem is, the change seems to break compatibility with version 1 of the library as now the sqlalchemy-migrate package, which is dependent on it, is reporting missing modules, thus breaking down. Now, the thing is that SQLAlchemy's requirement is the following: 'SQLAlchemy>
Here is an excerpt of the error message reported by sqlalchemy-migrate:
"""
Failed to import test module: nova.tests.
Traceback (most recent call last):
File "/usr/lib64/
module = self._get_
File "/usr/lib64/
__import_
File "/.../nova/
from nova import test
File "/.../nova/
from nova.tests import fixtures as nova_fixtures
File "/.../nova/
from .cinder import CinderFixture # noqa: F401
^^^
File "/.../nova/
from nova.tests.fixtures import nova as nova_fixtures
File "/.../nova/
from nova.db import migration
File "/.../nova/
from migrate import exceptions as migrate_exceptions
File "/.../.
from migrate.changeset import *
File "/.../.
from migrate.
File "/.../.
from migrate.
File "/.../.
from migrate.
File "/.../.
from sqlalchemy.
ModuleNotFoundE
"""
Here is some information about the SQLAlchemy's new update:
https:/
Steps to reproduce
==================
1.- python -m venv .venv
2.- . .venv/bin/activate
3.- pip install -e . -r requirements.txt -r test-requiremen
4.- python -m unittest discover -p test_* -s .
Expected result
===============
ModuleNotFoundError exception does not happen.
Actual result
=============
Execution of the test discovery is interrupted due to the error.
Environment
===========
Fedora Linux 37 (Workstation Edition) x86_64
Python 3.11.1
Changed in nova: | |
status: | New → Triaged |
Same issue seems to happen in glance.
To fix it there I had to pin "tox" to a version < 4.0 and to pin "sqlalchemy" to a version <2.0 in the repo's main "requirements.txt".