diff --git a/python-sqlalchemy-1.2.8-sqlite-3.24.patch b/python-sqlalchemy-1.2.8-sqlite-3.24.patch new file mode 100644 index 0000000..9d78f42 --- /dev/null +++ b/python-sqlalchemy-1.2.8-sqlite-3.24.patch @@ -0,0 +1,28 @@ +From 3fd3ac6d554019f54efe1935f3a25cb5939fdad3 Mon Sep 17 00:00:00 2001 +From: Nils Philippsen +Date: Mon, 18 Jun 2018 00:08:38 +0200 +Subject: [PATCH] fix TypeReflectionTest for sqlite 3.24 + +SQLite 3.24 added support for PostgreSQL-style UPSERT. This added two +new keywords 'DO' and 'NOTHING' which made +test_round_trip_direct_type_affinity() fail with a syntax error. +--- + test/dialect/test_sqlite.py | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/test/dialect/test_sqlite.py b/test/dialect/test_sqlite.py +index 4c462aed1..d2d563208 100644 +--- a/test/dialect/test_sqlite.py ++++ b/test/dialect/test_sqlite.py +@@ -1637,7 +1637,7 @@ class TypeReflectionTest(fixtures.TestBase): + ("BLOBBER", sqltypes.NullType()), + ("DOUBLE PRECISION", sqltypes.REAL()), + ("FLOATY", sqltypes.REAL()), +- ("NOTHING WE KNOW", sqltypes.NUMERIC()), ++ ("SOMETHING UNKNOWN", sqltypes.NUMERIC()), + ] + + def _fixture_as_string(self, fixture): +-- +2.17.1 + diff --git a/python-sqlalchemy.spec b/python-sqlalchemy.spec index 7610e2b..8214eaf 100644 --- a/python-sqlalchemy.spec +++ b/python-sqlalchemy.spec @@ -18,6 +18,10 @@ Source0: https://files.pythonhosted.org/packages/source/S/%{srcname}/%{sr # 3.7 Those should be fixed upstream, we ignore them instead Patch0: python-sqlalchemy-1.2.8-ignore-DeprecationWarning.patch +# Fix tests for sqlite 3.24 +# https://github.com/zzzeek/sqlalchemy/pull/452 +Patch1: python-sqlalchemy-1.2.8-sqlite-3.24.patch + BuildRequires: gcc BuildRequires: python2-devel >= 2.6 @@ -109,12 +113,10 @@ This package includes the python 3 version of the module. rm -rf doc/build %check -# We temporarily skip test_round_trip_direct_type_affinity to unblock the Python 3.7 rebuild -# https://bugzilla.redhat.com/show_bug.cgi?id=1591353 -PYTHONPATH=. %{__python2} -m pytest test -k "not test_round_trip_direct_type_affinity" +PYTHONPATH=. %{__python2} -m pytest test %if 0%{?with_python3} -PYTHONPATH=. %{__python3} -m pytest test -k "not test_round_trip_direct_type_affinity" +PYTHONPATH=. %{__python3} -m pytest test %endif @@ -136,6 +138,7 @@ PYTHONPATH=. %{__python3} -m pytest test -k "not test_round_trip_direct_type_aff %changelog * Sun Jun 17 2018 Nils Philippsen - rename patch, apply with backups +- fix failing test for sqlite 3.24 instead of skipping it * Thu Jun 14 2018 Miro HronĨok - 1.2.8-2 - Rebuilt for Python 3.7