Hello community, here is the log from the commit of package python-tinydb for openSUSE:Factory checked in at 2020-01-02 14:43:26 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Factory/python-tinydb (Old) and /work/SRC/openSUSE:Factory/.python-tinydb.new.6675 (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "python-tinydb" Thu Jan 2 14:43:26 2020 rev:6 rq:760371 version:3.15.2 Changes: -------- --- /work/SRC/openSUSE:Factory/python-tinydb/python-tinydb.changes 2019-11-10 22:49:58.294075348 +0100 +++ /work/SRC/openSUSE:Factory/.python-tinydb.new.6675/python-tinydb.changes 2020-01-02 14:43:45.152968966 +0100 @@ -1,0 +2,7 @@ +Sun Dec 29 21:16:42 UTC 2019 - Arun Persaud <[email protected]> + +- update to version 3.15.2: + * Fix: handle Query().search and Query().matches with non-string + values correctly (see a forum post by foprel). + +------------------------------------------------------------------- Old: ---- tinydb-3.15.1.tar.gz New: ---- tinydb-3.15.2.tar.gz ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ python-tinydb.spec ++++++ --- /var/tmp/diff_new_pack.FiGbao/_old 2020-01-02 14:43:46.328969430 +0100 +++ /var/tmp/diff_new_pack.FiGbao/_new 2020-01-02 14:43:46.332969432 +0100 @@ -1,7 +1,7 @@ # # spec file for package python-tinydb # -# Copyright (c) 2019 SUSE LINUX GmbH, Nuernberg, Germany. +# Copyright (c) 2019 SUSE LLC # # All modifications and additions to the file contributed by third parties # remain the property of their copyright owners, unless otherwise agreed @@ -18,7 +18,7 @@ %{?!python_module:%define python_module() python-%{**} python3-%{**}} Name: python-tinydb -Version: 3.15.1 +Version: 3.15.2 Release: 0 Summary: A document-oriented database License: MIT ++++++ tinydb-3.15.1.tar.gz -> tinydb-3.15.2.tar.gz ++++++ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/tinydb-3.15.1/LICENSE new/tinydb-3.15.2/LICENSE --- old/tinydb-3.15.1/LICENSE 2017-01-16 12:29:58.000000000 +0100 +++ new/tinydb-3.15.2/LICENSE 2019-12-18 19:46:48.000000000 +0100 @@ -1,7 +1,7 @@ -Copyright (C) 2013 Markus Siemens <[email protected]> - -Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. +Copyright (C) 2013 Markus Siemens <[email protected]> + +Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/tinydb-3.15.1/PKG-INFO new/tinydb-3.15.2/PKG-INFO --- old/tinydb-3.15.1/PKG-INFO 2019-10-26 17:21:02.000000000 +0200 +++ new/tinydb-3.15.2/PKG-INFO 2019-12-18 19:54:12.000000000 +0100 @@ -1,6 +1,6 @@ -Metadata-Version: 1.1 +Metadata-Version: 1.2 Name: tinydb -Version: 3.15.1 +Version: 3.15.2 Summary: TinyDB is a tiny, document oriented database optimized for your happiness :) Home-page: https://github.com/msiemens/tinydb Author: Markus Siemens diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/tinydb-3.15.1/tests/conftest.py new/tinydb-3.15.2/tests/conftest.py --- old/tinydb-3.15.1/tests/conftest.py 2017-09-14 00:23:50.000000000 +0200 +++ new/tinydb-3.15.2/tests/conftest.py 2019-12-18 19:47:09.000000000 +0100 @@ -1,19 +1,19 @@ -import pytest - -from tinydb.middlewares import CachingMiddleware -from tinydb.storages import MemoryStorage -from tinydb import TinyDB - - [email protected] -def db(): - db_ = TinyDB(storage=MemoryStorage) - db_.purge_tables() - db_.insert_multiple({'int': 1, 'char': c} for c in 'abc') - return db_ - - [email protected] -def storage(): - _storage = CachingMiddleware(MemoryStorage) - return _storage() # Initialize MemoryStorage +import pytest + +from tinydb.middlewares import CachingMiddleware +from tinydb.storages import MemoryStorage +from tinydb import TinyDB + + [email protected] +def db(): + db_ = TinyDB(storage=MemoryStorage) + db_.purge_tables() + db_.insert_multiple({'int': 1, 'char': c} for c in 'abc') + return db_ + + [email protected] +def storage(): + _storage = CachingMiddleware(MemoryStorage) + return _storage() # Initialize MemoryStorage diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/tinydb-3.15.1/tests/test_queries.py new/tinydb-3.15.2/tests/test_queries.py --- old/tinydb-3.15.1/tests/test_queries.py 2019-07-03 21:34:20.000000000 +0200 +++ new/tinydb-3.15.2/tests/test_queries.py 2019-12-18 19:48:06.000000000 +0100 @@ -155,6 +155,7 @@ assert query({'val': 'ab3'}) assert not query({'val': 'abc'}) assert not query({'val': ''}) + assert not query({'val': 12}) assert not query({'': None}) assert hash(query) @@ -163,6 +164,7 @@ assert query({'val': 'xJohNx'}) assert not query({'val': 'JOH'}) assert not query({'': None}) + assert not query({'': True}) assert hash(query) diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/tinydb-3.15.1/tinydb/queries.py new/tinydb-3.15.2/tinydb/queries.py --- old/tinydb-3.15.1/tinydb/queries.py 2019-07-03 21:34:20.000000000 +0200 +++ new/tinydb-3.15.2/tinydb/queries.py 2019-12-18 19:47:40.000000000 +0100 @@ -268,11 +268,15 @@ >>> Query().f1.matches(r'^\\w+$') :param regex: The regular expression to use for matching + :param flags: regex flags to pass to ``re.match`` """ - return self._generate_test( - lambda value: re.match(regex, value, flags), - ('matches', self._path, regex) - ) + def test(value): + if not isinstance(value, str): + return False + + return re.match(regex, value, flags) is not None + + return self._generate_test(test, ('matches', self._path, regex)) def search(self, regex, flags=0): """ @@ -282,11 +286,17 @@ >>> Query().f1.search(r'^\\w+$') :param regex: The regular expression to use for matching + :param flags: regex flags to pass to ``re.match`` """ - return self._generate_test( - lambda value: re.search(regex, value, flags), - ('search', self._path, regex) - ) + + def test(value): + if not isinstance(value, str): + return False + + return re.search(regex, value, flags) is not None + + return self._generate_test(test, ('search', self._path, regex)) + def test(self, func, *args): """ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/tinydb-3.15.1/tinydb/version.py new/tinydb-3.15.2/tinydb/version.py --- old/tinydb-3.15.1/tinydb/version.py 2019-10-26 17:19:11.000000000 +0200 +++ new/tinydb-3.15.2/tinydb/version.py 2019-12-18 19:51:30.000000000 +0100 @@ -1 +1 @@ -__version__ = '3.15.1' +__version__ = '3.15.2' diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/tinydb-3.15.1/tinydb.egg-info/PKG-INFO new/tinydb-3.15.2/tinydb.egg-info/PKG-INFO --- old/tinydb-3.15.1/tinydb.egg-info/PKG-INFO 2019-10-26 17:21:02.000000000 +0200 +++ new/tinydb-3.15.2/tinydb.egg-info/PKG-INFO 2019-12-18 19:54:12.000000000 +0100 @@ -1,6 +1,6 @@ -Metadata-Version: 1.1 +Metadata-Version: 1.2 Name: tinydb -Version: 3.15.1 +Version: 3.15.2 Summary: TinyDB is a tiny, document oriented database optimized for your happiness :) Home-page: https://github.com/msiemens/tinydb Author: Markus Siemens
