url stringlengths 53 56 | repository_url stringclasses 1
value | labels_url stringlengths 67 70 | comments_url stringlengths 62 65 | events_url stringlengths 60 63 | html_url stringlengths 41 46 | id int64 450k 1.69B | node_id stringlengths 18 32 | number int64 1 2.72k | title stringlengths 1 209 | user dict | labels list | state stringclasses 1
value | locked bool 2
classes | assignee null | assignees list | milestone null | comments list | created_at timestamp[s] | updated_at timestamp[s] | closed_at timestamp[s] | author_association stringclasses 3
values | active_lock_reason stringclasses 2
values | body stringlengths 0 104k ⌀ | reactions dict | timeline_url stringlengths 62 65 | performed_via_github_app null | state_reason stringclasses 2
values | draft bool 2
classes | pull_request dict |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
https://api.github.com/repos/coleifer/peewee/issues/2218 | https://api.github.com/repos/coleifer/peewee | https://api.github.com/repos/coleifer/peewee/issues/2218/labels{/name} | https://api.github.com/repos/coleifer/peewee/issues/2218/comments | https://api.github.com/repos/coleifer/peewee/issues/2218/events | https://github.com/coleifer/peewee/issues/2218 | 651,238,790 | MDU6SXNzdWU2NTEyMzg3OTA= | 2,218 | How to get ridoff double quotes | {
"login": "wilberh",
"id": 6799242,
"node_id": "MDQ6VXNlcjY3OTkyNDI=",
"avatar_url": "https://avatars.githubusercontent.com/u/6799242?v=4",
"gravatar_id": "",
"url": "https://api.github.com/users/wilberh",
"html_url": "https://github.com/wilberh",
"followers_url": "https://api.github.com/users/wilberh/... | [] | closed | false | null | [] | null | [
"Responded to this when you asked on a different issue: https://github.com/coleifer/peewee/issues/2064#issuecomment-654236281\r\n\r\nThe alternative is to maintain a list of all sql reserved words and only quote words when they happen to collide with a sql keyword, and that seems silly. Quoting identifiers is the b... | 2020-07-06T04:32:40 | 2020-07-06T13:27:39 | 2020-07-06T13:27:39 | NONE | null | I'm using a database driver that is DB API (PEP-249) v2.0 compliant.
How can I tell peewee to not add double quotes on everything?
ex:
My base class is inheriting from the Model class. Whenever I call ItemModel.select() and noticed peewee is adding double quotes. How can I configure the class Model to not add do... | {
"url": "https://api.github.com/repos/coleifer/peewee/issues/2218/reactions",
"total_count": 0,
"+1": 0,
"-1": 0,
"laugh": 0,
"hooray": 0,
"confused": 0,
"heart": 0,
"rocket": 0,
"eyes": 0
} | https://api.github.com/repos/coleifer/peewee/issues/2218/timeline | null | completed | null | null |
https://api.github.com/repos/coleifer/peewee/issues/2217 | https://api.github.com/repos/coleifer/peewee | https://api.github.com/repos/coleifer/peewee/issues/2217/labels{/name} | https://api.github.com/repos/coleifer/peewee/issues/2217/comments | https://api.github.com/repos/coleifer/peewee/issues/2217/events | https://github.com/coleifer/peewee/issues/2217 | 650,911,828 | MDU6SXNzdWU2NTA5MTE4Mjg= | 2,217 | Multiple joins on same table produces ambiguous column name | {
"login": "Zverik",
"id": 766031,
"node_id": "MDQ6VXNlcjc2NjAzMQ==",
"avatar_url": "https://avatars.githubusercontent.com/u/766031?v=4",
"gravatar_id": "",
"url": "https://api.github.com/users/Zverik",
"html_url": "https://github.com/Zverik",
"followers_url": "https://api.github.com/users/Zverik/follow... | [] | closed | false | null | [] | null | [
">I have solved this with MailCode.alias()\r\n\r\nThis is the peewee-official way to do reference the same table in multiple contexts within a single query."
] | 2020-07-04T15:40:56 | 2020-07-04T15:50:51 | 2020-07-04T15:50:51 | CONTRIBUTOR | null | I've got this code that inner joins the same table twice:
```
cnt = (
User.select()
.join_from(User, MailCode, on=MailCode.sent_by)
.join_from(User, MailCode, on=Mail... | {
"url": "https://api.github.com/repos/coleifer/peewee/issues/2217/reactions",
"total_count": 0,
"+1": 0,
"-1": 0,
"laugh": 0,
"hooray": 0,
"confused": 0,
"heart": 0,
"rocket": 0,
"eyes": 0
} | https://api.github.com/repos/coleifer/peewee/issues/2217/timeline | null | completed | null | null |
https://api.github.com/repos/coleifer/peewee/issues/2216 | https://api.github.com/repos/coleifer/peewee | https://api.github.com/repos/coleifer/peewee/issues/2216/labels{/name} | https://api.github.com/repos/coleifer/peewee/issues/2216/comments | https://api.github.com/repos/coleifer/peewee/issues/2216/events | https://github.com/coleifer/peewee/issues/2216 | 650,052,367 | MDU6SXNzdWU2NTAwNTIzNjc= | 2,216 | Any integration with Hadoop (Hive)? | {
"login": "wilberh",
"id": 6799242,
"node_id": "MDQ6VXNlcjY3OTkyNDI=",
"avatar_url": "https://avatars.githubusercontent.com/u/6799242?v=4",
"gravatar_id": "",
"url": "https://api.github.com/users/wilberh",
"html_url": "https://github.com/wilberh",
"followers_url": "https://api.github.com/users/wilberh/... | [] | closed | false | null | [] | null | [
"never heard of it. Read the manual:\r\n\r\nhttp://docs.peewee-orm.com/en/latest/peewee/database.html#adding-a-new-database-driver"
] | 2020-07-02T16:11:48 | 2020-07-02T16:33:39 | 2020-07-02T16:33:38 | NONE | null | Does Peewee have support / extension for Hadoop (Hive / Pyhive)? | {
"url": "https://api.github.com/repos/coleifer/peewee/issues/2216/reactions",
"total_count": 0,
"+1": 0,
"-1": 0,
"laugh": 0,
"hooray": 0,
"confused": 0,
"heart": 0,
"rocket": 0,
"eyes": 0
} | https://api.github.com/repos/coleifer/peewee/issues/2216/timeline | null | completed | null | null |
https://api.github.com/repos/coleifer/peewee/issues/2215 | https://api.github.com/repos/coleifer/peewee | https://api.github.com/repos/coleifer/peewee/issues/2215/labels{/name} | https://api.github.com/repos/coleifer/peewee/issues/2215/comments | https://api.github.com/repos/coleifer/peewee/issues/2215/events | https://github.com/coleifer/peewee/issues/2215 | 648,096,937 | MDU6SXNzdWU2NDgwOTY5Mzc= | 2,215 | peewee + asyncpg | {
"login": "jet10000",
"id": 2258120,
"node_id": "MDQ6VXNlcjIyNTgxMjA=",
"avatar_url": "https://avatars.githubusercontent.com/u/2258120?v=4",
"gravatar_id": "",
"url": "https://api.github.com/users/jet10000",
"html_url": "https://github.com/jet10000",
"followers_url": "https://api.github.com/users/jet10... | [] | closed | false | null | [] | null | [] | 2020-06-30T11:29:09 | 2020-06-30T13:08:18 | 2020-06-30T13:08:18 | NONE | null | I want to use peewee to manage tables and queries, use peewee to generate sql queries, and then use asyncpg to execute. How can I do it? I hope there is an example.
```
import asyncio
import asyncpg
from devtools import debug
from auth.models import User
async def main():
conn = await asyncpg.connect('po... | {
"url": "https://api.github.com/repos/coleifer/peewee/issues/2215/reactions",
"total_count": 0,
"+1": 0,
"-1": 0,
"laugh": 0,
"hooray": 0,
"confused": 0,
"heart": 0,
"rocket": 0,
"eyes": 0
} | https://api.github.com/repos/coleifer/peewee/issues/2215/timeline | null | completed | null | null |
https://api.github.com/repos/coleifer/peewee/issues/2214 | https://api.github.com/repos/coleifer/peewee | https://api.github.com/repos/coleifer/peewee/issues/2214/labels{/name} | https://api.github.com/repos/coleifer/peewee/issues/2214/comments | https://api.github.com/repos/coleifer/peewee/issues/2214/events | https://github.com/coleifer/peewee/issues/2214 | 647,989,124 | MDU6SXNzdWU2NDc5ODkxMjQ= | 2,214 | Add UUIDKeyField for postgres | {
"login": "jet10000",
"id": 2258120,
"node_id": "MDQ6VXNlcjIyNTgxMjA=",
"avatar_url": "https://avatars.githubusercontent.com/u/2258120?v=4",
"gravatar_id": "",
"url": "https://api.github.com/users/jet10000",
"html_url": "https://github.com/jet10000",
"followers_url": "https://api.github.com/users/jet10... | [] | closed | false | null | [] | null | [
"CockroachDB provides this function out-of-the-box. Postgres requires an extension, so it is not provided as a built-in. It is quite easy to add this if you want it, though -- just use the implementation from cockroachdb or create your own subclass.",
"PostgreSQL 13 \r\nhttps://www.postgresql.org/docs/13/function... | 2020-06-30T08:46:05 | 2020-10-10T18:17:58 | 2020-06-30T13:11:35 | NONE | null | I found a UUIDKeyField in cockroachdb, Please add a UUIDKeyField for PostgreSQL, the default value `gen_random_uuid()`.
```
CREATE EXTENSION IF NOT EXISTS "pgcrypto";
```
https://medium.com/@shawnoy/generate-a-uuid-as-postgresql-default-value-fc0ae41a37d2
if extension not exists, reminder to install this exten... | {
"url": "https://api.github.com/repos/coleifer/peewee/issues/2214/reactions",
"total_count": 0,
"+1": 0,
"-1": 0,
"laugh": 0,
"hooray": 0,
"confused": 0,
"heart": 0,
"rocket": 0,
"eyes": 0
} | https://api.github.com/repos/coleifer/peewee/issues/2214/timeline | null | completed | null | null |
https://api.github.com/repos/coleifer/peewee/issues/2213 | https://api.github.com/repos/coleifer/peewee | https://api.github.com/repos/coleifer/peewee/issues/2213/labels{/name} | https://api.github.com/repos/coleifer/peewee/issues/2213/comments | https://api.github.com/repos/coleifer/peewee/issues/2213/events | https://github.com/coleifer/peewee/pull/2213 | 646,426,772 | MDExOlB1bGxSZXF1ZXN0NDQwNzE4MDI5 | 2,213 | Fix invalid escape sequence in regex | {
"login": "narusemotoki",
"id": 1593495,
"node_id": "MDQ6VXNlcjE1OTM0OTU=",
"avatar_url": "https://avatars.githubusercontent.com/u/1593495?v=4",
"gravatar_id": "",
"url": "https://api.github.com/users/narusemotoki",
"html_url": "https://github.com/narusemotoki",
"followers_url": "https://api.github.com... | [] | closed | false | null | [] | null | [] | 2020-06-26T18:04:51 | 2020-06-26T18:27:33 | 2020-06-26T18:20:14 | CONTRIBUTOR | null | Hello.
Lint tools told me about `\` in regex. I think it's better to be raw strings.
pycodestyle says me:
```
playhouse/cockroachdb.py:71:48: W605 invalid escape sequence '\d'
playhouse/cockroachdb.py:71:52: W605 invalid escape sequence '\.'
playhouse/cockroachdb.py:71:55: W605 invalid escape sequence '\d'
pla... | {
"url": "https://api.github.com/repos/coleifer/peewee/issues/2213/reactions",
"total_count": 0,
"+1": 0,
"-1": 0,
"laugh": 0,
"hooray": 0,
"confused": 0,
"heart": 0,
"rocket": 0,
"eyes": 0
} | https://api.github.com/repos/coleifer/peewee/issues/2213/timeline | null | null | false | {
"url": "https://api.github.com/repos/coleifer/peewee/pulls/2213",
"html_url": "https://github.com/coleifer/peewee/pull/2213",
"diff_url": "https://github.com/coleifer/peewee/pull/2213.diff",
"patch_url": "https://github.com/coleifer/peewee/pull/2213.patch",
"merged_at": "2020-06-26T18:20:14"
} |
https://api.github.com/repos/coleifer/peewee/issues/2212 | https://api.github.com/repos/coleifer/peewee | https://api.github.com/repos/coleifer/peewee/issues/2212/labels{/name} | https://api.github.com/repos/coleifer/peewee/issues/2212/comments | https://api.github.com/repos/coleifer/peewee/issues/2212/events | https://github.com/coleifer/peewee/issues/2212 | 645,963,760 | MDU6SXNzdWU2NDU5NjM3NjA= | 2,212 | Field in query results has ") appended to its name | {
"login": "zacc",
"id": 966053,
"node_id": "MDQ6VXNlcjk2NjA1Mw==",
"avatar_url": "https://avatars.githubusercontent.com/u/966053?v=4",
"gravatar_id": "",
"url": "https://api.github.com/users/zacc",
"html_url": "https://github.com/zacc",
"followers_url": "https://api.github.com/users/zacc/followers",
... | [] | closed | false | null | [] | null | [
"You're probably using an older version of Sqlite(?) or otherwise the database is generating a column-name for your MAX value like 'MAX(\"t1\".\"score\")'. Just specify an alias:\r\n\r\n```python\r\nfn.MAX(Comment.score).alias('max_score')\r\n```\r\n\r\nThen it will be available as the \"max_score\" attribute.",
... | 2020-06-26T02:32:48 | 2020-06-27T01:56:21 | 2020-06-26T13:06:52 | NONE | null | Executing this query in Python\:
`Comment.select(Comment.submission_id, Comment.id, fn.Max(Comment.score)).group_by(Comment.submission_id)`
The `.sql()` output of the query is:
`('SELECT "t1"."submission_id", "t1"."id", Max("t1"."score") FROM "comment" AS "t1" GROUP BY "t1"."submission_id"', [])`
Running `print... | {
"url": "https://api.github.com/repos/coleifer/peewee/issues/2212/reactions",
"total_count": 0,
"+1": 0,
"-1": 0,
"laugh": 0,
"hooray": 0,
"confused": 0,
"heart": 0,
"rocket": 0,
"eyes": 0
} | https://api.github.com/repos/coleifer/peewee/issues/2212/timeline | null | completed | null | null |
https://api.github.com/repos/coleifer/peewee/issues/2211 | https://api.github.com/repos/coleifer/peewee | https://api.github.com/repos/coleifer/peewee/issues/2211/labels{/name} | https://api.github.com/repos/coleifer/peewee/issues/2211/comments | https://api.github.com/repos/coleifer/peewee/issues/2211/events | https://github.com/coleifer/peewee/pull/2211 | 643,289,554 | MDExOlB1bGxSZXF1ZXN0NDM4MTE4NDkw | 2,211 | Fix for Falcon integration example code | {
"login": "zgoda",
"id": 141999,
"node_id": "MDQ6VXNlcjE0MTk5OQ==",
"avatar_url": "https://avatars.githubusercontent.com/u/141999?v=4",
"gravatar_id": "",
"url": "https://api.github.com/users/zgoda",
"html_url": "https://github.com/zgoda",
"followers_url": "https://api.github.com/users/zgoda/followers"... | [] | closed | false | null | [] | null | [] | 2020-06-22T18:50:50 | 2020-06-22T20:44:13 | 2020-06-22T20:40:25 | CONTRIBUTOR | null | The signature for response processing in middlewares has one more argument (see https://falcon.readthedocs.io/en/stable/api/middleware.html) | {
"url": "https://api.github.com/repos/coleifer/peewee/issues/2211/reactions",
"total_count": 0,
"+1": 0,
"-1": 0,
"laugh": 0,
"hooray": 0,
"confused": 0,
"heart": 0,
"rocket": 0,
"eyes": 0
} | https://api.github.com/repos/coleifer/peewee/issues/2211/timeline | null | null | false | {
"url": "https://api.github.com/repos/coleifer/peewee/pulls/2211",
"html_url": "https://github.com/coleifer/peewee/pull/2211",
"diff_url": "https://github.com/coleifer/peewee/pull/2211.diff",
"patch_url": "https://github.com/coleifer/peewee/pull/2211.patch",
"merged_at": "2020-06-22T20:40:25"
} |
https://api.github.com/repos/coleifer/peewee/issues/2210 | https://api.github.com/repos/coleifer/peewee | https://api.github.com/repos/coleifer/peewee/issues/2210/labels{/name} | https://api.github.com/repos/coleifer/peewee/issues/2210/comments | https://api.github.com/repos/coleifer/peewee/issues/2210/events | https://github.com/coleifer/peewee/issues/2210 | 643,203,713 | MDU6SXNzdWU2NDMyMDM3MTM= | 2,210 | Use JSONField with database proxy? | {
"login": "LVerneyPEReN",
"id": 58298410,
"node_id": "MDQ6VXNlcjU4Mjk4NDEw",
"avatar_url": "https://avatars.githubusercontent.com/u/58298410?v=4",
"gravatar_id": "",
"url": "https://api.github.com/users/LVerneyPEReN",
"html_url": "https://github.com/LVerneyPEReN",
"followers_url": "https://api.github.c... | [] | closed | false | null | [] | null | [
"No, that's not really do-able, as each database tends to require it's own form of syntax and operations.",
"You could try to apply a hook when the database proxy is initialized, which at that point would add the correct Json field to the model instance, I guess?",
"Digging into `peewee` code, I came across htt... | 2020-06-22T16:20:46 | 2020-06-23T07:52:49 | 2020-06-22T18:00:11 | NONE | null | Hi,
I see that Playhouse extensions have dedicated `JSONField` for each database implementation. However, I did not find an abstract `JSONField` which could be used in a database proxy scenario.
For instance, I am using something like:
```python
import peewee
from playhouse.db_url import connect
database_... | {
"url": "https://api.github.com/repos/coleifer/peewee/issues/2210/reactions",
"total_count": 0,
"+1": 0,
"-1": 0,
"laugh": 0,
"hooray": 0,
"confused": 0,
"heart": 0,
"rocket": 0,
"eyes": 0
} | https://api.github.com/repos/coleifer/peewee/issues/2210/timeline | null | completed | null | null |
https://api.github.com/repos/coleifer/peewee/issues/2209 | https://api.github.com/repos/coleifer/peewee | https://api.github.com/repos/coleifer/peewee/issues/2209/labels{/name} | https://api.github.com/repos/coleifer/peewee/issues/2209/comments | https://api.github.com/repos/coleifer/peewee/issues/2209/events | https://github.com/coleifer/peewee/issues/2209 | 642,285,170 | MDU6SXNzdWU2NDIyODUxNzA= | 2,209 | peewee.ProgrammingError: missing FROM-clause entry for table "t1" | {
"login": "jet10000",
"id": 2258120,
"node_id": "MDQ6VXNlcjIyNTgxMjA=",
"avatar_url": "https://avatars.githubusercontent.com/u/2258120?v=4",
"gravatar_id": "",
"url": "https://api.github.com/users/jet10000",
"html_url": "https://github.com/jet10000",
"followers_url": "https://api.github.com/users/jet10... | [] | closed | false | null | [] | null | [
"I can't see a problem in the SQL being generated. Can you provide the SQL for a working version and highlight the differences? Also what database are you using?",
"PostgreSQL12\r\n\r\n",
"Can you provide the SQL for a working version?",
"```\r\nquery3 = Bookchapter.select(\r\n Bookchapter.id,\r\n Bookc... | 2020-06-20T01:46:12 | 2020-06-22T14:07:53 | 2020-06-22T14:07:53 | NONE | null | ```
query3 = Bookchapter.select(
Bookchapter.id,
Bookchapter.chapter,
)
Books.insert_from(query3, fields=[
Books.id,
Books.chapter
]).on_conflict(
conflict_target=[Books.id],
update={Books.chapter: Bookchapter.chapter}
).execute()
```
| {
"url": "https://api.github.com/repos/coleifer/peewee/issues/2209/reactions",
"total_count": 0,
"+1": 0,
"-1": 0,
"laugh": 0,
"hooray": 0,
"confused": 0,
"heart": 0,
"rocket": 0,
"eyes": 0
} | https://api.github.com/repos/coleifer/peewee/issues/2209/timeline | null | completed | null | null |
https://api.github.com/repos/coleifer/peewee/issues/2208 | https://api.github.com/repos/coleifer/peewee | https://api.github.com/repos/coleifer/peewee/issues/2208/labels{/name} | https://api.github.com/repos/coleifer/peewee/issues/2208/comments | https://api.github.com/repos/coleifer/peewee/issues/2208/events | https://github.com/coleifer/peewee/pull/2208 | 642,277,642 | MDExOlB1bGxSZXF1ZXN0NDM3MzQyOTc1 | 2,208 | Add missing parenthesis in sqlite_ext docs | {
"login": "jinai",
"id": 7669687,
"node_id": "MDQ6VXNlcjc2Njk2ODc=",
"avatar_url": "https://avatars.githubusercontent.com/u/7669687?v=4",
"gravatar_id": "",
"url": "https://api.github.com/users/jinai",
"html_url": "https://github.com/jinai",
"followers_url": "https://api.github.com/users/jinai/follower... | [] | closed | false | null | [] | null | [] | 2020-06-20T00:54:30 | 2020-06-20T01:08:01 | 2020-06-20T01:08:01 | CONTRIBUTOR | null | If you were to copy and paste the first example in the `Getting started` section of the sqlite_ext docs,
you'd get a `SyntaxError`. | {
"url": "https://api.github.com/repos/coleifer/peewee/issues/2208/reactions",
"total_count": 0,
"+1": 0,
"-1": 0,
"laugh": 0,
"hooray": 0,
"confused": 0,
"heart": 0,
"rocket": 0,
"eyes": 0
} | https://api.github.com/repos/coleifer/peewee/issues/2208/timeline | null | null | false | {
"url": "https://api.github.com/repos/coleifer/peewee/pulls/2208",
"html_url": "https://github.com/coleifer/peewee/pull/2208",
"diff_url": "https://github.com/coleifer/peewee/pull/2208.diff",
"patch_url": "https://github.com/coleifer/peewee/pull/2208.patch",
"merged_at": "2020-06-20T01:08:01"
} |
https://api.github.com/repos/coleifer/peewee/issues/2207 | https://api.github.com/repos/coleifer/peewee | https://api.github.com/repos/coleifer/peewee/issues/2207/labels{/name} | https://api.github.com/repos/coleifer/peewee/issues/2207/comments | https://api.github.com/repos/coleifer/peewee/issues/2207/events | https://github.com/coleifer/peewee/issues/2207 | 641,850,068 | MDU6SXNzdWU2NDE4NTAwNjg= | 2,207 | AttributeError: module 'Person' has no attribute '_meta' | {
"login": "teamcloud-jh",
"id": 66046114,
"node_id": "MDQ6VXNlcjY2MDQ2MTE0",
"avatar_url": "https://avatars.githubusercontent.com/u/66046114?v=4",
"gravatar_id": "",
"url": "https://api.github.com/users/teamcloud-jh",
"html_url": "https://github.com/teamcloud-jh",
"followers_url": "https://api.github.c... | [] | closed | false | null | [] | null | [
"It seems like `Person` does not inherit `Model`. You did not put the code for `Person` so it's just a guess.",
"Thanks for the reply.\r\n\r\nHowever, I do have Person inherit Model.\r\n\r\nCode:\r\n> from peewee import *\r\n> class Person(Model):\r\n\r\nAlso tried\r\n> import peewee\r\n> class Person(peewee.Mode... | 2020-06-19T09:54:10 | 2020-06-22T05:19:09 | 2020-06-19T12:53:01 | NONE | null | Unable to create a table containing foreign keys due to this error.
Code:
import peewee
import Person
db = peewee.MySQLDatabase('database', user='user', passwd='')
class Activity(peewee.Model):
id = peewee.CharField(primary_key=True)
userId = peewee.ForeignKeyField(model=Person)
... | {
"url": "https://api.github.com/repos/coleifer/peewee/issues/2207/reactions",
"total_count": 0,
"+1": 0,
"-1": 0,
"laugh": 0,
"hooray": 0,
"confused": 0,
"heart": 0,
"rocket": 0,
"eyes": 0
} | https://api.github.com/repos/coleifer/peewee/issues/2207/timeline | null | completed | null | null |
https://api.github.com/repos/coleifer/peewee/issues/2206 | https://api.github.com/repos/coleifer/peewee | https://api.github.com/repos/coleifer/peewee/issues/2206/labels{/name} | https://api.github.com/repos/coleifer/peewee/issues/2206/comments | https://api.github.com/repos/coleifer/peewee/issues/2206/events | https://github.com/coleifer/peewee/issues/2206 | 641,489,194 | MDU6SXNzdWU2NDE0ODkxOTQ= | 2,206 | Hadaoop (hdfs) extension? | {
"login": "wilberh",
"id": 6799242,
"node_id": "MDQ6VXNlcjY3OTkyNDI=",
"avatar_url": "https://avatars.githubusercontent.com/u/6799242?v=4",
"gravatar_id": "",
"url": "https://api.github.com/users/wilberh",
"html_url": "https://github.com/wilberh",
"followers_url": "https://api.github.com/users/wilberh/... | [] | closed | false | null | [] | null | [
"No"
] | 2020-06-18T19:16:18 | 2020-06-18T22:13:03 | 2020-06-18T22:13:03 | NONE | null | Any Hadoop (hdfs) extension available? | {
"url": "https://api.github.com/repos/coleifer/peewee/issues/2206/reactions",
"total_count": 0,
"+1": 0,
"-1": 0,
"laugh": 0,
"hooray": 0,
"confused": 0,
"heart": 0,
"rocket": 0,
"eyes": 0
} | https://api.github.com/repos/coleifer/peewee/issues/2206/timeline | null | completed | null | null |
https://api.github.com/repos/coleifer/peewee/issues/2205 | https://api.github.com/repos/coleifer/peewee | https://api.github.com/repos/coleifer/peewee/issues/2205/labels{/name} | https://api.github.com/repos/coleifer/peewee/issues/2205/comments | https://api.github.com/repos/coleifer/peewee/issues/2205/events | https://github.com/coleifer/peewee/issues/2205 | 639,440,781 | MDU6SXNzdWU2Mzk0NDA3ODE= | 2,205 | LATERAL constant string doesn't have JOIN inside | {
"login": "lephuongbg",
"id": 1001176,
"node_id": "MDQ6VXNlcjEwMDExNzY=",
"avatar_url": "https://avatars.githubusercontent.com/u/1001176?v=4",
"gravatar_id": "",
"url": "https://api.github.com/users/lephuongbg",
"html_url": "https://github.com/lephuongbg",
"followers_url": "https://api.github.com/users... | [] | closed | false | null | [] | null | [
"I'm following the examples provided here in pg's doc: https://www.postgresql.org/docs/current/queries-table-expressions.html#QUERIES-LATERAL\r\n\r\nI suppose we probably also need to support an inner lateral join, too, though I'm not sure how that would be used.",
"The way I'm currently going to address this is ... | 2020-06-16T07:34:37 | 2020-06-17T08:18:23 | 2020-06-16T15:28:10 | NONE | null | `JOIN.LATERAL` constant string currently only contains `'LATERAL'`, which causes syntax error with Postgresql. It should be either `'INNER JOIN LATERAL'` or simply `'JOIN LATERAL'`
`JOIN.LEFT_LATERAL` is correct though (`'LEFT JOIN LATERAL'`). | {
"url": "https://api.github.com/repos/coleifer/peewee/issues/2205/reactions",
"total_count": 0,
"+1": 0,
"-1": 0,
"laugh": 0,
"hooray": 0,
"confused": 0,
"heart": 0,
"rocket": 0,
"eyes": 0
} | https://api.github.com/repos/coleifer/peewee/issues/2205/timeline | null | completed | null | null |
https://api.github.com/repos/coleifer/peewee/issues/2204 | https://api.github.com/repos/coleifer/peewee | https://api.github.com/repos/coleifer/peewee/issues/2204/labels{/name} | https://api.github.com/repos/coleifer/peewee/issues/2204/comments | https://api.github.com/repos/coleifer/peewee/issues/2204/events | https://github.com/coleifer/peewee/issues/2204 | 639,403,185 | MDU6SXNzdWU2Mzk0MDMxODU= | 2,204 | Peewee/psychopg2 always in transaction mode | {
"login": "RickMeasham",
"id": 79414,
"node_id": "MDQ6VXNlcjc5NDE0",
"avatar_url": "https://avatars.githubusercontent.com/u/79414?v=4",
"gravatar_id": "",
"url": "https://api.github.com/users/RickMeasham",
"html_url": "https://github.com/RickMeasham",
"followers_url": "https://api.github.com/users/Rick... | [] | closed | false | null | [] | null | [
">When there's a database error, postgres leaves me in a failed transaction.\r\n\r\nYes, in which case you should issue a rollback.\r\n\r\nPeewee is currently designed to work *with* psycopg2's transaction handling. Setting `autocommit=True` may break Peewee's transactional APIs or may have other unintended consequ... | 2020-06-16T06:22:38 | 2020-06-16T13:27:09 | 2020-06-16T13:27:08 | NONE | null | When there's a database error, postgres leaves me in a failed transaction. This appears to be because psycopg2 [defaults to manual commits](https://www.psycopg.org/docs/connection.html#connection.autocommit). So I updated the connection to pass through `autocommit=True` but it appears I'm still stuck in failed transact... | {
"url": "https://api.github.com/repos/coleifer/peewee/issues/2204/reactions",
"total_count": 0,
"+1": 0,
"-1": 0,
"laugh": 0,
"hooray": 0,
"confused": 0,
"heart": 0,
"rocket": 0,
"eyes": 0
} | https://api.github.com/repos/coleifer/peewee/issues/2204/timeline | null | completed | null | null |
https://api.github.com/repos/coleifer/peewee/issues/2203 | https://api.github.com/repos/coleifer/peewee | https://api.github.com/repos/coleifer/peewee/issues/2203/labels{/name} | https://api.github.com/repos/coleifer/peewee/issues/2203/comments | https://api.github.com/repos/coleifer/peewee/issues/2203/events | https://github.com/coleifer/peewee/issues/2203 | 638,199,563 | MDU6SXNzdWU2MzgxOTk1NjM= | 2,203 | How to scrape an img src url? | {
"login": "xdebbie",
"id": 57162213,
"node_id": "MDQ6VXNlcjU3MTYyMjEz",
"avatar_url": "https://avatars.githubusercontent.com/u/57162213?v=4",
"gravatar_id": "",
"url": "https://api.github.com/users/xdebbie",
"html_url": "https://github.com/xdebbie",
"followers_url": "https://api.github.com/users/xdebbi... | [] | closed | false | null | [] | null | [
"This is a question about some scraping library you are using. peewee issue tracker is not for questions, much less questions about a completely unrelated and unidentified html library.\r\n"
] | 2020-06-13T17:25:50 | 2020-06-13T17:32:20 | 2020-06-13T17:32:19 | NONE | null | I'm using peewee to scrape a webpage, and everything is working fine except when I try to get the url of an "img src=" tag. Does anyone know what is the correct syntax to get the url?
My code goes like this:
```
# record label
label = resp.html.find('.labels-list__item')
if label:
data['lab... | {
"url": "https://api.github.com/repos/coleifer/peewee/issues/2203/reactions",
"total_count": 1,
"+1": 0,
"-1": 1,
"laugh": 0,
"hooray": 0,
"confused": 0,
"heart": 0,
"rocket": 0,
"eyes": 0
} | https://api.github.com/repos/coleifer/peewee/issues/2203/timeline | null | completed | null | null |
https://api.github.com/repos/coleifer/peewee/issues/2202 | https://api.github.com/repos/coleifer/peewee | https://api.github.com/repos/coleifer/peewee/issues/2202/labels{/name} | https://api.github.com/repos/coleifer/peewee/issues/2202/comments | https://api.github.com/repos/coleifer/peewee/issues/2202/events | https://github.com/coleifer/peewee/issues/2202 | 637,362,997 | MDU6SXNzdWU2MzczNjI5OTc= | 2,202 | model to dict extra_attrs | {
"login": "JPilarr",
"id": 45560120,
"node_id": "MDQ6VXNlcjQ1NTYwMTIw",
"avatar_url": "https://avatars.githubusercontent.com/u/45560120?v=4",
"gravatar_id": "",
"url": "https://api.github.com/users/JPilarr",
"html_url": "https://github.com/JPilarr",
"followers_url": "https://api.github.com/users/JPilar... | [] | closed | false | null | [] | null | [
"I'm sorry but I don't understand the question, what these special field subclasses are, or really what the problem is."
] | 2020-06-11T22:39:15 | 2020-06-15T00:28:46 | 2020-06-15T00:28:46 | NONE | null | Hello,
i have model like.
```
class Printer(pw.Model, ch.Model):
# DB fields
id = pw.AutoField(primary_key=True)
name = pw.CharField()
# cache field stored in redis
state = ch.CharField(default=State.OFFLINE.name)
```
i have problem serialize redis part of model by model_to_dict. If i us... | {
"url": "https://api.github.com/repos/coleifer/peewee/issues/2202/reactions",
"total_count": 0,
"+1": 0,
"-1": 0,
"laugh": 0,
"hooray": 0,
"confused": 0,
"heart": 0,
"rocket": 0,
"eyes": 0
} | https://api.github.com/repos/coleifer/peewee/issues/2202/timeline | null | completed | null | null |
https://api.github.com/repos/coleifer/peewee/issues/2201 | https://api.github.com/repos/coleifer/peewee | https://api.github.com/repos/coleifer/peewee/issues/2201/labels{/name} | https://api.github.com/repos/coleifer/peewee/issues/2201/comments | https://api.github.com/repos/coleifer/peewee/issues/2201/events | https://github.com/coleifer/peewee/issues/2201 | 636,365,759 | MDU6SXNzdWU2MzYzNjU3NTk= | 2,201 | Should AsIs() set converter attribute to False? | {
"login": "theosotr",
"id": 6434138,
"node_id": "MDQ6VXNlcjY0MzQxMzg=",
"avatar_url": "https://avatars.githubusercontent.com/u/6434138?v=4",
"gravatar_id": "",
"url": "https://api.github.com/users/theosotr",
"html_url": "https://github.com/theosotr",
"followers_url": "https://api.github.com/users/theos... | [] | closed | false | null | [] | null | [
"One may still want the option to apply converter logic, so converter is not explicitly disabled."
] | 2020-06-10T15:56:10 | 2020-06-10T16:59:45 | 2020-06-10T16:59:45 | NONE | null | According to the documentation of `AsIs`.
> Represents a Value that is treated as-is, and passed directly back to the database driver. This may be useful if you are using database extensions that accept native Python data-types and you do not wish Peewee to impose any handling of the values.
However, this is not ... | {
"url": "https://api.github.com/repos/coleifer/peewee/issues/2201/reactions",
"total_count": 0,
"+1": 0,
"-1": 0,
"laugh": 0,
"hooray": 0,
"confused": 0,
"heart": 0,
"rocket": 0,
"eyes": 0
} | https://api.github.com/repos/coleifer/peewee/issues/2201/timeline | null | completed | null | null |
https://api.github.com/repos/coleifer/peewee/issues/2200 | https://api.github.com/repos/coleifer/peewee | https://api.github.com/repos/coleifer/peewee/issues/2200/labels{/name} | https://api.github.com/repos/coleifer/peewee/issues/2200/comments | https://api.github.com/repos/coleifer/peewee/issues/2200/events | https://github.com/coleifer/peewee/issues/2200 | 635,272,169 | MDU6SXNzdWU2MzUyNzIxNjk= | 2,200 | sub-expressions not wrapped by parentheses | {
"login": "theosotr",
"id": 6434138,
"node_id": "MDQ6VXNlcjY0MzQxMzg=",
"avatar_url": "https://avatars.githubusercontent.com/u/6434138?v=4",
"gravatar_id": "",
"url": "https://api.github.com/users/theosotr",
"html_url": "https://github.com/theosotr",
"followers_url": "https://api.github.com/users/theos... | [] | closed | false | null | [] | null | [
"Thanks for reporting. This bug was caused by modifying an internal flag on the expression node without copying it first. This caused subsequent usages of that expression node to carry-over the flag when they shouldn't have."
] | 2020-06-09T09:33:53 | 2020-06-09T14:07:45 | 2020-06-09T14:07:06 | NONE | null | I have the following query (simplified for opening issue):
```python
expr = (Value(1) + Model.column)
squared = (expr * expr)
Model.select(fn.sum(expr), fn.avg(squared)).objects()
```
peewee generates the SQL query below
```sql
SELECT sum(1 + "t1"."column"), avg(1 + "t1"."column" * 1 + "t1"."column") FROM... | {
"url": "https://api.github.com/repos/coleifer/peewee/issues/2200/reactions",
"total_count": 0,
"+1": 0,
"-1": 0,
"laugh": 0,
"hooray": 0,
"confused": 0,
"heart": 0,
"rocket": 0,
"eyes": 0
} | https://api.github.com/repos/coleifer/peewee/issues/2200/timeline | null | completed | null | null |
https://api.github.com/repos/coleifer/peewee/issues/2199 | https://api.github.com/repos/coleifer/peewee | https://api.github.com/repos/coleifer/peewee/issues/2199/labels{/name} | https://api.github.com/repos/coleifer/peewee/issues/2199/comments | https://api.github.com/repos/coleifer/peewee/issues/2199/events | https://github.com/coleifer/peewee/issues/2199 | 635,062,582 | MDU6SXNzdWU2MzUwNjI1ODI= | 2,199 | Database.bind_ctx preserves the binded database | {
"login": "cslanziano",
"id": 36748119,
"node_id": "MDQ6VXNlcjM2NzQ4MTE5",
"avatar_url": "https://avatars.githubusercontent.com/u/36748119?v=4",
"gravatar_id": "",
"url": "https://api.github.com/users/cslanziano",
"html_url": "https://github.com/cslanziano",
"followers_url": "https://api.github.com/use... | [] | closed | false | null | [] | null | [
"Thanks for reporting. This is a bug and has to do with peewee performing redundant trips through the model graph."
] | 2020-06-09T02:35:09 | 2020-06-09T14:46:19 | 2020-06-09T14:46:19 | NONE | null | I am trying to set the database at run-time. Then the Models do not have the meta class defined. That means `Model._meta.database` is `None`. The first code below executes as I expected, after the `with` block the database parameter return to `None`.
```python
from peewee import SqliteDatabase, Model
class Table... | {
"url": "https://api.github.com/repos/coleifer/peewee/issues/2199/reactions",
"total_count": 0,
"+1": 0,
"-1": 0,
"laugh": 0,
"hooray": 0,
"confused": 0,
"heart": 0,
"rocket": 0,
"eyes": 0
} | https://api.github.com/repos/coleifer/peewee/issues/2199/timeline | null | completed | null | null |
https://api.github.com/repos/coleifer/peewee/issues/2198 | https://api.github.com/repos/coleifer/peewee | https://api.github.com/repos/coleifer/peewee/issues/2198/labels{/name} | https://api.github.com/repos/coleifer/peewee/issues/2198/comments | https://api.github.com/repos/coleifer/peewee/issues/2198/events | https://github.com/coleifer/peewee/issues/2198 | 633,598,069 | MDU6SXNzdWU2MzM1OTgwNjk= | 2,198 | Postgresql materialized views not showing | {
"login": "albireox",
"id": 568775,
"node_id": "MDQ6VXNlcjU2ODc3NQ==",
"avatar_url": "https://avatars.githubusercontent.com/u/568775?v=4",
"gravatar_id": "",
"url": "https://api.github.com/users/albireox",
"html_url": "https://github.com/albireox",
"followers_url": "https://api.github.com/users/albireo... | [] | closed | false | null | [] | null | [
"First result on google my dude.\r\n\r\nhttps://stackoverflow.com/questions/58720894/check-a-materialized-view-exists",
"I know how to use the `pg_class` table, \"my dude\", I was asking if this can be do directly in Peewee using its API. I won't be opening any more issues trying to improve Peewee since there doe... | 2020-06-07T17:26:40 | 2020-06-08T00:18:05 | 2020-06-07T21:10:04 | NONE | null | It seems Postgresql materialized views are not seen as a table or a view in Peewee. I have a model of a materialized view that works fine otherwise but `Model.table_exists()` returns `False`. If I try to find it in `database.get_tables()` or `database.get_views()` it does not appears anywhere. Is there a way to check i... | {
"url": "https://api.github.com/repos/coleifer/peewee/issues/2198/reactions",
"total_count": 0,
"+1": 0,
"-1": 0,
"laugh": 0,
"hooray": 0,
"confused": 0,
"heart": 0,
"rocket": 0,
"eyes": 0
} | https://api.github.com/repos/coleifer/peewee/issues/2198/timeline | null | completed | null | null |
https://api.github.com/repos/coleifer/peewee/issues/2197 | https://api.github.com/repos/coleifer/peewee | https://api.github.com/repos/coleifer/peewee/issues/2197/labels{/name} | https://api.github.com/repos/coleifer/peewee/issues/2197/comments | https://api.github.com/repos/coleifer/peewee/issues/2197/events | https://github.com/coleifer/peewee/issues/2197 | 632,932,114 | MDU6SXNzdWU2MzI5MzIxMTQ= | 2,197 | BinaryUUIDFields do not seem to work with Mysql/pymysql | {
"login": "stevenj",
"id": 764829,
"node_id": "MDQ6VXNlcjc2NDgyOQ==",
"avatar_url": "https://avatars.githubusercontent.com/u/764829?v=4",
"gravatar_id": "",
"url": "https://api.github.com/users/stevenj",
"html_url": "https://github.com/stevenj",
"followers_url": "https://api.github.com/users/stevenj/fo... | [] | closed | false | null | [] | null | [
"BinaryUUIDField is tested against all databases, including MySQL, and seems to work just fine.\r\n\r\nIf you can produce a failing test-case I will look into it some more.",
"https://github.com/coleifer/peewee/blob/master/tests/fields.py#L841-L897",
"I ran the tests, and the warning is generated by them. The ... | 2020-06-07T02:18:51 | 2020-06-09T14:08:41 | 2020-06-07T16:06:00 | NONE | null | I am using Mysql8 and pymysql.
I have a field defined thus:
```
class Adapter(BaseModel):
id = BinaryUUIDField(primary_key=True)
class Meta:
"""Metadata."""
table_name = "adapter"
```
the matching sql is:
```
CREATE TABLE `adapter` (
`id` VARBINARY(16) NOT NULL ,
PRIMA... | {
"url": "https://api.github.com/repos/coleifer/peewee/issues/2197/reactions",
"total_count": 0,
"+1": 0,
"-1": 0,
"laugh": 0,
"hooray": 0,
"confused": 0,
"heart": 0,
"rocket": 0,
"eyes": 0
} | https://api.github.com/repos/coleifer/peewee/issues/2197/timeline | null | completed | null | null |
https://api.github.com/repos/coleifer/peewee/issues/2196 | https://api.github.com/repos/coleifer/peewee | https://api.github.com/repos/coleifer/peewee/issues/2196/labels{/name} | https://api.github.com/repos/coleifer/peewee/issues/2196/comments | https://api.github.com/repos/coleifer/peewee/issues/2196/events | https://github.com/coleifer/peewee/issues/2196 | 631,530,360 | MDU6SXNzdWU2MzE1MzAzNjA= | 2,196 | An empty query result if JOIN.CROSS is combined with JOIN.INNER. At the same time, raw() worked properly | {
"login": "navolotsky",
"id": 43314216,
"node_id": "MDQ6VXNlcjQzMzE0MjE2",
"avatar_url": "https://avatars.githubusercontent.com/u/43314216?v=4",
"gravatar_id": "",
"url": "https://api.github.com/users/navolotsky",
"html_url": "https://github.com/navolotsky",
"followers_url": "https://api.github.com/use... | [] | closed | false | null | [] | null | [
"Try using `.objects()` instead at the end of your \"non-raw\" query, which will skip the model-join graph reconstruction step. You don't need it as you're only selecting from one table and it seems to be the issue.",
"I'm having a bit of trouble parsing-out exactly what your query is designed to accomplish. Ther... | 2020-06-05T11:46:53 | 2020-06-08T16:18:41 | 2020-06-05T20:44:44 | NONE | null | ```python
import logging
import traceback
from peewee import JOIN, CharField, ForeignKeyField, Model, SqliteDatabase
database = SqliteDatabase(":memory:")
class BaseModel(Model):
class Meta:
database = database
class FileGroup(BaseModel):
descr = CharField()
class FileBasename(... | {
"url": "https://api.github.com/repos/coleifer/peewee/issues/2196/reactions",
"total_count": 0,
"+1": 0,
"-1": 0,
"laugh": 0,
"hooray": 0,
"confused": 0,
"heart": 0,
"rocket": 0,
"eyes": 0
} | https://api.github.com/repos/coleifer/peewee/issues/2196/timeline | null | completed | null | null |
https://api.github.com/repos/coleifer/peewee/issues/2195 | https://api.github.com/repos/coleifer/peewee | https://api.github.com/repos/coleifer/peewee/issues/2195/labels{/name} | https://api.github.com/repos/coleifer/peewee/issues/2195/comments | https://api.github.com/repos/coleifer/peewee/issues/2195/events | https://github.com/coleifer/peewee/issues/2195 | 631,282,269 | MDU6SXNzdWU2MzEyODIyNjk= | 2,195 | SUM subquery | {
"login": "Feijo",
"id": 1585710,
"node_id": "MDQ6VXNlcjE1ODU3MTA=",
"avatar_url": "https://avatars.githubusercontent.com/u/1585710?v=4",
"gravatar_id": "",
"url": "https://api.github.com/users/Feijo",
"html_url": "https://github.com/Feijo",
"followers_url": "https://api.github.com/users/Feijo/follower... | [] | closed | false | null | [] | null | [
"```python\r\n\r\nsubq = (MyEntity\r\n .select(MyEntity.value_1)\r\n .where((MyEntity.ClientId == i) | (MyEntity.date == z)))\r\n .alias('subquery'))\r\nMyEntity.select(fn.MAX(subq.c.value_1)).from_(subq)\r\n```"
] | 2020-06-05T03:24:17 | 2020-06-05T16:50:58 | 2020-06-05T16:50:58 | NONE | null | I am working on a formula-based application, which each function contructs a piece of the SQL query that will be executed. In other words, each function is a formula, which can call other formulas.
For example:
```
class Formulas():
def formula_piece_1(self, i, z):
return (MyEntity.select(MyEntity.... | {
"url": "https://api.github.com/repos/coleifer/peewee/issues/2195/reactions",
"total_count": 0,
"+1": 0,
"-1": 0,
"laugh": 0,
"hooray": 0,
"confused": 0,
"heart": 0,
"rocket": 0,
"eyes": 0
} | https://api.github.com/repos/coleifer/peewee/issues/2195/timeline | null | completed | null | null |
https://api.github.com/repos/coleifer/peewee/issues/2194 | https://api.github.com/repos/coleifer/peewee | https://api.github.com/repos/coleifer/peewee/issues/2194/labels{/name} | https://api.github.com/repos/coleifer/peewee/issues/2194/comments | https://api.github.com/repos/coleifer/peewee/issues/2194/events | https://github.com/coleifer/peewee/issues/2194 | 628,997,829 | MDU6SXNzdWU2Mjg5OTc4Mjk= | 2,194 | Regarding aliased columns of relationships | {
"login": "theosotr",
"id": 6434138,
"node_id": "MDQ6VXNlcjY0MzQxMzg=",
"avatar_url": "https://avatars.githubusercontent.com/u/6434138?v=4",
"gravatar_id": "",
"url": "https://api.github.com/users/theosotr",
"html_url": "https://github.com/theosotr",
"followers_url": "https://api.github.com/users/theos... | [] | closed | false | null | [] | null | [
"Peewee puts stuff on the model it belongs to. You're just aliasing the author's first-name, so peewee puts that on the author model. When you have an expression where it is unclear what model it belongs to, then it gets placed on the root/selected model.\r\n\r\nIf you don't want to be dealing with a graph of model... | 2020-06-02T08:14:50 | 2020-06-02T16:19:20 | 2020-06-02T16:19:19 | NONE | null | I have the following models
```python
class Author(BaseModel):
first_name = CharField()
surname = CharField()
class Meta:
table_name = 'author'
class Book(BaseModel):
author = ForeignKeyField(column_name='author_id', field='id', model=Author)
isbn = CharField(null=True, unique... | {
"url": "https://api.github.com/repos/coleifer/peewee/issues/2194/reactions",
"total_count": 0,
"+1": 0,
"-1": 0,
"laugh": 0,
"hooray": 0,
"confused": 0,
"heart": 0,
"rocket": 0,
"eyes": 0
} | https://api.github.com/repos/coleifer/peewee/issues/2194/timeline | null | completed | null | null |
https://api.github.com/repos/coleifer/peewee/issues/2193 | https://api.github.com/repos/coleifer/peewee | https://api.github.com/repos/coleifer/peewee/issues/2193/labels{/name} | https://api.github.com/repos/coleifer/peewee/issues/2193/comments | https://api.github.com/repos/coleifer/peewee/issues/2193/events | https://github.com/coleifer/peewee/issues/2193 | 628,993,043 | MDU6SXNzdWU2Mjg5OTMwNDM= | 2,193 | How to define computed fields? | {
"login": "bravegag",
"id": 4385408,
"node_id": "MDQ6VXNlcjQzODU0MDg=",
"avatar_url": "https://avatars.githubusercontent.com/u/4385408?v=4",
"gravatar_id": "",
"url": "https://api.github.com/users/bravegag",
"html_url": "https://github.com/bravegag",
"followers_url": "https://api.github.com/users/brave... | [] | closed | false | null | [] | null | [] | 2020-06-02T08:07:13 | 2020-06-02T16:16:28 | 2020-06-02T16:16:28 | NONE | null | Can anyone please help with this?
https://stackoverflow.com/questions/62147440/how-to-define-computed-fields-in-peewee | {
"url": "https://api.github.com/repos/coleifer/peewee/issues/2193/reactions",
"total_count": 0,
"+1": 0,
"-1": 0,
"laugh": 0,
"hooray": 0,
"confused": 0,
"heart": 0,
"rocket": 0,
"eyes": 0
} | https://api.github.com/repos/coleifer/peewee/issues/2193/timeline | null | completed | null | null |
https://api.github.com/repos/coleifer/peewee/issues/2192 | https://api.github.com/repos/coleifer/peewee | https://api.github.com/repos/coleifer/peewee/issues/2192/labels{/name} | https://api.github.com/repos/coleifer/peewee/issues/2192/comments | https://api.github.com/repos/coleifer/peewee/issues/2192/events | https://github.com/coleifer/peewee/issues/2192 | 628,428,843 | MDU6SXNzdWU2Mjg0Mjg4NDM= | 2,192 | According to the MySQL worklog, VALUES function will be deprecated soon | {
"login": "ShuFFel",
"id": 21026699,
"node_id": "MDQ6VXNlcjIxMDI2Njk5",
"avatar_url": "https://avatars.githubusercontent.com/u/21026699?v=4",
"gravatar_id": "",
"url": "https://api.github.com/users/ShuFFel",
"html_url": "https://github.com/ShuFFel",
"followers_url": "https://api.github.com/users/ShuFFe... | [] | closed | false | null | [] | null | [
"Thanks for the heads-up. I wonder how they intend to reference the selected column. Anyways we'll cross that bridge when we get there."
] | 2020-06-01T13:14:00 | 2020-06-01T14:22:14 | 2020-06-01T14:22:14 | NONE | null | Found task in MySQL worklog: [https://dev.mysql.com/worklog/task/?id=13325]
Right now it's just a warning about deprecation, but seems that this function will be removed in future | {
"url": "https://api.github.com/repos/coleifer/peewee/issues/2192/reactions",
"total_count": 0,
"+1": 0,
"-1": 0,
"laugh": 0,
"hooray": 0,
"confused": 0,
"heart": 0,
"rocket": 0,
"eyes": 0
} | https://api.github.com/repos/coleifer/peewee/issues/2192/timeline | null | completed | null | null |
https://api.github.com/repos/coleifer/peewee/issues/2191 | https://api.github.com/repos/coleifer/peewee | https://api.github.com/repos/coleifer/peewee/issues/2191/labels{/name} | https://api.github.com/repos/coleifer/peewee/issues/2191/comments | https://api.github.com/repos/coleifer/peewee/issues/2191/events | https://github.com/coleifer/peewee/pull/2191 | 625,765,606 | MDExOlB1bGxSZXF1ZXN0NDIzOTA3OTY3 | 2,191 | fix analytics example | {
"login": "phanirithvij",
"id": 29627898,
"node_id": "MDQ6VXNlcjI5NjI3ODk4",
"avatar_url": "https://avatars.githubusercontent.com/u/29627898?v=4",
"gravatar_id": "",
"url": "https://api.github.com/users/phanirithvij",
"html_url": "https://github.com/phanirithvij",
"followers_url": "https://api.github.c... | [] | closed | false | null | [] | null | [] | 2020-05-27T14:50:37 | 2020-05-27T15:12:55 | 2020-05-27T15:12:54 | CONTRIBUTOR | null | {
"url": "https://api.github.com/repos/coleifer/peewee/issues/2191/reactions",
"total_count": 0,
"+1": 0,
"-1": 0,
"laugh": 0,
"hooray": 0,
"confused": 0,
"heart": 0,
"rocket": 0,
"eyes": 0
} | https://api.github.com/repos/coleifer/peewee/issues/2191/timeline | null | null | false | {
"url": "https://api.github.com/repos/coleifer/peewee/pulls/2191",
"html_url": "https://github.com/coleifer/peewee/pull/2191",
"diff_url": "https://github.com/coleifer/peewee/pull/2191.diff",
"patch_url": "https://github.com/coleifer/peewee/pull/2191.patch",
"merged_at": "2020-05-27T15:12:54"
} | |
https://api.github.com/repos/coleifer/peewee/issues/2190 | https://api.github.com/repos/coleifer/peewee | https://api.github.com/repos/coleifer/peewee/issues/2190/labels{/name} | https://api.github.com/repos/coleifer/peewee/issues/2190/comments | https://api.github.com/repos/coleifer/peewee/issues/2190/events | https://github.com/coleifer/peewee/pull/2190 | 625,736,133 | MDExOlB1bGxSZXF1ZXN0NDIzODgzOTI2 | 2,190 | fix diary example | {
"login": "phanirithvij",
"id": 29627898,
"node_id": "MDQ6VXNlcjI5NjI3ODk4",
"avatar_url": "https://avatars.githubusercontent.com/u/29627898?v=4",
"gravatar_id": "",
"url": "https://api.github.com/users/phanirithvij",
"html_url": "https://github.com/phanirithvij",
"followers_url": "https://api.github.c... | [] | closed | false | null | [] | null | [
"wow that was fast.",
"@coleifer The build failed for some reason might want to revert?",
"https://travis-ci.org/github/coleifer/peewee/builds/691771699"
] | 2020-05-27T14:18:13 | 2020-05-27T14:38:44 | 2020-05-27T14:21:26 | CONTRIBUTOR | null | {
"url": "https://api.github.com/repos/coleifer/peewee/issues/2190/reactions",
"total_count": 0,
"+1": 0,
"-1": 0,
"laugh": 0,
"hooray": 0,
"confused": 0,
"heart": 0,
"rocket": 0,
"eyes": 0
} | https://api.github.com/repos/coleifer/peewee/issues/2190/timeline | null | null | false | {
"url": "https://api.github.com/repos/coleifer/peewee/pulls/2190",
"html_url": "https://github.com/coleifer/peewee/pull/2190",
"diff_url": "https://github.com/coleifer/peewee/pull/2190.diff",
"patch_url": "https://github.com/coleifer/peewee/pull/2190.patch",
"merged_at": "2020-05-27T14:21:26"
} | |
https://api.github.com/repos/coleifer/peewee/issues/2189 | https://api.github.com/repos/coleifer/peewee | https://api.github.com/repos/coleifer/peewee/issues/2189/labels{/name} | https://api.github.com/repos/coleifer/peewee/issues/2189/comments | https://api.github.com/repos/coleifer/peewee/issues/2189/events | https://github.com/coleifer/peewee/issues/2189 | 624,032,131 | MDU6SXNzdWU2MjQwMzIxMzE= | 2,189 | any plan to support async/await | {
"login": "DieterLi",
"id": 9697015,
"node_id": "MDQ6VXNlcjk2OTcwMTU=",
"avatar_url": "https://avatars.githubusercontent.com/u/9697015?v=4",
"gravatar_id": "",
"url": "https://api.github.com/users/DieterLi",
"html_url": "https://github.com/DieterLi",
"followers_url": "https://api.github.com/users/Diete... | [] | closed | false | null | [] | null | [
"Discussed and dismissed many times, notably #263. There are so many things I dislike about the ~twisted~ asyncio approach, mostly the fact that you have to write \"asyncio\"-specific everything -- drivers, ORMs, application frameworks, etc., etc. and even then you still have a \"[what color is my function](https:/... | 2020-05-25T04:10:46 | 2021-09-09T08:24:44 | 2020-05-26T00:57:43 | NONE | null | as the title. Thanks, team | {
"url": "https://api.github.com/repos/coleifer/peewee/issues/2189/reactions",
"total_count": 0,
"+1": 0,
"-1": 0,
"laugh": 0,
"hooray": 0,
"confused": 0,
"heart": 0,
"rocket": 0,
"eyes": 0
} | https://api.github.com/repos/coleifer/peewee/issues/2189/timeline | null | completed | null | null |
https://api.github.com/repos/coleifer/peewee/issues/2188 | https://api.github.com/repos/coleifer/peewee | https://api.github.com/repos/coleifer/peewee/issues/2188/labels{/name} | https://api.github.com/repos/coleifer/peewee/issues/2188/comments | https://api.github.com/repos/coleifer/peewee/issues/2188/events | https://github.com/coleifer/peewee/issues/2188 | 623,649,933 | MDU6SXNzdWU2MjM2NDk5MzM= | 2,188 | Request: make table_function to be evaluated during first time Model being instantiated. | {
"login": "futursolo",
"id": 11693215,
"node_id": "MDQ6VXNlcjExNjkzMjE1",
"avatar_url": "https://avatars.githubusercontent.com/u/11693215?v=4",
"gravatar_id": "",
"url": "https://api.github.com/users/futursolo",
"html_url": "https://github.com/futursolo",
"followers_url": "https://api.github.com/users/... | [] | closed | false | null | [] | null | [
"Yes, we evaluate it at class-creation time. I'm going to pass on the solutions proposed, as they seem rather specific to whatever you're doing."
] | 2020-05-23T12:27:01 | 2020-05-24T01:44:18 | 2020-05-24T01:44:18 | NONE | null | Rationale
---------
Currently, `table_function` is evaluated as soon as a `Model` class is defined.
However, just like`peewee.DatabaseProxy()`, sometimes table prefix is also not known until the config file is parsed.
Current Workaround
--------------------
I carefully checked imports to make sure no database... | {
"url": "https://api.github.com/repos/coleifer/peewee/issues/2188/reactions",
"total_count": 0,
"+1": 0,
"-1": 0,
"laugh": 0,
"hooray": 0,
"confused": 0,
"heart": 0,
"rocket": 0,
"eyes": 0
} | https://api.github.com/repos/coleifer/peewee/issues/2188/timeline | null | completed | null | null |
https://api.github.com/repos/coleifer/peewee/issues/2187 | https://api.github.com/repos/coleifer/peewee | https://api.github.com/repos/coleifer/peewee/issues/2187/labels{/name} | https://api.github.com/repos/coleifer/peewee/issues/2187/comments | https://api.github.com/repos/coleifer/peewee/issues/2187/events | https://github.com/coleifer/peewee/issues/2187 | 622,067,095 | MDU6SXNzdWU2MjIwNjcwOTU= | 2,187 | A little typo makes using select with several models impossible in seldom cases | {
"login": "navolotsky",
"id": 43314216,
"node_id": "MDQ6VXNlcjQzMzE0MjE2",
"avatar_url": "https://avatars.githubusercontent.com/u/43314216?v=4",
"gravatar_id": "",
"url": "https://api.github.com/users/navolotsky",
"html_url": "https://github.com/navolotsky",
"followers_url": "https://api.github.com/use... | [] | closed | false | null | [] | null | [
">The following code is just an example. It will not throw an exception.\r\n\r\nIf you can produce code that reliably causes problems, I will be happy to investigate... Did you hand-write that traceback, though? I'm confused because you have said that the code does *not* produce an error, but then you have pasted w... | 2020-05-20T20:34:26 | 2020-05-22T11:50:01 | 2020-05-20T21:43:00 | NONE | null | It looks like `instance` must be `src` because `set_keys` is a `dict` that contains models.
https://github.com/coleifer/peewee/blob/d6318dce0e5149a61511521a7dcb96600bec9b25/peewee.py#L7521
If we do `select` with several models (`B` and `A`) and `B` is unhashable, we will get an exception.
The following code is j... | {
"url": "https://api.github.com/repos/coleifer/peewee/issues/2187/reactions",
"total_count": 0,
"+1": 0,
"-1": 0,
"laugh": 0,
"hooray": 0,
"confused": 0,
"heart": 0,
"rocket": 0,
"eyes": 0
} | https://api.github.com/repos/coleifer/peewee/issues/2187/timeline | null | completed | null | null |
https://api.github.com/repos/coleifer/peewee/issues/2186 | https://api.github.com/repos/coleifer/peewee | https://api.github.com/repos/coleifer/peewee/issues/2186/labels{/name} | https://api.github.com/repos/coleifer/peewee/issues/2186/comments | https://api.github.com/repos/coleifer/peewee/issues/2186/events | https://github.com/coleifer/peewee/issues/2186 | 621,504,289 | MDU6SXNzdWU2MjE1MDQyODk= | 2,186 | Postgres TimeFields with timezones | {
"login": "BryceBeagle",
"id": 5437880,
"node_id": "MDQ6VXNlcjU0Mzc4ODA=",
"avatar_url": "https://avatars.githubusercontent.com/u/5437880?v=4",
"gravatar_id": "",
"url": "https://api.github.com/users/BryceBeagle",
"html_url": "https://github.com/BryceBeagle",
"followers_url": "https://api.github.com/us... | [] | closed | false | null | [] | null | [
"Also related, the [docs](https://github.com/coleifer/peewee/blame/master/docs/peewee/playhouse.rst#L688) mention (and try linking to) `DateTimeTZ` (as opposed to `DateTimeTZField`) resulting in a broken link",
"How can a time have a timezone, when the time's value is dependent on the date it's attached to? At an... | 2020-05-20T06:46:54 | 2020-05-21T03:49:28 | 2020-05-20T13:02:36 | NONE | null | `DateTimeField` has a timezone-based subclass in `postgres_ext.DateTimeTZField`. Is there a reason why there's no analog for `TimeField` (i.e. `TimeTZField`)? | {
"url": "https://api.github.com/repos/coleifer/peewee/issues/2186/reactions",
"total_count": 0,
"+1": 0,
"-1": 0,
"laugh": 0,
"hooray": 0,
"confused": 0,
"heart": 0,
"rocket": 0,
"eyes": 0
} | https://api.github.com/repos/coleifer/peewee/issues/2186/timeline | null | completed | null | null |
https://api.github.com/repos/coleifer/peewee/issues/2185 | https://api.github.com/repos/coleifer/peewee | https://api.github.com/repos/coleifer/peewee/issues/2185/labels{/name} | https://api.github.com/repos/coleifer/peewee/issues/2185/comments | https://api.github.com/repos/coleifer/peewee/issues/2185/events | https://github.com/coleifer/peewee/issues/2185 | 621,179,741 | MDU6SXNzdWU2MjExNzk3NDE= | 2,185 | Can't use Model class as field value | {
"login": "mikemill",
"id": 1652125,
"node_id": "MDQ6VXNlcjE2NTIxMjU=",
"avatar_url": "https://avatars.githubusercontent.com/u/1652125?v=4",
"gravatar_id": "",
"url": "https://api.github.com/users/mikemill",
"html_url": "https://github.com/mikemill",
"followers_url": "https://api.github.com/users/mikem... | [] | closed | false | null | [] | null | [
"It isn't calling `db_value()` because peewee sees that you're using a model class as a value, which is a recognized AST type. The issue that originated this fix is #2131.",
"Thanks for reporting, this is fixed in master now.",
"Thank you! I just wanted to drop a note saying how much I've enjoyed using peewee ... | 2020-05-19T18:04:54 | 2020-05-19T21:32:35 | 2020-05-19T20:54:28 | NONE | null | I have a custom field that stores the import path to a Python class. The `db_value` takes the class object and coverts it to the import path string and the `python_value` takes the string and imports the object giving me back the class. However, as of peewee 3.13.2 this no longer works and instead gives me `peewee.In... | {
"url": "https://api.github.com/repos/coleifer/peewee/issues/2185/reactions",
"total_count": 0,
"+1": 0,
"-1": 0,
"laugh": 0,
"hooray": 0,
"confused": 0,
"heart": 0,
"rocket": 0,
"eyes": 0
} | https://api.github.com/repos/coleifer/peewee/issues/2185/timeline | null | completed | null | null |
https://api.github.com/repos/coleifer/peewee/issues/2184 | https://api.github.com/repos/coleifer/peewee | https://api.github.com/repos/coleifer/peewee/issues/2184/labels{/name} | https://api.github.com/repos/coleifer/peewee/issues/2184/comments | https://api.github.com/repos/coleifer/peewee/issues/2184/events | https://github.com/coleifer/peewee/issues/2184 | 620,658,494 | MDU6SXNzdWU2MjA2NTg0OTQ= | 2,184 | can't adapt type 'BackrefAccessor' | {
"login": "aparcar",
"id": 16000931,
"node_id": "MDQ6VXNlcjE2MDAwOTMx",
"avatar_url": "https://avatars.githubusercontent.com/u/16000931?v=4",
"gravatar_id": "",
"url": "https://api.github.com/users/aparcar",
"html_url": "https://github.com/aparcar",
"followers_url": "https://api.github.com/users/aparca... | [] | closed | false | null | [] | null | [
"StackOverflow for questions.\r\n\r\nYou need to properly join on your relation and then array-agg over the result column you are trying to aggregate..."
] | 2020-05-19T03:59:54 | 2020-05-19T13:52:49 | 2020-05-19T13:52:48 | NONE | null | Hi, I'm trying to use `fn.array_agg` on a backref foreign key. However when trying to loop over the returned, model, I get the following error message:
```
Exception has occurred: ProgrammingError
can't adapt type 'BackrefAccessor'
```
My code looks something like that:
```python
sources = target.sourc... | {
"url": "https://api.github.com/repos/coleifer/peewee/issues/2184/reactions",
"total_count": 0,
"+1": 0,
"-1": 0,
"laugh": 0,
"hooray": 0,
"confused": 0,
"heart": 0,
"rocket": 0,
"eyes": 0
} | https://api.github.com/repos/coleifer/peewee/issues/2184/timeline | null | completed | null | null |
https://api.github.com/repos/coleifer/peewee/issues/2183 | https://api.github.com/repos/coleifer/peewee | https://api.github.com/repos/coleifer/peewee/issues/2183/labels{/name} | https://api.github.com/repos/coleifer/peewee/issues/2183/comments | https://api.github.com/repos/coleifer/peewee/issues/2183/events | https://github.com/coleifer/peewee/issues/2183 | 620,048,418 | MDU6SXNzdWU2MjAwNDg0MTg= | 2,183 | Peewee generates an SQL query with syntax errors | {
"login": "theosotr",
"id": 6434138,
"node_id": "MDQ6VXNlcjY0MzQxMzg=",
"avatar_url": "https://avatars.githubusercontent.com/u/6434138?v=4",
"gravatar_id": "",
"url": "https://api.github.com/users/theosotr",
"html_url": "https://github.com/theosotr",
"followers_url": "https://api.github.com/users/theos... | [] | closed | false | null | [] | null | [
"Did you try this?\r\n\r\n```python\r\nmul = ((Listing.sale_price * Listing.yearly_rent)).cast('float')\r\navg = fn.avg(mul).alias('avg')\r\nmul = mul.alias('mul')\r\n```",
"Thank you; yes, this works!\r\nBut, I would expect peewee to implicitly turn off alias when used in irrelevant cases.",
"To do this it wou... | 2020-05-18T09:20:09 | 2020-05-18T13:30:55 | 2020-05-18T13:30:55 | NONE | null | I have the following query
```python
mul = ((Listing.sale_price * Listing.yearly_rent)).cast('float').alias('mul')
avg = fn.avg(mul).alias('avg')
Listing.select(avg, mul).group_by(mul).where(mul > 100)
```
Peewee generates an SQL query with syntax error on `sqlite3`.
```
peewee.OperationalError: near "AS": ... | {
"url": "https://api.github.com/repos/coleifer/peewee/issues/2183/reactions",
"total_count": 0,
"+1": 0,
"-1": 0,
"laugh": 0,
"hooray": 0,
"confused": 0,
"heart": 0,
"rocket": 0,
"eyes": 0
} | https://api.github.com/repos/coleifer/peewee/issues/2183/timeline | null | completed | null | null |
https://api.github.com/repos/coleifer/peewee/issues/2182 | https://api.github.com/repos/coleifer/peewee | https://api.github.com/repos/coleifer/peewee/issues/2182/labels{/name} | https://api.github.com/repos/coleifer/peewee/issues/2182/comments | https://api.github.com/repos/coleifer/peewee/issues/2182/events | https://github.com/coleifer/peewee/issues/2182 | 619,702,121 | MDU6SXNzdWU2MTk3MDIxMjE= | 2,182 | peewee.OperationalError: no such column: t2.subforum_id | {
"login": "LuaFan2",
"id": 51294434,
"node_id": "MDQ6VXNlcjUxMjk0NDM0",
"avatar_url": "https://avatars.githubusercontent.com/u/51294434?v=4",
"gravatar_id": "",
"url": "https://api.github.com/users/LuaFan2",
"html_url": "https://github.com/LuaFan2",
"followers_url": "https://api.github.com/users/LuaFan... | [] | closed | false | null | [] | null | [
"I'm guessing you added that column to your model class without also ensuring it was added to the database. Try dropping and recreating your table, or migrating the schema using the migrate extension.\r\n\r\nPlease post questions on stackoverflow from now on. This is the issue tracker."
] | 2020-05-17T13:21:54 | 2020-05-17T17:06:09 | 2020-05-17T17:06:09 | NONE | null | I have such models. Everything looks good
```
class Cats(db.Model):
name = CharField()
class Forums(db.Model):
cat = ForeignKeyField(Cats)
name = CharField()
class SubForums(db.Model):
forum = ForeignKeyField(Forums)
name = CharField()
description = CharField(default="")... | {
"url": "https://api.github.com/repos/coleifer/peewee/issues/2182/reactions",
"total_count": 0,
"+1": 0,
"-1": 0,
"laugh": 0,
"hooray": 0,
"confused": 0,
"heart": 0,
"rocket": 0,
"eyes": 0
} | https://api.github.com/repos/coleifer/peewee/issues/2182/timeline | null | completed | null | null |
https://api.github.com/repos/coleifer/peewee/issues/2181 | https://api.github.com/repos/coleifer/peewee | https://api.github.com/repos/coleifer/peewee/issues/2181/labels{/name} | https://api.github.com/repos/coleifer/peewee/issues/2181/comments | https://api.github.com/repos/coleifer/peewee/issues/2181/events | https://github.com/coleifer/peewee/issues/2181 | 619,472,464 | MDU6SXNzdWU2MTk0NzI0NjQ= | 2,181 | flask_peewee.auth without password | {
"login": "LuaFan2",
"id": 51294434,
"node_id": "MDQ6VXNlcjUxMjk0NDM0",
"avatar_url": "https://avatars.githubusercontent.com/u/51294434?v=4",
"gravatar_id": "",
"url": "https://api.github.com/users/LuaFan2",
"html_url": "https://github.com/LuaFan2",
"followers_url": "https://api.github.com/users/LuaFan... | [] | closed | false | null | [] | null | [] | 2020-05-16T13:17:23 | 2020-05-17T13:25:06 | 2020-05-17T13:25:06 | NONE | null | Is it possible to make user auth without a password?I wanna to make possibility to login through Steam OpenID, but peewee-flask auth force me to make such column as password | {
"url": "https://api.github.com/repos/coleifer/peewee/issues/2181/reactions",
"total_count": 0,
"+1": 0,
"-1": 0,
"laugh": 0,
"hooray": 0,
"confused": 0,
"heart": 0,
"rocket": 0,
"eyes": 0
} | https://api.github.com/repos/coleifer/peewee/issues/2181/timeline | null | completed | null | null |
https://api.github.com/repos/coleifer/peewee/issues/2180 | https://api.github.com/repos/coleifer/peewee | https://api.github.com/repos/coleifer/peewee/issues/2180/labels{/name} | https://api.github.com/repos/coleifer/peewee/issues/2180/comments | https://api.github.com/repos/coleifer/peewee/issues/2180/events | https://github.com/coleifer/peewee/issues/2180 | 618,941,614 | MDU6SXNzdWU2MTg5NDE2MTQ= | 2,180 | Question. Migrations maker | {
"login": "mrkovalchuk",
"id": 18255783,
"node_id": "MDQ6VXNlcjE4MjU1Nzgz",
"avatar_url": "https://avatars.githubusercontent.com/u/18255783?v=4",
"gravatar_id": "",
"url": "https://api.github.com/users/mrkovalchuk",
"html_url": "https://github.com/mrkovalchuk",
"followers_url": "https://api.github.com/... | [] | closed | false | null | [] | null | [
"Peewee has a very easy-to-use migrations helper that you can use to modify your schema. At the time of writing, an automatic \"detect changes and generate migrations\" tool is not part of Peewee and likely will not be added at any time. Such tools carry a very large maintenance burden and are buggy, and bugs can h... | 2020-05-15T12:46:07 | 2020-05-15T13:31:50 | 2020-05-15T13:31:49 | NONE | null | Peewee it's enough popular python ORM library. Have the migrations system. But he hasn't instrument for auto make migrations. Like in django, or Alimbic for SQLAlchemy.
Is any work in this direction? https://pypi.org/project/peewee-migrations/ - like this (but more life full) | {
"url": "https://api.github.com/repos/coleifer/peewee/issues/2180/reactions",
"total_count": 0,
"+1": 0,
"-1": 0,
"laugh": 0,
"hooray": 0,
"confused": 0,
"heart": 0,
"rocket": 0,
"eyes": 0
} | https://api.github.com/repos/coleifer/peewee/issues/2180/timeline | null | completed | null | null |
https://api.github.com/repos/coleifer/peewee/issues/2179 | https://api.github.com/repos/coleifer/peewee | https://api.github.com/repos/coleifer/peewee/issues/2179/labels{/name} | https://api.github.com/repos/coleifer/peewee/issues/2179/comments | https://api.github.com/repos/coleifer/peewee/issues/2179/events | https://github.com/coleifer/peewee/issues/2179 | 618,497,119 | MDU6SXNzdWU2MTg0OTcxMTk= | 2,179 | Database.session_start() locking error | {
"login": "hfaua",
"id": 350335,
"node_id": "MDQ6VXNlcjM1MDMzNQ==",
"avatar_url": "https://avatars.githubusercontent.com/u/350335?v=4",
"gravatar_id": "",
"url": "https://api.github.com/users/hfaua",
"html_url": "https://github.com/hfaua",
"followers_url": "https://api.github.com/users/hfaua/followers"... | [] | closed | false | null | [] | null | [
"Thanks, switched to RLock."
] | 2020-05-14T19:55:55 | 2020-05-15T01:53:10 | 2020-05-15T01:53:01 | NONE | null | Problem:
When `Database.session_start()` is called before opening the connection to the database it tries to acquire the lock recursively first time in the `Database.session_start()` and second time in `Database.begin()`.
```
peewee.py:3195
def session_start(self):
with self._lock:
-> return self.trans... | {
"url": "https://api.github.com/repos/coleifer/peewee/issues/2179/reactions",
"total_count": 0,
"+1": 0,
"-1": 0,
"laugh": 0,
"hooray": 0,
"confused": 0,
"heart": 0,
"rocket": 0,
"eyes": 0
} | https://api.github.com/repos/coleifer/peewee/issues/2179/timeline | null | completed | null | null |
https://api.github.com/repos/coleifer/peewee/issues/2178 | https://api.github.com/repos/coleifer/peewee | https://api.github.com/repos/coleifer/peewee/issues/2178/labels{/name} | https://api.github.com/repos/coleifer/peewee/issues/2178/comments | https://api.github.com/repos/coleifer/peewee/issues/2178/events | https://github.com/coleifer/peewee/issues/2178 | 618,445,371 | MDU6SXNzdWU2MTg0NDUzNzE= | 2,178 | MariaDB 5 | {
"login": "CaffeineLab",
"id": 18175452,
"node_id": "MDQ6VXNlcjE4MTc1NDUy",
"avatar_url": "https://avatars.githubusercontent.com/u/18175452?v=4",
"gravatar_id": "",
"url": "https://api.github.com/users/CaffeineLab",
"html_url": "https://github.com/CaffeineLab",
"followers_url": "https://api.github.com/... | [] | closed | false | null | [] | null | [
"10.0 was released in 2012... So are you using an 8+ year old version of MariaDB?\r\n\r\nYou can also suppress warnings if that's your preference: https://docs.python.org/3/library/warnings.html#temporarily-suppressing-warnings",
"Yes. And I'm not happy about it either :) So at this point, my opinion (and I am ... | 2020-05-14T18:25:14 | 2020-05-14T19:56:42 | 2020-05-14T19:22:07 | NONE | null | So I'm using MariaDB 5.?.? and every time I run I get a warning that it's unable to determine the MySQL version.... in the function it appears to only want to identify versions starting with a 1. Not sure if this is an issue or if it's supposed to be a warning that you are using an old version of MariaDB so it's a bi... | {
"url": "https://api.github.com/repos/coleifer/peewee/issues/2178/reactions",
"total_count": 1,
"+1": 1,
"-1": 0,
"laugh": 0,
"hooray": 0,
"confused": 0,
"heart": 0,
"rocket": 0,
"eyes": 0
} | https://api.github.com/repos/coleifer/peewee/issues/2178/timeline | null | completed | null | null |
https://api.github.com/repos/coleifer/peewee/issues/2177 | https://api.github.com/repos/coleifer/peewee | https://api.github.com/repos/coleifer/peewee/issues/2177/labels{/name} | https://api.github.com/repos/coleifer/peewee/issues/2177/comments | https://api.github.com/repos/coleifer/peewee/issues/2177/events | https://github.com/coleifer/peewee/issues/2177 | 617,510,009 | MDU6SXNzdWU2MTc1MTAwMDk= | 2,177 | how to prevent inserting NULL values and raising exception instead | {
"login": "soufelhanafi",
"id": 32456103,
"node_id": "MDQ6VXNlcjMyNDU2MTAz",
"avatar_url": "https://avatars.githubusercontent.com/u/32456103?v=4",
"gravatar_id": "",
"url": "https://api.github.com/users/soufelhanafi",
"html_url": "https://github.com/soufelhanafi",
"followers_url": "https://api.github.c... | [] | closed | false | null | [] | null | [
"I commented on your identical issue earlier.\r\n\r\nhttps://github.com/coleifer/peewee/issues/2176#issuecomment-628016499"
] | 2020-05-13T14:44:43 | 2020-05-13T15:40:28 | 2020-05-13T15:40:28 | NONE | null | After running this code, the data will be inserted into the database. when I check the database, I find a row added with values: int_field=0 and other="" (empty string)
My question is how to throw exception in case of Null/empty insert.
import peewee as pw
from datetime import datetime
db = pw.MySQLDataba... | {
"url": "https://api.github.com/repos/coleifer/peewee/issues/2177/reactions",
"total_count": 0,
"+1": 0,
"-1": 0,
"laugh": 0,
"hooray": 0,
"confused": 0,
"heart": 0,
"rocket": 0,
"eyes": 0
} | https://api.github.com/repos/coleifer/peewee/issues/2177/timeline | null | completed | null | null |
https://api.github.com/repos/coleifer/peewee/issues/2176 | https://api.github.com/repos/coleifer/peewee | https://api.github.com/repos/coleifer/peewee/issues/2176/labels{/name} | https://api.github.com/repos/coleifer/peewee/issues/2176/comments | https://api.github.com/repos/coleifer/peewee/issues/2176/events | https://github.com/coleifer/peewee/issues/2176 | 617,472,918 | MDU6SXNzdWU2MTc0NzI5MTg= | 2,176 | Insert data into database even the field are not allowing null values | {
"login": "soufelhanafi",
"id": 32456103,
"node_id": "MDQ6VXNlcjMyNDU2MTAz",
"avatar_url": "https://avatars.githubusercontent.com/u/32456103?v=4",
"gravatar_id": "",
"url": "https://api.github.com/users/soufelhanafi",
"html_url": "https://github.com/soufelhanafi",
"followers_url": "https://api.github.c... | [] | closed | false | null | [] | null | [
"I am unclear what you are asking. Perhaps you have a mysql setting enabled that causes it to use default/empty values instead of raising an exception?\r\n\r\nAt any rate, this is not a peewee issue but a mysql question. Please take it to stackoverflow."
] | 2020-05-13T13:58:20 | 2020-05-13T14:12:35 | 2020-05-13T14:12:35 | NONE | null | I have an issue with inserting data using peewee Model.create method.
after running the code below, the data will be inserted into the database with default values empty string for the **other field** and 0 for the **int_field**.
My question is how can I invoque an exception without inserting data into database.
... | {
"url": "https://api.github.com/repos/coleifer/peewee/issues/2176/reactions",
"total_count": 0,
"+1": 0,
"-1": 0,
"laugh": 0,
"hooray": 0,
"confused": 0,
"heart": 0,
"rocket": 0,
"eyes": 0
} | https://api.github.com/repos/coleifer/peewee/issues/2176/timeline | null | completed | null | null |
https://api.github.com/repos/coleifer/peewee/issues/2175 | https://api.github.com/repos/coleifer/peewee | https://api.github.com/repos/coleifer/peewee/issues/2175/labels{/name} | https://api.github.com/repos/coleifer/peewee/issues/2175/comments | https://api.github.com/repos/coleifer/peewee/issues/2175/events | https://github.com/coleifer/peewee/issues/2175 | 617,247,073 | MDU6SXNzdWU2MTcyNDcwNzM= | 2,175 | psycopg2.ProgrammingError: invalid dsn: invalid connection option "autoconnect" | {
"login": "kmakwana",
"id": 64768985,
"node_id": "MDQ6VXNlcjY0NzY4OTg1",
"avatar_url": "https://avatars.githubusercontent.com/u/64768985?v=4",
"gravatar_id": "",
"url": "https://api.github.com/users/kmakwana",
"html_url": "https://github.com/kmakwana",
"followers_url": "https://api.github.com/users/kma... | [] | closed | false | null | [] | null | [
"Autoconnect was not present in 3.7.0: https://github.com/coleifer/peewee/blob/3.7.0/peewee.py#L2531-L2532"
] | 2020-05-13T08:23:20 | 2020-05-13T13:33:39 | 2020-05-13T13:33:30 | NONE | null | OS : Ubuntu 20.04
Python version : 3.8.2
Psycopg2 version : 2.8.5
Peewee version : 3.7.0
I am trying to do database connection but it gives me following error:
```
Traceback (most recent call last):
File "/usr/lib/python3/dist-packages/peewee.py", line 2600, in connect
self._state.set_connection(self._c... | {
"url": "https://api.github.com/repos/coleifer/peewee/issues/2175/reactions",
"total_count": 0,
"+1": 0,
"-1": 0,
"laugh": 0,
"hooray": 0,
"confused": 0,
"heart": 0,
"rocket": 0,
"eyes": 0
} | https://api.github.com/repos/coleifer/peewee/issues/2175/timeline | null | completed | null | null |
https://api.github.com/repos/coleifer/peewee/issues/2174 | https://api.github.com/repos/coleifer/peewee | https://api.github.com/repos/coleifer/peewee/issues/2174/labels{/name} | https://api.github.com/repos/coleifer/peewee/issues/2174/comments | https://api.github.com/repos/coleifer/peewee/issues/2174/events | https://github.com/coleifer/peewee/issues/2174 | 617,012,840 | MDU6SXNzdWU2MTcwMTI4NDA= | 2,174 | Reflection does not identify primary keys | {
"login": "albireox",
"id": 568775,
"node_id": "MDQ6VXNlcjU2ODc3NQ==",
"avatar_url": "https://avatars.githubusercontent.com/u/568775?v=4",
"gravatar_id": "",
"url": "https://api.github.com/users/albireox",
"html_url": "https://github.com/albireox",
"followers_url": "https://api.github.com/users/albireo... | [] | closed | false | null | [] | null | [
"If you can create a reproducible test-case I would be happy to investigate. As it is, the reflection module is already tested and I can assure you that it is not as fundamentally broken as all that.\r\n\r\nhttps://github.com/coleifer/peewee/blob/3b1181a7cf727cc749a5fbb76f96602a3bb3325b/tests/reflection.py#L77-L443... | 2020-05-12T22:46:35 | 2020-05-13T00:52:34 | 2020-05-13T00:04:38 | NONE | null | It seems that `generate_models` does not identify when a field is the primary key. Instead it creates a composite primary key with all the fields in the model. | {
"url": "https://api.github.com/repos/coleifer/peewee/issues/2174/reactions",
"total_count": 0,
"+1": 0,
"-1": 0,
"laugh": 0,
"hooray": 0,
"confused": 0,
"heart": 0,
"rocket": 0,
"eyes": 0
} | https://api.github.com/repos/coleifer/peewee/issues/2174/timeline | null | completed | null | null |
https://api.github.com/repos/coleifer/peewee/issues/2173 | https://api.github.com/repos/coleifer/peewee | https://api.github.com/repos/coleifer/peewee/issues/2173/labels{/name} | https://api.github.com/repos/coleifer/peewee/issues/2173/comments | https://api.github.com/repos/coleifer/peewee/issues/2173/events | https://github.com/coleifer/peewee/issues/2173 | 616,736,744 | MDU6SXNzdWU2MTY3MzY3NDQ= | 2,173 | BitField variable name not accepting any name other than "flags" | {
"login": "nisanb",
"id": 20663443,
"node_id": "MDQ6VXNlcjIwNjYzNDQz",
"avatar_url": "https://avatars.githubusercontent.com/u/20663443?v=4",
"gravatar_id": "",
"url": "https://api.github.com/users/nisanb",
"html_url": "https://github.com/nisanb",
"followers_url": "https://api.github.com/users/nisanb/fo... | [] | closed | false | null | [] | null | [
"I don't see any such regression: 06c283159fa9917fda8836e2b2973fd38da0a029"
] | 2020-05-12T15:11:30 | 2020-05-12T15:25:07 | 2020-05-12T15:25:07 | NONE | null | Hi,
Given your example:
```
class Post(Model):
content = TextField()
flags = BitField()
is_favorite = flags.flag(1)
is_sticky = flags.flag(2)
is_minimized = flags.flag(4)
is_deleted = flags.flag(8)
```
When changing "flags" variable to any other variable, the fields are effectiv... | {
"url": "https://api.github.com/repos/coleifer/peewee/issues/2173/reactions",
"total_count": 0,
"+1": 0,
"-1": 0,
"laugh": 0,
"hooray": 0,
"confused": 0,
"heart": 0,
"rocket": 0,
"eyes": 0
} | https://api.github.com/repos/coleifer/peewee/issues/2173/timeline | null | completed | null | null |
https://api.github.com/repos/coleifer/peewee/issues/2172 | https://api.github.com/repos/coleifer/peewee | https://api.github.com/repos/coleifer/peewee/issues/2172/labels{/name} | https://api.github.com/repos/coleifer/peewee/issues/2172/comments | https://api.github.com/repos/coleifer/peewee/issues/2172/events | https://github.com/coleifer/peewee/issues/2172 | 615,571,386 | MDU6SXNzdWU2MTU1NzEzODY= | 2,172 | pwiz generates non-auto_increment primary key field as AutoField | {
"login": "zqch",
"id": 40731613,
"node_id": "MDQ6VXNlcjQwNzMxNjEz",
"avatar_url": "https://avatars.githubusercontent.com/u/40731613?v=4",
"gravatar_id": "",
"url": "https://api.github.com/users/zqch",
"html_url": "https://github.com/zqch",
"followers_url": "https://api.github.com/users/zqch/followers"... | [] | closed | false | null | [] | null | [
"I gather you're using MySQL.\r\n\r\nFor what it's worth, the first example where `user_id` is `AutoField` -- the `info.user_id` stored in the database is still \"10\" in both cases. The reason \"0\" gets assigned, however, is because Peewee thinks this is an auto-increment integer field. So it is trying to read th... | 2020-05-11T04:04:11 | 2020-05-12T03:00:03 | 2020-05-11T13:26:19 | NONE | null | I use pwiz to generate model codes, and I got `AutoField` rather than `IntegerField(primaty_key=True)` when the primary key field is not auto_increment, this will cause different results.
for example:
```py
"""
create table user_info (
user_id int unsigned not null,
name varchar(20) not null,
primary key (... | {
"url": "https://api.github.com/repos/coleifer/peewee/issues/2172/reactions",
"total_count": 0,
"+1": 0,
"-1": 0,
"laugh": 0,
"hooray": 0,
"confused": 0,
"heart": 0,
"rocket": 0,
"eyes": 0
} | https://api.github.com/repos/coleifer/peewee/issues/2172/timeline | null | completed | null | null |
https://api.github.com/repos/coleifer/peewee/issues/2171 | https://api.github.com/repos/coleifer/peewee | https://api.github.com/repos/coleifer/peewee/issues/2171/labels{/name} | https://api.github.com/repos/coleifer/peewee/issues/2171/comments | https://api.github.com/repos/coleifer/peewee/issues/2171/events | https://github.com/coleifer/peewee/issues/2171 | 615,203,871 | MDU6SXNzdWU2MTUyMDM4NzE= | 2,171 | Unable to select/update model after migrating ForeignKeyField: RecursionError | {
"login": "arel",
"id": 153497,
"node_id": "MDQ6VXNlcjE1MzQ5Nw==",
"avatar_url": "https://avatars.githubusercontent.com/u/153497?v=4",
"gravatar_id": "",
"url": "https://api.github.com/users/arel",
"html_url": "https://github.com/arel",
"followers_url": "https://api.github.com/users/arel/followers",
... | [] | closed | false | null | [] | null | [] | 2020-05-09T15:48:10 | 2020-05-13T00:26:48 | 2020-05-13T00:26:48 | NONE | null | I have a migration script that first adds a column and then initializes it. I am using MySQL. However, after adding the column, the model's `ForeignKeyField` is changed in a way that results in a recursion error by simply selecting or updating the new field:
```
RecursionError: maximum recursion depth exceeded
```... | {
"url": "https://api.github.com/repos/coleifer/peewee/issues/2171/reactions",
"total_count": 0,
"+1": 0,
"-1": 0,
"laugh": 0,
"hooray": 0,
"confused": 0,
"heart": 0,
"rocket": 0,
"eyes": 0
} | https://api.github.com/repos/coleifer/peewee/issues/2171/timeline | null | completed | null | null |
https://api.github.com/repos/coleifer/peewee/issues/2170 | https://api.github.com/repos/coleifer/peewee | https://api.github.com/repos/coleifer/peewee/issues/2170/labels{/name} | https://api.github.com/repos/coleifer/peewee/issues/2170/comments | https://api.github.com/repos/coleifer/peewee/issues/2170/events | https://github.com/coleifer/peewee/issues/2170 | 614,470,419 | MDU6SXNzdWU2MTQ0NzA0MTk= | 2,170 | TypeError: not enough arguments for format string | {
"login": "kelmore5",
"id": 9361401,
"node_id": "MDQ6VXNlcjkzNjE0MDE=",
"avatar_url": "https://avatars.githubusercontent.com/u/9361401?v=4",
"gravatar_id": "",
"url": "https://api.github.com/users/kelmore5",
"html_url": "https://github.com/kelmore5",
"followers_url": "https://api.github.com/users/kelmo... | [] | closed | false | null | [] | null | [
"As you can see from the traceback:\r\n\r\n```python\r\nFile \"/home/kyle/.local/lib/python3.7/site-packages/pymysql/cursors.py\", line 150, in mogrify\r\n query = query % self._escape_args(args, conn)\r\n```\r\n\r\nThe error is in pymysql, not peewee.",
"No.\r\n\r\nThe error is not because of pymysql. It's be... | 2020-05-08T03:04:54 | 2020-05-08T15:09:28 | 2020-05-08T14:30:57 | NONE | null | I believe there's some unexpected behavior that happens when using the `Database.execute_sql` command with an SQL statement but no parameters. The above error occurs in the pymysql project, but it's actually a problem with peewee (in my opinion).
When you run the following code:
```
sql = "INSERT INTO some_table... | {
"url": "https://api.github.com/repos/coleifer/peewee/issues/2170/reactions",
"total_count": 0,
"+1": 0,
"-1": 0,
"laugh": 0,
"hooray": 0,
"confused": 0,
"heart": 0,
"rocket": 0,
"eyes": 0
} | https://api.github.com/repos/coleifer/peewee/issues/2170/timeline | null | completed | null | null |
https://api.github.com/repos/coleifer/peewee/issues/2169 | https://api.github.com/repos/coleifer/peewee | https://api.github.com/repos/coleifer/peewee/issues/2169/labels{/name} | https://api.github.com/repos/coleifer/peewee/issues/2169/comments | https://api.github.com/repos/coleifer/peewee/issues/2169/events | https://github.com/coleifer/peewee/issues/2169 | 614,269,594 | MDU6SXNzdWU2MTQyNjk1OTQ= | 2,169 | Join fails on Python3.8 | {
"login": "ayyazdaniaryan",
"id": 1242841,
"node_id": "MDQ6VXNlcjEyNDI4NDE=",
"avatar_url": "https://avatars.githubusercontent.com/u/1242841?v=4",
"gravatar_id": "",
"url": "https://api.github.com/users/ayyazdaniaryan",
"html_url": "https://github.com/ayyazdaniaryan",
"followers_url": "https://api.gith... | [] | closed | false | null | [] | null | [
"Your example code obviously won't run, as your classes do not extend `Model`. Neither can I tell why you are including a trailing \".\" after your CCC.select() and CCC.select().join(BBB).\r\n\r\nI just ran the following code without any issues on Python 3.8.0:\r\n\r\n```python\r\n\r\ndb = PostgresqlDatabase('peewe... | 2020-05-07T18:49:53 | 2020-05-07T19:03:33 | 2020-05-07T19:02:17 | NONE | null | Hello,
I've recently used `peewee` for a new project, shying away after many years of `SQLAlchemy`. Neat package, works well, is pythonic, and small learning curve. Kudos!
I wanted to see anyone else though has noticed issues on the latest version of Python, 3.8, and peewee. I cannot seem to be able to do a `join... | {
"url": "https://api.github.com/repos/coleifer/peewee/issues/2169/reactions",
"total_count": 0,
"+1": 0,
"-1": 0,
"laugh": 0,
"hooray": 0,
"confused": 0,
"heart": 0,
"rocket": 0,
"eyes": 0
} | https://api.github.com/repos/coleifer/peewee/issues/2169/timeline | null | completed | null | null |
https://api.github.com/repos/coleifer/peewee/issues/2168 | https://api.github.com/repos/coleifer/peewee | https://api.github.com/repos/coleifer/peewee/issues/2168/labels{/name} | https://api.github.com/repos/coleifer/peewee/issues/2168/comments | https://api.github.com/repos/coleifer/peewee/issues/2168/events | https://github.com/coleifer/peewee/issues/2168 | 613,926,515 | MDU6SXNzdWU2MTM5MjY1MTU= | 2,168 | update_model_from_dict - ignoring field types | {
"login": "OranShuster",
"id": 1076161,
"node_id": "MDQ6VXNlcjEwNzYxNjE=",
"avatar_url": "https://avatars.githubusercontent.com/u/1076161?v=4",
"gravatar_id": "",
"url": "https://api.github.com/users/OranShuster",
"html_url": "https://github.com/OranShuster",
"followers_url": "https://api.github.com/us... | [] | closed | false | null | [] | null | [
"Peewee doesn't convert types on assignment. It would convert the type before sending it to the database, e.g., if you used it in a query. But you can assign any value to any field type:\r\n\r\n```python\r\n\r\nIn [1]: from peewee import * \r\n\r\nI... | 2020-05-07T09:56:05 | 2023-02-21T14:05:15 | 2020-05-09T14:44:57 | NONE | null | Example model -
```
class VmSize(Model):
class Meta:
...
id = PrimaryKeyField()
cost= DecimalField()
```
if i would use playhous' `model_to_dict` ->`json.dumps` and then `dict_to_model` the value of the decimal field would containt a float (since thats how the json module reads that value... | {
"url": "https://api.github.com/repos/coleifer/peewee/issues/2168/reactions",
"total_count": 0,
"+1": 0,
"-1": 0,
"laugh": 0,
"hooray": 0,
"confused": 0,
"heart": 0,
"rocket": 0,
"eyes": 0
} | https://api.github.com/repos/coleifer/peewee/issues/2168/timeline | null | completed | null | null |
https://api.github.com/repos/coleifer/peewee/issues/2167 | https://api.github.com/repos/coleifer/peewee | https://api.github.com/repos/coleifer/peewee/issues/2167/labels{/name} | https://api.github.com/repos/coleifer/peewee/issues/2167/comments | https://api.github.com/repos/coleifer/peewee/issues/2167/events | https://github.com/coleifer/peewee/issues/2167 | 612,768,536 | MDU6SXNzdWU2MTI3Njg1MzY= | 2,167 | DecimalField wizhout max_digits | {
"login": "daeeros",
"id": 34482855,
"node_id": "MDQ6VXNlcjM0NDgyODU1",
"avatar_url": "https://avatars.githubusercontent.com/u/34482855?v=4",
"gravatar_id": "",
"url": "https://api.github.com/users/daeeros",
"html_url": "https://github.com/daeeros",
"followers_url": "https://api.github.com/users/daeero... | [] | closed | false | null | [] | null | [
"\r\n",
"Peewee requires that you be explicit w/the decimal field. If you dislike this functionality, then you can subclass it and override the `get_modifiers()` method.\r\n\r\n```python\r\n\r\nclass Nume... | 2020-05-05T17:23:07 | 2020-05-05T19:38:33 | 2020-05-05T19:38:32 | NONE | null | Why can not you specify max_digits, etc. In ordinary PhpPgadmin, this can be done and the column is simply called numeric without max_digits, etc. | {
"url": "https://api.github.com/repos/coleifer/peewee/issues/2167/reactions",
"total_count": 0,
"+1": 0,
"-1": 0,
"laugh": 0,
"hooray": 0,
"confused": 0,
"heart": 0,
"rocket": 0,
"eyes": 0
} | https://api.github.com/repos/coleifer/peewee/issues/2167/timeline | null | completed | null | null |
https://api.github.com/repos/coleifer/peewee/issues/2166 | https://api.github.com/repos/coleifer/peewee | https://api.github.com/repos/coleifer/peewee/issues/2166/labels{/name} | https://api.github.com/repos/coleifer/peewee/issues/2166/comments | https://api.github.com/repos/coleifer/peewee/issues/2166/events | https://github.com/coleifer/peewee/issues/2166 | 610,623,706 | MDU6SXNzdWU2MTA2MjM3MDY= | 2,166 | Support for read slaves | {
"login": "aniljaiswal",
"id": 43805107,
"node_id": "MDQ6VXNlcjQzODA1MTA3",
"avatar_url": "https://avatars.githubusercontent.com/u/43805107?v=4",
"gravatar_id": "",
"url": "https://api.github.com/users/aniljaiswal",
"html_url": "https://github.com/aniljaiswal",
"followers_url": "https://api.github.com/... | [] | closed | false | null | [] | null | [
"The way to do this with Peewee 3 is probably to use the various context-managers:\r\n\r\nhttp://docs.peewee-orm.com/en/latest/peewee/api.html#Database.bind_ctx\r\n\r\nYou can explicitly set `Query._database` as well on a one-off basis, but that's up to you.",
"Yep, I went with `DB.bind(models)`. Thanks for the r... | 2020-05-01T08:00:48 | 2021-05-21T06:41:23 | 2020-05-01T14:47:38 | NONE | null | Hi @coleifer,
I'm using a master-slave(read-only) setup for our MySQL RDS. Currently, there's no straightforward way to specify the database connection on the basis of `SELECT` vs other query types. I stumbled upon your `read_slave` module from playhouse extension v2.10.0 release of peewee.
Is it possible that I... | {
"url": "https://api.github.com/repos/coleifer/peewee/issues/2166/reactions",
"total_count": 0,
"+1": 0,
"-1": 0,
"laugh": 0,
"hooray": 0,
"confused": 0,
"heart": 0,
"rocket": 0,
"eyes": 0
} | https://api.github.com/repos/coleifer/peewee/issues/2166/timeline | null | completed | null | null |
https://api.github.com/repos/coleifer/peewee/issues/2165 | https://api.github.com/repos/coleifer/peewee | https://api.github.com/repos/coleifer/peewee/issues/2165/labels{/name} | https://api.github.com/repos/coleifer/peewee/issues/2165/comments | https://api.github.com/repos/coleifer/peewee/issues/2165/events | https://github.com/coleifer/peewee/issues/2165 | 609,748,010 | MDU6SXNzdWU2MDk3NDgwMTA= | 2,165 | delete_instance is atomic? | {
"login": "theruziev",
"id": 32102033,
"node_id": "MDQ6VXNlcjMyMTAyMDMz",
"avatar_url": "https://avatars.githubusercontent.com/u/32102033?v=4",
"gravatar_id": "",
"url": "https://api.github.com/users/theruziev",
"html_url": "https://github.com/theruziev",
"followers_url": "https://api.github.com/users/... | [] | closed | false | null | [] | null | [
"Transaction management is left up to the user. So if you want atomicity, then wrap your operations in the `atomic()` context manager.\r\n\r\nhttp://docs.peewee-orm.com/en/latest/peewee/database.html#managing-transactions",
"Thanks for the answer"
] | 2020-04-30T09:18:43 | 2020-04-30T15:22:05 | 2020-04-30T13:05:40 | NONE | null | is it ok to delete_instance it's not atomic by design or I misunderstood code and documentation? | {
"url": "https://api.github.com/repos/coleifer/peewee/issues/2165/reactions",
"total_count": 0,
"+1": 0,
"-1": 0,
"laugh": 0,
"hooray": 0,
"confused": 0,
"heart": 0,
"rocket": 0,
"eyes": 0
} | https://api.github.com/repos/coleifer/peewee/issues/2165/timeline | null | completed | null | null |
https://api.github.com/repos/coleifer/peewee/issues/2164 | https://api.github.com/repos/coleifer/peewee | https://api.github.com/repos/coleifer/peewee/issues/2164/labels{/name} | https://api.github.com/repos/coleifer/peewee/issues/2164/comments | https://api.github.com/repos/coleifer/peewee/issues/2164/events | https://github.com/coleifer/peewee/issues/2164 | 608,921,380 | MDU6SXNzdWU2MDg5MjEzODA= | 2,164 | [Question] How to remove element from ArrayField | {
"login": "daeeros",
"id": 34482855,
"node_id": "MDQ6VXNlcjM0NDgyODU1",
"avatar_url": "https://avatars.githubusercontent.com/u/34482855?v=4",
"gravatar_id": "",
"url": "https://api.github.com/users/daeeros",
"html_url": "https://github.com/daeeros",
"followers_url": "https://api.github.com/users/daeero... | [] | closed | false | null | [] | null | [
"https://www.postgresql.org/docs/9.3/functions-array.html#ARRAY-FUNCTIONS-TABLE",
"The issue tracker is not for \"how do I...\" questions. Ask those on:\r\n\r\n* StackOverflow\r\n* IRC\r\n* Mailing list\r\n\r\nhttp://docs.peewee-orm.com/en/latest/peewee/contributing.html#questions"
] | 2020-04-29T09:49:06 | 2020-04-29T13:11:42 | 2020-04-29T13:10:45 | NONE | null | Hi, I apologize for the large number of questions. How can I remove an item from an ArrayField?
How to add, I seem to have found the function `from peewee import fn`
`fn.array_append ()`
But I did not find how to remove | {
"url": "https://api.github.com/repos/coleifer/peewee/issues/2164/reactions",
"total_count": 0,
"+1": 0,
"-1": 0,
"laugh": 0,
"hooray": 0,
"confused": 0,
"heart": 0,
"rocket": 0,
"eyes": 0
} | https://api.github.com/repos/coleifer/peewee/issues/2164/timeline | null | completed | null | null |
https://api.github.com/repos/coleifer/peewee/issues/2163 | https://api.github.com/repos/coleifer/peewee | https://api.github.com/repos/coleifer/peewee/issues/2163/labels{/name} | https://api.github.com/repos/coleifer/peewee/issues/2163/comments | https://api.github.com/repos/coleifer/peewee/issues/2163/events | https://github.com/coleifer/peewee/issues/2163 | 608,297,839 | MDU6SXNzdWU2MDgyOTc4Mzk= | 2,163 | [Question] How to add new value for ArrayField table | {
"login": "daeeros",
"id": 34482855,
"node_id": "MDQ6VXNlcjM0NDgyODU1",
"avatar_url": "https://avatars.githubusercontent.com/u/34482855?v=4",
"gravatar_id": "",
"url": "https://api.github.com/users/daeeros",
"html_url": "https://github.com/daeeros",
"followers_url": "https://api.github.com/users/daeero... | [] | closed | false | null | [] | null | [
"Read the postgresql array docs: https://www.postgresql.org/docs/9.1/arrays.html\r\n\r\nYou can use the concatenation operator, though it's pretty \"fragile\" and may complain about operators, in which case you'll need to use casts."
] | 2020-04-28T12:59:43 | 2020-04-28T14:43:06 | 2020-04-28T14:43:06 | NONE | null | Hi, how i can add new value for arrayfield column? I try thet
`await db.execute(MarriagePlayer.update({MarriagePlayer.woman_childrens: MarriagePlayer.woman_childrens.append(1)}))`
But its not working(, i don't see in documentation thet funcion | {
"url": "https://api.github.com/repos/coleifer/peewee/issues/2163/reactions",
"total_count": 0,
"+1": 0,
"-1": 0,
"laugh": 0,
"hooray": 0,
"confused": 0,
"heart": 0,
"rocket": 0,
"eyes": 0
} | https://api.github.com/repos/coleifer/peewee/issues/2163/timeline | null | completed | null | null |
https://api.github.com/repos/coleifer/peewee/issues/2162 | https://api.github.com/repos/coleifer/peewee | https://api.github.com/repos/coleifer/peewee/issues/2162/labels{/name} | https://api.github.com/repos/coleifer/peewee/issues/2162/comments | https://api.github.com/repos/coleifer/peewee/issues/2162/events | https://github.com/coleifer/peewee/issues/2162 | 607,850,591 | MDU6SXNzdWU2MDc4NTA1OTE= | 2,162 | Cannot use bulk_create to create multiple entities with a foreign key relationship | {
"login": "psahgal",
"id": 2686895,
"node_id": "MDQ6VXNlcjI2ODY4OTU=",
"avatar_url": "https://avatars.githubusercontent.com/u/2686895?v=4",
"gravatar_id": "",
"url": "https://api.github.com/users/psahgal",
"html_url": "https://github.com/psahgal",
"followers_url": "https://api.github.com/users/psahgal/... | [] | closed | false | null | [] | null | [
"Peewee introduced an efficiency measure in `bulk_create()` to use the object-id descriptor to grab the associated PK of the related object. It seems it has had an unintended side-effect of not reflecting the new primary-key value upon saving the related object. I'll look into this.",
"Fixed. Note that this would... | 2020-04-27T21:01:16 | 2020-04-28T14:01:04 | 2020-04-27T21:27:51 | NONE | null | While making some changes to our ETL pipeline, my team and I noticed that some new errors have appeared. It looks like there was an issue that was introduced in version. 3.13.3. It's also possible we were relying on some undocumented behavior.
What we're trying to do is instantiate a set of entities before writing ... | {
"url": "https://api.github.com/repos/coleifer/peewee/issues/2162/reactions",
"total_count": 0,
"+1": 0,
"-1": 0,
"laugh": 0,
"hooray": 0,
"confused": 0,
"heart": 0,
"rocket": 0,
"eyes": 0
} | https://api.github.com/repos/coleifer/peewee/issues/2162/timeline | null | completed | null | null |
https://api.github.com/repos/coleifer/peewee/issues/2161 | https://api.github.com/repos/coleifer/peewee | https://api.github.com/repos/coleifer/peewee/issues/2161/labels{/name} | https://api.github.com/repos/coleifer/peewee/issues/2161/comments | https://api.github.com/repos/coleifer/peewee/issues/2161/events | https://github.com/coleifer/peewee/issues/2161 | 607,513,471 | MDU6SXNzdWU2MDc1MTM0NzE= | 2,161 | Invalid SQL is generated upon multiple joins of a table | {
"login": "intruder777",
"id": 1699706,
"node_id": "MDQ6VXNlcjE2OTk3MDY=",
"avatar_url": "https://avatars.githubusercontent.com/u/1699706?v=4",
"gravatar_id": "",
"url": "https://api.github.com/users/intruder777",
"html_url": "https://github.com/intruder777",
"followers_url": "https://api.github.com/us... | [] | closed | false | null | [] | null | [
"I'd be happy to look into this, but I'm not digging through all the craziness.\r\n\r\nIf you can produce a *minimal* example using simple models (e.g. my favorites are \"User\" / \"Tweet\") I'll reopen and investigate."
] | 2020-04-27T12:36:20 | 2020-04-27T14:16:49 | 2020-04-27T14:16:49 | NONE | null | I have strange problem with **peewee (v3.13.3)** when joining several tables in **Postgres (v12.2)**.
- DB structure SQL: https://gist.github.com/intruder777/f36a00b2009a1c9a8236c9f641819556
- DB models (generated by pwiz): https://gist.github.com/intruder777/18b800e3758df471d50fdf52cd05ef87
- Python run file: htt... | {
"url": "https://api.github.com/repos/coleifer/peewee/issues/2161/reactions",
"total_count": 0,
"+1": 0,
"-1": 0,
"laugh": 0,
"hooray": 0,
"confused": 0,
"heart": 0,
"rocket": 0,
"eyes": 0
} | https://api.github.com/repos/coleifer/peewee/issues/2161/timeline | null | completed | null | null |
https://api.github.com/repos/coleifer/peewee/issues/2160 | https://api.github.com/repos/coleifer/peewee | https://api.github.com/repos/coleifer/peewee/issues/2160/labels{/name} | https://api.github.com/repos/coleifer/peewee/issues/2160/comments | https://api.github.com/repos/coleifer/peewee/issues/2160/events | https://github.com/coleifer/peewee/issues/2160 | 606,765,244 | MDU6SXNzdWU2MDY3NjUyNDQ= | 2,160 | How to set comments for columns | {
"login": "pch18",
"id": 19822708,
"node_id": "MDQ6VXNlcjE5ODIyNzA4",
"avatar_url": "https://avatars.githubusercontent.com/u/19822708?v=4",
"gravatar_id": "",
"url": "https://api.github.com/users/pch18",
"html_url": "https://github.com/pch18",
"followers_url": "https://api.github.com/users/pch18/follow... | [] | closed | false | null | [] | null | [
"Peewee does not add comments to the schema.",
"Is this functionality you would be interested in having as part of peewee? \r\n\r\nI already have code I could easily adapt to a PR.\r\n\r\n@pch18 A solution for you could look something like this:\r\n``` python\r\nimport peewee as pw\r\n\r\n\r\nclass DatabaseCommen... | 2020-04-25T13:02:01 | 2020-04-25T14:13:14 | 2020-04-25T13:25:39 | NONE | null | I tried to set the help_text field, it didn't seem to work | {
"url": "https://api.github.com/repos/coleifer/peewee/issues/2160/reactions",
"total_count": 0,
"+1": 0,
"-1": 0,
"laugh": 0,
"hooray": 0,
"confused": 0,
"heart": 0,
"rocket": 0,
"eyes": 0
} | https://api.github.com/repos/coleifer/peewee/issues/2160/timeline | null | completed | null | null |
https://api.github.com/repos/coleifer/peewee/issues/2159 | https://api.github.com/repos/coleifer/peewee | https://api.github.com/repos/coleifer/peewee/issues/2159/labels{/name} | https://api.github.com/repos/coleifer/peewee/issues/2159/comments | https://api.github.com/repos/coleifer/peewee/issues/2159/events | https://github.com/coleifer/peewee/issues/2159 | 605,646,768 | MDU6SXNzdWU2MDU2NDY3Njg= | 2,159 | Selecting from a union causes peewee.InterfaceError | {
"login": "8BitMate",
"id": 14078867,
"node_id": "MDQ6VXNlcjE0MDc4ODY3",
"avatar_url": "https://avatars.githubusercontent.com/u/14078867?v=4",
"gravatar_id": "",
"url": "https://api.github.com/users/8BitMate",
"html_url": "https://github.com/8BitMate",
"followers_url": "https://api.github.com/users/8Bi... | [] | closed | false | null | [] | null | [
"The issue is the final `select()` method.\r\n\r\n```python\r\n\r\nq1 = Data.select()\r\nq2 = Data.select()\r\nquery = q1.union(q2)\r\n```",
"I probably wasn't explaining the issue well enough, but focused on giving a minimal example to reproduce the issue.\r\n\r\nWhat I have are two different queries producing t... | 2020-04-23T15:47:16 | 2020-04-23T19:34:28 | 2020-04-23T16:06:21 | NONE | null | Selecting from a union of two tables causes an InterfaceError.
If i write this query:
```python
q = (
Data
.select()
.union(
Data
.select()
).select()
)
```
and call `q.execute()` I get the following error:
```
peewee.InterfaceError: Query must be bound to a database in ord... | {
"url": "https://api.github.com/repos/coleifer/peewee/issues/2159/reactions",
"total_count": 0,
"+1": 0,
"-1": 0,
"laugh": 0,
"hooray": 0,
"confused": 0,
"heart": 0,
"rocket": 0,
"eyes": 0
} | https://api.github.com/repos/coleifer/peewee/issues/2159/timeline | null | completed | null | null |
https://api.github.com/repos/coleifer/peewee/issues/2158 | https://api.github.com/repos/coleifer/peewee | https://api.github.com/repos/coleifer/peewee/issues/2158/labels{/name} | https://api.github.com/repos/coleifer/peewee/issues/2158/comments | https://api.github.com/repos/coleifer/peewee/issues/2158/events | https://github.com/coleifer/peewee/issues/2158 | 605,438,517 | MDU6SXNzdWU2MDU0Mzg1MTc= | 2,158 | How Update the required array in the database column (Integer) | {
"login": "daeeros",
"id": 34482855,
"node_id": "MDQ6VXNlcjM0NDgyODU1",
"avatar_url": "https://avatars.githubusercontent.com/u/34482855?v=4",
"gravatar_id": "",
"url": "https://api.github.com/users/daeeros",
"html_url": "https://github.com/daeeros",
"followers_url": "https://api.github.com/users/daeero... | [] | closed | false | null | [] | null | [
"Released in 3.13.3 https://github.com/coleifer/peewee/releases/tag/3.13.3"
] | 2020-04-23T10:57:27 | 2020-04-24T00:37:15 | 2020-04-24T00:28:04 | NONE | null | ```
await db.execute(MarriagePlayer.update({
MarriagePlayer.statistics[0]: MarriagePlayer.statistics[0] + 1
}).where(
MarriagePlayer.chat_id == msg.receiver_id,
MarriagePlayer.user_id << [msg.sender_id, p.loved]))
```
i try to update 0 array in column but i get error... | {
"url": "https://api.github.com/repos/coleifer/peewee/issues/2158/reactions",
"total_count": 0,
"+1": 0,
"-1": 0,
"laugh": 0,
"hooray": 0,
"confused": 0,
"heart": 0,
"rocket": 0,
"eyes": 0
} | https://api.github.com/repos/coleifer/peewee/issues/2158/timeline | null | completed | null | null |
https://api.github.com/repos/coleifer/peewee/issues/2157 | https://api.github.com/repos/coleifer/peewee | https://api.github.com/repos/coleifer/peewee/issues/2157/labels{/name} | https://api.github.com/repos/coleifer/peewee/issues/2157/comments | https://api.github.com/repos/coleifer/peewee/issues/2157/events | https://github.com/coleifer/peewee/issues/2157 | 604,949,428 | MDU6SXNzdWU2MDQ5NDk0Mjg= | 2,157 | sqlite3 random rows by seed | {
"login": "nisanb",
"id": 20663443,
"node_id": "MDQ6VXNlcjIwNjYzNDQz",
"avatar_url": "https://avatars.githubusercontent.com/u/20663443?v=4",
"gravatar_id": "",
"url": "https://api.github.com/users/nisanb",
"html_url": "https://github.com/nisanb",
"followers_url": "https://api.github.com/users/nisanb/fo... | [] | closed | false | null | [] | null | [
"Sqlite allows you to write arbitrary user-defined functions. There are examples:\r\n\r\nhttp://docs.peewee-orm.com/en/latest/peewee/database.html#sqlite-user-functions"
] | 2020-04-22T17:53:35 | 2020-04-22T18:20:27 | 2020-04-22T18:20:27 | NONE | null | With using Python, my tool has a randomized seed for each run.
Upon placing the same seed, I would like to receive the same randomized results.
I tried externally-implementing it, but that causes performance degradation for two reasons:
1. I need to build a list out of ModelSelect objects
2. I need to return all ... | {
"url": "https://api.github.com/repos/coleifer/peewee/issues/2157/reactions",
"total_count": 0,
"+1": 0,
"-1": 0,
"laugh": 0,
"hooray": 0,
"confused": 0,
"heart": 0,
"rocket": 0,
"eyes": 0
} | https://api.github.com/repos/coleifer/peewee/issues/2157/timeline | null | completed | null | null |
https://api.github.com/repos/coleifer/peewee/issues/2156 | https://api.github.com/repos/coleifer/peewee | https://api.github.com/repos/coleifer/peewee/issues/2156/labels{/name} | https://api.github.com/repos/coleifer/peewee/issues/2156/comments | https://api.github.com/repos/coleifer/peewee/issues/2156/events | https://github.com/coleifer/peewee/issues/2156 | 604,625,096 | MDU6SXNzdWU2MDQ2MjUwOTY= | 2,156 | Slow attribute access in 2.10.2 | {
"login": "ParthGandhi",
"id": 819237,
"node_id": "MDQ6VXNlcjgxOTIzNw==",
"avatar_url": "https://avatars.githubusercontent.com/u/819237?v=4",
"gravatar_id": "",
"url": "https://api.github.com/users/ParthGandhi",
"html_url": "https://github.com/ParthGandhi",
"followers_url": "https://api.github.com/user... | [] | closed | false | null | [] | null | [
"Python is slow. Typically the time spent querying the DB will be the bulk of the time spent in any peewee code path... usually orders of magnitude. If attribute access is hurting you, use the tuples method on the query to have the cursor return tuples instead of model instances."
] | 2020-04-22T10:01:26 | 2020-04-22T13:00:09 | 2020-04-22T13:00:09 | NONE | null | We're on version `2.10.2`, with no plans to upgrade in the short term.
From our profiling we've found that `__get__ peewee.py:915` takes a really long time in some of our hot code paths. Any idea why that `FieldDescriptor` is so slow? It seems to be doing just a `get` on a dict. I tried accessing the underlying `._d... | {
"url": "https://api.github.com/repos/coleifer/peewee/issues/2156/reactions",
"total_count": 0,
"+1": 0,
"-1": 0,
"laugh": 0,
"hooray": 0,
"confused": 0,
"heart": 0,
"rocket": 0,
"eyes": 0
} | https://api.github.com/repos/coleifer/peewee/issues/2156/timeline | null | completed | null | null |
https://api.github.com/repos/coleifer/peewee/issues/2155 | https://api.github.com/repos/coleifer/peewee | https://api.github.com/repos/coleifer/peewee/issues/2155/labels{/name} | https://api.github.com/repos/coleifer/peewee/issues/2155/comments | https://api.github.com/repos/coleifer/peewee/issues/2155/events | https://github.com/coleifer/peewee/issues/2155 | 603,849,342 | MDU6SXNzdWU2MDM4NDkzNDI= | 2,155 | Error with bulk_update and UUID primary keys | {
"login": "spl0k",
"id": 2974943,
"node_id": "MDQ6VXNlcjI5NzQ5NDM=",
"avatar_url": "https://avatars.githubusercontent.com/u/2974943?v=4",
"gravatar_id": "",
"url": "https://api.github.com/users/spl0k",
"html_url": "https://github.com/spl0k",
"followers_url": "https://api.github.com/users/spl0k/follower... | [] | closed | false | null | [] | null | [
"Fixed in 3.13.3"
] | 2020-04-21T09:27:37 | 2020-04-24T00:37:37 | 2020-04-21T17:07:01 | NONE | null | Hello,
It seems peewee doesn't serialize primary keys properly in `bulk_update()` when they're `UUIDField`s.
This code
```python
import logging
import uuid
from peewee import Model, UUIDField, IntegerField, SqliteDatabase
database = SqliteDatabase(":memory:")
class TestModel(Model):
pk = UUIDFi... | {
"url": "https://api.github.com/repos/coleifer/peewee/issues/2155/reactions",
"total_count": 0,
"+1": 0,
"-1": 0,
"laugh": 0,
"hooray": 0,
"confused": 0,
"heart": 0,
"rocket": 0,
"eyes": 0
} | https://api.github.com/repos/coleifer/peewee/issues/2155/timeline | null | completed | null | null |
https://api.github.com/repos/coleifer/peewee/issues/2154 | https://api.github.com/repos/coleifer/peewee | https://api.github.com/repos/coleifer/peewee/issues/2154/labels{/name} | https://api.github.com/repos/coleifer/peewee/issues/2154/comments | https://api.github.com/repos/coleifer/peewee/issues/2154/events | https://github.com/coleifer/peewee/issues/2154 | 603,565,773 | MDU6SXNzdWU2MDM1NjU3NzM= | 2,154 | Error when issuing bulk_create with FK to non-primary-key rel field | {
"login": "coleifer",
"id": 119974,
"node_id": "MDQ6VXNlcjExOTk3NA==",
"avatar_url": "https://avatars.githubusercontent.com/u/119974?v=4",
"gravatar_id": "",
"url": "https://api.github.com/users/coleifer",
"html_url": "https://github.com/coleifer",
"followers_url": "https://api.github.com/users/coleife... | [] | closed | false | null | [] | null | [
"So the `bulk_create()` method just pulls field data off each model and lines it up for insert. When the model being created has a foreign-key, then peewee is pulling off the related model instance. When doing the insert, we don't realize that we want the related model attr that corresponds to the FK and are just b... | 2020-04-20T22:04:54 | 2020-04-20T22:37:39 | 2020-04-20T22:37:39 | OWNER | null | u1 = BCUser.create(username='u1')
u2 = BCUser.create(username='u2')
BCTweet.bulk_create([
BCTweet(user='u1', content='t%s' % i)
for i in range(4)])
Throws a foreign-key mismatch error. | {
"url": "https://api.github.com/repos/coleifer/peewee/issues/2154/reactions",
"total_count": 0,
"+1": 0,
"-1": 0,
"laugh": 0,
"hooray": 0,
"confused": 0,
"heart": 0,
"rocket": 0,
"eyes": 0
} | https://api.github.com/repos/coleifer/peewee/issues/2154/timeline | null | completed | null | null |
https://api.github.com/repos/coleifer/peewee/issues/2153 | https://api.github.com/repos/coleifer/peewee | https://api.github.com/repos/coleifer/peewee/issues/2153/labels{/name} | https://api.github.com/repos/coleifer/peewee/issues/2153/comments | https://api.github.com/repos/coleifer/peewee/issues/2153/events | https://github.com/coleifer/peewee/issues/2153 | 601,223,147 | MDU6SXNzdWU2MDEyMjMxNDc= | 2,153 | ManyToMany field no longer has .add, .remove, .clear methods | {
"login": "pylakey",
"id": 56714344,
"node_id": "MDQ6VXNlcjU2NzE0MzQ0",
"avatar_url": "https://avatars.githubusercontent.com/u/56714344?v=4",
"gravatar_id": "",
"url": "https://api.github.com/users/pylakey",
"html_url": "https://github.com/pylakey",
"followers_url": "https://api.github.com/users/pylake... | [] | closed | false | null | [] | null | [
"I am sorry for opening this issue. Already found a stupid mistake",
"The example code runs fine for me on the latest version of Peewee.\r\n\r\nhttps://gist.github.com/coleifer/8dd15da06ed5e390064ff99ae8ef9378\r\n\r\nThe methods you mentioned *are* present. They are exposed on the backref accessor, not the field ... | 2020-04-16T16:21:36 | 2020-04-17T08:41:08 | 2020-04-16T16:47:59 | NONE | null | I suppose that http://docs.peewee-orm.com/en/latest/peewee/relationships.html#manytomanyfield is outdated.
Example in docs doesn't work with latest peewee version because of AttributeError
EDIT: This issue is related to ManyToManyField with through_model set. | {
"url": "https://api.github.com/repos/coleifer/peewee/issues/2153/reactions",
"total_count": 0,
"+1": 0,
"-1": 0,
"laugh": 0,
"hooray": 0,
"confused": 0,
"heart": 0,
"rocket": 0,
"eyes": 0
} | https://api.github.com/repos/coleifer/peewee/issues/2153/timeline | null | completed | null | null |
https://api.github.com/repos/coleifer/peewee/issues/2152 | https://api.github.com/repos/coleifer/peewee | https://api.github.com/repos/coleifer/peewee/issues/2152/labels{/name} | https://api.github.com/repos/coleifer/peewee/issues/2152/comments | https://api.github.com/repos/coleifer/peewee/issues/2152/events | https://github.com/coleifer/peewee/issues/2152 | 599,203,349 | MDU6SXNzdWU1OTkyMDMzNDk= | 2,152 | Support CTE in ModelInsert? | {
"login": "albireox",
"id": 568775,
"node_id": "MDQ6VXNlcjU2ODc3NQ==",
"avatar_url": "https://avatars.githubusercontent.com/u/568775?v=4",
"gravatar_id": "",
"url": "https://api.github.com/users/albireox",
"html_url": "https://github.com/albireox",
"followers_url": "https://api.github.com/users/albireo... | [] | closed | false | null | [] | null | [
"This is now implemented in 21dcc113c28b853544ca1db804750320d934e17e\r\n\r\nExamples can be found in the new tests, reproduced here:\r\n\r\n```python\r\n def test_data_modifying_cte_delete(self):\r\n # delete products whose price is less than 3, simultaneously copying them to\r\n # the archive tabl... | 2020-04-13T23:54:42 | 2022-07-27T14:25:31 | 2022-06-16T15:39:03 | NONE | null | I have the following use case. I have a table `tic_v8` from which I want to get the columns `ra` and `dec` and insert them into a table `catalog`, also assigning a serial primary key (`catalogid`). In the same query I want to retrieve the newly assigned catalogids and `tic_v8.id` and add them to a relational table `cat... | {
"url": "https://api.github.com/repos/coleifer/peewee/issues/2152/reactions",
"total_count": 10,
"+1": 9,
"-1": 1,
"laugh": 0,
"hooray": 0,
"confused": 0,
"heart": 0,
"rocket": 0,
"eyes": 0
} | https://api.github.com/repos/coleifer/peewee/issues/2152/timeline | null | completed | null | null |
https://api.github.com/repos/coleifer/peewee/issues/2151 | https://api.github.com/repos/coleifer/peewee | https://api.github.com/repos/coleifer/peewee/issues/2151/labels{/name} | https://api.github.com/repos/coleifer/peewee/issues/2151/comments | https://api.github.com/repos/coleifer/peewee/issues/2151/events | https://github.com/coleifer/peewee/issues/2151 | 597,334,022 | MDU6SXNzdWU1OTczMzQwMjI= | 2,151 | Pivot functionality? | {
"login": "bravegag",
"id": 4385408,
"node_id": "MDQ6VXNlcjQzODU0MDg=",
"avatar_url": "https://avatars.githubusercontent.com/u/4385408?v=4",
"gravatar_id": "",
"url": "https://api.github.com/users/bravegag",
"html_url": "https://github.com/bravegag",
"followers_url": "https://api.github.com/users/brave... | [] | closed | false | null | [] | null | [
"I don't think this is a good fit for a library like Peewee, but I would encourage you, if you think it would be useful, to create your own module."
] | 2020-04-09T14:44:32 | 2020-04-09T16:28:20 | 2020-04-09T16:28:20 | NONE | null | I think a really good feature in Peewee would be pivoting data which is supported up to some extent by different database vendors. Having pivot support would be a welcome abstraction to Peewee for a far common problem. Note that pandas implements pivoting see: https://pandas.pydata.org/Pandas_Cheat_Sheet.pdf
Pivotin... | {
"url": "https://api.github.com/repos/coleifer/peewee/issues/2151/reactions",
"total_count": 0,
"+1": 0,
"-1": 0,
"laugh": 0,
"hooray": 0,
"confused": 0,
"heart": 0,
"rocket": 0,
"eyes": 0
} | https://api.github.com/repos/coleifer/peewee/issues/2151/timeline | null | completed | null | null |
https://api.github.com/repos/coleifer/peewee/issues/2150 | https://api.github.com/repos/coleifer/peewee | https://api.github.com/repos/coleifer/peewee/issues/2150/labels{/name} | https://api.github.com/repos/coleifer/peewee/issues/2150/comments | https://api.github.com/repos/coleifer/peewee/issues/2150/events | https://github.com/coleifer/peewee/issues/2150 | 597,206,825 | MDU6SXNzdWU1OTcyMDY4MjU= | 2,150 | [q] Run-time model schema | {
"login": "ak4nv",
"id": 73960,
"node_id": "MDQ6VXNlcjczOTYw",
"avatar_url": "https://avatars.githubusercontent.com/u/73960?v=4",
"gravatar_id": "",
"url": "https://api.github.com/users/ak4nv",
"html_url": "https://github.com/ak4nv",
"followers_url": "https://api.github.com/users/ak4nv/followers",
"f... | [] | closed | false | null | [] | null | [
"You can use the `SubclassAwareMetadata` implementation, which tracks all models declared in your app. From that list of models, you should be able to easily iterate through them and change each model's `._meta.schema`.",
"This is exactly covered in this test-case:\r\n\r\nhttps://github.com/coleifer/peewee/blob/4... | 2020-04-09T11:10:51 | 2020-04-09T13:29:26 | 2020-04-09T13:28:38 | NONE | null | Hi there!
I'm trying to make a multitenancy application (flask+peewee). I think it possible to change the schema for all models in runtime but can't find the way.
Any example, pls (without context managers)
Thanks! | {
"url": "https://api.github.com/repos/coleifer/peewee/issues/2150/reactions",
"total_count": 0,
"+1": 0,
"-1": 0,
"laugh": 0,
"hooray": 0,
"confused": 0,
"heart": 0,
"rocket": 0,
"eyes": 0
} | https://api.github.com/repos/coleifer/peewee/issues/2150/timeline | null | completed | null | null |
https://api.github.com/repos/coleifer/peewee/issues/2149 | https://api.github.com/repos/coleifer/peewee | https://api.github.com/repos/coleifer/peewee/issues/2149/labels{/name} | https://api.github.com/repos/coleifer/peewee/issues/2149/comments | https://api.github.com/repos/coleifer/peewee/issues/2149/events | https://github.com/coleifer/peewee/issues/2149 | 596,803,220 | MDU6SXNzdWU1OTY4MDMyMjA= | 2,149 | OperationalError: PRIMARY KEY missing on table | {
"login": "bravegag",
"id": 4385408,
"node_id": "MDQ6VXNlcjQzODU0MDg=",
"avatar_url": "https://avatars.githubusercontent.com/u/4385408?v=4",
"gravatar_id": "",
"url": "https://api.github.com/users/bravegag",
"html_url": "https://github.com/bravegag",
"followers_url": "https://api.github.com/users/brave... | [] | closed | false | null | [] | null | [
"When does that operational error occur? Without the full traceback it's impossible to tell what happened. Operational error typically is raised by your driver - you're violating a constraint implied by something in your schema.\r\n\r\nI believe, looking at the sqlite source code, that it's the use of \"without row... | 2020-04-08T19:22:04 | 2020-04-09T07:10:38 | 2020-04-08T21:41:46 | NONE | null | I get the OP title error while creating a table and setting the Meta to `primary_key = False` see the following MCVE sample:
```
from peewee import *
db = SqliteDatabase('market_data.db')
class BaseModel(Model):
"""
Base reusable model.
"""
class Meta:
database = db
leg... | {
"url": "https://api.github.com/repos/coleifer/peewee/issues/2149/reactions",
"total_count": 0,
"+1": 0,
"-1": 0,
"laugh": 0,
"hooray": 0,
"confused": 0,
"heart": 0,
"rocket": 0,
"eyes": 0
} | https://api.github.com/repos/coleifer/peewee/issues/2149/timeline | null | completed | null | null |
https://api.github.com/repos/coleifer/peewee/issues/2148 | https://api.github.com/repos/coleifer/peewee | https://api.github.com/repos/coleifer/peewee/issues/2148/labels{/name} | https://api.github.com/repos/coleifer/peewee/issues/2148/comments | https://api.github.com/repos/coleifer/peewee/issues/2148/events | https://github.com/coleifer/peewee/issues/2148 | 596,447,421 | MDU6SXNzdWU1OTY0NDc0MjE= | 2,148 | [Question] Return FKs with an _id suffix. | {
"login": "dsmurrell",
"id": 4035854,
"node_id": "MDQ6VXNlcjQwMzU4NTQ=",
"avatar_url": "https://avatars.githubusercontent.com/u/4035854?v=4",
"gravatar_id": "",
"url": "https://api.github.com/users/dsmurrell",
"html_url": "https://github.com/dsmurrell",
"followers_url": "https://api.github.com/users/ds... | [] | closed | false | null | [] | null | [
"`model_to_dict` is simply a shortcut, provided for convenience. If you need something different, then just implement a simple serialization function.",
"I understand that and have read that elsewhere... just checking that something didn't exist already that I was missing. Thanks!"
] | 2020-04-08T09:43:46 | 2020-04-08T14:34:30 | 2020-04-08T13:13:49 | NONE | null | Right now, even though foreign keys are stored as field names in the database with an `_id` suffix, they are added to the dictionary outputted by `model_to_dict` without the `_id` suffix.
I was wondering, if I want all foreign keys to appear in the output dict of `model_to_dict` with a `_id` suffix, do I have to wri... | {
"url": "https://api.github.com/repos/coleifer/peewee/issues/2148/reactions",
"total_count": 0,
"+1": 0,
"-1": 0,
"laugh": 0,
"hooray": 0,
"confused": 0,
"heart": 0,
"rocket": 0,
"eyes": 0
} | https://api.github.com/repos/coleifer/peewee/issues/2148/timeline | null | completed | null | null |
https://api.github.com/repos/coleifer/peewee/issues/2147 | https://api.github.com/repos/coleifer/peewee | https://api.github.com/repos/coleifer/peewee/issues/2147/labels{/name} | https://api.github.com/repos/coleifer/peewee/issues/2147/comments | https://api.github.com/repos/coleifer/peewee/issues/2147/events | https://github.com/coleifer/peewee/issues/2147 | 596,278,607 | MDU6SXNzdWU1OTYyNzg2MDc= | 2,147 | mysql default sql_mode setting | {
"login": "amchii",
"id": 26922464,
"node_id": "MDQ6VXNlcjI2OTIyNDY0",
"avatar_url": "https://avatars.githubusercontent.com/u/26922464?v=4",
"gravatar_id": "",
"url": "https://api.github.com/users/amchii",
"html_url": "https://github.com/amchii",
"followers_url": "https://api.github.com/users/amchii/fo... | [] | closed | false | null | [] | null | [
"You're welcome to specify whatever sql mode you wish by passing it in the constructor."
] | 2020-04-08T03:15:12 | 2020-04-08T13:12:14 | 2020-04-08T13:12:13 | NONE | null | Hi,
peewee set the sql_mode to `'PIPES_AS_CONCAT'` when use `MySQLDatabase`, but this will remove the default setted values `'ONLY_FULL_GROUP_BY,STRICT_TRANS_TABLES,NO_ZERO_IN_DATE,NO_ZERO_DATE,ERROR_FOR_DIVISION_BY_ZERO,NO_ENGINE_SUBSTITUTION'`,
```python
import peewee
pwdb=peewee.MySQLDatabase('test',user=... | {
"url": "https://api.github.com/repos/coleifer/peewee/issues/2147/reactions",
"total_count": 0,
"+1": 0,
"-1": 0,
"laugh": 0,
"hooray": 0,
"confused": 0,
"heart": 0,
"rocket": 0,
"eyes": 0
} | https://api.github.com/repos/coleifer/peewee/issues/2147/timeline | null | completed | null | null |
https://api.github.com/repos/coleifer/peewee/issues/2146 | https://api.github.com/repos/coleifer/peewee | https://api.github.com/repos/coleifer/peewee/issues/2146/labels{/name} | https://api.github.com/repos/coleifer/peewee/issues/2146/comments | https://api.github.com/repos/coleifer/peewee/issues/2146/events | https://github.com/coleifer/peewee/issues/2146 | 595,227,179 | MDU6SXNzdWU1OTUyMjcxNzk= | 2,146 | no function fts_bm25 | {
"login": "Dawoodkhorsandi",
"id": 23568714,
"node_id": "MDQ6VXNlcjIzNTY4NzE0",
"avatar_url": "https://avatars.githubusercontent.com/u/23568714?v=4",
"gravatar_id": "",
"url": "https://api.github.com/users/Dawoodkhorsandi",
"html_url": "https://github.com/Dawoodkhorsandi",
"followers_url": "https://api... | [] | closed | false | null | [] | null | [
"Peewee ships with some user-defined functions which provide the bm25 ranking (when using fts3/4). You need to ensure that you're using `SqliteExtDatabase` as your database class and you should be good-to-go, as it will register the rank functions by default.\r\n\r\nYou can register them yourself, too, just check o... | 2020-04-06T15:49:04 | 2020-04-06T15:52:11 | 2020-04-06T15:52:11 | NONE | null | Hi
I tried to use sqlite3 full-text search with peewee when I run this code
```Python
Poets.select().
join(PoetsIndex, on=(Poets.id == PoetsIndex.rowid)).
where(PoetsIndex.match(phrase))
order_by(PoetsIndex.bm25())
```
it's throws error:
cursor.execute(sql, params o... | {
"url": "https://api.github.com/repos/coleifer/peewee/issues/2146/reactions",
"total_count": 0,
"+1": 0,
"-1": 0,
"laugh": 0,
"hooray": 0,
"confused": 0,
"heart": 0,
"rocket": 0,
"eyes": 0
} | https://api.github.com/repos/coleifer/peewee/issues/2146/timeline | null | completed | null | null |
https://api.github.com/repos/coleifer/peewee/issues/2145 | https://api.github.com/repos/coleifer/peewee | https://api.github.com/repos/coleifer/peewee/issues/2145/labels{/name} | https://api.github.com/repos/coleifer/peewee/issues/2145/comments | https://api.github.com/repos/coleifer/peewee/issues/2145/events | https://github.com/coleifer/peewee/issues/2145 | 595,174,762 | MDU6SXNzdWU1OTUxNzQ3NjI= | 2,145 | foreign key exist | {
"login": "JPilarr",
"id": 45560120,
"node_id": "MDQ6VXNlcjQ1NTYwMTIw",
"avatar_url": "https://avatars.githubusercontent.com/u/45560120?v=4",
"gravatar_id": "",
"url": "https://api.github.com/users/JPilarr",
"html_url": "https://github.com/JPilarr",
"followers_url": "https://api.github.com/users/JPilar... | [] | closed | false | null | [] | null | [
"Questions go on stackoverflow. http://docs.peewee-orm.com/en/latest/peewee/contributing.html#questions"
] | 2020-04-06T14:41:47 | 2020-04-06T14:52:36 | 2020-04-06T14:52:36 | NONE | null | hi,
would like check if foreign key exist do something.
```
if self.printer_type:
result['type_id'] = self.printer_type.id
result['type_name'] = self.printer_type.name
```
like this. I think the example doesn't work | {
"url": "https://api.github.com/repos/coleifer/peewee/issues/2145/reactions",
"total_count": 0,
"+1": 0,
"-1": 0,
"laugh": 0,
"hooray": 0,
"confused": 0,
"heart": 0,
"rocket": 0,
"eyes": 0
} | https://api.github.com/repos/coleifer/peewee/issues/2145/timeline | null | completed | null | null |
https://api.github.com/repos/coleifer/peewee/issues/2144 | https://api.github.com/repos/coleifer/peewee | https://api.github.com/repos/coleifer/peewee/issues/2144/labels{/name} | https://api.github.com/repos/coleifer/peewee/issues/2144/comments | https://api.github.com/repos/coleifer/peewee/issues/2144/events | https://github.com/coleifer/peewee/issues/2144 | 595,052,964 | MDU6SXNzdWU1OTUwNTI5NjQ= | 2,144 | Through model with not AutoField primary key (e.g., UUIDField) with the default value problem | {
"login": "Ignisor",
"id": 22328453,
"node_id": "MDQ6VXNlcjIyMzI4NDUz",
"avatar_url": "https://avatars.githubusercontent.com/u/22328453?v=4",
"gravatar_id": "",
"url": "https://api.github.com/users/Ignisor",
"html_url": "https://github.com/Ignisor",
"followers_url": "https://api.github.com/users/Igniso... | [] | closed | false | null | [] | null | [
"This is expected behavior when using a primary-key field whose default-value is calculated in Python.\r\n\r\nBulk-populating a many-to-many using a select query is an optimization. You can see from the traceback that it's doing an `INSERT ... FROM` query, which means we're inserting into the through table directly... | 2020-04-06T11:57:11 | 2020-04-07T09:01:07 | 2020-04-06T14:09:21 | NONE | null | Hi.
## Problem description
For example, I have a schema like that:
```python
class _BaseModel(pw.Model):
id = pw.UUIDField(primary_key=True, default=uuid.uuid4)
class Meta:
database = DB
class Cucumber(_BaseModel):
size = pw.CharField()
CucumbersThroughDeferred = pw.DeferredT... | {
"url": "https://api.github.com/repos/coleifer/peewee/issues/2144/reactions",
"total_count": 0,
"+1": 0,
"-1": 0,
"laugh": 0,
"hooray": 0,
"confused": 0,
"heart": 0,
"rocket": 0,
"eyes": 0
} | https://api.github.com/repos/coleifer/peewee/issues/2144/timeline | null | completed | null | null |
https://api.github.com/repos/coleifer/peewee/issues/2143 | https://api.github.com/repos/coleifer/peewee | https://api.github.com/repos/coleifer/peewee/issues/2143/labels{/name} | https://api.github.com/repos/coleifer/peewee/issues/2143/comments | https://api.github.com/repos/coleifer/peewee/issues/2143/events | https://github.com/coleifer/peewee/issues/2143 | 591,917,732 | MDU6SXNzdWU1OTE5MTc3MzI= | 2,143 | Comparison operations for subqueries | {
"login": "EugeneRymarev",
"id": 6260309,
"node_id": "MDQ6VXNlcjYyNjAzMDk=",
"avatar_url": "https://avatars.githubusercontent.com/u/6260309?v=4",
"gravatar_id": "",
"url": "https://api.github.com/users/EugeneRymarev",
"html_url": "https://github.com/EugeneRymarev",
"followers_url": "https://api.github.... | [] | closed | false | null | [] | null | [
"4919f5b6ea56969e56abaa5f4e276452e96bc9c9"
] | 2020-04-01T13:30:11 | 2020-04-01T17:52:42 | 2020-04-01T17:52:41 | NONE | null | Hi, @coleifer!
Again with same problem, but not for **EQ** or **NE** operations.
Other operations not work too. Like **LT** or **GT**.
In _HashableSource class need add more operations from **OP**.
https://github.com/coleifer/peewee/issues/2118#issuecomment-593150353_ | {
"url": "https://api.github.com/repos/coleifer/peewee/issues/2143/reactions",
"total_count": 0,
"+1": 0,
"-1": 0,
"laugh": 0,
"hooray": 0,
"confused": 0,
"heart": 0,
"rocket": 0,
"eyes": 0
} | https://api.github.com/repos/coleifer/peewee/issues/2143/timeline | null | completed | null | null |
https://api.github.com/repos/coleifer/peewee/issues/2142 | https://api.github.com/repos/coleifer/peewee | https://api.github.com/repos/coleifer/peewee/issues/2142/labels{/name} | https://api.github.com/repos/coleifer/peewee/issues/2142/comments | https://api.github.com/repos/coleifer/peewee/issues/2142/events | https://github.com/coleifer/peewee/issues/2142 | 591,872,814 | MDU6SXNzdWU1OTE4NzI4MTQ= | 2,142 | SqliteDatabase + DateTimeField not working | {
"login": "COM8",
"id": 11741404,
"node_id": "MDQ6VXNlcjExNzQxNDA0",
"avatar_url": "https://avatars.githubusercontent.com/u/11741404?v=4",
"gravatar_id": "",
"url": "https://api.github.com/users/COM8",
"html_url": "https://github.com/COM8",
"followers_url": "https://api.github.com/users/COM8/followers"... | [] | closed | false | null | [] | null | [
"Too much typing...\r\n```Python\r\nexpires: DateTimeField(default=datetime.now(timezone.utc))\r\n```\r\nShould be:\r\n\r\n```Python\r\nexpires: DateTimeField = DateTimeField(default=datetime.now(timezone.utc))\r\n```"
] | 2020-04-01T12:20:21 | 2020-04-01T13:27:30 | 2020-04-01T13:27:29 | NONE | null | When you run the following example, it creates a DB and the `wnstoken` table but without the `expires` field.
```python
from peewee import *
from datetime import datetime, timezone
DB_PATH: str = "peeweeTest.db"
db: SqliteDatabase = SqliteDatabase(DB_PATH)
class WNSToken(Model):
token: CharField = CharFi... | {
"url": "https://api.github.com/repos/coleifer/peewee/issues/2142/reactions",
"total_count": 0,
"+1": 0,
"-1": 0,
"laugh": 0,
"hooray": 0,
"confused": 0,
"heart": 0,
"rocket": 0,
"eyes": 0
} | https://api.github.com/repos/coleifer/peewee/issues/2142/timeline | null | completed | null | null |
https://api.github.com/repos/coleifer/peewee/issues/2141 | https://api.github.com/repos/coleifer/peewee | https://api.github.com/repos/coleifer/peewee/issues/2141/labels{/name} | https://api.github.com/repos/coleifer/peewee/issues/2141/comments | https://api.github.com/repos/coleifer/peewee/issues/2141/events | https://github.com/coleifer/peewee/issues/2141 | 590,248,390 | MDU6SXNzdWU1OTAyNDgzOTA= | 2,141 | AttributeError: 'BackrefAccessor' object has no attribute 'replace' | {
"login": "smartstoic",
"id": 30124082,
"node_id": "MDQ6VXNlcjMwMTI0MDgy",
"avatar_url": "https://avatars.githubusercontent.com/u/30124082?v=4",
"gravatar_id": "",
"url": "https://api.github.com/users/smartstoic",
"html_url": "https://github.com/smartstoic",
"followers_url": "https://api.github.com/use... | [] | closed | false | null | [] | null | [
"Your `Symbol` exchange backref is stomping on your `Exchanges.exchange` field. Try renaming it to something more semantic:\r\n\r\n```python\r\n\r\nclass Symbols(Model):\r\n symbol = TextField(primary_key=True)\r\n # backref changed to \"symbols\", which is more accurate anyways.\r\n exchange = ForeignKeyF... | 2020-03-30T12:23:54 | 2020-03-30T15:16:00 | 2020-03-30T13:10:28 | NONE | null | Hello,
Thanks a lot for the amazing library.
I have the following issue:
```
import json
from peewee import *
def update_exchanges():
text = '{"exchange": "ADS","region": "AE","description": "Abu Dhabi Securities Exchange","mic": "XADS", "exchange_suffix": "-DH"}'
j = json.loads(text)
Excha... | {
"url": "https://api.github.com/repos/coleifer/peewee/issues/2141/reactions",
"total_count": 0,
"+1": 0,
"-1": 0,
"laugh": 0,
"hooray": 0,
"confused": 0,
"heart": 0,
"rocket": 0,
"eyes": 0
} | https://api.github.com/repos/coleifer/peewee/issues/2141/timeline | null | completed | null | null |
https://api.github.com/repos/coleifer/peewee/issues/2140 | https://api.github.com/repos/coleifer/peewee | https://api.github.com/repos/coleifer/peewee/issues/2140/labels{/name} | https://api.github.com/repos/coleifer/peewee/issues/2140/comments | https://api.github.com/repos/coleifer/peewee/issues/2140/events | https://github.com/coleifer/peewee/issues/2140 | 589,784,776 | MDU6SXNzdWU1ODk3ODQ3NzY= | 2,140 | chaining where clauses fails | {
"login": "fredrikchabot",
"id": 4558741,
"node_id": "MDQ6VXNlcjQ1NTg3NDE=",
"avatar_url": "https://avatars.githubusercontent.com/u/4558741?v=4",
"gravatar_id": "",
"url": "https://api.github.com/users/fredrikchabot",
"html_url": "https://github.com/fredrikchabot",
"followers_url": "https://api.github.... | [] | closed | false | null | [] | null | [
"There's something wrong with your code/models. Maybe you're using properties or something else? I've added a regression test which shows where-clause chaining works fine:\r\n\r\n9cc0d09c5810d02681ddc68097291e7005a8d13a",
"Running the same queries in cPython work.\r\n\r\nNothing special in the model.\r\n\r\nclass... | 2020-03-29T12:50:49 | 2020-03-29T13:50:52 | 2020-03-29T13:14:51 | NONE | null | peewee 3.13.1
pypy 7.3.0
With debugging on:
>>> len(list(Plrgl().select().where(Plrgl.pln==14578)))
('SELECT "t1"."f6lock", "t1"."recordid", "t1"."pln", "t1"."rgl", "t1"."snr", "t1"."niv", "t1"."ste", "t1"."afd", "t
1"."dss", "t1"."oms", "t1"."std", "t1"."end", "t1"."frq", "t1"."frs", "t1"."wma", "t1"."wdi", "... | {
"url": "https://api.github.com/repos/coleifer/peewee/issues/2140/reactions",
"total_count": 0,
"+1": 0,
"-1": 0,
"laugh": 0,
"hooray": 0,
"confused": 0,
"heart": 0,
"rocket": 0,
"eyes": 0
} | https://api.github.com/repos/coleifer/peewee/issues/2140/timeline | null | completed | null | null |
https://api.github.com/repos/coleifer/peewee/issues/2139 | https://api.github.com/repos/coleifer/peewee | https://api.github.com/repos/coleifer/peewee/issues/2139/labels{/name} | https://api.github.com/repos/coleifer/peewee/issues/2139/comments | https://api.github.com/repos/coleifer/peewee/issues/2139/events | https://github.com/coleifer/peewee/issues/2139 | 589,515,367 | MDU6SXNzdWU1ODk1MTUzNjc= | 2,139 | database.execute_sql('PRAGMA foreign_keys = 1;') not working | {
"login": "ldconejo",
"id": 5453372,
"node_id": "MDQ6VXNlcjU0NTMzNzI=",
"avatar_url": "https://avatars.githubusercontent.com/u/5453372?v=4",
"gravatar_id": "",
"url": "https://api.github.com/users/ldconejo",
"html_url": "https://github.com/ldconejo",
"followers_url": "https://api.github.com/users/ldcon... | [] | closed | false | null | [] | null | [
"So some database pragmas have to be executed once, before any tables are created (journal_mode for example). Other pragmas, like \"foreign_keys\", have to be issued at the start of every connection. The recommended way to do this with peewee is to declare your pragmas as part of your db constructor:\r\n\r\n```pyth... | 2020-03-28T05:52:20 | 2020-03-28T15:03:44 | 2020-03-28T15:03:18 | NONE | null | Hi,
I teach a Python class in which we use Peewee for implementing SQL databases in Python, given how straightforward it is to use.
One of my students recently pointed out that the foreign key constraints in one of the class examples were not working.
How to reproduce:
1. Run _personjob_learning_v3_p1.py_: ... | {
"url": "https://api.github.com/repos/coleifer/peewee/issues/2139/reactions",
"total_count": 0,
"+1": 0,
"-1": 0,
"laugh": 0,
"hooray": 0,
"confused": 0,
"heart": 0,
"rocket": 0,
"eyes": 0
} | https://api.github.com/repos/coleifer/peewee/issues/2139/timeline | null | completed | null | null |
https://api.github.com/repos/coleifer/peewee/issues/2138 | https://api.github.com/repos/coleifer/peewee | https://api.github.com/repos/coleifer/peewee/issues/2138/labels{/name} | https://api.github.com/repos/coleifer/peewee/issues/2138/comments | https://api.github.com/repos/coleifer/peewee/issues/2138/events | https://github.com/coleifer/peewee/issues/2138 | 589,016,595 | MDU6SXNzdWU1ODkwMTY1OTU= | 2,138 | About release! | {
"login": "funny-95",
"id": 27837489,
"node_id": "MDQ6VXNlcjI3ODM3NDg5",
"avatar_url": "https://avatars.githubusercontent.com/u/27837489?v=4",
"gravatar_id": "",
"url": "https://api.github.com/users/funny-95",
"html_url": "https://github.com/funny-95",
"followers_url": "https://api.github.com/users/fun... | [] | closed | false | null | [] | null | [
"Thanks for the nudge.\r\n\r\nhttps://github.com/coleifer/peewee/releases/tag/3.13.2"
] | 2020-03-27T09:57:29 | 2020-03-27T16:52:30 | 2020-03-27T16:52:30 | NONE | null | Excuse me! Can i ask when the latest version will be released! | {
"url": "https://api.github.com/repos/coleifer/peewee/issues/2138/reactions",
"total_count": 0,
"+1": 0,
"-1": 0,
"laugh": 0,
"hooray": 0,
"confused": 0,
"heart": 0,
"rocket": 0,
"eyes": 0
} | https://api.github.com/repos/coleifer/peewee/issues/2138/timeline | null | completed | null | null |
https://api.github.com/repos/coleifer/peewee/issues/2137 | https://api.github.com/repos/coleifer/peewee | https://api.github.com/repos/coleifer/peewee/issues/2137/labels{/name} | https://api.github.com/repos/coleifer/peewee/issues/2137/comments | https://api.github.com/repos/coleifer/peewee/issues/2137/events | https://github.com/coleifer/peewee/issues/2137 | 585,316,363 | MDU6SXNzdWU1ODUzMTYzNjM= | 2,137 | Python 3.8.0 : reduce is not defined | {
"login": "caryfitzhugh",
"id": 445848,
"node_id": "MDQ6VXNlcjQ0NTg0OA==",
"avatar_url": "https://avatars.githubusercontent.com/u/445848?v=4",
"gravatar_id": "",
"url": "https://api.github.com/users/caryfitzhugh",
"html_url": "https://github.com/caryfitzhugh",
"followers_url": "https://api.github.com/u... | [] | closed | false | null | [] | null | [
"> Running with python 3.8.0 I run into errors where 'reduce is not defined'.\r\n> \r\n> In looking at it peewee.py assumes that if you can\r\n> \r\n> ```python\r\n> from collections.abc import Callable\r\n> ```\r\n> \r\n> then you don't need to import reduce.\r\n> \r\n> In my environment at least, that is not accu... | 2020-03-20T20:41:26 | 2020-03-21T23:56:30 | 2020-03-21T12:08:42 | NONE | null | Running with python 3.8.0 I run into errors where 'reduce is not defined'.
In looking at it peewee.py assumes that if you can
```python
from collections.abc import Callable
```
then you don't need to import reduce.
In my environment at least, that is not accurate.
At the top of peewee.py (around line 192 ... | {
"url": "https://api.github.com/repos/coleifer/peewee/issues/2137/reactions",
"total_count": 0,
"+1": 0,
"-1": 0,
"laugh": 0,
"hooray": 0,
"confused": 0,
"heart": 0,
"rocket": 0,
"eyes": 0
} | https://api.github.com/repos/coleifer/peewee/issues/2137/timeline | null | completed | null | null |
https://api.github.com/repos/coleifer/peewee/issues/2136 | https://api.github.com/repos/coleifer/peewee | https://api.github.com/repos/coleifer/peewee/issues/2136/labels{/name} | https://api.github.com/repos/coleifer/peewee/issues/2136/comments | https://api.github.com/repos/coleifer/peewee/issues/2136/events | https://github.com/coleifer/peewee/issues/2136 | 583,899,584 | MDU6SXNzdWU1ODM4OTk1ODQ= | 2,136 | Question on INSERT ON DUPLICATE KEY UPDATE | {
"login": "eely22",
"id": 4094985,
"node_id": "MDQ6VXNlcjQwOTQ5ODU=",
"avatar_url": "https://avatars.githubusercontent.com/u/4094985?v=4",
"gravatar_id": "",
"url": "https://api.github.com/users/eely22",
"html_url": "https://github.com/eely22",
"followers_url": "https://api.github.com/users/eely22/foll... | [] | closed | false | null | [] | null | [
"Ok, nevermind, I figured it out. I just had the syntax wrong, this is it: \r\n\r\n```\r\nCarrierRateModel.insert_many([model_to_dict(r) for r in rates[i:i + bulk_size]]).on_conflict(\r\n update={\r\n CarrierRateModel.updated: (CarrierRateModel.rate != fn.VALUES(CarrierRateModel.ra... | 2020-03-18T17:44:24 | 2020-03-18T19:38:17 | 2020-03-18T19:38:16 | NONE | null | This is more of a question than an issue as I am unsure of how to do something. I have a simple table like this:
```
class CarrierRateModel(Model):
age = DoubleField(null=True)
rate = DoubleField(null=True)
rate_set_id = CharField(null=False, index=True)
updated = BooleanField(default=False, i... | {
"url": "https://api.github.com/repos/coleifer/peewee/issues/2136/reactions",
"total_count": 0,
"+1": 0,
"-1": 0,
"laugh": 0,
"hooray": 0,
"confused": 0,
"heart": 0,
"rocket": 0,
"eyes": 0
} | https://api.github.com/repos/coleifer/peewee/issues/2136/timeline | null | completed | null | null |
https://api.github.com/repos/coleifer/peewee/issues/2135 | https://api.github.com/repos/coleifer/peewee | https://api.github.com/repos/coleifer/peewee/issues/2135/labels{/name} | https://api.github.com/repos/coleifer/peewee/issues/2135/comments | https://api.github.com/repos/coleifer/peewee/issues/2135/events | https://github.com/coleifer/peewee/pull/2135 | 583,325,637 | MDExOlB1bGxSZXF1ZXN0MzkwMTAwMzU1 | 2,135 | Fix some deprecation warnings when using \s or \w on non-raw strings | {
"login": "kraptor",
"id": 7249728,
"node_id": "MDQ6VXNlcjcyNDk3Mjg=",
"avatar_url": "https://avatars.githubusercontent.com/u/7249728?v=4",
"gravatar_id": "",
"url": "https://api.github.com/users/kraptor",
"html_url": "https://github.com/kraptor",
"followers_url": "https://api.github.com/users/kraptor/... | [] | closed | false | null | [] | null | [
"Let me know if you want the commit squashed or not..."
] | 2020-03-17T22:02:38 | 2020-03-17T23:46:26 | 2020-03-17T23:46:26 | CONTRIBUTOR | null | Fixes #2134 | {
"url": "https://api.github.com/repos/coleifer/peewee/issues/2135/reactions",
"total_count": 0,
"+1": 0,
"-1": 0,
"laugh": 0,
"hooray": 0,
"confused": 0,
"heart": 0,
"rocket": 0,
"eyes": 0
} | https://api.github.com/repos/coleifer/peewee/issues/2135/timeline | null | null | false | {
"url": "https://api.github.com/repos/coleifer/peewee/pulls/2135",
"html_url": "https://github.com/coleifer/peewee/pull/2135",
"diff_url": "https://github.com/coleifer/peewee/pull/2135.diff",
"patch_url": "https://github.com/coleifer/peewee/pull/2135.patch",
"merged_at": "2020-03-17T23:46:26"
} |
https://api.github.com/repos/coleifer/peewee/issues/2134 | https://api.github.com/repos/coleifer/peewee | https://api.github.com/repos/coleifer/peewee/issues/2134/labels{/name} | https://api.github.com/repos/coleifer/peewee/issues/2134/comments | https://api.github.com/repos/coleifer/peewee/issues/2134/events | https://github.com/coleifer/peewee/issues/2134 | 583,325,265 | MDU6SXNzdWU1ODMzMjUyNjU= | 2,134 | Fix some deprecation warnings on regular expressions | {
"login": "kraptor",
"id": 7249728,
"node_id": "MDQ6VXNlcjcyNDk3Mjg=",
"avatar_url": "https://avatars.githubusercontent.com/u/7249728?v=4",
"gravatar_id": "",
"url": "https://api.github.com/users/kraptor",
"html_url": "https://github.com/kraptor",
"followers_url": "https://api.github.com/users/kraptor/... | [] | closed | false | null | [] | null | [] | 2020-03-17T22:01:52 | 2020-03-17T23:46:26 | 2020-03-17T23:46:26 | CONTRIBUTOR | null | While testing my project, I came across some deprecation warnings in Peewee where \s and \w are used on non-raw strings. Sending a pull request in a minute... | {
"url": "https://api.github.com/repos/coleifer/peewee/issues/2134/reactions",
"total_count": 0,
"+1": 0,
"-1": 0,
"laugh": 0,
"hooray": 0,
"confused": 0,
"heart": 0,
"rocket": 0,
"eyes": 0
} | https://api.github.com/repos/coleifer/peewee/issues/2134/timeline | null | completed | null | null |
https://api.github.com/repos/coleifer/peewee/issues/2133 | https://api.github.com/repos/coleifer/peewee | https://api.github.com/repos/coleifer/peewee/issues/2133/labels{/name} | https://api.github.com/repos/coleifer/peewee/issues/2133/comments | https://api.github.com/repos/coleifer/peewee/issues/2133/events | https://github.com/coleifer/peewee/issues/2133 | 583,152,712 | MDU6SXNzdWU1ODMxNTI3MTI= | 2,133 | JSONField.concat always uses json.dumps on parameters | {
"login": "crvv",
"id": 6398635,
"node_id": "MDQ6VXNlcjYzOTg2MzU=",
"avatar_url": "https://avatars.githubusercontent.com/u/6398635?v=4",
"gravatar_id": "",
"url": "https://api.github.com/users/crvv",
"html_url": "https://github.com/crvv",
"followers_url": "https://api.github.com/users/crvv/followers",
... | [] | closed | false | null | [] | null | [
"Thanks, this is fixed."
] | 2020-03-17T16:48:39 | 2020-03-17T18:00:22 | 2020-03-17T18:00:18 | NONE | null | ```Python
from peewee import Model, PostgresqlDatabase
from playhouse.postgres_ext import BinaryJSONField
database = PostgresqlDatabase(database='postgres', autoconnect=True)
class Test(Model):
x = BinaryJSONField(index=False)
y = BinaryJSONField(index=False)
class Meta:
database = datab... | {
"url": "https://api.github.com/repos/coleifer/peewee/issues/2133/reactions",
"total_count": 0,
"+1": 0,
"-1": 0,
"laugh": 0,
"hooray": 0,
"confused": 0,
"heart": 0,
"rocket": 0,
"eyes": 0
} | https://api.github.com/repos/coleifer/peewee/issues/2133/timeline | null | completed | null | null |
https://api.github.com/repos/coleifer/peewee/issues/2132 | https://api.github.com/repos/coleifer/peewee | https://api.github.com/repos/coleifer/peewee/issues/2132/labels{/name} | https://api.github.com/repos/coleifer/peewee/issues/2132/comments | https://api.github.com/repos/coleifer/peewee/issues/2132/events | https://github.com/coleifer/peewee/pull/2132 | 580,650,122 | MDExOlB1bGxSZXF1ZXN0Mzg3ODE3NTgw | 2,132 | ensure extracting Field instance from Function arguments | {
"login": "kamilkozik7",
"id": 26979805,
"node_id": "MDQ6VXNlcjI2OTc5ODA1",
"avatar_url": "https://avatars.githubusercontent.com/u/26979805?v=4",
"gravatar_id": "",
"url": "https://api.github.com/users/kamilkozik7",
"html_url": "https://github.com/kamilkozik7",
"followers_url": "https://api.github.com/... | [] | closed | false | null | [] | null | [
"I'm going to pass. If you have complicated nesting and need a special conversion, just specify a `python_value()` converter to the `fn.(...)`."
] | 2020-03-13T14:50:19 | 2020-03-14T23:51:34 | 2020-03-14T23:51:34 | NONE | null | when the Function is nested in another Function in _initialize_columns method of class BaseModelCursorWrapper | {
"url": "https://api.github.com/repos/coleifer/peewee/issues/2132/reactions",
"total_count": 0,
"+1": 0,
"-1": 0,
"laugh": 0,
"hooray": 0,
"confused": 0,
"heart": 0,
"rocket": 0,
"eyes": 0
} | https://api.github.com/repos/coleifer/peewee/issues/2132/timeline | null | null | false | {
"url": "https://api.github.com/repos/coleifer/peewee/pulls/2132",
"html_url": "https://github.com/coleifer/peewee/pull/2132",
"diff_url": "https://github.com/coleifer/peewee/pull/2132.diff",
"patch_url": "https://github.com/coleifer/peewee/pull/2132.patch",
"merged_at": null
} |
https://api.github.com/repos/coleifer/peewee/issues/2131 | https://api.github.com/repos/coleifer/peewee | https://api.github.com/repos/coleifer/peewee/issues/2131/labels{/name} | https://api.github.com/repos/coleifer/peewee/issues/2131/comments | https://api.github.com/repos/coleifer/peewee/issues/2131/events | https://github.com/coleifer/peewee/issues/2131 | 579,232,817 | MDU6SXNzdWU1NzkyMzI4MTc= | 2,131 | How to use composite type as function argument (PostgresQL) | {
"login": "zmwangx",
"id": 4149852,
"node_id": "MDQ6VXNlcjQxNDk4NTI=",
"avatar_url": "https://avatars.githubusercontent.com/u/4149852?v=4",
"gravatar_id": "",
"url": "https://api.github.com/users/zmwangx",
"html_url": "https://github.com/zmwangx",
"followers_url": "https://api.github.com/users/zmwangx/... | [] | closed | false | null | [] | null | [
"I believe this is fixed, thanks for the report.",
"It works now, thanks."
] | 2020-03-11T12:36:03 | 2020-03-12T01:46:44 | 2020-03-11T15:19:13 | CONTRIBUTOR | null | PostgresQL supports composite types (e.g. row types) as function arguments, but I can't figure out how to use a model as an argument of a `peewee.fn.func`.
Say we have this schema
```sql
CREATE TABLE IF NOT EXISTS post (
id INTEGER NOT NULL PRIMARY KEY,
votes INTEGER NOT NULL,
posted TIMESTAMPTZ N... | {
"url": "https://api.github.com/repos/coleifer/peewee/issues/2131/reactions",
"total_count": 0,
"+1": 0,
"-1": 0,
"laugh": 0,
"hooray": 0,
"confused": 0,
"heart": 0,
"rocket": 0,
"eyes": 0
} | https://api.github.com/repos/coleifer/peewee/issues/2131/timeline | null | completed | null | null |
https://api.github.com/repos/coleifer/peewee/issues/2130 | https://api.github.com/repos/coleifer/peewee | https://api.github.com/repos/coleifer/peewee/issues/2130/labels{/name} | https://api.github.com/repos/coleifer/peewee/issues/2130/comments | https://api.github.com/repos/coleifer/peewee/issues/2130/events | https://github.com/coleifer/peewee/issues/2130 | 578,821,121 | MDU6SXNzdWU1Nzg4MjExMjE= | 2,130 | Clarify PostgresqlMigrator.set_search_path in docs | {
"login": "albireox",
"id": 568775,
"node_id": "MDQ6VXNlcjU2ODc3NQ==",
"avatar_url": "https://avatars.githubusercontent.com/u/568775?v=4",
"gravatar_id": "",
"url": "https://api.github.com/users/albireox",
"html_url": "https://github.com/albireox",
"followers_url": "https://api.github.com/users/albireo... | [] | closed | false | null | [] | null | [
"Can you give an example of what you mean? I would have thought that the setting of `schema` on models would have been adequate, and that the migration methods would take the schema into consideration, though I may be wrong.",
"I may be misunderstanding how it's supposed to work but I'd guess that if I do\r\n\r\n... | 2020-03-10T19:49:14 | 2020-03-11T16:10:35 | 2020-03-11T16:10:29 | NONE | null | It may be beneficial to make a bit more clear that `PostgresqlMigrator.set_search_path` needs to be added to `migrate` for it to take effect. That may be obvious in hindsight but because of the way it's presented in the docs API it took me a good while to realise that. An example in the main section of the Schema Migra... | {
"url": "https://api.github.com/repos/coleifer/peewee/issues/2130/reactions",
"total_count": 0,
"+1": 0,
"-1": 0,
"laugh": 0,
"hooray": 0,
"confused": 0,
"heart": 0,
"rocket": 0,
"eyes": 0
} | https://api.github.com/repos/coleifer/peewee/issues/2130/timeline | null | completed | null | null |
https://api.github.com/repos/coleifer/peewee/issues/2129 | https://api.github.com/repos/coleifer/peewee | https://api.github.com/repos/coleifer/peewee/issues/2129/labels{/name} | https://api.github.com/repos/coleifer/peewee/issues/2129/comments | https://api.github.com/repos/coleifer/peewee/issues/2129/events | https://github.com/coleifer/peewee/issues/2129 | 578,484,544 | MDU6SXNzdWU1Nzg0ODQ1NDQ= | 2,129 | Python descriptor protocol support for correct attribute injection | {
"login": "dimma837",
"id": 31541891,
"node_id": "MDQ6VXNlcjMxNTQxODkx",
"avatar_url": "https://avatars.githubusercontent.com/u/31541891?v=4",
"gravatar_id": "",
"url": "https://api.github.com/users/dimma837",
"html_url": "https://github.com/dimma837",
"followers_url": "https://api.github.com/users/dim... | [] | closed | false | null | [] | null | [] | 2020-03-10T10:37:42 | 2020-03-10T13:44:01 | 2020-03-10T13:44:01 | NONE | null | Hi,
I use peewee ORM with python [dependency injection framework](https://github.com/ivankorobkov/python-inject) for database instance injection. But peewee does not implement Python descriptor protocol on class attributes access, so it does not work in conjunction with DI.
I described this problem including code... | {
"url": "https://api.github.com/repos/coleifer/peewee/issues/2129/reactions",
"total_count": 0,
"+1": 0,
"-1": 0,
"laugh": 0,
"hooray": 0,
"confused": 0,
"heart": 0,
"rocket": 0,
"eyes": 0
} | https://api.github.com/repos/coleifer/peewee/issues/2129/timeline | null | completed | null | null |
https://api.github.com/repos/coleifer/peewee/issues/2128 | https://api.github.com/repos/coleifer/peewee | https://api.github.com/repos/coleifer/peewee/issues/2128/labels{/name} | https://api.github.com/repos/coleifer/peewee/issues/2128/comments | https://api.github.com/repos/coleifer/peewee/issues/2128/events | https://github.com/coleifer/peewee/pull/2128 | 577,751,562 | MDExOlB1bGxSZXF1ZXN0Mzg1NDYwMTM2 | 2,128 | Fix URL to Flask Application Factories and typos. | {
"login": "Jo-Con-El",
"id": 607909,
"node_id": "MDQ6VXNlcjYwNzkwOQ==",
"avatar_url": "https://avatars.githubusercontent.com/u/607909?v=4",
"gravatar_id": "",
"url": "https://api.github.com/users/Jo-Con-El",
"html_url": "https://github.com/Jo-Con-El",
"followers_url": "https://api.github.com/users/Jo-C... | [] | closed | false | null | [] | null | [
"Thx ghibli bro."
] | 2020-03-09T08:58:50 | 2020-03-09T13:10:20 | 2020-03-09T13:10:08 | CONTRIBUTOR | null | {
"url": "https://api.github.com/repos/coleifer/peewee/issues/2128/reactions",
"total_count": 0,
"+1": 0,
"-1": 0,
"laugh": 0,
"hooray": 0,
"confused": 0,
"heart": 0,
"rocket": 0,
"eyes": 0
} | https://api.github.com/repos/coleifer/peewee/issues/2128/timeline | null | null | false | {
"url": "https://api.github.com/repos/coleifer/peewee/pulls/2128",
"html_url": "https://github.com/coleifer/peewee/pull/2128",
"diff_url": "https://github.com/coleifer/peewee/pull/2128.diff",
"patch_url": "https://github.com/coleifer/peewee/pull/2128.patch",
"merged_at": "2020-03-09T13:10:08"
} | |
https://api.github.com/repos/coleifer/peewee/issues/2127 | https://api.github.com/repos/coleifer/peewee | https://api.github.com/repos/coleifer/peewee/issues/2127/labels{/name} | https://api.github.com/repos/coleifer/peewee/issues/2127/comments | https://api.github.com/repos/coleifer/peewee/issues/2127/events | https://github.com/coleifer/peewee/issues/2127 | 577,334,232 | MDU6SXNzdWU1NzczMzQyMzI= | 2,127 | KeyError in ModelCursorWrapper.process_row when joining a subquery | {
"login": "zmwangx",
"id": 4149852,
"node_id": "MDQ6VXNlcjQxNDk4NTI=",
"avatar_url": "https://avatars.githubusercontent.com/u/4149852?v=4",
"gravatar_id": "",
"url": "https://api.github.com/users/zmwangx",
"html_url": "https://github.com/zmwangx",
"followers_url": "https://api.github.com/users/zmwangx/... | [] | closed | false | null | [] | null | [
"Thanks for the excellent report. This *should* work, but currently it seems to be running into an edge-case that is proving to be difficult to work around right now.\r\n\r\nI'll work-up a fix, but for now I'd suggest using the \".objects()\" helper, which will patch all the selected values onto a single model inst... | 2020-03-07T13:22:00 | 2020-03-10T21:34:48 | 2020-03-10T21:34:11 | CONTRIBUTOR | null | I'm getting a strange error with `ModelCursorWrapper.process_row` when joining a subquery. When the select is built from the subquery's "perspective" instead of a model's, the generated SQL is all good but processing the returned results fail. Here's a simplified example:
```python
import logging
import peewee
... | {
"url": "https://api.github.com/repos/coleifer/peewee/issues/2127/reactions",
"total_count": 0,
"+1": 0,
"-1": 0,
"laugh": 0,
"hooray": 0,
"confused": 0,
"heart": 0,
"rocket": 0,
"eyes": 0
} | https://api.github.com/repos/coleifer/peewee/issues/2127/timeline | null | completed | null | null |
https://api.github.com/repos/coleifer/peewee/issues/2126 | https://api.github.com/repos/coleifer/peewee | https://api.github.com/repos/coleifer/peewee/issues/2126/labels{/name} | https://api.github.com/repos/coleifer/peewee/issues/2126/comments | https://api.github.com/repos/coleifer/peewee/issues/2126/events | https://github.com/coleifer/peewee/pull/2126 | 576,279,643 | MDExOlB1bGxSZXF1ZXN0Mzg0Mjk2Njg0 | 2,126 | Improve reflection for AutoField/IntegerField | {
"login": "ilyakamens",
"id": 3293811,
"node_id": "MDQ6VXNlcjMyOTM4MTE=",
"avatar_url": "https://avatars.githubusercontent.com/u/3293811?v=4",
"gravatar_id": "",
"url": "https://api.github.com/users/ilyakamens",
"html_url": "https://github.com/ilyakamens",
"followers_url": "https://api.github.com/users... | [] | closed | false | null | [] | null | [
"I'm going to pass on this for now, but may reconsider it at some point."
] | 2020-03-05T14:08:38 | 2022-08-23T02:15:20 | 2020-03-10T14:56:52 | CONTRIBUTOR | null | Specifically, don't assume `IntegerField(primary_key=True)` is an `AutoField()` if the database isn't SQLite.
See https://github.com/coleifer/peewee/issues/2124 for more context. | {
"url": "https://api.github.com/repos/coleifer/peewee/issues/2126/reactions",
"total_count": 0,
"+1": 0,
"-1": 0,
"laugh": 0,
"hooray": 0,
"confused": 0,
"heart": 0,
"rocket": 0,
"eyes": 0
} | https://api.github.com/repos/coleifer/peewee/issues/2126/timeline | null | null | false | {
"url": "https://api.github.com/repos/coleifer/peewee/pulls/2126",
"html_url": "https://github.com/coleifer/peewee/pull/2126",
"diff_url": "https://github.com/coleifer/peewee/pull/2126.diff",
"patch_url": "https://github.com/coleifer/peewee/pull/2126.patch",
"merged_at": null
} |
https://api.github.com/repos/coleifer/peewee/issues/2125 | https://api.github.com/repos/coleifer/peewee | https://api.github.com/repos/coleifer/peewee/issues/2125/labels{/name} | https://api.github.com/repos/coleifer/peewee/issues/2125/comments | https://api.github.com/repos/coleifer/peewee/issues/2125/events | https://github.com/coleifer/peewee/issues/2125 | 575,570,750 | MDU6SXNzdWU1NzU1NzA3NTA= | 2,125 | Insert Many across multiple tables | {
"login": "phuvp",
"id": 6632710,
"node_id": "MDQ6VXNlcjY2MzI3MTA=",
"avatar_url": "https://avatars.githubusercontent.com/u/6632710?v=4",
"gravatar_id": "",
"url": "https://api.github.com/users/phuvp",
"html_url": "https://github.com/phuvp",
"followers_url": "https://api.github.com/users/phuvp/follower... | [] | closed | false | null | [] | null | [
"Sql databases do not support inserting into multiple tables in one *network call*."
] | 2020-03-04T16:52:10 | 2020-03-04T20:44:22 | 2020-03-04T20:44:05 | NONE | null | I'd like to use `insert_many` on multiple tables in one network call. It does not seem possible since `insert_many` is based on the class name. Is that correct? | {
"url": "https://api.github.com/repos/coleifer/peewee/issues/2125/reactions",
"total_count": 0,
"+1": 0,
"-1": 0,
"laugh": 0,
"hooray": 0,
"confused": 0,
"heart": 0,
"rocket": 0,
"eyes": 0
} | https://api.github.com/repos/coleifer/peewee/issues/2125/timeline | null | completed | null | null |
https://api.github.com/repos/coleifer/peewee/issues/2124 | https://api.github.com/repos/coleifer/peewee | https://api.github.com/repos/coleifer/peewee/issues/2124/labels{/name} | https://api.github.com/repos/coleifer/peewee/issues/2124/comments | https://api.github.com/repos/coleifer/peewee/issues/2124/events | https://github.com/coleifer/peewee/issues/2124 | 575,427,482 | MDU6SXNzdWU1NzU0Mjc0ODI= | 2,124 | Peewee incorrectly assumes that a column of the form IntegerField(primary_key=True) is an AutoField() | {
"login": "ilyakamens",
"id": 3293811,
"node_id": "MDQ6VXNlcjMyOTM4MTE=",
"avatar_url": "https://avatars.githubusercontent.com/u/3293811?v=4",
"gravatar_id": "",
"url": "https://api.github.com/users/ilyakamens",
"html_url": "https://github.com/ilyakamens",
"followers_url": "https://api.github.com/users... | [] | closed | false | null | [] | null | [
"Yeah, Peewee uses a heuristic when introspecting the database and assigns the auto-incrementing integer field when it discovers integer primary keys. Known behavior.",
"@coleifer - Understood. Would you accept a PR to fix this case?",
"@ilyakamens - before putting together a patch, how would you go about handl... | 2020-03-04T14:05:13 | 2020-03-08T18:02:47 | 2020-03-04T20:41:23 | CONTRIBUTOR | null | - Peewee 3.13.1
- PostgreSQL 9.6.15
- psycopg2 2.8.2
```
class TestModel(db.Model):
id = IntegerField(primary_key=True)
```
```
>>> TestModel.create_table()
>>> models = generate_models(db.database)
>>> models["testmodel"]._meta.columns["id"]
<AutoField: testmodel.id>
```
```
# \d testmodel;
... | {
"url": "https://api.github.com/repos/coleifer/peewee/issues/2124/reactions",
"total_count": 0,
"+1": 0,
"-1": 0,
"laugh": 0,
"hooray": 0,
"confused": 0,
"heart": 0,
"rocket": 0,
"eyes": 0
} | https://api.github.com/repos/coleifer/peewee/issues/2124/timeline | null | completed | null | null |
https://api.github.com/repos/coleifer/peewee/issues/2123 | https://api.github.com/repos/coleifer/peewee | https://api.github.com/repos/coleifer/peewee/issues/2123/labels{/name} | https://api.github.com/repos/coleifer/peewee/issues/2123/comments | https://api.github.com/repos/coleifer/peewee/issues/2123/events | https://github.com/coleifer/peewee/issues/2123 | 575,362,776 | MDU6SXNzdWU1NzUzNjI3NzY= | 2,123 | prefetch fails when foreign key field or target primary key field not selected | {
"login": "zmwangx",
"id": 4149852,
"node_id": "MDQ6VXNlcjQxNDk4NTI=",
"avatar_url": "https://avatars.githubusercontent.com/u/4149852?v=4",
"gravatar_id": "",
"url": "https://api.github.com/users/zmwangx",
"html_url": "https://github.com/zmwangx",
"followers_url": "https://api.github.com/users/zmwangx/... | [] | closed | false | null | [] | null | [
"Yeah, prefetch needs those fields to be able to reconstruct the graph. I'll make a note in the docs."
] | 2020-03-04T12:29:31 | 2020-03-04T12:34:07 | 2020-03-04T12:34:07 | CONTRIBUTOR | null | This is not a bug, but rather a minor UX issue. Consider this simple example:
```python
import peewee
db = peewee.SqliteDatabase(":memory:")
class _BaseModel(peewee.Model):
class Meta:
database = db
class User(_BaseModel):
name = peewee.TextField()
class Entry(_BaseModel):
... | {
"url": "https://api.github.com/repos/coleifer/peewee/issues/2123/reactions",
"total_count": 0,
"+1": 0,
"-1": 0,
"laugh": 0,
"hooray": 0,
"confused": 0,
"heart": 0,
"rocket": 0,
"eyes": 0
} | https://api.github.com/repos/coleifer/peewee/issues/2123/timeline | null | completed | null | null |
https://api.github.com/repos/coleifer/peewee/issues/2122 | https://api.github.com/repos/coleifer/peewee | https://api.github.com/repos/coleifer/peewee/issues/2122/labels{/name} | https://api.github.com/repos/coleifer/peewee/issues/2122/comments | https://api.github.com/repos/coleifer/peewee/issues/2122/events | https://github.com/coleifer/peewee/issues/2122 | 575,353,858 | MDU6SXNzdWU1NzUzNTM4NTg= | 2,122 | Unable to use dict pragmas with sqliteq | {
"login": "dev-dsp",
"id": 4235552,
"node_id": "MDQ6VXNlcjQyMzU1NTI=",
"avatar_url": "https://avatars.githubusercontent.com/u/4235552?v=4",
"gravatar_id": "",
"url": "https://api.github.com/users/dev-dsp",
"html_url": "https://github.com/dev-dsp",
"followers_url": "https://api.github.com/users/dev-dsp/... | [] | closed | false | null | [] | null | [] | 2020-03-04T12:13:57 | 2020-03-04T12:28:21 | 2020-03-04T12:28:21 | CONTRIBUTOR | null | Hi
https://github.com/coleifer/peewee/blob/master/playhouse/sqliteq.py#L228
Here for pragmas being dictionary it fails with
```
...
pdict = dict((k.lower(), v) for (k, v) in pragmas)
ValueError: too many values to unpack (expected 2)
```
Not sure how to better fix it in code. Not urgent also, I will ... | {
"url": "https://api.github.com/repos/coleifer/peewee/issues/2122/reactions",
"total_count": 0,
"+1": 0,
"-1": 0,
"laugh": 0,
"hooray": 0,
"confused": 0,
"heart": 0,
"rocket": 0,
"eyes": 0
} | https://api.github.com/repos/coleifer/peewee/issues/2122/timeline | null | completed | null | null |
https://api.github.com/repos/coleifer/peewee/issues/2121 | https://api.github.com/repos/coleifer/peewee | https://api.github.com/repos/coleifer/peewee/issues/2121/labels{/name} | https://api.github.com/repos/coleifer/peewee/issues/2121/comments | https://api.github.com/repos/coleifer/peewee/issues/2121/events | https://github.com/coleifer/peewee/issues/2121 | 574,699,264 | MDU6SXNzdWU1NzQ2OTkyNjQ= | 2,121 | Hybrid expression with JOIN | {
"login": "vltr",
"id": 1540275,
"node_id": "MDQ6VXNlcjE1NDAyNzU=",
"avatar_url": "https://avatars.githubusercontent.com/u/1540275?v=4",
"gravatar_id": "",
"url": "https://api.github.com/users/vltr",
"html_url": "https://github.com/vltr",
"followers_url": "https://api.github.com/users/vltr/followers",
... | [] | closed | false | null | [] | null | [
"Questions typically go on stackoverflow."
] | 2020-03-03T14:16:31 | 2020-03-03T16:33:00 | 2020-03-03T16:32:59 | CONTRIBUTOR | null | Howdy! I'm fairly new to `peewee`, but have some strong background on SQLAlchemy (and all the vices that come with it). I'm trying to create a custom hybrid expression that correlates to a third (or N) table. I'll try to demonstrate in an example (non-tested) code:
```python
class BaseModel(Model):
class Meta:... | {
"url": "https://api.github.com/repos/coleifer/peewee/issues/2121/reactions",
"total_count": 0,
"+1": 0,
"-1": 0,
"laugh": 0,
"hooray": 0,
"confused": 0,
"heart": 0,
"rocket": 0,
"eyes": 0
} | https://api.github.com/repos/coleifer/peewee/issues/2121/timeline | null | completed | null | null |
https://api.github.com/repos/coleifer/peewee/issues/2120 | https://api.github.com/repos/coleifer/peewee | https://api.github.com/repos/coleifer/peewee/issues/2120/labels{/name} | https://api.github.com/repos/coleifer/peewee/issues/2120/comments | https://api.github.com/repos/coleifer/peewee/issues/2120/events | https://github.com/coleifer/peewee/issues/2120 | 574,379,943 | MDU6SXNzdWU1NzQzNzk5NDM= | 2,120 | Field help_text attribute? | {
"login": "jvickroy",
"id": 9497294,
"node_id": "MDQ6VXNlcjk0OTcyOTQ=",
"avatar_url": "https://avatars.githubusercontent.com/u/9497294?v=4",
"gravatar_id": "",
"url": "https://api.github.com/users/jvickroy",
"html_url": "https://github.com/jvickroy",
"followers_url": "https://api.github.com/users/jvick... | [] | closed | false | null | [] | null | [
"It's available to provide a standard way of adding metadata. `flask-peewee` &co made use of it. To access the help text, just access `field.help_text`. To iterate a model's fields, `ModelClass._meta.sorted_fields` returns the fields in order of declaration."
] | 2020-03-03T02:49:44 | 2020-03-03T11:24:33 | 2020-03-03T11:24:33 | NONE | null | What is the intent of the help_text attribute?
Looking at the code, it seems to only be be listed in the class Field definition.
I would like to be able to access the help_text strings, in my scripts, but do not know how to do so.
Could someone point in the right direction?
Thanks for your time.
P.S. peewee is gr... | {
"url": "https://api.github.com/repos/coleifer/peewee/issues/2120/reactions",
"total_count": 0,
"+1": 0,
"-1": 0,
"laugh": 0,
"hooray": 0,
"confused": 0,
"heart": 0,
"rocket": 0,
"eyes": 0
} | https://api.github.com/repos/coleifer/peewee/issues/2120/timeline | null | completed | null | null |
https://api.github.com/repos/coleifer/peewee/issues/2119 | https://api.github.com/repos/coleifer/peewee | https://api.github.com/repos/coleifer/peewee/issues/2119/labels{/name} | https://api.github.com/repos/coleifer/peewee/issues/2119/comments | https://api.github.com/repos/coleifer/peewee/issues/2119/events | https://github.com/coleifer/peewee/issues/2119 | 573,702,968 | MDU6SXNzdWU1NzM3MDI5Njg= | 2,119 | How to compare with boolean for PostgreSQL? | {
"login": "EugeneRymarev",
"id": 6260309,
"node_id": "MDQ6VXNlcjYyNjAzMDk=",
"avatar_url": "https://avatars.githubusercontent.com/u/6260309?v=4",
"gravatar_id": "",
"url": "https://api.github.com/users/EugeneRymarev",
"html_url": "https://github.com/EugeneRymarev",
"followers_url": "https://api.github.... | [] | closed | false | null | [] | null | [
"`Table.Column == SQL('false')` works fine, but that wrong way",
"Huh? I've added a regression test that shows the full range of boolean comparisons. I could not replicate any problems on my machine: a9ebf6bdf2c7a74a802bd6860d1357b091b332a2"
] | 2020-03-02T04:09:04 | 2020-03-02T12:14:46 | 2020-03-02T12:14:46 | NONE | null | Hello!
`Table.coumn == False` in peewee give me
`Table.column = 0` in sql.
And i receive error "can't compare boolean and int". | {
"url": "https://api.github.com/repos/coleifer/peewee/issues/2119/reactions",
"total_count": 0,
"+1": 0,
"-1": 0,
"laugh": 0,
"hooray": 0,
"confused": 0,
"heart": 0,
"rocket": 0,
"eyes": 0
} | https://api.github.com/repos/coleifer/peewee/issues/2119/timeline | null | completed | null | null |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.