Script 'mail_helper' called by obssrc
Hello community,
here is the log from the commit of package python-peewee for openSUSE:Factory checked in at 2022-11-01 13:42:16
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/python-peewee (Old)
and /work/SRC/openSUSE:Factory/.python-peewee.new.2275 (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "python-peewee"
Tue Nov 1 13:42:16 2022 rev:19 rq:1032500 version:3.15.3
Changes:
--------
--- /work/SRC/openSUSE:Factory/python-peewee/python-peewee.changes 2022-10-08 01:25:56.434328128 +0200
+++ /work/SRC/openSUSE:Factory/.python-peewee.new.2275/python-peewee.changes 2022-11-01 13:42:27.827862749 +0100
@@ -2 +2 @@
-Tue Oct 4 22:59:19 UTC 2022 - Yogalakshmi Arunachalam
+Fri Oct 28 19:52:59 UTC 2022 - Yogalakshmi Arunachalam
@@ -9,0 +10,3 @@
+
+-------------------------------------------------------------------
+Tue Oct 4 22:59:19 UTC 2022 - Yogalakshmi Arunachalam
Old:
----
peewee-3.15.2.tar.gz
New:
----
peewee-3.15.3.tar.gz
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Other differences:
------------------
++++++ python-peewee.spec ++++++
--- /var/tmp/diff_new_pack.y7hgnD/_old 2022-11-01 13:42:28.271865111 +0100
+++ /var/tmp/diff_new_pack.y7hgnD/_new 2022-11-01 13:42:28.275865132 +0100
@@ -18,7 +18,7 @@
%{?!python_module:%define python_module() python-%{**} python3-%{**}}
Name: python-peewee
-Version: 3.15.2
+Version: 3.15.3
Release: 0
Summary: An expressive ORM that supports multiple SQL backends
License: BSD-3-Clause
++++++ peewee-3.15.2.tar.gz -> peewee-3.15.3.tar.gz ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/peewee-3.15.2/CHANGELOG.md new/peewee-3.15.3/CHANGELOG.md
--- old/peewee-3.15.2/CHANGELOG.md 2022-08-26 16:08:15.000000000 +0200
+++ new/peewee-3.15.3/CHANGELOG.md 2022-09-22 04:55:53.000000000 +0200
@@ -7,7 +7,17 @@
## master
-[View commits](https://github.com/coleifer/peewee/compare/3.15.2...master)
+[View commits](https://github.com/coleifer/peewee/compare/3.15.3...master)
+
+## 3.15.3
+
+* Add `scalars()` query method (complements `scalar()`), roughly equivalent to
+ writing `[t[0] for t in query.tuples()]`.
+* Small doc improvements
+* Fix and remove some flaky test assertions with Sqlite INSERT + RETURNING.
+* Fix innocuous failing Sqlite test on big-endian machines.
+
+[View commits](https://github.com/coleifer/peewee/compare/3.15.2...3.15.3)
## 3.15.2
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/peewee-3.15.2/docs/peewee/database.rst new/peewee-3.15.3/docs/peewee/database.rst
--- old/peewee-3.15.2/docs/peewee/database.rst 2022-08-26 16:08:15.000000000 +0200
+++ new/peewee-3.15.3/docs/peewee/database.rst 2022-09-22 04:55:53.000000000 +0200
@@ -101,8 +101,8 @@
Consult your database driver's documentation for the available parameters:
* Postgres: `psycopg2 http://initd.org/psycopg/docs/module.html#psycopg2.connect`_
-* MySQL: `MySQLdb http://mysql-python.sourceforge.net/MySQLdb.html#some-mysql-examples`_
* MySQL: `pymysql https://github.com/PyMySQL/PyMySQL/blob/f08f01fe8a59e8acfb5f5add4a8fe874bec2...`_
+* MySQL: `mysqlclient https://github.com/PyMySQL/mysqlclient`_
* SQLite: `sqlite3 https://docs.python.org/2/library/sqlite3.html#sqlite3.connect`_
* CockroachDB: see `psycopg2 http://initd.org/psycopg/docs/module.html#psycopg2.connect`_
@@ -564,7 +564,7 @@
To connect to a MySQL database, we will use :py:class:`MySQLDatabase`. After
the database name, you can specify arbitrary connection parameters that will be
-passed back to the driver (either MySQLdb or pymysql).
+passed back to the driver (e.g. ``pymysql`` or ``mysqlclient``).
.. code-block:: python
@@ -579,6 +579,20 @@
username = CharField()
# etc, etc
+Driver information:
+
+* `pymysql https://github.com/PyMySQL/PyMySQL`_ is a pure-python mysql client,
+ works with python 2 and 3. Peewee will use attempt to use pymysql first.
+* `mysqlclient https://github.com/PyMySQL/mysqlclient-python`_ uses a c
+ extension and supports python 3. It exposes a ``MySQLdb`` module. Peewee will
+ attempt to use this module if pymysql is not installed.
+* ``mysql-python`` is also called `MySQLdb1 https://github.com/farcepest/MySQLdb1`_
+ and is legacy and should not be used. Since this shares the same module name
+ as mysqlclient, same applies.
+* `mysql-connector python https://github.com/mysql/mysql-connector-python`_ pure-python
+ (I think??) supports python 3. To use this driver you can use :ref:`MySQLConnectorDatabase`
+ from the ``playhouse.mysql_ext`` extension.
+
Error 2006: MySQL server has gone away
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/peewee-3.15.2/docs/peewee/playhouse.rst new/peewee-3.15.3/docs/peewee/playhouse.rst
--- old/peewee-3.15.2/docs/peewee/playhouse.rst 2022-08-26 16:08:15.000000000 +0200
+++ new/peewee-3.15.3/docs/peewee/playhouse.rst 2022-09-22 04:55:53.000000000 +0200
@@ -1603,31 +1603,41 @@
the `mariadb-connector https://mariadb-corporation.github.io/mariadb-connector-python/`_.
The implementations can be found in ``playhouse.mysql_ext``.
-Example usage of mysql-connector:
+.. py:class:: MySQLConnectorDatabase(database, **kwargs)
-.. code-block:: python
+ Database implementation using `mysql-connector https://dev.mysql.com/doc/connector-python/en/`_.
+ Full list of supported `connection parameters https://dev.mysql.com/doc/connector-python/en/connector-python-connectargs.h...`_.
- from playhouse.mysql_ext import MySQLConnectorDatabase
+ Example usage of mysql-connector:
- # MySQL database implementation that utilizes mysql-connector driver.
- db = MySQLConnectorDatabase('my_database', host='1.2.3.4', user='mysql')
+ .. code-block:: python
-Example usage of mariadb-connector:
+ from playhouse.mysql_ext import MySQLConnectorDatabase
-.. code-block:: python
+ # MySQL database implementation that utilizes mysql-connector driver.
+ db = MySQLConnectorDatabase('my_database', host='1.2.3.4', user='mysql')
- from playhouse.mysql_ext import MariaDBConnectorDatabase
+.. py:class:: MariaDBConnectorDatabase(database, **kwargs)
- # MySQL database implementation that utilizes mysql-connector driver.
- db = MariaDBConnectorDatabase('my_database', host='1.2.3.4', user='mysql')
+ Database implementation using `mariadb-connector https://mariadb-corporation.github.io/mariadb-connector-python/`_.
+ Full list of supported `connection parameters https://mariadb-corporation.github.io/mariadb-connector-python/module.html#c...`_.
-.. note::
- The :py:class:`MariaDBConnectorDatabase` does **not** accept the following
- parameters:
+ Example usage of mariadb-connector:
- * ``charset`` (it is always utf8mb4)
- * ``sql_mode``
- * ``use_unicode``
+ .. code-block:: python
+
+ from playhouse.mysql_ext import MariaDBConnectorDatabase
+
+ # MySQL database implementation that utilizes mysql-connector driver.
+ db = MariaDBConnectorDatabase('my_database', host='1.2.3.4', user='mysql')
+
+ .. note::
+ The :py:class:`MariaDBConnectorDatabase` does **not** accept the following
+ parameters:
+
+ * ``charset`` (it is always utf8mb4)
+ * ``sql_mode``
+ * ``use_unicode``
Additional MySQL-specific helpers:
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/peewee-3.15.2/peewee.py new/peewee-3.15.3/peewee.py
--- old/peewee-3.15.2/peewee.py 2022-08-26 16:08:15.000000000 +0200
+++ new/peewee-3.15.3/peewee.py 2022-09-22 04:55:53.000000000 +0200
@@ -70,7 +70,7 @@
mysql = None
-__version__ = '3.15.2'
+__version__ = '3.15.3'
__all__ = [
'AnyField',
'AsIs',
@@ -1246,7 +1246,7 @@
'end-point.')
return self.between(item.start, item.stop)
return self == item
- def __iter__(self): raise NotImplementedError # Prevent accidents.
+ __iter__ = None # Prevent infinite loop.
def distinct(self):
return NodeList((SQL('DISTINCT'), self))
@@ -2212,6 +2212,11 @@
return row[0] if row and not as_tuple else row
@database_required
+ def scalars(self, database):
+ for row in self.tuples().execute(database):
+ yield row[0]
+
+ @database_required
def count(self, database, clear_limit=False):
clone = self.order_by().alias('_wrapped')
if clear_limit:
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/peewee-3.15.2/setup.py new/peewee-3.15.3/setup.py
--- old/peewee-3.15.2/setup.py 2022-08-26 16:08:15.000000000 +0200
+++ new/peewee-3.15.3/setup.py 2022-09-22 04:55:53.000000000 +0200
@@ -162,10 +162,10 @@
'Programming Language :: Python :: 3.10',
'Programming Language :: Python :: 3.11',
'Programming Language :: Python :: 3.12',
- 'Programming Language :: Python :: 3.13',
- 'Programming Language :: Python :: 3.14',
- 'Programming Language :: Python :: 3.15',
- 'Programming Language :: Python :: 999.99',
+ #'Programming Language :: Python :: 3.13',
+ #'Programming Language :: Python :: 3.14',
+ #'Programming Language :: Python :: 3.15',
+ #'Programming Language :: Python :: 999.99',
'Topic :: Database',
'Topic :: Software Development :: Libraries :: Python Modules',
],
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/peewee-3.15.2/tests/queries.py new/peewee-3.15.3/tests/queries.py
--- old/peewee-3.15.2/tests/queries.py 2022-08-26 16:08:15.000000000 +0200
+++ new/peewee-3.15.3/tests/queries.py 2022-09-22 04:55:53.000000000 +0200
@@ -116,6 +116,18 @@
query = query.where(Register.value >= 2)
self.assertEqual(query.scalar(as_tuple=True), (15, 3, 5))
+ def test_scalars(self):
+ values = [1.0, 1.5, 2.0, 5.0, 8.0]
+ (Register
+ .insert([{Register.value: value} for value in values])
+ .execute())
+
+ query = Register.select(Register.value).order_by(Register.value)
+ self.assertEqual(list(query.scalars()), values)
+
+ query = query.where(Register.value < 5)
+ self.assertEqual(list(query.scalars()), [1.0, 1.5, 2.0])
+
def test_slicing_select(self):
values = [1., 1., 2., 3., 5., 8.]
(Register
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/peewee-3.15.2/tests/regressions.py new/peewee-3.15.3/tests/regressions.py
--- old/peewee-3.15.2/tests/regressions.py 2022-08-26 16:08:15.000000000 +0200
+++ new/peewee-3.15.3/tests/regressions.py 2022-09-22 04:55:53.000000000 +0200
@@ -1740,4 +1740,4 @@
class TestFunctionInfiniteLoop(BaseTestCase):
def test_function_infinite_loop(self):
- self.assertRaises(NotImplementedError, lambda: list(fn.COUNT()))
+ self.assertRaises(TypeError, lambda: list(fn.COUNT()))
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/peewee-3.15.2/tests/sqlite.py new/peewee-3.15.3/tests/sqlite.py
--- old/peewee-3.15.2/tests/sqlite.py 2022-08-26 16:08:15.000000000 +0200
+++ new/peewee-3.15.3/tests/sqlite.py 2022-09-22 04:55:53.000000000 +0200
@@ -1572,6 +1572,7 @@
cursor = self.database.execute(query)
self.assertEqual(cursor.fetchone()[0], e)
+ @skip_if(sys.byteorder == 'big', 'fails on big endian')
def test_murmur_hash(self):
self.assertHash('testkey', 2871421366)
self.assertHash('murmur', 3883399899)
@@ -2502,8 +2503,12 @@
iq = User.insert_many([{'username': 'u2'}, {'username': 'u3'}])
self.assertEqual(list(iq.execute()), [(2,), (3,)])
- iq = User.insert_many([('u4',), ('u5',)]).as_rowcount()
- self.assertEqual(iq.execute(), 2)
+ # NOTE: sqlite3_changes() does not return the inserted rowcount until
+ # the statement has been consumed. The fact that it returned 2 is a
+ # side-effect of the statement cache and our having consumed the query
+ # in the previous test assertion. So this test is invalid.
+ #iq = User.insert_many([('u4',), ('u5',)]).as_rowcount()
+ #self.assertEqual(iq.execute(), 2)
iq = KVR.insert({'key': 'k1', 'value': 1})
self.assertEqual(iq.execute(), 'k1')
@@ -2511,8 +2516,9 @@
iq = KVR.insert_many([('k2', 2), ('k3', 3)])
self.assertEqual(list(iq.execute()), [('k2',), ('k3',)])
- iq = KVR.insert_many([('k4', 4), ('k5', 5)]).as_rowcount()
- self.assertEqual(iq.execute(), 2)
+ # See note above.
+ #iq = KVR.insert_many([('k4', 4), ('k5', 5)]).as_rowcount()
+ #self.assertEqual(iq.execute(), 2)
def test_insert_on_conflict(self):
KVR.create(key='k1', value=1)