[Python-modules-team] Bug#906701: peewee FTBFS with Python 3.7 as supported version

Adrian Bunk bunk at debian.org
Sun Aug 19 22:52:00 BST 2018


Source: peewee
Version: 2.10.2+dfsg-2
Severity: serious
Tags: ftbfs

https://buildd.debian.org/status/package.php?p=peewee&suite=sid

...
============================= test session starts ==============================
platform linux -- Python 3.7.0, pytest-3.6.2, py-1.5.3, pluggy-0.6.0
rootdir: /<<BUILDDIR>>/peewee-2.10.2+dfsg, inifile:
collected 383 items

tests.py ............................................................... [ 16%]
........................................................................ [ 35%]
........................................................................ [ 54%]
........................................................................ [ 72%]
.......................FFF.............................................. [ 91%]
................................                                         [100%]

=================================== FAILURES ===================================
_____________________ TestQueryResultWrapper.test_iterator _____________________

self = <peewee.NaiveQueryResultWrapper object at 0x7f33bbd339b0>

    def iterator(self):
        while True:
>           yield self.iterate()

peewee.py:2353: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

self = <peewee.NaiveQueryResultWrapper object at 0x7f33bbd339b0>

    def iterate(self):
        row = self.cursor.fetchone()
        if not row:
            self._populated = True
            if not getattr(self.cursor, 'name', None):
                self.cursor.close()
>           raise StopIteration
E           StopIteration

peewee.py:2345: StopIteration

The above exception was the direct cause of the following exception:

self = <playhouse.tests.test_query_results.TestQueryResultWrapper testMethod=test_iterator>

    def test_iterator(self):
        User.create_users(10)
    
        with self.assertQueryCount(1):
            qr = User.select().order_by(User.id).execute()
>           usernames = [u.username for u in qr.iterator()]

playhouse/tests/test_query_results.py:111: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

.0 = <generator object QueryResultWrapper.iterator at 0x7f33bbdb71b0>

>   usernames = [u.username for u in qr.iterator()]
E   RuntimeError: generator raised StopIteration

playhouse/tests/test_query_results.py:111: RuntimeError
------------------------------ Captured log call -------------------------------
peewee.py                 3826 DEBUG    ('DROP TABLE IF EXISTS "comment"', [])
peewee.py                 3826 DEBUG    ('DROP TABLE IF EXISTS "blog"', [])
peewee.py                 3826 DEBUG    ('DROP TABLE IF EXISTS "users"', [])
peewee.py                 3826 DEBUG    ('CREATE TABLE "users" ("id" INTEGER NOT NULL PRIMARY KEY, "username" VARCHAR(255) NOT NULL)', [])
peewee.py                 3826 DEBUG    ('CREATE TABLE "blog" ("pk" INTEGER NOT NULL PRIMARY KEY, "user_id" INTEGER NOT NULL, "title" VARCHAR(25) NOT NULL, "content" TEXT NOT NULL, "pub_date" DATETIME, FOREIGN KEY ("user_id") REFERENCES "users" ("id"))', [])
peewee.py                 3826 DEBUG    ('CREATE INDEX "blog_user_id" ON "blog" ("user_id")', [])
peewee.py                 3826 DEBUG    ('CREATE TABLE "comment" ("id" INTEGER NOT NULL PRIMARY KEY, "blog_id" INTEGER NOT NULL, "comment" VARCHAR(255) NOT NULL, FOREIGN KEY ("blog_id") REFERENCES "blog" ("pk"))', [])
peewee.py                 3826 DEBUG    ('CREATE INDEX "comment_blog_id" ON "comment" ("blog_id")', [])
peewee.py                 3826 DEBUG    ('INSERT INTO "users" ("username") VALUES (?)', ['u1'])
peewee.py                 3826 DEBUG    ('INSERT INTO "users" ("username") VALUES (?)', ['u2'])
peewee.py                 3826 DEBUG    ('INSERT INTO "users" ("username") VALUES (?)', ['u3'])
peewee.py                 3826 DEBUG    ('INSERT INTO "users" ("username") VALUES (?)', ['u4'])
peewee.py                 3826 DEBUG    ('INSERT INTO "users" ("username") VALUES (?)', ['u5'])
peewee.py                 3826 DEBUG    ('INSERT INTO "users" ("username") VALUES (?)', ['u6'])
peewee.py                 3826 DEBUG    ('INSERT INTO "users" ("username") VALUES (?)', ['u7'])
peewee.py                 3826 DEBUG    ('INSERT INTO "users" ("username") VALUES (?)', ['u8'])
peewee.py                 3826 DEBUG    ('INSERT INTO "users" ("username") VALUES (?)', ['u9'])
peewee.py                 3826 DEBUG    ('INSERT INTO "users" ("username") VALUES (?)', ['u10'])
peewee.py                 3826 DEBUG    ('SELECT "t1"."id", "t1"."username" FROM "users" AS t1 ORDER BY "t1"."id"', [])
peewee.py                 3826 DEBUG    ('DROP TABLE IF EXISTS "comment"', [])
peewee.py                 3826 DEBUG    ('DROP TABLE IF EXISTS "blog"', [])
peewee.py                 3826 DEBUG    ('DROP TABLE IF EXISTS "users"', [])
________________ TestQueryResultWrapper.test_iterator_extended _________________

self = <peewee.NaiveQueryResultWrapper object at 0x7f33bbe94898>

    def iterator(self):
        while True:
>           yield self.iterate()

peewee.py:2353: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

self = <peewee.NaiveQueryResultWrapper object at 0x7f33bbe94898>

    def iterate(self):
        row = self.cursor.fetchone()
        if not row:
            self._populated = True
            if not getattr(self.cursor, 'name', None):
                self.cursor.close()
>           raise StopIteration
E           StopIteration

peewee.py:2345: StopIteration

The above exception was the direct cause of the following exception:

self = <playhouse.tests.test_query_results.TestQueryResultWrapper testMethod=test_iterator_extended>

    def test_iterator_extended(self):
        User.create_users(10)
        for i in range(1, 4):
            for j in range(i):
                Blog.create(
                    title='blog-%s-%s' % (i, j),
                    user=User.get(User.username == 'u%s' % i))
    
        qr = (User
              .select(
                  User.username,
                  fn.Count(Blog.pk).alias('ct'))
              .join(Blog)
              .where(User.username << ['u1', 'u2', 'u3'])
              .group_by(User)
              .order_by(User.id)
              .naive())
    
        accum = []
        with self.assertQueryCount(1):
>           for user in qr.iterator():
E           RuntimeError: generator raised StopIteration

playhouse/tests/test_query_results.py:158: RuntimeError
------------------------------ Captured log call -------------------------------
peewee.py                 3826 DEBUG    ('DROP TABLE IF EXISTS "comment"', [])
peewee.py                 3826 DEBUG    ('DROP TABLE IF EXISTS "blog"', [])
peewee.py                 3826 DEBUG    ('DROP TABLE IF EXISTS "users"', [])
peewee.py                 3826 DEBUG    ('CREATE TABLE "users" ("id" INTEGER NOT NULL PRIMARY KEY, "username" VARCHAR(255) NOT NULL)', [])
peewee.py                 3826 DEBUG    ('CREATE TABLE "blog" ("pk" INTEGER NOT NULL PRIMARY KEY, "user_id" INTEGER NOT NULL, "title" VARCHAR(25) NOT NULL, "content" TEXT NOT NULL, "pub_date" DATETIME, FOREIGN KEY ("user_id") REFERENCES "users" ("id"))', [])
peewee.py                 3826 DEBUG    ('CREATE INDEX "blog_user_id" ON "blog" ("user_id")', [])
peewee.py                 3826 DEBUG    ('CREATE TABLE "comment" ("id" INTEGER NOT NULL PRIMARY KEY, "blog_id" INTEGER NOT NULL, "comment" VARCHAR(255) NOT NULL, FOREIGN KEY ("blog_id") REFERENCES "blog" ("pk"))', [])
peewee.py                 3826 DEBUG    ('CREATE INDEX "comment_blog_id" ON "comment" ("blog_id")', [])
peewee.py                 3826 DEBUG    ('INSERT INTO "users" ("username") VALUES (?)', ['u1'])
peewee.py                 3826 DEBUG    ('INSERT INTO "users" ("username") VALUES (?)', ['u2'])
peewee.py                 3826 DEBUG    ('INSERT INTO "users" ("username") VALUES (?)', ['u3'])
peewee.py                 3826 DEBUG    ('INSERT INTO "users" ("username") VALUES (?)', ['u4'])
peewee.py                 3826 DEBUG    ('INSERT INTO "users" ("username") VALUES (?)', ['u5'])
peewee.py                 3826 DEBUG    ('INSERT INTO "users" ("username") VALUES (?)', ['u6'])
peewee.py                 3826 DEBUG    ('INSERT INTO "users" ("username") VALUES (?)', ['u7'])
peewee.py                 3826 DEBUG    ('INSERT INTO "users" ("username") VALUES (?)', ['u8'])
peewee.py                 3826 DEBUG    ('INSERT INTO "users" ("username") VALUES (?)', ['u9'])
peewee.py                 3826 DEBUG    ('INSERT INTO "users" ("username") VALUES (?)', ['u10'])
peewee.py                 3826 DEBUG    ('SELECT "t1"."id", "t1"."username" FROM "users" AS t1 WHERE ("t1"."username" = ?) LIMIT 1 OFFSET 0', ['u1'])
peewee.py                 3826 DEBUG    ('INSERT INTO "blog" ("user_id", "title", "content") VALUES (?, ?, ?)', [1, 'blog-1-0', ''])
peewee.py                 3826 DEBUG    ('SELECT "t1"."id", "t1"."username" FROM "users" AS t1 WHERE ("t1"."username" = ?) LIMIT 1 OFFSET 0', ['u2'])
peewee.py                 3826 DEBUG    ('INSERT INTO "blog" ("user_id", "title", "content") VALUES (?, ?, ?)', [2, 'blog-2-0', ''])
peewee.py                 3826 DEBUG    ('SELECT "t1"."id", "t1"."username" FROM "users" AS t1 WHERE ("t1"."username" = ?) LIMIT 1 OFFSET 0', ['u2'])
peewee.py                 3826 DEBUG    ('INSERT INTO "blog" ("user_id", "title", "content") VALUES (?, ?, ?)', [2, 'blog-2-1', ''])
peewee.py                 3826 DEBUG    ('SELECT "t1"."id", "t1"."username" FROM "users" AS t1 WHERE ("t1"."username" = ?) LIMIT 1 OFFSET 0', ['u3'])
peewee.py                 3826 DEBUG    ('INSERT INTO "blog" ("user_id", "title", "content") VALUES (?, ?, ?)', [3, 'blog-3-0', ''])
peewee.py                 3826 DEBUG    ('SELECT "t1"."id", "t1"."username" FROM "users" AS t1 WHERE ("t1"."username" = ?) LIMIT 1 OFFSET 0', ['u3'])
peewee.py                 3826 DEBUG    ('INSERT INTO "blog" ("user_id", "title", "content") VALUES (?, ?, ?)', [3, 'blog-3-1', ''])
peewee.py                 3826 DEBUG    ('SELECT "t1"."id", "t1"."username" FROM "users" AS t1 WHERE ("t1"."username" = ?) LIMIT 1 OFFSET 0', ['u3'])
peewee.py                 3826 DEBUG    ('INSERT INTO "blog" ("user_id", "title", "content") VALUES (?, ?, ?)', [3, 'blog-3-2', ''])
peewee.py                 3826 DEBUG    ('SELECT "t1"."username", Count("t2"."pk") AS ct FROM "users" AS t1 INNER JOIN "blog" AS t2 ON ("t1"."id" = "t2"."user_id") WHERE ("t1"."username" IN (?, ?, ?)) GROUP BY "t1"."id", "t1"."username" ORDER BY "t1"."id"', ['u1', 'u2', 'u3'])
peewee.py                 3826 DEBUG    ('DROP TABLE IF EXISTS "comment"', [])
peewee.py                 3826 DEBUG    ('DROP TABLE IF EXISTS "blog"', [])
peewee.py                 3826 DEBUG    ('DROP TABLE IF EXISTS "users"', [])
______________ TestQueryResultWrapper.test_iterator_query_method _______________

self = <peewee.NaiveQueryResultWrapper object at 0x7f33bbea9cc0>

    def iterator(self):
        while True:
>           yield self.iterate()

peewee.py:2353: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

self = <peewee.NaiveQueryResultWrapper object at 0x7f33bbea9cc0>

    def iterate(self):
        row = self.cursor.fetchone()
        if not row:
            self._populated = True
            if not getattr(self.cursor, 'name', None):
                self.cursor.close()
>           raise StopIteration
E           StopIteration

peewee.py:2345: StopIteration

The above exception was the direct cause of the following exception:

self = <playhouse.tests.test_query_results.TestQueryResultWrapper testMethod=test_iterator_query_method>

    def test_iterator_query_method(self):
        User.create_users(10)
    
        with self.assertQueryCount(1):
            qr = User.select().order_by(User.id)
>           usernames = [u.username for u in qr.iterator()]

playhouse/tests/test_query_results.py:131: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

.0 = <generator object QueryResultWrapper.iterator at 0x7f33bbe7d9a8>

>   usernames = [u.username for u in qr.iterator()]
E   RuntimeError: generator raised StopIteration

playhouse/tests/test_query_results.py:131: RuntimeError
------------------------------ Captured log call -------------------------------
peewee.py                 3826 DEBUG    ('DROP TABLE IF EXISTS "comment"', [])
peewee.py                 3826 DEBUG    ('DROP TABLE IF EXISTS "blog"', [])
peewee.py                 3826 DEBUG    ('DROP TABLE IF EXISTS "users"', [])
peewee.py                 3826 DEBUG    ('CREATE TABLE "users" ("id" INTEGER NOT NULL PRIMARY KEY, "username" VARCHAR(255) NOT NULL)', [])
peewee.py                 3826 DEBUG    ('CREATE TABLE "blog" ("pk" INTEGER NOT NULL PRIMARY KEY, "user_id" INTEGER NOT NULL, "title" VARCHAR(25) NOT NULL, "content" TEXT NOT NULL, "pub_date" DATETIME, FOREIGN KEY ("user_id") REFERENCES "users" ("id"))', [])
peewee.py                 3826 DEBUG    ('CREATE INDEX "blog_user_id" ON "blog" ("user_id")', [])
peewee.py                 3826 DEBUG    ('CREATE TABLE "comment" ("id" INTEGER NOT NULL PRIMARY KEY, "blog_id" INTEGER NOT NULL, "comment" VARCHAR(255) NOT NULL, FOREIGN KEY ("blog_id") REFERENCES "blog" ("pk"))', [])
peewee.py                 3826 DEBUG    ('CREATE INDEX "comment_blog_id" ON "comment" ("blog_id")', [])
peewee.py                 3826 DEBUG    ('INSERT INTO "users" ("username") VALUES (?)', ['u1'])
peewee.py                 3826 DEBUG    ('INSERT INTO "users" ("username") VALUES (?)', ['u2'])
peewee.py                 3826 DEBUG    ('INSERT INTO "users" ("username") VALUES (?)', ['u3'])
peewee.py                 3826 DEBUG    ('INSERT INTO "users" ("username") VALUES (?)', ['u4'])
peewee.py                 3826 DEBUG    ('INSERT INTO "users" ("username") VALUES (?)', ['u5'])
peewee.py                 3826 DEBUG    ('INSERT INTO "users" ("username") VALUES (?)', ['u6'])
peewee.py                 3826 DEBUG    ('INSERT INTO "users" ("username") VALUES (?)', ['u7'])
peewee.py                 3826 DEBUG    ('INSERT INTO "users" ("username") VALUES (?)', ['u8'])
peewee.py                 3826 DEBUG    ('INSERT INTO "users" ("username") VALUES (?)', ['u9'])
peewee.py                 3826 DEBUG    ('INSERT INTO "users" ("username") VALUES (?)', ['u10'])
peewee.py                 3826 DEBUG    ('SELECT "t1"."id", "t1"."username" FROM "users" AS t1 ORDER BY "t1"."id"', [])
peewee.py                 3826 DEBUG    ('DROP TABLE IF EXISTS "comment"', [])
peewee.py                 3826 DEBUG    ('DROP TABLE IF EXISTS "blog"', [])
peewee.py                 3826 DEBUG    ('DROP TABLE IF EXISTS "users"', [])
=============================== warnings summary ===============================
tests.py
  cannot collect 'test_db' because it is not a function.

tests.py::TestDatabase
  cannot collect test class 'TestDatabase' because it has a __init__ constructor

tests.py::TestModel
  cannot collect test class 'TestModel' because it has a __init__ constructor

tests.py::TestModelA
  cannot collect test class 'TestModelA' because it has a __init__ constructor

tests.py::TestModelB
  cannot collect test class 'TestModelB' because it has a __init__ constructor

tests.py::TestModelC
  cannot collect test class 'TestModelC' because it has a __init__ constructor

tests.py::TestingID
  cannot collect test class 'TestingID' because it has a __init__ constructor

-- Docs: http://doc.pytest.org/en/latest/warnings.html
=============== 3 failed, 380 passed, 7 warnings in 3.79 seconds ===============
make[1]: *** [debian/rules:43: override_dh_auto_test] Error 1



More information about the Python-modules-team mailing list