summary refs log tree commit diff
path: root/gnu/packages/patches
diff options
context:
space:
mode:
authorMaxim Cournoyer <maxim.cournoyer@gmail.com>2022-04-29 17:36:15 -0400
committerMaxim Cournoyer <maxim.cournoyer@gmail.com>2022-05-31 14:52:34 -0400
commitcfc02804fc5808647630c2fd75402887923168c8 (patch)
tree5630f934a5761e3d9ea7f5ec0e1cac6659192ac2 /gnu/packages/patches
parent421d09a1d3784e69239ac27294fa252e005a3fad (diff)
downloadguix-cfc02804fc5808647630c2fd75402887923168c8.tar.gz
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.
Diffstat (limited to 'gnu/packages/patches')
-rw-r--r--gnu/packages/patches/gourmet-sqlalchemy-compat.patch18
1 files changed, 18 insertions, 0 deletions
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):