diff --git a/devel/ci/Dockerfile-pip b/devel/ci/Dockerfile-pip index 8c76342ccb..9597610625 100644 --- a/devel/ci/Dockerfile-pip +++ b/devel/ci/Dockerfile-pip @@ -30,9 +30,6 @@ RUN pip-3 install \ pymediawiki \ celery -# proposed fix for sqlalchemy 2.0 compatibility -RUN pip-3 install git+https://github.com/fschulze/sqlalchemy_schemadisplay.git@refs/pull/34/head - VOLUME ["/results"] WORKDIR /bodhi CMD ["bash"] diff --git a/docs/generate_db_schema b/docs/generate_db_schema index 1969d27f3b..a731f4a166 100755 --- a/docs/generate_db_schema +++ b/docs/generate_db_schema @@ -3,16 +3,20 @@ Generate an image of the database schema """ from packaging import version -from sqlalchemy import __version__ as sqlaver +from sqlalchemy import create_engine from sqlalchemy_schemadisplay import create_schema_graph +try: + from sqlalchemy_schemadisplay import __version__ as sqlschemaver +except ImportError: + sqlschemaver = '1.0' -from bodhi.server import models, Session +from bodhi.server import models def write_graph(filename): - if version.parse(sqlaver) >= version.parse('2.0.0'): + if version.parse(sqlschemaver) >= version.parse('2.0'): graph = create_schema_graph( - session=Session, + engine=create_engine('sqlite:///:memory:'), metadata=models.metadata, show_datatypes=False, show_indexes=False,