From cfc02804fc5808647630c2fd75402887923168c8 Mon Sep 17 00:00:00 2001 From: Maxim Cournoyer Date: Fri, 29 Apr 2022 17:36:15 -0400 Subject: gnu: gourmet: Update to 0.17.4-0-8af29c8 and enable tests. * gnu/packages/patches/gourmet-sqlalchemy-compat.patch: Add file. * gnu/local.mk (dist_patch_DATA): Register it. * gnu/packages/nutrition.scm (gourmet): Update to 0.17.4-0-8af29c8. [source]: Apply patch. [python]: Delete argument. [tests?]: Likewise. [phases]{prepare-x}: New phase. {check}: New phase override. {install-dekstop-file-and-icons}: New phase. [native-inputs]: Delete python2-distutils-extra, intltool and python2-pygtk. Add python-dogtail, python-pytest, python-selenium and xorg-server-for-tests. [inputs]: Delete python2-pygtk, python2-sqlalchemy, python2-lxml, python2-pillow and python2-elib.intl. Add gtk+, python-argcomplete, python-beautifulsoup4, python-gst, python-keyring, python-lxml, python-pillow, python-pycairo, python-pyenchant, python-pygobject, python-requests, python-scrape-schema-recipe, python-sqlalchemy. --- gnu/packages/patches/gourmet-sqlalchemy-compat.patch | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) create mode 100644 gnu/packages/patches/gourmet-sqlalchemy-compat.patch (limited to 'gnu/packages/patches') diff --git a/gnu/packages/patches/gourmet-sqlalchemy-compat.patch b/gnu/packages/patches/gourmet-sqlalchemy-compat.patch new file mode 100644 index 0000000000..d0cdf9e5a7 --- /dev/null +++ b/gnu/packages/patches/gourmet-sqlalchemy-compat.patch @@ -0,0 +1,18 @@ +diff --git a/gourmet/backends/db.py b/gourmet/backends/db.py +index faa6a57a..7e6d2bc6 100644 +--- a/gourmet/backends/db.py ++++ b/gourmet/backends/db.py +@@ -773,9 +773,11 @@ class RecData (Pluggable): + """Return the number of rows in table that match criteria + """ + if criteria: +- return table.count(*make_simple_select_arg(criteria,table)).execute().fetchone()[0] ++ return sqlalchemy.select( ++ sqlalchemy.func.count(criteria)).select_from(table).scalar() + else: +- return table.count().execute().fetchone()[0] ++ return sqlalchemy.select( ++ sqlalchemy.func.count()).select_from(table).scalar() + + def fetch_join (self, table1, table2, col1, col2, + column_names=None, sort_by=[], **criteria): -- cgit v1.2.3