From fc3785288f4d7b485a0ad5ae4da26aa5e2a20bf7a46e76148ee0bff0c723e92f Mon Sep 17 00:00:00 2001 From: Matej Cepl Date: Wed, 1 Sep 2021 18:45:31 +0000 Subject: [PATCH] Accepting request 915483 from home:glaubitz:branches:devel:languages:python - Update to 2.0.5 * Clean up things and set up CI (#16) * Don't use ported_eq function - Drop patches for issues fixed upstream * no_ported_eq.patch - Rename README to README.md in %files section OBS-URL: https://build.opensuse.org/request/show/915483 OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-minidb?expand=0&rev=11 --- minidb-2.0.4.tar.gz | 3 -- minidb-2.0.5.tar.gz | 3 ++ no_ported_eq.patch | 106 ------------------------------------------ python-minidb.changes | 10 ++++ python-minidb.spec | 7 +-- 5 files changed, 15 insertions(+), 114 deletions(-) delete mode 100644 minidb-2.0.4.tar.gz create mode 100644 minidb-2.0.5.tar.gz delete mode 100644 no_ported_eq.patch diff --git a/minidb-2.0.4.tar.gz b/minidb-2.0.4.tar.gz deleted file mode 100644 index db678f9..0000000 --- a/minidb-2.0.4.tar.gz +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:c1c62be076a1e4bb9dd880504dd81a3e7e027b7657e8a54a83c5a2727f09520a -size 14104 diff --git a/minidb-2.0.5.tar.gz b/minidb-2.0.5.tar.gz new file mode 100644 index 0000000..1bbd9a1 --- /dev/null +++ b/minidb-2.0.5.tar.gz @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:ce14281cea2595ad0a805a5e4e9d2542ed0c10babb5d3d39ef63c40a286c717d +size 16799 diff --git a/no_ported_eq.patch b/no_ported_eq.patch deleted file mode 100644 index 32dd405..0000000 --- a/no_ported_eq.patch +++ /dev/null @@ -1,106 +0,0 @@ -From ac709c48385583a0309ff850cd31896d5f19f647 Mon Sep 17 00:00:00 2001 -From: Paolo Stivanin -Date: Fri, 27 Mar 2020 14:47:48 +0100 -Subject: [PATCH] switch to pytest - ---- - test/test_minidb.py | 33 ++++++++++++++------------------- - 1 file changed, 14 insertions(+), 19 deletions(-) - ---- a/test/test_minidb.py -+++ b/test/test_minidb.py -@@ -3,11 +3,6 @@ import pytest - import datetime - - --def ported_eq(a, b, msg=None): -- if not a == b: -- raise AssertionError(msg or "%r != %r" % (a, b)) -- -- - class FieldTest(minidb.Model): - CONSTANT = 123 - -@@ -195,7 +190,7 @@ def test_json_field_query(): - db.register(WithJsonField) - d = {'a': [1, True, 3.9]} - WithJsonField(bar=d).save(db) -- ported_eq(next(WithJsonField.c.bar.query(db)).bar, d) -+ assert next(WithJsonField.c.bar.query(db)).bar == d - - - def test_json_field_renamed_query(): -@@ -206,7 +201,7 @@ def test_json_field_renamed_query(): - db.register(WithJsonField) - d = {'a': [1, True, 3.9]} - WithJsonField(bar=d).save(db) -- ported_eq(next(WithJsonField.c.bar('renamed').query(db)).renamed, d) -+ assert next(WithJsonField.c.bar('renamed').query(db)).renamed == d - - - def test_field_conversion_get_object(): -@@ -477,11 +472,11 @@ def test_distinct(): - - # minidb.func.distinct(COLUMN)(NAME) - result = {tuple(x) for x in Foo.query(db, lambda c: minidb.func.distinct(c.bar)('foo'))} -- ported_eq(result, expected) -+ assert result == expected - - # COLUMN.distinct(NAME) - result = {tuple(x) for x in Foo.query(db, Foo.c.bar.distinct('foo'))} -- ported_eq(result, expected) -+ assert result == expected - - - -@@ -504,12 +499,12 @@ def test_group_by_with_sum(): - # minidb.func.sum(COLUMN)(NAME) - result = {tuple(x) for x in Foo.query(db, lambda c: c.bar // - minidb.func.sum(c.baz)('sum'), group_by=lambda c: c.bar)} -- ported_eq(result, expected) -+ assert result == expected - - # COLUMN.sum(NAME) - result = {tuple(x) for x in Foo.query(db, lambda c: c.bar // - c.baz.sum('sum'), group_by=lambda c: c.bar)} -- ported_eq(result, expected) -+ assert result == expected - - - def test_save_without_db_raises_valueerror(): -@@ -552,10 +547,10 @@ def test_default_values_are_set_if_none( - - with minidb.Store(debug=True) as db: - f = Foo() -- ported_eq(f.name, 'Bob') -+ assert f.name == 'Bob' - - f = Foo(name='John') -- ported_eq(f.name, 'John') -+ assert f.name == 'John' - - - def test_default_values_with_callable(): -@@ -572,16 +567,16 @@ def test_default_values_with_callable(): - - with minidb.Store(debug=True) as db: - f = Foo() -- ported_eq(f.name, 'Bob') -- ported_eq(f.email, 'Bob@example.com') -+ assert f.name == 'Bob' -+ assert f.email == 'Bob@example.com' - - f = Foo(name='John') -- ported_eq(f.name, 'John') -- ported_eq(f.email, 'John@example.com') -+ assert f.name == 'John' -+ assert f.email == 'John@example.com' - - f = Foo(name='Joe', email='joe@example.net') -- ported_eq(f.name, 'Joe') -- ported_eq(f.email, 'joe@example.net') -+ assert f.name == 'Joe' -+ assert f.email == 'joe@example.net' - - - def test_storing_and_retrieving_datetime(): diff --git a/python-minidb.changes b/python-minidb.changes index b5a36e1..2f2d308 100644 --- a/python-minidb.changes +++ b/python-minidb.changes @@ -1,3 +1,13 @@ +------------------------------------------------------------------- +Wed Sep 1 12:57:53 UTC 2021 - John Paul Adrian Glaubitz + +- Update to 2.0.5 + * Clean up things and set up CI (#16) + * Don't use ported_eq function +- Drop patches for issues fixed upstream + * no_ported_eq.patch +- Rename README to README.md in %files section + ------------------------------------------------------------------- Tue Mar 16 15:59:42 UTC 2021 - Matej Cepl diff --git a/python-minidb.spec b/python-minidb.spec index 908099b..755a857 100644 --- a/python-minidb.spec +++ b/python-minidb.spec @@ -20,16 +20,13 @@ %define skip_python2 1 %bcond_without test Name: python-minidb -Version: 2.0.4 +Version: 2.0.5 Release: 0 Summary: SQLite3-based store for Python objects License: ISC Group: Development/Languages/Python URL: https://thp.io/2010/minidb/ Source: https://files.pythonhosted.org/packages/source/m/minidb/minidb-%{version}.tar.gz -# PATCH-FIX-UPSTREAM no_ported_eq.patch gh#thp/minidb#15 mcepl@suse.com -# Don't use ported_eq workaround. -Patch0: no_ported_eq.patch BuildRequires: %{python_module setuptools} BuildRequires: %{pythons} BuildRequires: fdupes @@ -60,7 +57,7 @@ Minidb 2 allows you to store Python objects in a SQLite 3 database. %endif %files %{python_files} -%doc README +%doc README.md %{python_sitelib}/minidb.py* %{python_sitelib}/minidb-%{version}-py*.egg-info %pycache_only %{python_sitelib}/__pycache__/minidb*.py*