From 34c9d61c85f21d45505886ace6b800d050f1a145 Mon Sep 17 00:00:00 2001 From: lilydjwg Date: Mon, 9 Sep 2024 16:48:14 +0800 Subject: [PATCH] remove missed sqlalchemy mentions --- docs/setup.rst | 2 +- lilac | 4 +--- scripts/testdb.py | 17 ----------------- 3 files changed, 2 insertions(+), 21 deletions(-) delete mode 100755 scripts/testdb.py diff --git a/docs/setup.rst b/docs/setup.rst index f0423568..dd5cb940 100644 --- a/docs/setup.rst +++ b/docs/setup.rst @@ -22,7 +22,7 @@ To use PostgreSQL, the following dependencies need to be installed (besides the .. code-block:: sh - pacman -S python-sqlalchemy python-psycopg2 + pacman -S python-psycopg2 Lilac can send error reports via email. A local mail transfer agent (MTA) is preferred (e.g. Postfix) but a remote one is supported too. We'll disable this in this article. diff --git a/lilac b/lilac index 084ddb78..f81b869d 100755 --- a/lilac +++ b/lilac @@ -516,10 +516,8 @@ def main_may_raise( pkgbuild.update_data(PACMAN_DB_DIR, pacman_conf) if dburl := config['lilac'].get('dburl'): - import sqlalchemy - engine = sqlalchemy.create_engine(dburl) schema = config['lilac'].get('schema') - db.setup(engine, schema) + db.setup(dburl, schema) if cmds := config.get('misc', {}).get('prerun'): for cmd in cmds: diff --git a/scripts/testdb.py b/scripts/testdb.py deleted file mode 100755 index 7150ec50..00000000 --- a/scripts/testdb.py +++ /dev/null @@ -1,17 +0,0 @@ -#!/usr/bin/python3 - -import sqlalchemy - -from lilac2 import db - -def main(): - engine = sqlalchemy.create_engine('postgresql:///') - db.setup(engine) - - with db.get_session() as s: - b = db.Batch(event='start') - s.add(b) - -if __name__ == '__main__': - main() -