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/1718 | https://api.github.com/repos/coleifer/peewee | https://api.github.com/repos/coleifer/peewee/issues/1718/labels{/name} | https://api.github.com/repos/coleifer/peewee/issues/1718/comments | https://api.github.com/repos/coleifer/peewee/issues/1718/events | https://github.com/coleifer/peewee/issues/1718 | 358,662,376 | MDU6SXNzdWUzNTg2NjIzNzY= | 1,718 | ManyToManyField doesn't accept on_delete parameter | {
"login": "Susensio",
"id": 11474625,
"node_id": "MDQ6VXNlcjExNDc0NjI1",
"avatar_url": "https://avatars.githubusercontent.com/u/11474625?v=4",
"gravatar_id": "",
"url": "https://api.github.com/users/Susensio",
"html_url": "https://github.com/Susensio",
"followers_url": "https://api.github.com/users/Sus... | [] | closed | false | null | [] | null | [] | 2018-09-10T14:57:42 | 2018-09-10T15:31:45 | 2018-09-10T15:31:45 | CONTRIBUTOR | null | This parameter should map itself to both child _ForeingKeyField_s created. | {
"url": "https://api.github.com/repos/coleifer/peewee/issues/1718/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/1718/timeline | null | completed | null | null |
https://api.github.com/repos/coleifer/peewee/issues/1717 | https://api.github.com/repos/coleifer/peewee | https://api.github.com/repos/coleifer/peewee/issues/1717/labels{/name} | https://api.github.com/repos/coleifer/peewee/issues/1717/comments | https://api.github.com/repos/coleifer/peewee/issues/1717/events | https://github.com/coleifer/peewee/issues/1717 | 358,636,091 | MDU6SXNzdWUzNTg2MzYwOTE= | 1,717 | I want to strip string values in my schema, what is the best way to achieve this? | {
"login": "moar55",
"id": 12253294,
"node_id": "MDQ6VXNlcjEyMjUzMjk0",
"avatar_url": "https://avatars.githubusercontent.com/u/12253294?v=4",
"gravatar_id": "",
"url": "https://api.github.com/users/moar55",
"html_url": "https://github.com/moar55",
"followers_url": "https://api.github.com/users/moar55/fo... | [] | closed | false | null | [] | null | [
"Presumably you would do any data-processing before throwing it into Peewee...Peewee is your layer for talking to the database, in a clean design it should probably not also be your business-logic layer. You're probably best off just overriding the `save()` method rather than messing with the signals API, though of... | 2018-09-10T13:58:49 | 2018-09-10T14:44:25 | 2018-09-10T14:14:49 | NONE | null | I thought of using the `pre_save` but I am not sure if this is the optimal method. | {
"url": "https://api.github.com/repos/coleifer/peewee/issues/1717/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/1717/timeline | null | completed | null | null |
https://api.github.com/repos/coleifer/peewee/issues/1716 | https://api.github.com/repos/coleifer/peewee | https://api.github.com/repos/coleifer/peewee/issues/1716/labels{/name} | https://api.github.com/repos/coleifer/peewee/issues/1716/comments | https://api.github.com/repos/coleifer/peewee/issues/1716/events | https://github.com/coleifer/peewee/issues/1716 | 358,412,383 | MDU6SXNzdWUzNTg0MTIzODM= | 1,716 | Using `in_` with a subquery applies a table alias to the subquery | {
"login": "iksteen",
"id": 1001206,
"node_id": "MDQ6VXNlcjEwMDEyMDY=",
"avatar_url": "https://avatars.githubusercontent.com/u/1001206?v=4",
"gravatar_id": "",
"url": "https://api.github.com/users/iksteen",
"html_url": "https://github.com/iksteen",
"followers_url": "https://api.github.com/users/iksteen/... | [] | closed | false | null | [] | null | [
"That is a kind of weird construction...typically wouldn't you write instead:\r\n\r\n```python\r\nsubquery = Team.select().where(Team.id == 1)\r\nquery = User.select().where(User.team.in_(subquery))\r\n```",
"In this minimal example, perhaps. The actual use of this construction will of course be more complex (bot... | 2018-09-09T21:07:40 | 2018-09-10T18:19:14 | 2018-09-10T15:06:42 | NONE | null | When using `in_` with a subquery, a table alias is applied to the subquery in the final SQL statement which results in an invalid SQL statement.
F.e. the sample below produces the following SQL statement. Notice the `AS "t3"` part.
```sql
SELECT ("t1"."team_id" IN (SELECT "t2"."id" FROM "team" AS "t2" WHERE ("t2".... | {
"url": "https://api.github.com/repos/coleifer/peewee/issues/1716/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/1716/timeline | null | completed | null | null |
https://api.github.com/repos/coleifer/peewee/issues/1715 | https://api.github.com/repos/coleifer/peewee | https://api.github.com/repos/coleifer/peewee/issues/1715/labels{/name} | https://api.github.com/repos/coleifer/peewee/issues/1715/comments | https://api.github.com/repos/coleifer/peewee/issues/1715/events | https://github.com/coleifer/peewee/issues/1715 | 358,374,123 | MDU6SXNzdWUzNTgzNzQxMjM= | 1,715 | Is there tinyint type in models? | {
"login": "moar55",
"id": 12253294,
"node_id": "MDQ6VXNlcjEyMjUzMjk0",
"avatar_url": "https://avatars.githubusercontent.com/u/12253294?v=4",
"gravatar_id": "",
"url": "https://api.github.com/users/moar55",
"html_url": "https://github.com/moar55",
"followers_url": "https://api.github.com/users/moar55/fo... | [] | closed | false | null | [] | null | [
"Refer to [this table](http://docs.peewee-orm.com/en/latest/peewee/models.html#field-types-table) for fields that are currently supported in peewee.\r\n\r\nFor any other database specific types, you can easily create a [custom field](http://docs.peewee-orm.com/en/latest/peewee/models.html#creating-a-custom-field).\... | 2018-09-09T12:18:16 | 2018-09-10T15:04:46 | 2018-09-09T12:42:42 | NONE | null | {
"url": "https://api.github.com/repos/coleifer/peewee/issues/1715/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/1715/timeline | null | completed | null | null | |
https://api.github.com/repos/coleifer/peewee/issues/1714 | https://api.github.com/repos/coleifer/peewee | https://api.github.com/repos/coleifer/peewee/issues/1714/labels{/name} | https://api.github.com/repos/coleifer/peewee/issues/1714/comments | https://api.github.com/repos/coleifer/peewee/issues/1714/events | https://github.com/coleifer/peewee/issues/1714 | 358,361,959 | MDU6SXNzdWUzNTgzNjE5NTk= | 1,714 | How do I make table names plural? | {
"login": "moar55",
"id": 12253294,
"node_id": "MDQ6VXNlcjEyMjUzMjk0",
"avatar_url": "https://avatars.githubusercontent.com/u/12253294?v=4",
"gravatar_id": "",
"url": "https://api.github.com/users/moar55",
"html_url": "https://github.com/moar55",
"followers_url": "https://api.github.com/users/moar55/fo... | [] | closed | false | null | [] | null | [
"You can easily override the default naming.\r\n\r\n```\r\nclass Project(Model):\r\n class Meta:\r\n table_name = 'projects'\r\n```\r\n\r\nSee [here](http://docs.peewee-orm.com/en/latest/peewee/models.html#model-options-and-table-metadata) for more.",
"I knew about this I was thinking of making the tabl... | 2018-09-09T08:56:26 | 2018-09-09T14:07:35 | 2018-09-09T14:07:35 | NONE | null | I like the default table naming function except that I want table names to be plural. How do I achieve this easily? | {
"url": "https://api.github.com/repos/coleifer/peewee/issues/1714/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/1714/timeline | null | completed | null | null |
https://api.github.com/repos/coleifer/peewee/issues/1713 | https://api.github.com/repos/coleifer/peewee | https://api.github.com/repos/coleifer/peewee/issues/1713/labels{/name} | https://api.github.com/repos/coleifer/peewee/issues/1713/comments | https://api.github.com/repos/coleifer/peewee/issues/1713/events | https://github.com/coleifer/peewee/issues/1713 | 358,330,039 | MDU6SXNzdWUzNTgzMzAwMzk= | 1,713 | Joining with no ON condition and no FK. | {
"login": "joaodlf",
"id": 3275379,
"node_id": "MDQ6VXNlcjMyNzUzNzk=",
"avatar_url": "https://avatars.githubusercontent.com/u/3275379?v=4",
"gravatar_id": "",
"url": "https://api.github.com/users/joaodlf",
"html_url": "https://github.com/joaodlf",
"followers_url": "https://api.github.com/users/joaodlf/... | [] | closed | false | null | [] | null | [
"Would this query be equivalent?\r\n\r\n```python\r\nresults = (table1.select(...)\r\n .from_(table1, table2)\r\n .join_from(table1, table3, JOIN.LEFT_OUTER, ((table3.table1_id == table1.id) & ...))\r\n .where(table3.is.is_null()))\r\n```",
"That produces a different query, and also ... | 2018-09-08T21:41:26 | 2019-04-24T08:36:23 | 2018-09-08T23:08:13 | NONE | null | (Postgres 10 and peewee version 3.7.0)
To make this simple to test, I've assembled some ready to use SQL:
```
create table table1(
id serial primary key
);
create table table2(
id serial primary key
);
create table table3(
id serial primary key,
table1_id int,
table2_id int
);
insert int... | {
"url": "https://api.github.com/repos/coleifer/peewee/issues/1713/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/1713/timeline | null | completed | null | null |
https://api.github.com/repos/coleifer/peewee/issues/1712 | https://api.github.com/repos/coleifer/peewee | https://api.github.com/repos/coleifer/peewee/issues/1712/labels{/name} | https://api.github.com/repos/coleifer/peewee/issues/1712/comments | https://api.github.com/repos/coleifer/peewee/issues/1712/events | https://github.com/coleifer/peewee/issues/1712 | 358,234,763 | MDU6SXNzdWUzNTgyMzQ3NjM= | 1,712 | CockroachDB | {
"login": "ghost",
"id": 10137,
"node_id": "MDQ6VXNlcjEwMTM3",
"avatar_url": "https://avatars.githubusercontent.com/u/10137?v=4",
"gravatar_id": "",
"url": "https://api.github.com/users/ghost",
"html_url": "https://github.com/ghost",
"followers_url": "https://api.github.com/users/ghost/followers",
"f... | [] | closed | false | null | [] | null | [
"I don't think you're quite right that Peewee is using single-quotes around 'id' and 'name'. Peewee would presumably be using double-quotes.\r\n\r\nEx:\r\n\r\n```python\r\nIn [1]: from peewee import *\r\n\r\nIn [2]: db = PostgresqlDatabase('peewee_test', user='postgres')\r\n\r\nIn [3]: class GS(Model):\r\n ...: ... | 2018-09-07T22:52:16 | 2018-09-08T14:01:11 | 2018-09-08T02:20:06 | NONE | null | hi I use peewee with cockroachdb. worked great except a thing
`INSERT INTO "gs" ('id', 'name') VALUES (379589221701222401, 'yoshi') ON CONFLICT ("id") DO UPDATE SET "name" = EXCLUDED."name" RETURNING "id"`
the cockroach wants `INSERT INTO "gs" (id, name)` ... without the `'` around id and name
is it something to f... | {
"url": "https://api.github.com/repos/coleifer/peewee/issues/1712/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/1712/timeline | null | completed | null | null |
https://api.github.com/repos/coleifer/peewee/issues/1711 | https://api.github.com/repos/coleifer/peewee | https://api.github.com/repos/coleifer/peewee/issues/1711/labels{/name} | https://api.github.com/repos/coleifer/peewee/issues/1711/comments | https://api.github.com/repos/coleifer/peewee/issues/1711/events | https://github.com/coleifer/peewee/issues/1711 | 357,443,768 | MDU6SXNzdWUzNTc0NDM3Njg= | 1,711 | What is the difference between backref and related_name and some other peewee convetions? | {
"login": "rlvillacarlos",
"id": 11273158,
"node_id": "MDQ6VXNlcjExMjczMTU4",
"avatar_url": "https://avatars.githubusercontent.com/u/11273158?v=4",
"gravatar_id": "",
"url": "https://api.github.com/users/rlvillacarlos",
"html_url": "https://github.com/rlvillacarlos",
"followers_url": "https://api.githu... | [] | closed | false | null | [] | null | [
"`backref` is the correct way -- `related_name` was used prior to Peewee 3.0 and is deprecated, but they have the same effect.\r\n\r\nYou are running into a circular import problem. Consider re-architecting your modules or become more familiar with how python imports work.\r\n\r\nPeewee follows the convention of us... | 2018-09-05T23:50:09 | 2018-09-06T15:29:29 | 2018-09-06T14:51:06 | NONE | null | Hi, I am trying out for the first time peewee + flask and python. For starter, I am trying to create a simple Todo app.I have some question regarding how peewee handles foreign key relations. My background is PHP and I have some experience using Eloquent.
First, I am quite confused as to what to use when setting th... | {
"url": "https://api.github.com/repos/coleifer/peewee/issues/1711/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/1711/timeline | null | completed | null | null |
https://api.github.com/repos/coleifer/peewee/issues/1710 | https://api.github.com/repos/coleifer/peewee | https://api.github.com/repos/coleifer/peewee/issues/1710/labels{/name} | https://api.github.com/repos/coleifer/peewee/issues/1710/comments | https://api.github.com/repos/coleifer/peewee/issues/1710/events | https://github.com/coleifer/peewee/issues/1710 | 356,380,512 | MDU6SXNzdWUzNTYzODA1MTI= | 1,710 | is the connection closed? | {
"login": "bfdcq",
"id": 17643058,
"node_id": "MDQ6VXNlcjE3NjQzMDU4",
"avatar_url": "https://avatars.githubusercontent.com/u/17643058?v=4",
"gravatar_id": "",
"url": "https://api.github.com/users/bfdcq",
"html_url": "https://github.com/bfdcq",
"followers_url": "https://api.github.com/users/bfdcq/follow... | [] | closed | false | null | [] | null | [] | 2018-09-03T07:00:52 | 2018-09-03T09:00:11 | 2018-09-03T09:00:11 | NONE | null | ```
[2018-09-03 15:57:10] [pool:152] [DEBUG] Connection 140187317752720 was stale, closing.
[2018-09-03 15:57:10] [peewee:2612] [DEBUG] close <socket.socket fd=4, family=AddressFamily.AF_INET, type=SocketKind.SOCK_STREAM, proto=6, laddr=('192.168.2.99', 46786), raddr=('192.168.3.78', 3306)>
[2018-09-03 15:57:10] [p... | {
"url": "https://api.github.com/repos/coleifer/peewee/issues/1710/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/1710/timeline | null | completed | null | null |
https://api.github.com/repos/coleifer/peewee/issues/1709 | https://api.github.com/repos/coleifer/peewee | https://api.github.com/repos/coleifer/peewee/issues/1709/labels{/name} | https://api.github.com/repos/coleifer/peewee/issues/1709/comments | https://api.github.com/repos/coleifer/peewee/issues/1709/events | https://github.com/coleifer/peewee/issues/1709 | 356,350,106 | MDU6SXNzdWUzNTYzNTAxMDY= | 1,709 | sql LENGTH function convert to peewee expression | {
"login": "mouday",
"id": 24365682,
"node_id": "MDQ6VXNlcjI0MzY1Njgy",
"avatar_url": "https://avatars.githubusercontent.com/u/24365682?v=4",
"gravatar_id": "",
"url": "https://api.github.com/users/mouday",
"html_url": "https://github.com/mouday",
"followers_url": "https://api.github.com/users/mouday/fo... | [] | closed | false | null | [] | null | [
"```.where(fn.LENGTH(SomeModel.name) < 45)```",
"http://docs.peewee-orm.com/en/latest/peewee/querying.html#filtering-records",
"thank you"
] | 2018-09-03T03:53:00 | 2021-12-07T06:00:45 | 2018-09-04T15:54:30 | NONE | null | sql `select * from table where LENGTH(name) < 45`
can I convert to peewee expression? thank you! | {
"url": "https://api.github.com/repos/coleifer/peewee/issues/1709/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/1709/timeline | null | completed | null | null |
https://api.github.com/repos/coleifer/peewee/issues/1708 | https://api.github.com/repos/coleifer/peewee | https://api.github.com/repos/coleifer/peewee/issues/1708/labels{/name} | https://api.github.com/repos/coleifer/peewee/issues/1708/comments | https://api.github.com/repos/coleifer/peewee/issues/1708/events | https://github.com/coleifer/peewee/issues/1708 | 353,834,003 | MDU6SXNzdWUzNTM4MzQwMDM= | 1,708 | model_to_dict don't work with ManyToManyField | {
"login": "Martin25699",
"id": 10417137,
"node_id": "MDQ6VXNlcjEwNDE3MTM3",
"avatar_url": "https://avatars.githubusercontent.com/u/10417137?v=4",
"gravatar_id": "",
"url": "https://api.github.com/users/Martin25699",
"html_url": "https://github.com/Martin25699",
"followers_url": "https://api.github.com/... | [] | closed | false | null | [] | null | [
"Thanks for reporting, this is now fixed.",
"thx! so fast) when next release?",
"There are quite a few changes, I'll probably tag 3.7.0 here in the next week or so."
] | 2018-08-24T15:40:57 | 2018-08-24T20:12:00 | 2018-08-24T17:36:14 | NONE | null | Example code
```
import datetime
from peewee import *
from playhouse.shortcuts import model_to_dict
from playhouse.postgres_ext import PostgresqlExtDatabase
db = PostgresqlExtDatabase('test', user='test', password='tes', host='127.0.0.1', port=5432)
class BaseModel(Model):
class Meta:
databas... | {
"url": "https://api.github.com/repos/coleifer/peewee/issues/1708/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/1708/timeline | null | completed | null | null |
https://api.github.com/repos/coleifer/peewee/issues/1707 | https://api.github.com/repos/coleifer/peewee | https://api.github.com/repos/coleifer/peewee/issues/1707/labels{/name} | https://api.github.com/repos/coleifer/peewee/issues/1707/comments | https://api.github.com/repos/coleifer/peewee/issues/1707/events | https://github.com/coleifer/peewee/issues/1707 | 353,823,565 | MDU6SXNzdWUzNTM4MjM1NjU= | 1,707 | Classic many-to-many relation | {
"login": "inox9",
"id": 5548204,
"node_id": "MDQ6VXNlcjU1NDgyMDQ=",
"avatar_url": "https://avatars.githubusercontent.com/u/5548204?v=4",
"gravatar_id": "",
"url": "https://api.github.com/users/inox9",
"html_url": "https://github.com/inox9",
"followers_url": "https://api.github.com/users/inox9/follower... | [] | closed | false | null | [] | null | [
"Rather than querying from the perspective of Account (which may have 0..n codes), you should query from the intermediary model and eagerly load the associated account/code:\r\n\r\n```python\r\nquery = (AccountCode\r\n .select(AccountCode, Account, Code)\r\n .join_from(AccountCode, Account)\r\n ... | 2018-08-24T15:11:50 | 2018-08-24T15:46:09 | 2018-08-24T15:46:09 | NONE | null | Hello!
I have a strange problem doing classic many-to-many relation join. I use an intermediate table as suggested in official docs for this. I have enabled query log and noticed that despite join query is correct and actually returns everything that I need there are still additional excess queries done. Here are the ... | {
"url": "https://api.github.com/repos/coleifer/peewee/issues/1707/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/1707/timeline | null | completed | null | null |
https://api.github.com/repos/coleifer/peewee/issues/1706 | https://api.github.com/repos/coleifer/peewee | https://api.github.com/repos/coleifer/peewee/issues/1706/labels{/name} | https://api.github.com/repos/coleifer/peewee/issues/1706/comments | https://api.github.com/repos/coleifer/peewee/issues/1706/events | https://github.com/coleifer/peewee/issues/1706 | 353,642,330 | MDU6SXNzdWUzNTM2NDIzMzA= | 1,706 | Add possibility to add constrains in schema migrations | {
"login": "rominf",
"id": 3449635,
"node_id": "MDQ6VXNlcjM0NDk2MzU=",
"avatar_url": "https://avatars.githubusercontent.com/u/3449635?v=4",
"gravatar_id": "",
"url": "https://api.github.com/users/rominf",
"html_url": "https://github.com/rominf",
"followers_url": "https://api.github.com/users/rominf/foll... | [] | closed | false | null | [] | null | [
"This is already possible, if I understand the request correctly.\r\n\r\nWhen adding a new column, you can add arbitrary constraints:\r\n\r\n```python\r\nprice = FloatField(default=0., constraints=[Check('price >= 0.0')])\r\nmigrator = SchemaMigrator.from_database(db)\r\n# Add the \"price\" column, which includes a... | 2018-08-24T04:39:52 | 2018-08-24T15:03:16 | 2018-08-24T15:02:41 | NONE | null | {
"url": "https://api.github.com/repos/coleifer/peewee/issues/1706/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/1706/timeline | null | completed | null | null | |
https://api.github.com/repos/coleifer/peewee/issues/1705 | https://api.github.com/repos/coleifer/peewee | https://api.github.com/repos/coleifer/peewee/issues/1705/labels{/name} | https://api.github.com/repos/coleifer/peewee/issues/1705/comments | https://api.github.com/repos/coleifer/peewee/issues/1705/events | https://github.com/coleifer/peewee/issues/1705 | 353,574,826 | MDU6SXNzdWUzNTM1NzQ4MjY= | 1,705 | Join with join_type=JOIN.NATURAL requires explicit join condition | {
"login": "jbender",
"id": 723784,
"node_id": "MDQ6VXNlcjcyMzc4NA==",
"avatar_url": "https://avatars.githubusercontent.com/u/723784?v=4",
"gravatar_id": "",
"url": "https://api.github.com/users/jbender",
"html_url": "https://github.com/jbender",
"followers_url": "https://api.github.com/users/jbender/fo... | [] | closed | false | null | [] | null | [
"Peewee needs you to specify the join predicate when using models that don't have a foreign-key relationship, simple as that.\r\n\r\nIs there any reason why you wouldn't just:\r\n\r\n```python\r\nclass ModelB(BaseModel):\r\n class Meta:\r\n table_name = 'model_b'\r\n\r\n model_b_id = IntegerField() # presumab... | 2018-08-23T22:20:33 | 2018-08-28T20:58:21 | 2018-08-28T20:58:21 | NONE | null | Error being thrown:
```
Traceback (most recent call last):
File "example.py", line 35, in <module>
.join_from(ModelA, ModelB, JOIN.NATURAL)
File "/usr/local/lib/python3.7/site-packages/peewee.py", line 6061, in join_from
return self.join(dest, join_type, on, src, attr)
File "/usr/local/lib/python... | {
"url": "https://api.github.com/repos/coleifer/peewee/issues/1705/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/1705/timeline | null | completed | null | null |
https://api.github.com/repos/coleifer/peewee/issues/1704 | https://api.github.com/repos/coleifer/peewee | https://api.github.com/repos/coleifer/peewee/issues/1704/labels{/name} | https://api.github.com/repos/coleifer/peewee/issues/1704/comments | https://api.github.com/repos/coleifer/peewee/issues/1704/events | https://github.com/coleifer/peewee/issues/1704 | 353,164,421 | MDU6SXNzdWUzNTMxNjQ0MjE= | 1,704 | Clause equivalent in version 3 | {
"login": "djsutherland",
"id": 36478,
"node_id": "MDQ6VXNlcjM2NDc4",
"avatar_url": "https://avatars.githubusercontent.com/u/36478?v=4",
"gravatar_id": "",
"url": "https://api.github.com/users/djsutherland",
"html_url": "https://github.com/djsutherland",
"followers_url": "https://api.github.com/users/d... | [] | closed | false | null | [] | null | [
"```python\r\nfrom peewee import NodeList\r\n\r\nfn.GROUP_CONCAT(NodeList((\r\n MyModel.test_score.distinct(), \r\n SQL('ORDER BY'), \r\n MyModel.test_score.desc(), \r\n SQL('SEPARATOR \\' \\''))\r\n))\r\n```\r\n\r\nINTO:\r\n\r\n```sql\r\nGROUP_CONCAT(DISTINCT \"t1\".\"test_score\" ORDER BY \"t1\".\"tes... | 2018-08-22T23:35:47 | 2018-08-23T16:08:04 | 2018-08-23T00:14:56 | NONE | null | I was using [this hack](https://github.com/coleifer/peewee/issues/1181#issuecomment-274626273), which worked in peewee 2, but `peewee.Clause` seems to not be a thing anymore.
How can I pass a `SEPARATOR` argument to `GROUP_CONCAT` in peewee 3? | {
"url": "https://api.github.com/repos/coleifer/peewee/issues/1704/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/1704/timeline | null | completed | null | null |
https://api.github.com/repos/coleifer/peewee/issues/1703 | https://api.github.com/repos/coleifer/peewee | https://api.github.com/repos/coleifer/peewee/issues/1703/labels{/name} | https://api.github.com/repos/coleifer/peewee/issues/1703/comments | https://api.github.com/repos/coleifer/peewee/issues/1703/events | https://github.com/coleifer/peewee/issues/1703 | 352,579,331 | MDU6SXNzdWUzNTI1NzkzMzE= | 1,703 | Replace "raise Exception" by "raise XXX" | {
"login": "gustavi",
"id": 2736557,
"node_id": "MDQ6VXNlcjI3MzY1NTc=",
"avatar_url": "https://avatars.githubusercontent.com/u/2736557?v=4",
"gravatar_id": "",
"url": "https://api.github.com/users/gustavi",
"html_url": "https://github.com/gustavi",
"followers_url": "https://api.github.com/users/gustavi/... | [] | closed | false | null | [] | null | [
"e15141fb519e175970af73dac92b736011208541"
] | 2018-08-21T14:52:57 | 2018-08-21T15:00:33 | 2018-08-21T15:00:33 | NONE | null | There are 3 `raise Exception` in the code. It could be good to replace it by custom exception to catch it (and only it) when using peewee. | {
"url": "https://api.github.com/repos/coleifer/peewee/issues/1703/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/1703/timeline | null | completed | null | null |
https://api.github.com/repos/coleifer/peewee/issues/1702 | https://api.github.com/repos/coleifer/peewee | https://api.github.com/repos/coleifer/peewee/issues/1702/labels{/name} | https://api.github.com/repos/coleifer/peewee/issues/1702/comments | https://api.github.com/repos/coleifer/peewee/issues/1702/events | https://github.com/coleifer/peewee/pull/1702 | 352,469,483 | MDExOlB1bGxSZXF1ZXN0MjA5NzcxNzE5 | 1,702 | Reflection: Fix broken SQL statement for text-typed default values. | {
"login": "stlehmann",
"id": 4641542,
"node_id": "MDQ6VXNlcjQ2NDE1NDI=",
"avatar_url": "https://avatars.githubusercontent.com/u/4641542?v=4",
"gravatar_id": "",
"url": "https://api.github.com/users/stlehmann",
"html_url": "https://github.com/stlehmann",
"followers_url": "https://api.github.com/users/st... | [] | closed | false | null | [] | null | [
"You mean quotation marks, not parentheses...",
"I think the better way to fix this would be to introspect the field type rather than the default value.",
"You are right ... \"quotation marks\" it is. \r\n\r\nI decided to check the type of the default value because even if you have a certain numeric field type ... | 2018-08-21T10:00:26 | 2018-08-21T18:29:44 | 2018-08-21T14:28:38 | NONE | null | When using the refection module on text-typed (unicode on py2, str on py3) Columns with default values there were parantheses missing around the generated SQL statement. That leads to errors on model migration.
I fixed this error by checking the data type of the default value and adding parantheses around it if it i... | {
"url": "https://api.github.com/repos/coleifer/peewee/issues/1702/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/1702/timeline | null | null | false | {
"url": "https://api.github.com/repos/coleifer/peewee/pulls/1702",
"html_url": "https://github.com/coleifer/peewee/pull/1702",
"diff_url": "https://github.com/coleifer/peewee/pull/1702.diff",
"patch_url": "https://github.com/coleifer/peewee/pull/1702.patch",
"merged_at": null
} |
https://api.github.com/repos/coleifer/peewee/issues/1701 | https://api.github.com/repos/coleifer/peewee | https://api.github.com/repos/coleifer/peewee/issues/1701/labels{/name} | https://api.github.com/repos/coleifer/peewee/issues/1701/comments | https://api.github.com/repos/coleifer/peewee/issues/1701/events | https://github.com/coleifer/peewee/issues/1701 | 351,760,275 | MDU6SXNzdWUzNTE3NjAyNzU= | 1,701 | Missing documentation of a backwards incompatible change from 2.x | {
"login": "CriseX",
"id": 3485114,
"node_id": "MDQ6VXNlcjM0ODUxMTQ=",
"avatar_url": "https://avatars.githubusercontent.com/u/3485114?v=4",
"gravatar_id": "",
"url": "https://api.github.com/users/CriseX",
"html_url": "https://github.com/CriseX",
"followers_url": "https://api.github.com/users/CriseX/foll... | [] | closed | false | null | [] | null | [] | 2018-08-17T22:46:41 | 2018-08-19T00:20:16 | 2018-08-19T00:20:16 | NONE | null | The removal of old SelectModel.annotate() method is not listed under the list of backwards incompatible changes. I had to actually dig through the old 2.x documentation to figure out what that method used to do. Perhaps the current documentation could at least link to 2.x documentation on the 3.0 changes page in regard... | {
"url": "https://api.github.com/repos/coleifer/peewee/issues/1701/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/1701/timeline | null | completed | null | null |
https://api.github.com/repos/coleifer/peewee/issues/1700 | https://api.github.com/repos/coleifer/peewee | https://api.github.com/repos/coleifer/peewee/issues/1700/labels{/name} | https://api.github.com/repos/coleifer/peewee/issues/1700/comments | https://api.github.com/repos/coleifer/peewee/issues/1700/events | https://github.com/coleifer/peewee/issues/1700 | 351,459,226 | MDU6SXNzdWUzNTE0NTkyMjY= | 1,700 | Cannot create indexes using JSONPath with SQLite | {
"login": "blemasle",
"id": 5184737,
"node_id": "MDQ6VXNlcjUxODQ3Mzc=",
"avatar_url": "https://avatars.githubusercontent.com/u/5184737?v=4",
"gravatar_id": "",
"url": "https://api.github.com/users/blemasle",
"html_url": "https://github.com/blemasle",
"followers_url": "https://api.github.com/users/blema... | [] | closed | false | null | [] | null | [
"There's no way to fix this, unfortunately it's just a limit of SQLite that it won't accept the parameterized query in CREATE INDEX.",
"Indeed, I did not realize that was the case with every parametized index creation. Even the advanced index creation [stated in the doc](http://docs.peewee-orm.com/en/latest/peewe... | 2018-08-17T05:12:39 | 2018-08-18T00:23:24 | 2018-08-17T14:23:27 | NONE | null | Cannot create indexes using JSONPath with SQLite and apsw
Hi,
peewee : 3.6.4
apsw : 3.24.0-r1, with json1 extension enabled
For a rather tricky case, I need to create an index using the `json_extract` function. But the use of `JSONPath` produce a parametized SQL query, which is prohibited during indexes creat... | {
"url": "https://api.github.com/repos/coleifer/peewee/issues/1700/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/1700/timeline | null | completed | null | null |
https://api.github.com/repos/coleifer/peewee/issues/1699 | https://api.github.com/repos/coleifer/peewee | https://api.github.com/repos/coleifer/peewee/issues/1699/labels{/name} | https://api.github.com/repos/coleifer/peewee/issues/1699/comments | https://api.github.com/repos/coleifer/peewee/issues/1699/events | https://github.com/coleifer/peewee/issues/1699 | 350,809,621 | MDU6SXNzdWUzNTA4MDk2MjE= | 1,699 | [HELP] how to union_all subquerys | {
"login": "megachweng",
"id": 18111773,
"node_id": "MDQ6VXNlcjE4MTExNzcz",
"avatar_url": "https://avatars.githubusercontent.com/u/18111773?v=4",
"gravatar_id": "",
"url": "https://api.github.com/users/megachweng",
"html_url": "https://github.com/megachweng",
"followers_url": "https://api.github.com/use... | [] | closed | false | null | [] | null | [
"I'm not clear why you are writing your queries like that...but here's how you might do it with Peewee:\r\n\r\n```python\r\nLA1 = Log.alias()\r\nsubq1 = LA1.select(LA1).where(LA1.checked == 0).order_by(LA1.id.desc())\r\n\r\nlhs = (Log\r\n .select(subq1.c.api_id, subq1.c.id, subq1.c.new_name.alias('name'))\r\n... | 2018-08-15T13:30:13 | 2018-08-15T15:27:55 | 2018-08-15T14:52:21 | NONE | null | ```Python
class Wtlog(BaseModel):
api = CharField(column_name='api_id', constraints=[SQL("DEFAULT ''")])
ctime = DateTimeField(constraints=[SQL("DEFAULT current_timestamp()")], null=True)
new_name = CharField(null=True)
old_name = CharField(null=True)
```
The raw SQL is
```MySQL
SELECT api_i... | {
"url": "https://api.github.com/repos/coleifer/peewee/issues/1699/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/1699/timeline | null | completed | null | null |
https://api.github.com/repos/coleifer/peewee/issues/1698 | https://api.github.com/repos/coleifer/peewee | https://api.github.com/repos/coleifer/peewee/issues/1698/labels{/name} | https://api.github.com/repos/coleifer/peewee/issues/1698/comments | https://api.github.com/repos/coleifer/peewee/issues/1698/events | https://github.com/coleifer/peewee/issues/1698 | 350,761,413 | MDU6SXNzdWUzNTA3NjE0MTM= | 1,698 | join doesn't works | {
"login": "zhangmaohong",
"id": 26495548,
"node_id": "MDQ6VXNlcjI2NDk1NTQ4",
"avatar_url": "https://avatars.githubusercontent.com/u/26495548?v=4",
"gravatar_id": "",
"url": "https://api.github.com/users/zhangmaohong",
"html_url": "https://github.com/zhangmaohong",
"followers_url": "https://api.github.c... | [] | closed | false | null | [] | null | [
"From your issue it's unclear what the problem is, what the expected result/output should be, etc.\r\n\r\nCan you please add a comment indicating what the problem is? Also, if you could please create a minimal example -- the models you've included are difficult to read.\r\n\r\nI'll reopen the issue upon receiving a... | 2018-08-15T10:31:55 | 2018-08-16T14:37:12 | 2018-08-15T14:43:07 | NONE | null | ```class BaseModel(Model):
class Meta:
database = db
def __str__(self):
r = {}
for k in self.__data__.keys():
try:
r[k] = str(getattr(self, k))
except:
r[k] = json.dumps(getattr(self, k))
# return str(r)
... | {
"url": "https://api.github.com/repos/coleifer/peewee/issues/1698/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/1698/timeline | null | completed | null | null |
https://api.github.com/repos/coleifer/peewee/issues/1697 | https://api.github.com/repos/coleifer/peewee | https://api.github.com/repos/coleifer/peewee/issues/1697/labels{/name} | https://api.github.com/repos/coleifer/peewee/issues/1697/comments | https://api.github.com/repos/coleifer/peewee/issues/1697/events | https://github.com/coleifer/peewee/issues/1697 | 350,331,559 | MDU6SXNzdWUzNTAzMzE1NTk= | 1,697 | `User.select().dicts()` not return dict-list | {
"login": "bingtel",
"id": 24327444,
"node_id": "MDQ6VXNlcjI0MzI3NDQ0",
"avatar_url": "https://avatars.githubusercontent.com/u/24327444?v=4",
"gravatar_id": "",
"url": "https://api.github.com/users/bingtel",
"html_url": "https://github.com/bingtel",
"followers_url": "https://api.github.com/users/bingte... | [] | closed | false | null | [] | null | [
"Peewee lazily evaluates queries -- they are not evaluated until iterated (or you explicitly call .execute(), and in that case you get a special/smart iterator).\r\n\r\nTo get a list of dicts, either:\r\n\r\n```python\r\nq = User.select().dicts()\r\nlist_of_dicts1 = q[:]\r\nlist_of_dicts2 = list(q)\r\nlist_of_dicts... | 2018-08-14T08:36:18 | 2018-08-14T12:53:03 | 2018-08-14T12:53:03 | NONE | null | When I want to get a list of dict by `q = User.select().dicts()` , q is not a list of dict;
I have to `[e for e in q]` to get a dict-list. | {
"url": "https://api.github.com/repos/coleifer/peewee/issues/1697/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/1697/timeline | null | completed | null | null |
https://api.github.com/repos/coleifer/peewee/issues/1696 | https://api.github.com/repos/coleifer/peewee | https://api.github.com/repos/coleifer/peewee/issues/1696/labels{/name} | https://api.github.com/repos/coleifer/peewee/issues/1696/comments | https://api.github.com/repos/coleifer/peewee/issues/1696/events | https://github.com/coleifer/peewee/issues/1696 | 349,409,289 | MDU6SXNzdWUzNDk0MDkyODk= | 1,696 | Using fn.ST_AsText does not work in a select query | {
"login": "bmamouri",
"id": 6419173,
"node_id": "MDQ6VXNlcjY0MTkxNzM=",
"avatar_url": "https://avatars.githubusercontent.com/u/6419173?v=4",
"gravatar_id": "",
"url": "https://api.github.com/users/bmamouri",
"html_url": "https://github.com/bmamouri",
"followers_url": "https://api.github.com/users/bmamo... | [] | closed | false | null | [] | null | [
"First off, try modifying your query so that you're not selecting \"latlng\" twice:\r\n\r\n```python\r\nquery = Homes.select(Homes.name, fn.ST_AsText(Homes.latlng).alias('latlng'))\r\n```\r\n\r\nYou may not need the \".alias()\" so try with/without.",
"@coleifer, thank you for the reply. Unfortunately, that does ... | 2018-08-10T07:43:36 | 2018-08-13T13:56:34 | 2018-08-11T14:59:09 | NONE | null | I am trying to select a column of type `GEOMETRY` in WKT format using the ST_AsText function in PostgreSQL. Interestingly, peewee is generating the correct SQL but the query result is not fetched using the ST_AsText function.
```
from peewee import *
database = PostgresqlDatabase('test', user='postgres', passwo... | {
"url": "https://api.github.com/repos/coleifer/peewee/issues/1696/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/1696/timeline | null | completed | null | null |
https://api.github.com/repos/coleifer/peewee/issues/1695 | https://api.github.com/repos/coleifer/peewee | https://api.github.com/repos/coleifer/peewee/issues/1695/labels{/name} | https://api.github.com/repos/coleifer/peewee/issues/1695/comments | https://api.github.com/repos/coleifer/peewee/issues/1695/events | https://github.com/coleifer/peewee/issues/1695 | 348,176,225 | MDU6SXNzdWUzNDgxNzYyMjU= | 1,695 | How to end a simulated user. | {
"login": "qiaohao9",
"id": 15377472,
"node_id": "MDQ6VXNlcjE1Mzc3NDcy",
"avatar_url": "https://avatars.githubusercontent.com/u/15377472?v=4",
"gravatar_id": "",
"url": "https://api.github.com/users/qiaohao9",
"html_url": "https://github.com/qiaohao9",
"followers_url": "https://api.github.com/users/qia... | [] | closed | false | null | [] | null | [] | 2018-08-07T05:50:04 | 2018-08-07T05:50:23 | 2018-08-07T05:50:23 | NONE | null | I now have a question like how to end a simulated user.
Scenes:
The simulated user needs to log in before the simulation request can be made to the following `@task`, but if the login fails, the user will not proceed with the subsequent tasks, and will directly exit, and also need to finish the work.
Excuse me... | {
"url": "https://api.github.com/repos/coleifer/peewee/issues/1695/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/1695/timeline | null | completed | null | null |
https://api.github.com/repos/coleifer/peewee/issues/1694 | https://api.github.com/repos/coleifer/peewee | https://api.github.com/repos/coleifer/peewee/issues/1694/labels{/name} | https://api.github.com/repos/coleifer/peewee/issues/1694/comments | https://api.github.com/repos/coleifer/peewee/issues/1694/events | https://github.com/coleifer/peewee/issues/1694 | 348,161,092 | MDU6SXNzdWUzNDgxNjEwOTI= | 1,694 | update a model field mysql can't auto update the `ON UPDATE` field? | {
"login": "axiaoxin",
"id": 2876405,
"node_id": "MDQ6VXNlcjI4NzY0MDU=",
"avatar_url": "https://avatars.githubusercontent.com/u/2876405?v=4",
"gravatar_id": "",
"url": "https://api.github.com/users/axiaoxin",
"html_url": "https://github.com/axiaoxin",
"followers_url": "https://api.github.com/users/axiao... | [] | closed | false | null | [] | null | [
"Peewee is an active-record ORM...so when you call \".save()\" it will, by default, explicitly set the values for all columns using whatever values are stored in the model instance at that time.\r\n\r\nAdditionally, the `default=...` values only apply when the model does not already have a value for the given field... | 2018-08-07T04:15:13 | 2018-08-08T01:26:51 | 2018-08-07T14:54:32 | NONE | null | I created a table use `mysql < test.sql`, test.sql content is:
```sql
CREATE TABLE IF NOT EXISTS `caller` (
`id` INT NOT NULL AUTO_INCREMENT COMMENT 'caller id',
`key` VARCHAR(36) NOT NULL DEFAULT '' COMMENT 'caller key',
`admin` VARCHAR(255) NOT NULL DEFAULT '' COMMENT 'admin list',
`is_del... | {
"url": "https://api.github.com/repos/coleifer/peewee/issues/1694/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/1694/timeline | null | completed | null | null |
https://api.github.com/repos/coleifer/peewee/issues/1693 | https://api.github.com/repos/coleifer/peewee | https://api.github.com/repos/coleifer/peewee/issues/1693/labels{/name} | https://api.github.com/repos/coleifer/peewee/issues/1693/comments | https://api.github.com/repos/coleifer/peewee/issues/1693/events | https://github.com/coleifer/peewee/pull/1693 | 347,596,734 | MDExOlB1bGxSZXF1ZXN0MjA2MTgwOTYy | 1,693 | fix "NameError: name 'hashlib' is not defined" | {
"login": "lisfer",
"id": 9050581,
"node_id": "MDQ6VXNlcjkwNTA1ODE=",
"avatar_url": "https://avatars.githubusercontent.com/u/9050581?v=4",
"gravatar_id": "",
"url": "https://api.github.com/users/lisfer",
"html_url": "https://github.com/lisfer",
"followers_url": "https://api.github.com/users/lisfer/foll... | [] | closed | false | null | [] | null | [
"Beautiful, thanks!"
] | 2018-08-04T07:30:28 | 2018-08-06T15:37:47 | 2018-08-06T13:21:10 | CONTRIBUTOR | null | hashlib is used in playhouse.migrate::make_index_name, but not imported | {
"url": "https://api.github.com/repos/coleifer/peewee/issues/1693/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/1693/timeline | null | null | false | {
"url": "https://api.github.com/repos/coleifer/peewee/pulls/1693",
"html_url": "https://github.com/coleifer/peewee/pull/1693",
"diff_url": "https://github.com/coleifer/peewee/pull/1693.diff",
"patch_url": "https://github.com/coleifer/peewee/pull/1693.patch",
"merged_at": "2018-08-06T13:21:10"
} |
https://api.github.com/repos/coleifer/peewee/issues/1692 | https://api.github.com/repos/coleifer/peewee | https://api.github.com/repos/coleifer/peewee/issues/1692/labels{/name} | https://api.github.com/repos/coleifer/peewee/issues/1692/comments | https://api.github.com/repos/coleifer/peewee/issues/1692/events | https://github.com/coleifer/peewee/issues/1692 | 347,164,071 | MDU6SXNzdWUzNDcxNjQwNzE= | 1,692 | sqlite conflict_update version check ignores apsw version | {
"login": "brandond",
"id": 370103,
"node_id": "MDQ6VXNlcjM3MDEwMw==",
"avatar_url": "https://avatars.githubusercontent.com/u/370103?v=4",
"gravatar_id": "",
"url": "https://api.github.com/users/brandond",
"html_url": "https://github.com/brandond",
"followers_url": "https://api.github.com/users/brandon... | [] | closed | false | null | [] | null | [
"Thanks for the quick fix! I had literally just hacked around my local install with the same monkeypatch:\r\n\r\n```\r\nimport peewee\r\npeewee.__sqlite_version__ = tuple(int(x) for x in apsw.sqlitelibversion().split('.'))\r\n```"
] | 2018-08-02T20:33:03 | 2018-08-02T22:03:56 | 2018-08-02T21:55:22 | NONE | null | I'm using `APSWDatabase` with APSW 3.24.0, but calling `on_conflict` still raises an exception claiming 'ValueError: SQLite does not support specifying which values to preserve or update.' It appears that `conflict_update` is checking the Python sqlite3 module version, instead of the apsw sqlite version, when deciding ... | {
"url": "https://api.github.com/repos/coleifer/peewee/issues/1692/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/1692/timeline | null | completed | null | null |
https://api.github.com/repos/coleifer/peewee/issues/1691 | https://api.github.com/repos/coleifer/peewee | https://api.github.com/repos/coleifer/peewee/issues/1691/labels{/name} | https://api.github.com/repos/coleifer/peewee/issues/1691/comments | https://api.github.com/repos/coleifer/peewee/issues/1691/events | https://github.com/coleifer/peewee/issues/1691 | 346,875,541 | MDU6SXNzdWUzNDY4NzU1NDE= | 1,691 | ORDER BY a json field fails in CTE select_from | {
"login": "tuukkamustonen",
"id": 94327,
"node_id": "MDQ6VXNlcjk0MzI3",
"avatar_url": "https://avatars.githubusercontent.com/u/94327?v=4",
"gravatar_id": "",
"url": "https://api.github.com/users/tuukkamustonen",
"html_url": "https://github.com/tuukkamustonen",
"followers_url": "https://api.github.com/u... | [] | closed | false | null | [] | null | [
"Ouch...that's going to be rather difficult to fix, unfortunately, perhaps not possible. I'd suggest in the meantime trying something like:\r\n\r\n```python\r\n.order_by(Expression(cte.c.data, '->>', SQL(\"'x'\")))\r\n```",
"I'll try that, but I now realize that `select_from()` actually produces `SELECT FROM` ra... | 2018-08-02T06:24:45 | 2018-08-13T15:23:28 | 2018-08-11T15:03:10 | NONE | null | ```python
class Foo(Model):
data = BinaryJSONField()
# OK: Produces SELECT ... ORDER BY ("foo"."data"->>'x');
Foo.select().order_by(Foo.data['x'])
# NOK: Produces WITH foos AS (...) SELECT ... ORDER BY ("foos"."data" = 'x');
cte = Foo.select().cte('foos')
query = cte.select_from().order_by(cte.c.data['x'... | {
"url": "https://api.github.com/repos/coleifer/peewee/issues/1691/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/1691/timeline | null | completed | null | null |
https://api.github.com/repos/coleifer/peewee/issues/1690 | https://api.github.com/repos/coleifer/peewee | https://api.github.com/repos/coleifer/peewee/issues/1690/labels{/name} | https://api.github.com/repos/coleifer/peewee/issues/1690/comments | https://api.github.com/repos/coleifer/peewee/issues/1690/events | https://github.com/coleifer/peewee/issues/1690 | 346,767,365 | MDU6SXNzdWUzNDY3NjczNjU= | 1,690 | Proxy() Has No "__exit__" Attribute | {
"login": "madelyneriksen",
"id": 36825510,
"node_id": "MDQ6VXNlcjM2ODI1NTEw",
"avatar_url": "https://avatars.githubusercontent.com/u/36825510?v=4",
"gravatar_id": "",
"url": "https://api.github.com/users/madelyneriksen",
"html_url": "https://github.com/madelyneriksen",
"followers_url": "https://api.gi... | [] | closed | false | null | [] | null | [
"Well, `Proxy` works by overriding `__getattr__()` and `__setattr__()`...I think the crux of the issue is that these overrides do not cover special methods such as `__enter__` and `__exit__`. This is described in the [Python documentation](https://docs.python.org/3/reference/datamodel.html#special-method-lookup).\r... | 2018-08-01T21:01:16 | 2018-08-01T22:03:37 | 2018-08-01T21:20:30 | NONE | null | ### Version, System, Python Info
* Peewee v. 3.6.4
* Python v. 3.5.2
* OS: Ubuntu 16.04 LTS
### Description of Issue
The docs mentions that we can use databases as a context manager for connections. I have also lately taken to using Proxy() to test an application's behavior on multiple databases. I ran into ... | {
"url": "https://api.github.com/repos/coleifer/peewee/issues/1690/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/1690/timeline | null | completed | null | null |
https://api.github.com/repos/coleifer/peewee/issues/1689 | https://api.github.com/repos/coleifer/peewee | https://api.github.com/repos/coleifer/peewee/issues/1689/labels{/name} | https://api.github.com/repos/coleifer/peewee/issues/1689/comments | https://api.github.com/repos/coleifer/peewee/issues/1689/events | https://github.com/coleifer/peewee/pull/1689 | 346,754,165 | MDExOlB1bGxSZXF1ZXN0MjA1NTQyMTY2 | 1,689 | Support using FlaskDB with signals by customizing the base model class | {
"login": "iBelieve",
"id": 3230912,
"node_id": "MDQ6VXNlcjMyMzA5MTI=",
"avatar_url": "https://avatars.githubusercontent.com/u/3230912?v=4",
"gravatar_id": "",
"url": "https://api.github.com/users/iBelieve",
"html_url": "https://github.com/iBelieve",
"followers_url": "https://api.github.com/users/iBeli... | [] | closed | false | null | [] | null | [] | 2018-08-01T20:22:40 | 2018-08-01T20:58:46 | 2018-08-01T20:58:46 | CONTRIBUTOR | null | {
"url": "https://api.github.com/repos/coleifer/peewee/issues/1689/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/1689/timeline | null | null | false | {
"url": "https://api.github.com/repos/coleifer/peewee/pulls/1689",
"html_url": "https://github.com/coleifer/peewee/pull/1689",
"diff_url": "https://github.com/coleifer/peewee/pull/1689.diff",
"patch_url": "https://github.com/coleifer/peewee/pull/1689.patch",
"merged_at": "2018-08-01T20:58:46"
} | |
https://api.github.com/repos/coleifer/peewee/issues/1688 | https://api.github.com/repos/coleifer/peewee | https://api.github.com/repos/coleifer/peewee/issues/1688/labels{/name} | https://api.github.com/repos/coleifer/peewee/issues/1688/comments | https://api.github.com/repos/coleifer/peewee/issues/1688/events | https://github.com/coleifer/peewee/issues/1688 | 346,636,282 | MDU6SXNzdWUzNDY2MzYyODI= | 1,688 | Subquery expressions not parenthesized as function arguments | {
"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 | [
"Fixed, thanks for reporting."
] | 2018-08-01T14:54:17 | 2018-08-01T15:27:43 | 2018-08-01T15:27:13 | CONTRIBUTOR | null | peewee version: 3.6.4
It seems that peewee does not parenthesize subquery expressions when used in a function, resulting in syntax errors (at least with SQLite).
Consider this minimal example, where we run the same query with a subquery expression twice, except in the second case we try to coalesce the subquery e... | {
"url": "https://api.github.com/repos/coleifer/peewee/issues/1688/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/1688/timeline | null | completed | null | null |
https://api.github.com/repos/coleifer/peewee/issues/1687 | https://api.github.com/repos/coleifer/peewee | https://api.github.com/repos/coleifer/peewee/issues/1687/labels{/name} | https://api.github.com/repos/coleifer/peewee/issues/1687/comments | https://api.github.com/repos/coleifer/peewee/issues/1687/events | https://github.com/coleifer/peewee/issues/1687 | 346,534,165 | MDU6SXNzdWUzNDY1MzQxNjU= | 1,687 | table_exists api does not seems to work | {
"login": "dyadav7",
"id": 8121360,
"node_id": "MDQ6VXNlcjgxMjEzNjA=",
"avatar_url": "https://avatars.githubusercontent.com/u/8121360?v=4",
"gravatar_id": "",
"url": "https://api.github.com/users/dyadav7",
"html_url": "https://github.com/dyadav7",
"followers_url": "https://api.github.com/users/dyadav7/... | [] | closed | false | null | [] | null | [
"This is fixed in 3.5.0. See ababb51f"
] | 2018-08-01T10:07:32 | 2018-08-01T13:43:43 | 2018-08-01T13:43:43 | NONE | null | Hi
i am using Peewee version 3.1.5. table_exists() api is always returning False.
Regards
Deepak | {
"url": "https://api.github.com/repos/coleifer/peewee/issues/1687/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/1687/timeline | null | completed | null | null |
https://api.github.com/repos/coleifer/peewee/issues/1686 | https://api.github.com/repos/coleifer/peewee | https://api.github.com/repos/coleifer/peewee/issues/1686/labels{/name} | https://api.github.com/repos/coleifer/peewee/issues/1686/comments | https://api.github.com/repos/coleifer/peewee/issues/1686/events | https://github.com/coleifer/peewee/issues/1686 | 346,068,898 | MDU6SXNzdWUzNDYwNjg4OTg= | 1,686 | How to sort by geo distance? | {
"login": "BadReese",
"id": 18170860,
"node_id": "MDQ6VXNlcjE4MTcwODYw",
"avatar_url": "https://avatars.githubusercontent.com/u/18170860?v=4",
"gravatar_id": "",
"url": "https://api.github.com/users/BadReese",
"html_url": "https://github.com/BadReese",
"followers_url": "https://api.github.com/users/Bad... | [] | closed | false | null | [] | null | [
"provide a geo point, and sorted by distance",
"I'm assuming you're using something like PostGIS for Postgresql, or Spatialite for SQLite.\r\n\r\nYou just need to find the appropriate distance function and call it, e.g. [ST_distance](https://postgis.net/docs/ST_Distance.html):\r\n\r\n```python\r\nfn.ST_Distance(S... | 2018-07-31T07:33:48 | 2018-07-31T15:44:13 | 2018-07-31T15:44:13 | NONE | null | {
"url": "https://api.github.com/repos/coleifer/peewee/issues/1686/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/1686/timeline | null | completed | null | null | |
https://api.github.com/repos/coleifer/peewee/issues/1685 | https://api.github.com/repos/coleifer/peewee | https://api.github.com/repos/coleifer/peewee/issues/1685/labels{/name} | https://api.github.com/repos/coleifer/peewee/issues/1685/comments | https://api.github.com/repos/coleifer/peewee/issues/1685/events | https://github.com/coleifer/peewee/issues/1685 | 345,566,655 | MDU6SXNzdWUzNDU1NjY2NTU= | 1,685 | basic database sharding | {
"login": "iurly",
"id": 20878097,
"node_id": "MDQ6VXNlcjIwODc4MDk3",
"avatar_url": "https://avatars.githubusercontent.com/u/20878097?v=4",
"gravatar_id": "",
"url": "https://api.github.com/users/iurly",
"html_url": "https://github.com/iurly",
"followers_url": "https://api.github.com/users/iurly/follow... | [] | closed | false | null | [] | null | [
"> I don't have the faintest idea of how query objects work under the hood, so I don't know if there's a way of extending some class to override this kind of behavior.\r\n\r\nI'd suggest you take a deep dive into the code if you're considering implementing this kind of logic with peewee.\r\n\r\nSQLite has a neat fe... | 2018-07-29T22:06:27 | 2018-07-30T14:29:18 | 2018-07-30T14:29:18 | CONTRIBUTOR | null | Hi,
I'm building some data logging application for which I'd like to use SQLite.
Data comes from a limited number of data sources, which could be considered as separate subdomains, so it would make sense to have a single database for each data source (each with the same schema).
Given the nature of the data, it woul... | {
"url": "https://api.github.com/repos/coleifer/peewee/issues/1685/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/1685/timeline | null | completed | null | null |
https://api.github.com/repos/coleifer/peewee/issues/1684 | https://api.github.com/repos/coleifer/peewee | https://api.github.com/repos/coleifer/peewee/issues/1684/labels{/name} | https://api.github.com/repos/coleifer/peewee/issues/1684/comments | https://api.github.com/repos/coleifer/peewee/issues/1684/events | https://github.com/coleifer/peewee/issues/1684 | 345,126,806 | MDU6SXNzdWUzNDUxMjY4MDY= | 1,684 | Subquery with joins on complex queries | {
"login": "fbenderick",
"id": 24902987,
"node_id": "MDQ6VXNlcjI0OTAyOTg3",
"avatar_url": "https://avatars.githubusercontent.com/u/24902987?v=4",
"gravatar_id": "",
"url": "https://api.github.com/users/fbenderick",
"html_url": "https://github.com/fbenderick",
"followers_url": "https://api.github.com/use... | [] | closed | false | null | [] | null | [
"Is there a reason you're using a subquery? It seems to me that this is totally unnecessary. You can just write this, which is equivalent to what you have:\r\n\r\n```python\r\nquery = (Issue\r\n .select(Issue, Magazine, Post, User, Stage)\r\n .join_from(Issue, Magazine)\r\n .join_from(Issue, Po... | 2018-07-27T07:53:08 | 2018-07-27T11:59:03 | 2018-07-27T11:59:02 | NONE | null | Hello, I'm trying to figure out, how to use subquery with joins. Here's data shape I'm trying to get:
```python
# Issue object
{
"id": 1,
"magazine": { "id": 1, ... },
"posts": [ # <= should be sorted by post.stage.sort
{
"id": 1,
"user": { "id": 1, ... },
... | {
"url": "https://api.github.com/repos/coleifer/peewee/issues/1684/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/1684/timeline | null | completed | null | null |
https://api.github.com/repos/coleifer/peewee/issues/1683 | https://api.github.com/repos/coleifer/peewee | https://api.github.com/repos/coleifer/peewee/issues/1683/labels{/name} | https://api.github.com/repos/coleifer/peewee/issues/1683/comments | https://api.github.com/repos/coleifer/peewee/issues/1683/events | https://github.com/coleifer/peewee/issues/1683 | 343,657,795 | MDU6SXNzdWUzNDM2NTc3OTU= | 1,683 | Updated postgres_ext's HStoreFields are not "dirty" | {
"login": "droserasprout",
"id": 10263434,
"node_id": "MDQ6VXNlcjEwMjYzNDM0",
"avatar_url": "https://avatars.githubusercontent.com/u/10263434?v=4",
"gravatar_id": "",
"url": "https://api.github.com/users/droserasprout",
"html_url": "https://github.com/droserasprout",
"followers_url": "https://api.githu... | [] | closed | false | null | [] | null | [
"Yea, the way peewee detects \"dirty\" fields is based on observing `__set__` on a descriptor, so it's not perfect in the sense that it actually keeps track of initial state and does a comparison at `save()`-time. You are free to subclass and extend the `Model` behavior to track state more thoroughly, but at presen... | 2018-07-23T14:30:05 | 2018-07-23T15:14:33 | 2018-07-23T15:13:44 | NONE | null | Reproduced with peewee-3.6.4:
```
from datetime import datetime
import sys, os
import db_models as beo
from playhouse.shortcuts import model_to_dict, update_model_from_dict
from playhouse.postgres_ext import *
import config
from datetime import datetime
from playhouse.postgres_ext import *
import psycopg2... | {
"url": "https://api.github.com/repos/coleifer/peewee/issues/1683/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/1683/timeline | null | completed | null | null |
https://api.github.com/repos/coleifer/peewee/issues/1682 | https://api.github.com/repos/coleifer/peewee | https://api.github.com/repos/coleifer/peewee/issues/1682/labels{/name} | https://api.github.com/repos/coleifer/peewee/issues/1682/comments | https://api.github.com/repos/coleifer/peewee/issues/1682/events | https://github.com/coleifer/peewee/pull/1682 | 343,425,236 | MDExOlB1bGxSZXF1ZXN0MjAzMDY4NDc2 | 1,682 | Update to Maintain Compatibility | {
"login": "jseagrave21",
"id": 40873301,
"node_id": "MDQ6VXNlcjQwODczMzAx",
"avatar_url": "https://avatars.githubusercontent.com/u/40873301?v=4",
"gravatar_id": "",
"url": "https://api.github.com/users/jseagrave21",
"html_url": "https://github.com/jseagrave21",
"followers_url": "https://api.github.com/... | [] | closed | false | null | [] | null | [
"If you're storing a byte array -- i.e., *not* UTF8-encoded text -- you should be using a `BlobField`.",
"@coleifer Thank you for your help! I've almost got it working with 'Blobfield'. "
] | 2018-07-22T17:50:24 | 2018-08-10T17:33:20 | 2018-07-23T15:18:38 | NONE | null | This change allows compatibility between projects formerly using peewee2.6.2.
When trying to use the latest version of peewee we get the following errors relating to `_StringField`: "Could not get key 'utf-8' codec can't decode byte 0xb4 in position 3" or similar.
Making this change allows easy compatibility.
... | {
"url": "https://api.github.com/repos/coleifer/peewee/issues/1682/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/1682/timeline | null | null | false | {
"url": "https://api.github.com/repos/coleifer/peewee/pulls/1682",
"html_url": "https://github.com/coleifer/peewee/pull/1682",
"diff_url": "https://github.com/coleifer/peewee/pull/1682.diff",
"patch_url": "https://github.com/coleifer/peewee/pull/1682.patch",
"merged_at": null
} |
https://api.github.com/repos/coleifer/peewee/issues/1681 | https://api.github.com/repos/coleifer/peewee | https://api.github.com/repos/coleifer/peewee/issues/1681/labels{/name} | https://api.github.com/repos/coleifer/peewee/issues/1681/comments | https://api.github.com/repos/coleifer/peewee/issues/1681/events | https://github.com/coleifer/peewee/issues/1681 | 343,392,947 | MDU6SXNzdWUzNDMzOTI5NDc= | 1,681 | One sequence for all primary keys in all tables of database | {
"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 | [
"Your best bet is to simply add the following before you create the tables:\r\n\r\n```python\r\n\r\ndef setup_schema():\r\n with db:\r\n db.execute_sql('create sequence if not exists \"sequence_name\" start with 10000')\r\n db.create_tables([Foo, Bar, Baz, etc])\r\n```",
"You can always do someth... | 2018-07-22T09:53:38 | 2018-07-24T13:28:20 | 2018-07-22T14:21:36 | NONE | null | Hi!
This is very specific requirement: create a one sequence for all primary keys in all tables of database with start from 10000. It's simple for cli but is it possible to do in schema creation process?
Thanks! | {
"url": "https://api.github.com/repos/coleifer/peewee/issues/1681/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/1681/timeline | null | completed | null | null |
https://api.github.com/repos/coleifer/peewee/issues/1680 | https://api.github.com/repos/coleifer/peewee | https://api.github.com/repos/coleifer/peewee/issues/1680/labels{/name} | https://api.github.com/repos/coleifer/peewee/issues/1680/comments | https://api.github.com/repos/coleifer/peewee/issues/1680/events | https://github.com/coleifer/peewee/issues/1680 | 343,390,960 | MDU6SXNzdWUzNDMzOTA5NjA= | 1,680 | Create index with operator classes | {
"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 | [
"For now the easiest way may be:\r\n\r\n```python\r\nclass Taxonomy(Model):\r\n name = CharField()\r\n # ...\r\n\r\n class Meta:\r\n indexes = [\r\n SQL('create index on taxonomies_names (lower(name) varchar_pattern_ops...'),\r\n ]\r\n```\r\n\r\nAlternatively, you can:\r\n\r\n```py... | 2018-07-22T09:17:33 | 2018-07-22T14:19:07 | 2018-07-22T14:19:07 | NONE | null | Hi there!
Is it possible to create an index like this:
```sql
create index on taxonomies_names (lower(name) varchar_pattern_ops, name_class)
where name_class = 'scientific name';
```
Thanks! | {
"url": "https://api.github.com/repos/coleifer/peewee/issues/1680/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/1680/timeline | null | completed | null | null |
https://api.github.com/repos/coleifer/peewee/issues/1679 | https://api.github.com/repos/coleifer/peewee | https://api.github.com/repos/coleifer/peewee/issues/1679/labels{/name} | https://api.github.com/repos/coleifer/peewee/issues/1679/comments | https://api.github.com/repos/coleifer/peewee/issues/1679/events | https://github.com/coleifer/peewee/issues/1679 | 342,991,054 | MDU6SXNzdWUzNDI5OTEwNTQ= | 1,679 | Query do not support "%s as something" | {
"login": "m358807551",
"id": 14256423,
"node_id": "MDQ6VXNlcjE0MjU2NDIz",
"avatar_url": "https://avatars.githubusercontent.com/u/14256423?v=4",
"gravatar_id": "",
"url": "https://api.github.com/users/m358807551",
"html_url": "https://github.com/m358807551",
"followers_url": "https://api.github.com/use... | [] | closed | false | null | [] | null | [
"Is there a reason you are using \".raw()\"? You could very easily write your second example as:\r\n\r\n```python\r\nPerson.select(Person.name, Value('aaa').alias('field1')).where(Person.id == 1)\r\n```\r\n\r\nI'm not sure why `%s as field1` wouldn't work. What error are you receiving? What database are you using?"... | 2018-07-20T06:42:36 | 2018-07-23T02:06:56 | 2018-07-20T15:17:28 | NONE | null | worked:
`PersonModel.raw("select name from person where id=%s", (1,))`
not worked:
`PersonModel.raw("select name, %s as field1 from person where id=%s", ("aaa",1))` | {
"url": "https://api.github.com/repos/coleifer/peewee/issues/1679/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/1679/timeline | null | completed | null | null |
https://api.github.com/repos/coleifer/peewee/issues/1678 | https://api.github.com/repos/coleifer/peewee | https://api.github.com/repos/coleifer/peewee/issues/1678/labels{/name} | https://api.github.com/repos/coleifer/peewee/issues/1678/comments | https://api.github.com/repos/coleifer/peewee/issues/1678/events | https://github.com/coleifer/peewee/issues/1678 | 342,614,575 | MDU6SXNzdWUzNDI2MTQ1NzU= | 1,678 | How can I explicitly call close on all stale connections in the pool (including the ones in _in_use) | {
"login": "confessin",
"id": 238588,
"node_id": "MDQ6VXNlcjIzODU4OA==",
"avatar_url": "https://avatars.githubusercontent.com/u/238588?v=4",
"gravatar_id": "",
"url": "https://api.github.com/users/confessin",
"html_url": "https://github.com/confessin",
"followers_url": "https://api.github.com/users/conf... | [] | closed | false | null | [] | null | [
"> Although we have written a decorator to explicitly call close on db connections after each call. There are instances when it remains open.\r\n\r\nThis sounds like you have a bug in your code or there is some problem in your environment. I'd strongly suggest you look into where and how you're leaking database con... | 2018-07-19T07:43:39 | 2018-08-17T20:24:18 | 2018-07-24T20:58:49 | NONE | null | We are using Pooled Mysql connections on appengine with peewee and flask.
Although we have written a decorator to explicitly call close on db connections after each call. There are instances when it remains open. As a result we are hitting the max connection exceeded error.
Here is the decorator
def catchdb(db... | {
"url": "https://api.github.com/repos/coleifer/peewee/issues/1678/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/1678/timeline | null | completed | null | null |
https://api.github.com/repos/coleifer/peewee/issues/1677 | https://api.github.com/repos/coleifer/peewee | https://api.github.com/repos/coleifer/peewee/issues/1677/labels{/name} | https://api.github.com/repos/coleifer/peewee/issues/1677/comments | https://api.github.com/repos/coleifer/peewee/issues/1677/events | https://github.com/coleifer/peewee/issues/1677 | 342,408,236 | MDU6SXNzdWUzNDI0MDgyMzY= | 1,677 | CentOS 7 install issues | {
"login": "dmlb2000",
"id": 1504962,
"node_id": "MDQ6VXNlcjE1MDQ5NjI=",
"avatar_url": "https://avatars.githubusercontent.com/u/1504962?v=4",
"gravatar_id": "",
"url": "https://api.github.com/users/dmlb2000",
"html_url": "https://github.com/dmlb2000",
"followers_url": "https://api.github.com/users/dmlb2... | [] | closed | false | null | [] | null | [
"The `estimatedRows` struct field was added in SQLite 3.8.2. Apparently CentOS 7 ships with some old-as-fuck SQLite and that's causing the problem.",
"I know lots of folks like to ship an embedded sqlite with the software? maybe that's an option?",
"Unfortunately, Peewee's SQLite C extension utilizes the `estim... | 2018-07-18T16:44:10 | 2018-07-18T16:51:45 | 2018-07-18T16:51:45 | NONE | null | I'm trying to install peewee using pip on CentOS and version 3.6.1 is having issues on that platform.
Steps to reproduce:
```
docker run -it --rm centos:7 /bin/bash -l
yum -y install centos-release-scl
yum -y install rh-python36 rh-python36-python-devel rh-python36-python-pip sqlite-devel gcc glibc-devel sqlit... | {
"url": "https://api.github.com/repos/coleifer/peewee/issues/1677/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/1677/timeline | null | completed | null | null |
https://api.github.com/repos/coleifer/peewee/issues/1676 | https://api.github.com/repos/coleifer/peewee | https://api.github.com/repos/coleifer/peewee/issues/1676/labels{/name} | https://api.github.com/repos/coleifer/peewee/issues/1676/comments | https://api.github.com/repos/coleifer/peewee/issues/1676/events | https://github.com/coleifer/peewee/issues/1676 | 342,250,891 | MDU6SXNzdWUzNDIyNTA4OTE= | 1,676 | Failing to install Peewee with Pip | {
"login": "lmm-git",
"id": 2118953,
"node_id": "MDQ6VXNlcjIxMTg5NTM=",
"avatar_url": "https://avatars.githubusercontent.com/u/2118953?v=4",
"gravatar_id": "",
"url": "https://api.github.com/users/lmm-git",
"html_url": "https://github.com/lmm-git",
"followers_url": "https://api.github.com/users/lmm-git/... | [] | closed | false | null | [] | null | [
"The same issue here, but on different system. I think it's due to the https://github.com/coleifer/peewee/blob/master/setup.py#L12, which's now always `True`, and native extensions are always built. @coleifer can it be made tweakable?",
"The same isssue i guees w/ CentOS 7.5 and python 2.7\r\n\r\n```\r\nCollectin... | 2018-07-18T09:37:25 | 2023-03-21T15:21:13 | 2018-07-18T15:25:02 | NONE | null | Hi,
currently I am having a lot of trouble installing Peewee. When executing `pip3 install -r requirements.txt` on a Ubuntu 16.04 LTS I get
```bash
Collecting peewee~=3.6.1
Using cached https://files.pythonhosted.org/packages/2c/08/b059dd7cc0fa6ae45af86f36660fb0838463390d5626d37b8595e54efd9e/peewee-3.6.1.tar.... | {
"url": "https://api.github.com/repos/coleifer/peewee/issues/1676/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/1676/timeline | null | completed | null | null |
https://api.github.com/repos/coleifer/peewee/issues/1675 | https://api.github.com/repos/coleifer/peewee | https://api.github.com/repos/coleifer/peewee/issues/1675/labels{/name} | https://api.github.com/repos/coleifer/peewee/issues/1675/comments | https://api.github.com/repos/coleifer/peewee/issues/1675/events | https://github.com/coleifer/peewee/issues/1675 | 341,934,706 | MDU6SXNzdWUzNDE5MzQ3MDY= | 1,675 | Why read_slave extension is deleted in Peewee 3.x?? | {
"login": "zjyExcelsior",
"id": 6839922,
"node_id": "MDQ6VXNlcjY4Mzk5MjI=",
"avatar_url": "https://avatars.githubusercontent.com/u/6839922?v=4",
"gravatar_id": "",
"url": "https://api.github.com/users/zjyExcelsior",
"html_url": "https://github.com/zjyExcelsior",
"followers_url": "https://api.github.com... | [] | closed | false | null | [] | null | [
"It is removed because I am no longer interested in maintaining it. Feel free to take the 2.x code and modify it and release it as a separate library."
] | 2018-07-17T14:05:54 | 2018-07-17T14:15:46 | 2018-07-17T14:15:46 | NONE | null | I want to know why read_slave is deleted in Peewee 3.x?what's the reason for doing that? I am recently using Peewee 2.x | {
"url": "https://api.github.com/repos/coleifer/peewee/issues/1675/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/1675/timeline | null | completed | null | null |
https://api.github.com/repos/coleifer/peewee/issues/1674 | https://api.github.com/repos/coleifer/peewee | https://api.github.com/repos/coleifer/peewee/issues/1674/labels{/name} | https://api.github.com/repos/coleifer/peewee/issues/1674/comments | https://api.github.com/repos/coleifer/peewee/issues/1674/events | https://github.com/coleifer/peewee/issues/1674 | 341,912,892 | MDU6SXNzdWUzNDE5MTI4OTI= | 1,674 | Embed SSH tunnel usage and reuse existing connections | {
"login": "imakiro",
"id": 2473976,
"node_id": "MDQ6VXNlcjI0NzM5NzY=",
"avatar_url": "https://avatars.githubusercontent.com/u/2473976?v=4",
"gravatar_id": "",
"url": "https://api.github.com/users/imakiro",
"html_url": "https://github.com/imakiro",
"followers_url": "https://api.github.com/users/imakiro/... | [] | closed | false | null | [] | null | [
"This is way outside the scope of Peewee. Depending on the database driver you are using, you may want to discuss with them, but I doubt you'll have any luck there either. Why you would ever want to pipe a db connection over SSH is a whole other question.\r\n\r\nYou can use the connection pool, which keeps connecti... | 2018-07-17T13:11:15 | 2020-05-14T21:53:04 | 2018-07-17T14:14:45 | NONE | null | Because of environment constraints, and peewee lazy loading of DB properties, when using an SSH tunnel library like
`from sshtunnel import SSHTunnelForwarder `
I am getting rejected by the SSH server because it establishes a connection every request.
It's really hard to integrate Peewee with the SSH tunnel witho... | {
"url": "https://api.github.com/repos/coleifer/peewee/issues/1674/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/1674/timeline | null | completed | null | null |
https://api.github.com/repos/coleifer/peewee/issues/1673 | https://api.github.com/repos/coleifer/peewee | https://api.github.com/repos/coleifer/peewee/issues/1673/labels{/name} | https://api.github.com/repos/coleifer/peewee/issues/1673/comments | https://api.github.com/repos/coleifer/peewee/issues/1673/events | https://github.com/coleifer/peewee/issues/1673 | 341,355,504 | MDU6SXNzdWUzNDEzNTU1MDQ= | 1,673 | AttributeError: 'NoneType' object has no attribute 'safe_create_index' | {
"login": "gurland",
"id": 30530987,
"node_id": "MDQ6VXNlcjMwNTMwOTg3",
"avatar_url": "https://avatars.githubusercontent.com/u/30530987?v=4",
"gravatar_id": "",
"url": "https://api.github.com/users/gurland",
"html_url": "https://github.com/gurland",
"followers_url": "https://api.github.com/users/gurlan... | [] | closed | false | null | [] | null | [
"Your model class does not appear to have declared a database:\r\n\r\n```python\r\nclass MyModel(Model):\r\n class Meta:\r\n database = ... # You are missing this.\r\n```",
"> Your model class does not appear to have declared a database:\r\n> \r\n> ```python\r\n> class MyModel(Model):\r\n> class Me... | 2018-07-15T21:54:07 | 2021-08-23T07:43:05 | 2018-07-15T21:55:15 | NONE | null | I'm using `SqliteExtDatabase`. When I'm trying to create tables next error raises:
```Traceback (most recent call last):
File "/home/gurland/Projects/mathbot/bot.py", line 3, in <module>
from models import SubscriptionChat, Subscription, IUMCourse
File "/home/gurland/Projects/mathbot/models.py", line 119,... | {
"url": "https://api.github.com/repos/coleifer/peewee/issues/1673/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/1673/timeline | null | completed | null | null |
https://api.github.com/repos/coleifer/peewee/issues/1672 | https://api.github.com/repos/coleifer/peewee | https://api.github.com/repos/coleifer/peewee/issues/1672/labels{/name} | https://api.github.com/repos/coleifer/peewee/issues/1672/comments | https://api.github.com/repos/coleifer/peewee/issues/1672/events | https://github.com/coleifer/peewee/issues/1672 | 341,349,190 | MDU6SXNzdWUzNDEzNDkxOTA= | 1,672 | TimestampField, Microseconds (Precision=10**6) and Postgres | {
"login": "yakirmar",
"id": 3908237,
"node_id": "MDQ6VXNlcjM5MDgyMzc=",
"avatar_url": "https://avatars.githubusercontent.com/u/3908237?v=4",
"gravatar_id": "",
"url": "https://api.github.com/users/yakirmar",
"html_url": "https://github.com/yakirmar",
"followers_url": "https://api.github.com/users/yakir... | [] | closed | false | null | [] | null | [
"Whoops, oversight on my part. I need to change the underlying field type to `BigIntegerField`. Will have a patch up shortly.",
"3b89d3af132d06f986642384ffbdadfcffbfa563"
] | 2018-07-15T20:18:07 | 2018-07-15T20:32:16 | 2018-07-15T20:32:15 | NONE | null | Hi,
I created a Postgres DB with "PostgresqlDatabase" object and the field was defined like this:
`timestamp = TimestampField(resolution=10**6, index=True)`
Everything works great when I did some tests with SQLite but when I moved to Postgres, it created an integer field in the DB and the numbers that I want to in... | {
"url": "https://api.github.com/repos/coleifer/peewee/issues/1672/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/1672/timeline | null | completed | null | null |
https://api.github.com/repos/coleifer/peewee/issues/1671 | https://api.github.com/repos/coleifer/peewee | https://api.github.com/repos/coleifer/peewee/issues/1671/labels{/name} | https://api.github.com/repos/coleifer/peewee/issues/1671/comments | https://api.github.com/repos/coleifer/peewee/issues/1671/events | https://github.com/coleifer/peewee/issues/1671 | 341,280,203 | MDU6SXNzdWUzNDEyODAyMDM= | 1,671 | percent sign in column name breaks sql | {
"login": "NCarson",
"id": 17229021,
"node_id": "MDQ6VXNlcjE3MjI5MDIx",
"avatar_url": "https://avatars.githubusercontent.com/u/17229021?v=4",
"gravatar_id": "",
"url": "https://api.github.com/users/NCarson",
"html_url": "https://github.com/NCarson",
"followers_url": "https://api.github.com/users/NCarso... | [] | closed | false | null | [] | null | [
"> I have seen the other closed issue with modulo and percents and understand how psycopg2 binds params.\r\n\r\nMy guess is that the problem is with the way the parameters are interpolated into the SQL string. If you understand this, then it is hopefully clear why this column name was problematic.\r\n\r\nI agree th... | 2018-07-15T00:12:25 | 2018-07-15T02:24:36 | 2018-07-15T02:23:33 | NONE | null | I had a column named "win%" in one of my tables in Postgresql. When I tried to execute the query I got this error (last of the call stack):
```
File "/usr/local/lib/python3.5/dist-packages/peewee-3.5.2-py3.5-linux-x86_64.egg/peewee.py", line 2639, in execute_sql
cursor.execute(sql, params or ())
IndexError: lis... | {
"url": "https://api.github.com/repos/coleifer/peewee/issues/1671/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/1671/timeline | null | completed | null | null |
https://api.github.com/repos/coleifer/peewee/issues/1670 | https://api.github.com/repos/coleifer/peewee | https://api.github.com/repos/coleifer/peewee/issues/1670/labels{/name} | https://api.github.com/repos/coleifer/peewee/issues/1670/comments | https://api.github.com/repos/coleifer/peewee/issues/1670/events | https://github.com/coleifer/peewee/pull/1670 | 341,275,555 | MDExOlB1bGxSZXF1ZXN0MjAxNDcxODY3 | 1,670 | Added support for introspecting views for Postgresql. | {
"login": "NCarson",
"id": 17229021,
"node_id": "MDQ6VXNlcjE3MjI5MDIx",
"avatar_url": "https://avatars.githubusercontent.com/u/17229021?v=4",
"gravatar_id": "",
"url": "https://api.github.com/users/NCarson",
"html_url": "https://github.com/NCarson",
"followers_url": "https://api.github.com/users/NCarso... | [] | closed | false | null | [] | null | [
"I'm going to pass on this for now, but may reconsider adding this functionality (if it can be added cleanly for all supported database implementations). Thank you -- I may end up implementing this at some point and your code will certainly come in handy.",
"Also, for what it's worth, if you want to increase the ... | 2018-07-14T22:32:28 | 2018-07-17T19:34:10 | 2018-07-15T00:06:14 | NONE | null | A command line switch will introspect views instead of tables in pwiz.py. A
get_views function was added for Postgres and NotImplemented version for the
interface. It would probably be more convenient for users to do both tables and
views at once, but this was an extremely simple way to do it. I did not add it for
... | {
"url": "https://api.github.com/repos/coleifer/peewee/issues/1670/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/1670/timeline | null | null | false | {
"url": "https://api.github.com/repos/coleifer/peewee/pulls/1670",
"html_url": "https://github.com/coleifer/peewee/pull/1670",
"diff_url": "https://github.com/coleifer/peewee/pull/1670.diff",
"patch_url": "https://github.com/coleifer/peewee/pull/1670.patch",
"merged_at": null
} |
https://api.github.com/repos/coleifer/peewee/issues/1669 | https://api.github.com/repos/coleifer/peewee | https://api.github.com/repos/coleifer/peewee/issues/1669/labels{/name} | https://api.github.com/repos/coleifer/peewee/issues/1669/comments | https://api.github.com/repos/coleifer/peewee/issues/1669/events | https://github.com/coleifer/peewee/pull/1669 | 341,254,531 | MDExOlB1bGxSZXF1ZXN0MjAxNDYyNDA0 | 1,669 | Fix compatibility with Python 3.7 | {
"login": "felixonmars",
"id": 1006477,
"node_id": "MDQ6VXNlcjEwMDY0Nzc=",
"avatar_url": "https://avatars.githubusercontent.com/u/1006477?v=4",
"gravatar_id": "",
"url": "https://api.github.com/users/felixonmars",
"html_url": "https://github.com/felixonmars",
"followers_url": "https://api.github.com/us... | [] | closed | false | null | [] | null | [
"Thanks. So you can't raise `StopIteration` inside a generator according to [this PEP](https://www.python.org/dev/peps/pep-0479/)... weird. I'm guessing this is some consequence from the asyncio abomination. \r\n\r\n> Currently, StopIteration raised accidentally inside a generator function will be interpreted as th... | 2018-07-14T17:59:52 | 2018-07-15T05:31:39 | 2018-07-15T00:04:10 | CONTRIBUTOR | null | Fixes many test failures like below:
```
======================================================================
ERROR: test_iterator (tests.models.TestModelAPIs)
----------------------------------------------------------------------
Traceback (most recent call last):
File "/build/python-peewee/src/peewee-3.5.... | {
"url": "https://api.github.com/repos/coleifer/peewee/issues/1669/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/1669/timeline | null | null | false | {
"url": "https://api.github.com/repos/coleifer/peewee/pulls/1669",
"html_url": "https://github.com/coleifer/peewee/pull/1669",
"diff_url": "https://github.com/coleifer/peewee/pull/1669.diff",
"patch_url": "https://github.com/coleifer/peewee/pull/1669.patch",
"merged_at": "2018-07-15T00:04:10"
} |
https://api.github.com/repos/coleifer/peewee/issues/1668 | https://api.github.com/repos/coleifer/peewee | https://api.github.com/repos/coleifer/peewee/issues/1668/labels{/name} | https://api.github.com/repos/coleifer/peewee/issues/1668/comments | https://api.github.com/repos/coleifer/peewee/issues/1668/events | https://github.com/coleifer/peewee/issues/1668 | 341,244,228 | MDU6SXNzdWUzNDEyNDQyMjg= | 1,668 | peewee error message | {
"login": "TechComet",
"id": 5288136,
"node_id": "MDQ6VXNlcjUyODgxMzY=",
"avatar_url": "https://avatars.githubusercontent.com/u/5288136?v=4",
"gravatar_id": "",
"url": "https://api.github.com/users/TechComet",
"html_url": "https://github.com/TechComet",
"followers_url": "https://api.github.com/users/Te... | [] | closed | false | null | [] | null | [
"http://docs.peewee-orm.com/en/latest/peewee/contributing.html#bugs\r\n\r\nI have literally no clue what you are asking.",
"```\r\ntry:\r\n\ttable_name.function_name(...)\r\nexcept IntegrityError as e:\r\n\treturn e\r\n```",
"You can do this:\r\n\r\n```python\r\ntry:\r\n SomeModel.function_name(...)\r\nexcep... | 2018-07-14T15:28:36 | 2018-07-14T23:51:29 | 2018-07-14T15:47:07 | NONE | null | Hi,
How get error message | {
"url": "https://api.github.com/repos/coleifer/peewee/issues/1668/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/1668/timeline | null | completed | null | null |
https://api.github.com/repos/coleifer/peewee/issues/1667 | https://api.github.com/repos/coleifer/peewee | https://api.github.com/repos/coleifer/peewee/issues/1667/labels{/name} | https://api.github.com/repos/coleifer/peewee/issues/1667/comments | https://api.github.com/repos/coleifer/peewee/issues/1667/events | https://github.com/coleifer/peewee/issues/1667 | 340,980,268 | MDU6SXNzdWUzNDA5ODAyNjg= | 1,667 | One-to-one relationships returned as ModelSelect | {
"login": "astrilchuk",
"id": 1706688,
"node_id": "MDQ6VXNlcjE3MDY2ODg=",
"avatar_url": "https://avatars.githubusercontent.com/u/1706688?v=4",
"gravatar_id": "",
"url": "https://api.github.com/users/astrilchuk",
"html_url": "https://github.com/astrilchuk",
"followers_url": "https://api.github.com/users... | [] | closed | false | null | [] | null | [
"If you want to do something like that, why not just add a property?\r\n\r\n```python\r\n\r\nclass Person(Model):\r\n name = TextField()\r\n \r\n @property\r\n def account(self):\r\n return self.accounts.get()\r\n\r\n @account.setter\r\n def account(self, account_obj):\r\n account_obj.... | 2018-07-13T11:15:09 | 2021-06-24T13:08:16 | 2018-07-13T15:02:34 | NONE | null | Hi,
I have a number of one-to-one relationships in my schema. Each related table has a foreign key/primary key back to it's "parent" table. The one-to-one tables are selected in the SQL but "parent" model's backref properties are instances of ModelSelect.
I'm happy to provide more information if required.
Th... | {
"url": "https://api.github.com/repos/coleifer/peewee/issues/1667/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/1667/timeline | null | completed | null | null |
https://api.github.com/repos/coleifer/peewee/issues/1666 | https://api.github.com/repos/coleifer/peewee | https://api.github.com/repos/coleifer/peewee/issues/1666/labels{/name} | https://api.github.com/repos/coleifer/peewee/issues/1666/comments | https://api.github.com/repos/coleifer/peewee/issues/1666/events | https://github.com/coleifer/peewee/issues/1666 | 340,950,944 | MDU6SXNzdWUzNDA5NTA5NDQ= | 1,666 | peewee OperationalError: no such function: json_set | {
"login": "Quo00",
"id": 35671851,
"node_id": "MDQ6VXNlcjM1NjcxODUx",
"avatar_url": "https://avatars.githubusercontent.com/u/35671851?v=4",
"gravatar_id": "",
"url": "https://api.github.com/users/Quo00",
"html_url": "https://github.com/Quo00",
"followers_url": "https://api.github.com/users/Quo00/follow... | [] | closed | false | null | [] | null | [
"You need SQLite compiled with the `json1` extension. Apparently the SQLite you're using does not have it.\r\n\r\n* https://sqlite.org/json1.html\r\n* https://www.sqlite.org/compile.html#_options_to_enable_features_normally_turned_off",
"Hello @coleifer , I've tried to compile my own sqlite3.dll but it's still no... | 2018-07-13T09:40:01 | 2018-07-18T23:11:18 | 2018-07-13T14:36:39 | NONE | null | Hello,
Peewee version is 3.5.2.
I'm trying to update a JSON value in-place and am following the documentation. I'm using an SqliteDatabase in memory.
I'm following the documentation very closesly:
```
>>> from playhouse.sqlite_ext import *
>>> db = SqliteExtDatabase(':memory:')
>>> class KV(Model):
... ... | {
"url": "https://api.github.com/repos/coleifer/peewee/issues/1666/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/1666/timeline | null | completed | null | null |
https://api.github.com/repos/coleifer/peewee/issues/1665 | https://api.github.com/repos/coleifer/peewee | https://api.github.com/repos/coleifer/peewee/issues/1665/labels{/name} | https://api.github.com/repos/coleifer/peewee/issues/1665/comments | https://api.github.com/repos/coleifer/peewee/issues/1665/events | https://github.com/coleifer/peewee/pull/1665 | 340,308,560 | MDExOlB1bGxSZXF1ZXN0MjAwNzUxNjM1 | 1,665 | Improve imports in shortcuts extension | {
"login": "gustavi",
"id": 2736557,
"node_id": "MDQ6VXNlcjI3MzY1NTc=",
"avatar_url": "https://avatars.githubusercontent.com/u/2736557?v=4",
"gravatar_id": "",
"url": "https://api.github.com/users/gustavi",
"html_url": "https://github.com/gustavi",
"followers_url": "https://api.github.com/users/gustavi/... | [] | closed | false | null | [] | null | [
"Peewee's main module `peewee.py` defines a module-level `__all__` which controls what is exported when you `import *`. Peewee uses the convention of `import *` internally, so I am going to pass on this change, even though I do understand your reasoning behind the suggestion."
] | 2018-07-11T16:04:58 | 2018-07-11T16:09:14 | 2018-07-11T16:09:14 | NONE | null | Improve the imports in this file.
First statement use wildcard import (and this is bad) and second import something already imported.
Import only required objects is the good way to do. | {
"url": "https://api.github.com/repos/coleifer/peewee/issues/1665/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/1665/timeline | null | null | false | {
"url": "https://api.github.com/repos/coleifer/peewee/pulls/1665",
"html_url": "https://github.com/coleifer/peewee/pull/1665",
"diff_url": "https://github.com/coleifer/peewee/pull/1665.diff",
"patch_url": "https://github.com/coleifer/peewee/pull/1665.patch",
"merged_at": null
} |
https://api.github.com/repos/coleifer/peewee/issues/1664 | https://api.github.com/repos/coleifer/peewee | https://api.github.com/repos/coleifer/peewee/issues/1664/labels{/name} | https://api.github.com/repos/coleifer/peewee/issues/1664/comments | https://api.github.com/repos/coleifer/peewee/issues/1664/events | https://github.com/coleifer/peewee/issues/1664 | 339,923,946 | MDU6SXNzdWUzMzk5MjM5NDY= | 1,664 | Feature: a possibility to check whether Model matches Schema | {
"login": "pauleikis",
"id": 4095643,
"node_id": "MDQ6VXNlcjQwOTU2NDM=",
"avatar_url": "https://avatars.githubusercontent.com/u/4095643?v=4",
"gravatar_id": "",
"url": "https://api.github.com/users/pauleikis",
"html_url": "https://github.com/pauleikis",
"followers_url": "https://api.github.com/users/pa... | [] | closed | false | null | [] | null | [
"I do not plan on implementing such an API, but the fundamentals are all there already.\r\n\r\nYou can use `database.get_tables()` and `database.get_columns()` and check for differences with `Model._meta.fields`. You can also use the higher-level `reflection` APIs.\r\n\r\n* http://docs.peewee-orm.com/en/latest/peew... | 2018-07-10T16:45:53 | 2018-07-11T07:46:59 | 2018-07-10T19:08:56 | NONE | null | I have some semi permanent data which I would be fine with losing when I need to update Schema.
It would be nice to have a feature to check whether Model changed and recreate table if needed. I would imagine API and use case like this
```python
for model in model_list:
if not db.validate_tables(model):
... | {
"url": "https://api.github.com/repos/coleifer/peewee/issues/1664/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/1664/timeline | null | completed | null | null |
https://api.github.com/repos/coleifer/peewee/issues/1663 | https://api.github.com/repos/coleifer/peewee | https://api.github.com/repos/coleifer/peewee/issues/1663/labels{/name} | https://api.github.com/repos/coleifer/peewee/issues/1663/comments | https://api.github.com/repos/coleifer/peewee/issues/1663/events | https://github.com/coleifer/peewee/issues/1663 | 339,123,245 | MDU6SXNzdWUzMzkxMjMyNDU= | 1,663 | TypeError: get_sort_key() missing 1 required positional argument: 'ctx' | {
"login": "mindojo-victor",
"id": 17159503,
"node_id": "MDQ6VXNlcjE3MTU5NTAz",
"avatar_url": "https://avatars.githubusercontent.com/u/17159503?v=4",
"gravatar_id": "",
"url": "https://api.github.com/users/mindojo-victor",
"html_url": "https://github.com/mindojo-victor",
"followers_url": "https://api.gi... | [] | closed | false | null | [] | null | [
"peewee==3.5.2\r\nPython 3.6.5",
"Oh, the model contained a bad attribute:\r\n```python\r\n assigned_at = peewee.DateTimeField\r\n```\r\n2.10.2 detected this, while 3.5.2 showed this error.\r\nAfter I added the parens, it worked.\r\n\r\nShould I close this issue?",
"> 2.10.2 detected this, while 3.5.2 showed... | 2018-07-07T06:55:16 | 2020-10-20T20:11:54 | 2018-07-09T14:59:24 | NONE | null | What this might mean? I have no idea how to fix this. Or is it a bug in the `peewee` code?
```python
File "/Users/Vic/projects/brain2/brain/utils/reports/bi.py", line 449, in sync_author_tasks
BIAuthorTask.insert_many(author_tasks).on_conflict_replace().execute()
File "/Users/Vic/projects/brain2/venv/lib/py... | {
"url": "https://api.github.com/repos/coleifer/peewee/issues/1663/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/1663/timeline | null | completed | null | null |
https://api.github.com/repos/coleifer/peewee/issues/1662 | https://api.github.com/repos/coleifer/peewee | https://api.github.com/repos/coleifer/peewee/issues/1662/labels{/name} | https://api.github.com/repos/coleifer/peewee/issues/1662/comments | https://api.github.com/repos/coleifer/peewee/issues/1662/events | https://github.com/coleifer/peewee/issues/1662 | 338,836,780 | MDU6SXNzdWUzMzg4MzY3ODA= | 1,662 | Reject or warn on naive datetime objects for playhouse.postgres_ext.DateTimeTZField? | {
"login": "wonderbeyond",
"id": 228361,
"node_id": "MDQ6VXNlcjIyODM2MQ==",
"avatar_url": "https://avatars.githubusercontent.com/u/228361?v=4",
"gravatar_id": "",
"url": "https://api.github.com/users/wonderbeyond",
"html_url": "https://github.com/wonderbeyond",
"followers_url": "https://api.github.com/u... | [] | closed | false | null | [] | null | [
"I'm going to leave it as-is, but you are welcome to subclass `DateTimeTZField` and add whatever validation you want in the appropriate places."
] | 2018-07-06T07:38:23 | 2018-07-06T14:53:38 | 2018-07-06T14:53:38 | NONE | null | When assign a naive datetime object to a model filed of DateTimeTZField, it results an utc-timezoned value into db.
This behavior is crude, because without the knowledge of the current timezone we cannot convert a naive datetime object to the right aware one.
Can we let DateTimeTZField just reject on naive dateti... | {
"url": "https://api.github.com/repos/coleifer/peewee/issues/1662/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/1662/timeline | null | completed | null | null |
https://api.github.com/repos/coleifer/peewee/issues/1661 | https://api.github.com/repos/coleifer/peewee | https://api.github.com/repos/coleifer/peewee/issues/1661/labels{/name} | https://api.github.com/repos/coleifer/peewee/issues/1661/comments | https://api.github.com/repos/coleifer/peewee/issues/1661/events | https://github.com/coleifer/peewee/pull/1661 | 338,437,361 | MDExOlB1bGxSZXF1ZXN0MTk5MzY2ODA0 | 1,661 | Fixed: import mysql driver | {
"login": "elonzh",
"id": 8749411,
"node_id": "MDQ6VXNlcjg3NDk0MTE=",
"avatar_url": "https://avatars.githubusercontent.com/u/8749411?v=4",
"gravatar_id": "",
"url": "https://api.github.com/users/elonzh",
"html_url": "https://github.com/elonzh",
"followers_url": "https://api.github.com/users/elonzh/foll... | [] | closed | false | null | [] | null | [
"As I mentioned, I intend to prefer pymysql as it supports Python 3.x (whereas MySQLdb does not). I've updated the comment and provided a code snippet you can use to explicitly use MySQLdb (when you have both drivers installed for whatever reason)."
] | 2018-07-05T06:06:36 | 2018-07-05T14:37:56 | 2018-07-05T14:37:56 | NONE | null | Fixed: #1660 | {
"url": "https://api.github.com/repos/coleifer/peewee/issues/1661/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/1661/timeline | null | null | false | {
"url": "https://api.github.com/repos/coleifer/peewee/pulls/1661",
"html_url": "https://github.com/coleifer/peewee/pull/1661",
"diff_url": "https://github.com/coleifer/peewee/pull/1661.diff",
"patch_url": "https://github.com/coleifer/peewee/pull/1661.patch",
"merged_at": null
} |
https://api.github.com/repos/coleifer/peewee/issues/1660 | https://api.github.com/repos/coleifer/peewee | https://api.github.com/repos/coleifer/peewee/issues/1660/labels{/name} | https://api.github.com/repos/coleifer/peewee/issues/1660/comments | https://api.github.com/repos/coleifer/peewee/issues/1660/events | https://github.com/coleifer/peewee/issues/1660 | 338,436,776 | MDU6SXNzdWUzMzg0MzY3NzY= | 1,660 | the order of importing mysql database driver is wrong | {
"login": "elonzh",
"id": 8749411,
"node_id": "MDQ6VXNlcjg3NDk0MTE=",
"avatar_url": "https://avatars.githubusercontent.com/u/8749411?v=4",
"gravatar_id": "",
"url": "https://api.github.com/users/elonzh",
"html_url": "https://github.com/elonzh",
"followers_url": "https://api.github.com/users/elonzh/foll... | [] | closed | false | null | [] | null | [
"So `mysql-python` (`MySQLdb`) does not support Python 3, which is why it is no longer preferred. The comment needs to be updated.\r\n\r\nIf you would like to explicitly use a particular driver, it is quite easy:\r\n\r\n```python\r\nimport MySQLdb\r\n\r\nclass MySQLDatabaseCustom(MySQLDatabase):\r\n def _connect... | 2018-07-05T06:03:02 | 2018-07-06T02:32:31 | 2018-07-05T14:36:42 | NONE | null | ```python
try:
import pymysql as mysql
except ImportError:
try:
import MySQLdb as mysql # prefer the C module.
mysql_passwd = True
except ImportError:
mysql = None
```
As your comment, we should prefer the C module as default because it has better performance for productio... | {
"url": "https://api.github.com/repos/coleifer/peewee/issues/1660/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/1660/timeline | null | completed | null | null |
https://api.github.com/repos/coleifer/peewee/issues/1659 | https://api.github.com/repos/coleifer/peewee | https://api.github.com/repos/coleifer/peewee/issues/1659/labels{/name} | https://api.github.com/repos/coleifer/peewee/issues/1659/comments | https://api.github.com/repos/coleifer/peewee/issues/1659/events | https://github.com/coleifer/peewee/issues/1659 | 338,373,543 | MDU6SXNzdWUzMzgzNzM1NDM= | 1,659 | vcvarsall.bat | {
"login": "Rkauff",
"id": 34247878,
"node_id": "MDQ6VXNlcjM0MjQ3ODc4",
"avatar_url": "https://avatars.githubusercontent.com/u/34247878?v=4",
"gravatar_id": "",
"url": "https://api.github.com/users/Rkauff",
"html_url": "https://github.com/Rkauff",
"followers_url": "https://api.github.com/users/Rkauff/fo... | [] | closed | false | null | [] | null | [
"Weird, I would think you would only see that if you had cython, but how would you have cython without a c compiler?\r\n\r\nNo wheels.",
"Currently peewee is built using distutils, so there's no support for wheels at present."
] | 2018-07-04T20:53:35 | 2018-07-05T14:33:51 | 2018-07-05T14:33:51 | NONE | null | When trying to pip install peewee, I'm getting the message “unable to find vcvarsall.bat”
Are there wheels built for peewee? | {
"url": "https://api.github.com/repos/coleifer/peewee/issues/1659/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/1659/timeline | null | completed | null | null |
https://api.github.com/repos/coleifer/peewee/issues/1658 | https://api.github.com/repos/coleifer/peewee | https://api.github.com/repos/coleifer/peewee/issues/1658/labels{/name} | https://api.github.com/repos/coleifer/peewee/issues/1658/comments | https://api.github.com/repos/coleifer/peewee/issues/1658/events | https://github.com/coleifer/peewee/issues/1658 | 338,348,701 | MDU6SXNzdWUzMzgzNDg3MDE= | 1,658 | Registering and accessing Sqlite modules after connection to db | {
"login": "astrilchuk",
"id": 1706688,
"node_id": "MDQ6VXNlcjE3MDY2ODg=",
"avatar_url": "https://avatars.githubusercontent.com/u/1706688?v=4",
"gravatar_id": "",
"url": "https://api.github.com/users/astrilchuk",
"html_url": "https://github.com/astrilchuk",
"followers_url": "https://api.github.com/users... | [] | closed | false | null | [] | null | [
"Are you referring to the \"modules\" functionality in `apsw`? Or the `TableFunction` APIs? Or loading a shared-library sqlite3 module?",
"I'm using the `apsw.createmodule()` functionality in order to register a virtual table so I can import bulk data from external sources. Ideally I want to use a context to reg... | 2018-07-04T17:58:48 | 2018-07-06T02:31:31 | 2018-07-06T00:11:41 | NONE | null | This isn't a bug but a suggestion for possible improvement:
I recently ran across a scenario where I needed to conditionally register a Sqlite module for access to a virtual table. But I realized that I couldn't register the module after the database connection had been established. I also realized that even if I ... | {
"url": "https://api.github.com/repos/coleifer/peewee/issues/1658/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/1658/timeline | null | completed | null | null |
https://api.github.com/repos/coleifer/peewee/issues/1657 | https://api.github.com/repos/coleifer/peewee | https://api.github.com/repos/coleifer/peewee/issues/1657/labels{/name} | https://api.github.com/repos/coleifer/peewee/issues/1657/comments | https://api.github.com/repos/coleifer/peewee/issues/1657/events | https://github.com/coleifer/peewee/issues/1657 | 338,201,763 | MDU6SXNzdWUzMzgyMDE3NjM= | 1,657 | something like id__in(Django) for peewee | {
"login": "salva-imm",
"id": 32010748,
"node_id": "MDQ6VXNlcjMyMDEwNzQ4",
"avatar_url": "https://avatars.githubusercontent.com/u/32010748?v=4",
"gravatar_id": "",
"url": "https://api.github.com/users/salva-imm",
"html_url": "https://github.com/salva-imm",
"followers_url": "https://api.github.com/users/... | [] | closed | false | null | [] | null | [
"`.where(MyModel.id.in_([1, 2, 3, 4]))`\r\n\r\nhttp://docs.peewee-orm.com/en/latest/peewee/query_operators.html#id1"
] | 2018-07-04T09:35:41 | 2018-07-04T12:46:09 | 2018-07-04T12:46:09 | NONE | null | hi ,
does peewee provide something like this on django ??
`Model.objects.filter(id__in=instance['model_ids'])`
the instance['model_ids'] is list of ids ([1,2,3,4,5,6])
i know i can use `on((Model.id==instance['id][0]) & |.......................)`
but my list length isnt fixed ,, can change
i want to get all... | {
"url": "https://api.github.com/repos/coleifer/peewee/issues/1657/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/1657/timeline | null | completed | null | null |
https://api.github.com/repos/coleifer/peewee/issues/1656 | https://api.github.com/repos/coleifer/peewee | https://api.github.com/repos/coleifer/peewee/issues/1656/labels{/name} | https://api.github.com/repos/coleifer/peewee/issues/1656/comments | https://api.github.com/repos/coleifer/peewee/issues/1656/events | https://github.com/coleifer/peewee/issues/1656 | 337,760,301 | MDU6SXNzdWUzMzc3NjAzMDE= | 1,656 | When my program running in ubuntu 16.04, something error what is show. | {
"login": "0xn0ne",
"id": 16507416,
"node_id": "MDQ6VXNlcjE2NTA3NDE2",
"avatar_url": "https://avatars.githubusercontent.com/u/16507416?v=4",
"gravatar_id": "",
"url": "https://api.github.com/users/0xn0ne",
"html_url": "https://github.com/0xn0ne",
"followers_url": "https://api.github.com/users/0xn0ne/fo... | [] | closed | false | null | [] | null | [
"Does your basemodel class have a database assigned?",
"How did you install python? Is it possible that you don't have the sqlite driver installed? You can test:\r\n\r\n```pycon\r\n>>> import sqlite3\r\n>>> sqlite3\r\n```",
"Closing due to unresponsiveness."
] | 2018-07-03T06:22:44 | 2018-07-05T14:38:24 | 2018-07-05T14:38:24 | NONE | null | This is error detail
```
web@VM-35-97-ubuntu:~/smallprogram/smallprogram-backend$ sudo python3.6 app.py
/usr/local/lib/python3.6/site-packages/psycopg2/__init__.py:144: UserWarning: The psycopg2 wheel package will be renamed from release 2.8; in order to keep installing from binary please use "pip install psycopg2-... | {
"url": "https://api.github.com/repos/coleifer/peewee/issues/1656/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/1656/timeline | null | completed | null | null |
https://api.github.com/repos/coleifer/peewee/issues/1655 | https://api.github.com/repos/coleifer/peewee | https://api.github.com/repos/coleifer/peewee/issues/1655/labels{/name} | https://api.github.com/repos/coleifer/peewee/issues/1655/comments | https://api.github.com/repos/coleifer/peewee/issues/1655/events | https://github.com/coleifer/peewee/issues/1655 | 337,596,151 | MDU6SXNzdWUzMzc1OTYxNTE= | 1,655 | Error when attaching Sqlite db using APSW | {
"login": "astrilchuk",
"id": 1706688,
"node_id": "MDQ6VXNlcjE3MDY2ODg=",
"avatar_url": "https://avatars.githubusercontent.com/u/1706688?v=4",
"gravatar_id": "",
"url": "https://api.github.com/users/astrilchuk",
"html_url": "https://github.com/astrilchuk",
"followers_url": "https://api.github.com/users... | [] | closed | false | null | [] | null | [
"Thanks, fixed: 3475cbe0e092d9cea7f527b3a6a380b9bf714b86"
] | 2018-07-02T17:05:34 | 2018-07-02T20:21:54 | 2018-07-02T20:21:54 | NONE | null | I'm using APSW database driver(?) with peewee 3.5.1 and Sqlite and I am attempting to attach an in-memory database with the attach command:
db = apsw_ext.APSWDatabase("storage.db", pragmas=dict(foreign_keys=1, journal_mode="wal", cache_size=-1000 * 64))
...
db.attach(":memory:", "cache")
I'm getting an error on... | {
"url": "https://api.github.com/repos/coleifer/peewee/issues/1655/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/1655/timeline | null | completed | null | null |
https://api.github.com/repos/coleifer/peewee/issues/1654 | https://api.github.com/repos/coleifer/peewee | https://api.github.com/repos/coleifer/peewee/issues/1654/labels{/name} | https://api.github.com/repos/coleifer/peewee/issues/1654/comments | https://api.github.com/repos/coleifer/peewee/issues/1654/events | https://github.com/coleifer/peewee/issues/1654 | 337,572,374 | MDU6SXNzdWUzMzc1NzIzNzQ= | 1,654 | Incorrect syntax for index creation in Sqlite when using schema | {
"login": "astrilchuk",
"id": 1706688,
"node_id": "MDQ6VXNlcjE3MDY2ODg=",
"avatar_url": "https://avatars.githubusercontent.com/u/1706688?v=4",
"gravatar_id": "",
"url": "https://api.github.com/users/astrilchuk",
"html_url": "https://github.com/astrilchuk",
"followers_url": "https://api.github.com/users... | [] | closed | false | null | [] | null | [
"Nice catch, thanks for reporting."
] | 2018-07-02T15:49:14 | 2018-07-02T16:58:21 | 2018-07-02T16:58:21 | NONE | null | Creating an index on a table with a schema specified (other than the default) produces the following sql for a Sqlite database:
CREATE UNIQUE INDEX IF NOT EXISTS "programhash_program_id" ON "cache"."programhash" ("program_id")
The Sqlite definition for index creation (https://www.sqlite.org/lang_createindex.html)... | {
"url": "https://api.github.com/repos/coleifer/peewee/issues/1654/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/1654/timeline | null | completed | null | null |
https://api.github.com/repos/coleifer/peewee/issues/1653 | https://api.github.com/repos/coleifer/peewee | https://api.github.com/repos/coleifer/peewee/issues/1653/labels{/name} | https://api.github.com/repos/coleifer/peewee/issues/1653/comments | https://api.github.com/repos/coleifer/peewee/issues/1653/events | https://github.com/coleifer/peewee/issues/1653 | 337,444,399 | MDU6SXNzdWUzMzc0NDQzOTk= | 1,653 | peewee.OperationalError: (2013, 'Lost connection to MySQL server during query') | {
"login": "cookieY",
"id": 22343354,
"node_id": "MDQ6VXNlcjIyMzQzMzU0",
"avatar_url": "https://avatars.githubusercontent.com/u/22343354?v=4",
"gravatar_id": "",
"url": "https://api.github.com/users/cookieY",
"html_url": "https://github.com/cookieY",
"followers_url": "https://api.github.com/users/cookie... | [] | closed | false | null | [] | null | [
"You probably want to more closely monitor your connection setup/teardown. These docs may be relevant: http://docs.peewee-orm.com/en/latest/peewee/database.html#error-2006-mysql-server-has-gone-away\r\n\r\nI've not seen that particular error. Probably best off trying to ask on StackOverflow and posting some more in... | 2018-07-02T09:44:57 | 2018-11-24T22:17:34 | 2018-07-02T14:30:05 | NONE | null | I find that if mysql wait_timeout value is set too low peewee will lost connection .
so peewee can't automatically release the connection ?
how do I deal with this problem?
thanks | {
"url": "https://api.github.com/repos/coleifer/peewee/issues/1653/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/1653/timeline | null | completed | null | null |
https://api.github.com/repos/coleifer/peewee/issues/1652 | https://api.github.com/repos/coleifer/peewee | https://api.github.com/repos/coleifer/peewee/issues/1652/labels{/name} | https://api.github.com/repos/coleifer/peewee/issues/1652/comments | https://api.github.com/repos/coleifer/peewee/issues/1652/events | https://github.com/coleifer/peewee/issues/1652 | 337,289,830 | MDU6SXNzdWUzMzcyODk4MzA= | 1,652 | Prefetch same model error | {
"login": "1xinghuan",
"id": 33982538,
"node_id": "MDQ6VXNlcjMzOTgyNTM4",
"avatar_url": "https://avatars.githubusercontent.com/u/33982538?v=4",
"gravatar_id": "",
"url": "https://api.github.com/users/1xinghuan",
"html_url": "https://github.com/1xinghuan",
"followers_url": "https://api.github.com/users/... | [] | closed | false | null | [] | null | [
"I don't think you have any idea how prefetch is intended to be used... You don't need prefetch at all and you can do this all in a single query:\r\n\r\n```python\r\nTaskFile = File.alias() # File reference for Task.file object.\r\nversions = (Version\r\n .select(Version, Task, Shot, File, TaskFile)\r\n... | 2018-07-01T13:07:47 | 2018-07-02T05:56:26 | 2018-07-01T13:58:27 | NONE | null | I have some tables like these:
```
class File(ModelBase):
name = CharField(column_name='name', null=False)
class Shot(ModelBase):
name = CharField(column_name='name', null=False)
file= ForeignKeyField(column_name='file_id', model=File, field='id')
class Task(ModelBase):
name = CharField(co... | {
"url": "https://api.github.com/repos/coleifer/peewee/issues/1652/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/1652/timeline | null | completed | null | null |
https://api.github.com/repos/coleifer/peewee/issues/1651 | https://api.github.com/repos/coleifer/peewee | https://api.github.com/repos/coleifer/peewee/issues/1651/labels{/name} | https://api.github.com/repos/coleifer/peewee/issues/1651/comments | https://api.github.com/repos/coleifer/peewee/issues/1651/events | https://github.com/coleifer/peewee/issues/1651 | 337,192,593 | MDU6SXNzdWUzMzcxOTI1OTM= | 1,651 | peewee.OperationalError: Connection already opened. (peewee 3.3.4) | {
"login": "salva-imm",
"id": 32010748,
"node_id": "MDQ6VXNlcjMyMDEwNzQ4",
"avatar_url": "https://avatars.githubusercontent.com/u/32010748?v=4",
"gravatar_id": "",
"url": "https://api.github.com/users/salva-imm",
"html_url": "https://github.com/salva-imm",
"followers_url": "https://api.github.com/users/... | [] | closed | false | null | [] | null | [
"i found problem\r\nit was when i tried to \"create\" record , and because of \"Not Availabe ForeignKey\" , peewee raised exception ,, and left connection open , till restarting workers , it return error ,, \r\n\r\nfor solving this problem , we can use \"Try , Except\" , and \"abort\" request when this happen ,, or... | 2018-06-30T06:48:47 | 2019-04-07T13:03:38 | 2018-06-30T14:47:47 | NONE | null | im running peewee with flask ,
everything was fine , till i deployed my app with "Gunicorn , 3 workers and gracefull timeout arg"
any idea about using multiple workers with peewee ? | {
"url": "https://api.github.com/repos/coleifer/peewee/issues/1651/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/1651/timeline | null | completed | null | null |
https://api.github.com/repos/coleifer/peewee/issues/1650 | https://api.github.com/repos/coleifer/peewee | https://api.github.com/repos/coleifer/peewee/issues/1650/labels{/name} | https://api.github.com/repos/coleifer/peewee/issues/1650/comments | https://api.github.com/repos/coleifer/peewee/issues/1650/events | https://github.com/coleifer/peewee/issues/1650 | 336,888,941 | MDU6SXNzdWUzMzY4ODg5NDE= | 1,650 | Support for Postgres 10 IDENTITY columns | {
"login": "seamons",
"id": 11917193,
"node_id": "MDQ6VXNlcjExOTE3MTkz",
"avatar_url": "https://avatars.githubusercontent.com/u/11917193?v=4",
"gravatar_id": "",
"url": "https://api.github.com/users/seamons",
"html_url": "https://github.com/seamons",
"followers_url": "https://api.github.com/users/seamon... | [] | closed | false | null | [] | null | [
"I slightly changed this:\r\n\r\n```python\r\nclass IdentityField(AutoField):\r\n field_type = 'INT GENERATED BY DEFAULT AS IDENTITY'\r\n```",
"Added support. By default Peewee will continue to use `AutoField` (which corresponds to `SERIAL`), but you now have the option of using `IdentityField` instead:\r\n\r\... | 2018-06-29T07:14:17 | 2018-06-30T10:29:05 | 2018-06-29T13:52:02 | NONE | null | #Postgresql 10 has a new IDENTITY columns that replace SERIAL column:
> This is the SQL standard-conforming variant of PostgreSQL's serial
columns. It fixes a few usability issues that serial columns have:
> - CREATE TABLE / LIKE copies default but refers to same sequence
> - cannot add/drop serialness with ALTE... | {
"url": "https://api.github.com/repos/coleifer/peewee/issues/1650/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/1650/timeline | null | completed | null | null |
https://api.github.com/repos/coleifer/peewee/issues/1649 | https://api.github.com/repos/coleifer/peewee | https://api.github.com/repos/coleifer/peewee/issues/1649/labels{/name} | https://api.github.com/repos/coleifer/peewee/issues/1649/comments | https://api.github.com/repos/coleifer/peewee/issues/1649/events | https://github.com/coleifer/peewee/issues/1649 | 336,519,776 | MDU6SXNzdWUzMzY1MTk3NzY= | 1,649 | Allow arbitrary attributes on Fields | {
"login": "conqp",
"id": 3766192,
"node_id": "MDQ6VXNlcjM3NjYxOTI=",
"avatar_url": "https://avatars.githubusercontent.com/u/3766192?v=4",
"gravatar_id": "",
"url": "https://api.github.com/users/conqp",
"html_url": "https://github.com/conqp",
"followers_url": "https://api.github.com/users/conqp/follower... | [] | closed | false | null | [] | null | [
"While I understand how, with your use-case, you would want this functionality -- at present I am not interested in making such a change to how fields work. I think subclassing is going to be the way to go. You can create a mixin class and then apply it to fields, e.g.:\r\n\r\n```python\r\nclass FieldMixin(object):... | 2018-06-28T08:19:11 | 2018-06-28T14:16:12 | 2018-06-28T14:16:12 | CONTRIBUTOR | null | I am maintaining an own [extension of peewee](https://gitlab.com/HOMEINFO/peeweeplus) I use in several web applications.
For JSON-serializable models I currently use their "visibility" (Attrbiute prefixed with an underscore) state to determine whether to serialize and deserialize them or not.
I'd now like to have mor... | {
"url": "https://api.github.com/repos/coleifer/peewee/issues/1649/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/1649/timeline | null | completed | null | null |
https://api.github.com/repos/coleifer/peewee/issues/1648 | https://api.github.com/repos/coleifer/peewee | https://api.github.com/repos/coleifer/peewee/issues/1648/labels{/name} | https://api.github.com/repos/coleifer/peewee/issues/1648/comments | https://api.github.com/repos/coleifer/peewee/issues/1648/events | https://github.com/coleifer/peewee/issues/1648 | 336,453,009 | MDU6SXNzdWUzMzY0NTMwMDk= | 1,648 | Index name is differed from table_name when defining in Model class | {
"login": "imckl",
"id": 20377660,
"node_id": "MDQ6VXNlcjIwMzc3NjYw",
"avatar_url": "https://avatars.githubusercontent.com/u/20377660?v=4",
"gravatar_id": "",
"url": "https://api.github.com/users/imckl",
"html_url": "https://github.com/imckl",
"followers_url": "https://api.github.com/users/imckl/follow... | [] | closed | false | null | [] | null | [
"Thanks for the report, I suppose it would have been better to use the table name rather than the model name when declaring names for indices. Unfortunately, such a change would break backwards-compatibility, so I'm not too excited about changing this when there's a workaround that will allow you to control the ind... | 2018-06-28T02:42:41 | 2020-06-15T00:26:47 | 2018-06-29T15:11:28 | NONE | null | Just noticed index name is differed from table_name when defining in Model class, when using Meta.table_name.
This concerns on naming conventions.
Example code:
# class name meets PEP8
class ExampleTableWithSuffix(ContextModel):
column_pk = PrimaryKeyField()
column_a = IntegerField()
... | {
"url": "https://api.github.com/repos/coleifer/peewee/issues/1648/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/1648/timeline | null | completed | null | null |
https://api.github.com/repos/coleifer/peewee/issues/1647 | https://api.github.com/repos/coleifer/peewee | https://api.github.com/repos/coleifer/peewee/issues/1647/labels{/name} | https://api.github.com/repos/coleifer/peewee/issues/1647/comments | https://api.github.com/repos/coleifer/peewee/issues/1647/events | https://github.com/coleifer/peewee/issues/1647 | 336,417,654 | MDU6SXNzdWUzMzY0MTc2NTQ= | 1,647 | get_or_create return value is wrong in documentation | {
"login": "jouve",
"id": 1096799,
"node_id": "MDQ6VXNlcjEwOTY3OTk=",
"avatar_url": "https://avatars.githubusercontent.com/u/1096799?v=4",
"gravatar_id": "",
"url": "https://api.github.com/users/jouve",
"html_url": "https://github.com/jouve",
"followers_url": "https://api.github.com/users/jouve/follower... | [] | closed | false | null | [] | null | [
"Thanks, will fix."
] | 2018-06-27T23:05:29 | 2018-06-27T23:43:03 | 2018-06-27T23:43:03 | NONE | null | it documents `Model` instead of tuple of `Tuple[Model, bool]`.
```raw
.. py:classmethod:: get_or_create(**kwargs)
...
:returns: :py:class:`Model` instance.
```
| {
"url": "https://api.github.com/repos/coleifer/peewee/issues/1647/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/1647/timeline | null | completed | null | null |
https://api.github.com/repos/coleifer/peewee/issues/1646 | https://api.github.com/repos/coleifer/peewee | https://api.github.com/repos/coleifer/peewee/issues/1646/labels{/name} | https://api.github.com/repos/coleifer/peewee/issues/1646/comments | https://api.github.com/repos/coleifer/peewee/issues/1646/events | https://github.com/coleifer/peewee/issues/1646 | 336,243,474 | MDU6SXNzdWUzMzYyNDM0NzQ= | 1,646 | Psycogreen and Peewee | {
"login": "mtairu",
"id": 4996264,
"node_id": "MDQ6VXNlcjQ5OTYyNjQ=",
"avatar_url": "https://avatars.githubusercontent.com/u/4996264?v=4",
"gravatar_id": "",
"url": "https://api.github.com/users/mtairu",
"html_url": "https://github.com/mtairu",
"followers_url": "https://api.github.com/users/mtairu/foll... | [] | closed | false | null | [] | null | [
"psycogreen is just settings a wait callback, so yeah it should be fine to use that instead."
] | 2018-06-27T14:00:56 | 2018-06-27T15:04:58 | 2018-06-27T15:04:58 | NONE | null | Following gevent, psycogreen and peewee, what is the difference btw:
```
import gevent
import gevent.monkey
gevent.monkey.patch_all()
import psycogreen.gevent
psycogreen.gevent.patch_psycopg()
```
this:
```
from gevent.socket import wait_read, wait_write
from psycopg2 import extensions
# Call this fun... | {
"url": "https://api.github.com/repos/coleifer/peewee/issues/1646/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/1646/timeline | null | completed | null | null |
https://api.github.com/repos/coleifer/peewee/issues/1645 | https://api.github.com/repos/coleifer/peewee | https://api.github.com/repos/coleifer/peewee/issues/1645/labels{/name} | https://api.github.com/repos/coleifer/peewee/issues/1645/comments | https://api.github.com/repos/coleifer/peewee/issues/1645/events | https://github.com/coleifer/peewee/issues/1645 | 335,827,188 | MDU6SXNzdWUzMzU4MjcxODg= | 1,645 | insert_from with raw SQL query broke between Peewee 2 and 3 | {
"login": "timovwb",
"id": 893402,
"node_id": "MDQ6VXNlcjg5MzQwMg==",
"avatar_url": "https://avatars.githubusercontent.com/u/893402?v=4",
"gravatar_id": "",
"url": "https://api.github.com/users/timovwb",
"html_url": "https://github.com/timovwb",
"followers_url": "https://api.github.com/users/timovwb/fo... | [] | closed | false | null | [] | null | [
"It looks like it's entering endless recursion...will take a look.",
"Fixed, thanks for reporting.",
"Thanks for the fast fix!",
"Thanks for the quality bug report."
] | 2018-06-26T13:45:38 | 2018-06-26T14:05:19 | 2018-06-26T13:56:11 | NONE | null | I've been using `insert_from` to migrate data from a non-Peewee table to a Peewee created table. It works as intended with Peewee 2, I'm moving to 3 but it hangs and keeps increasing memory usage.
Below is a minimal, full working example showing the issue.
```
from peewee import SqliteDatabase, Model, CharField, S... | {
"url": "https://api.github.com/repos/coleifer/peewee/issues/1645/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/1645/timeline | null | completed | null | null |
https://api.github.com/repos/coleifer/peewee/issues/1644 | https://api.github.com/repos/coleifer/peewee | https://api.github.com/repos/coleifer/peewee/issues/1644/labels{/name} | https://api.github.com/repos/coleifer/peewee/issues/1644/comments | https://api.github.com/repos/coleifer/peewee/issues/1644/events | https://github.com/coleifer/peewee/issues/1644 | 335,750,986 | MDU6SXNzdWUzMzU3NTA5ODY= | 1,644 | reflection got wrong mysql blob field type | {
"login": "GrayMissing",
"id": 7198181,
"node_id": "MDQ6VXNlcjcxOTgxODE=",
"avatar_url": "https://avatars.githubusercontent.com/u/7198181?v=4",
"gravatar_id": "",
"url": "https://api.github.com/users/GrayMissing",
"html_url": "https://github.com/GrayMissing",
"followers_url": "https://api.github.com/us... | [] | closed | false | null | [] | null | [
"I'm confused by your issue. What exactly is the problem you are reporting? And if you read #1034, what are you confused about?",
"pwiz reflect mysql blob column to TextField, and TextField decode byte value using utf-8",
"Yeah, as it states in #1034, Peewee cannot differentiate blob from text due to a limitati... | 2018-06-26T10:15:38 | 2018-06-26T15:45:49 | 2018-06-26T15:45:49 | NONE | null | using pwiz to reflect created mysql table, I found blob column got a TextField defintion, which can lead to codec error. I don't think it's a proper way to decode byte_array using utf-8.
I read the issue before #1034 , but django's TextField seems more like BlobField in peewee... | {
"url": "https://api.github.com/repos/coleifer/peewee/issues/1644/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/1644/timeline | null | completed | null | null |
https://api.github.com/repos/coleifer/peewee/issues/1643 | https://api.github.com/repos/coleifer/peewee | https://api.github.com/repos/coleifer/peewee/issues/1643/labels{/name} | https://api.github.com/repos/coleifer/peewee/issues/1643/comments | https://api.github.com/repos/coleifer/peewee/issues/1643/events | https://github.com/coleifer/peewee/issues/1643 | 335,499,160 | MDU6SXNzdWUzMzU0OTkxNjA= | 1,643 | Stopping Python 2.7 support | {
"login": "willyhakim",
"id": 5633805,
"node_id": "MDQ6VXNlcjU2MzM4MDU=",
"avatar_url": "https://avatars.githubusercontent.com/u/5633805?v=4",
"gravatar_id": "",
"url": "https://api.github.com/users/willyhakim",
"html_url": "https://github.com/willyhakim",
"followers_url": "https://api.github.com/users... | [] | closed | false | null | [] | null | [
"I'll take the temperature of the community when it gets closer to 2020, but at present there are no plans to drop 2.7 support."
] | 2018-06-25T17:28:37 | 2018-06-25T17:44:59 | 2018-06-25T17:44:59 | NONE | null | Since legacy python support is stopping in January 1st 2020, we should make peewee python 3 only | {
"url": "https://api.github.com/repos/coleifer/peewee/issues/1643/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/1643/timeline | null | completed | null | null |
https://api.github.com/repos/coleifer/peewee/issues/1642 | https://api.github.com/repos/coleifer/peewee | https://api.github.com/repos/coleifer/peewee/issues/1642/labels{/name} | https://api.github.com/repos/coleifer/peewee/issues/1642/comments | https://api.github.com/repos/coleifer/peewee/issues/1642/events | https://github.com/coleifer/peewee/issues/1642 | 335,005,092 | MDU6SXNzdWUzMzUwMDUwOTI= | 1,642 | Improve pwiz documentation with some examples | {
"login": "willyhakim",
"id": 5633805,
"node_id": "MDQ6VXNlcjU2MzM4MDU=",
"avatar_url": "https://avatars.githubusercontent.com/u/5633805?v=4",
"gravatar_id": "",
"url": "https://api.github.com/users/willyhakim",
"html_url": "https://github.com/willyhakim",
"followers_url": "https://api.github.com/users... | [] | closed | false | null | [] | null | [
"Thank you for the suggestion, I'll look into it. Glad you find it helpful!",
"http://docs.peewee-orm.com/en/latest/peewee/playhouse.html#pwiz-a-model-generator\r\n\r\nNow includes more examples. Thanks for the suggestion.",
"Hahaha. You're so fast. I was hoping to make that my first PR"
] | 2018-06-22T20:13:14 | 2018-06-23T04:48:36 | 2018-06-22T20:42:50 | NONE | null | Pwiz is a helluva an awesome tool. Improving the docs around it by giving some examples for postgres, mysql and sqlite would be super cool. | {
"url": "https://api.github.com/repos/coleifer/peewee/issues/1642/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/1642/timeline | null | completed | null | null |
https://api.github.com/repos/coleifer/peewee/issues/1641 | https://api.github.com/repos/coleifer/peewee | https://api.github.com/repos/coleifer/peewee/issues/1641/labels{/name} | https://api.github.com/repos/coleifer/peewee/issues/1641/comments | https://api.github.com/repos/coleifer/peewee/issues/1641/events | https://github.com/coleifer/peewee/issues/1641 | 334,710,057 | MDU6SXNzdWUzMzQ3MTAwNTc= | 1,641 | peewee.OperationalError: too many SQL variables PLUS | {
"login": "cloud-admin",
"id": 13583446,
"node_id": "MDQ6VXNlcjEzNTgzNDQ2",
"avatar_url": "https://avatars.githubusercontent.com/u/13583446?v=4",
"gravatar_id": "",
"url": "https://api.github.com/users/cloud-admin",
"html_url": "https://github.com/cloud-admin",
"followers_url": "https://api.github.com/... | [] | closed | false | null | [] | null | [
"This is documented on SQLite's website, and the default is 999: https://www.sqlite.org/limits.html#max_variable_number\r\n\r\nThis is also documented in the bulk inserts section of peewee docs: http://docs.peewee-orm.com/en/latest/peewee/querying.html#bulk-inserts\r\n\r\n> SQLite users should be aware of some cave... | 2018-06-22T01:06:58 | 2019-02-12T08:10:21 | 2018-06-26T13:46:05 | NONE | null | Hi there:
I'm using peewee to insert files into SQLite, I meet this error: peewee.OperationalError: too many SQL variables . I tried Google, some said it's because the SQLITE_MAX_VARIABLE_NUMBER.
So i searched and using this code to get the SQLITE_MAX_VARIABLE_NUMBER.
```python
def max_sql_variables():
"""... | {
"url": "https://api.github.com/repos/coleifer/peewee/issues/1641/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/1641/timeline | null | completed | null | null |
https://api.github.com/repos/coleifer/peewee/issues/1640 | https://api.github.com/repos/coleifer/peewee | https://api.github.com/repos/coleifer/peewee/issues/1640/labels{/name} | https://api.github.com/repos/coleifer/peewee/issues/1640/comments | https://api.github.com/repos/coleifer/peewee/issues/1640/events | https://github.com/coleifer/peewee/issues/1640 | 334,644,424 | MDU6SXNzdWUzMzQ2NDQ0MjQ= | 1,640 | Documentation Improvement - Master Issue | {
"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 | [
"Really cool that you're doing this. The two things I look up the most are available field types and query operators. I find them easy to find via google and the table of contents so that's great!\r\n\r\nTwo things I struggled to find:\r\n\r\n1. Using `select` with fields from different tables, e.g. `A.select(A.nam... | 2018-06-21T20:26:08 | 2018-11-24T22:18:22 | 2018-11-24T22:18:22 | OWNER | null | The purpose of this issue is to collect suggestions for how the documentation might be improved.
Some of the things I'm wondering:
* Is it easy to find the information you're looking for?
* Does the organization of the sections and subsections make it easy to find what you need?
* Are some sections too verbose?... | {
"url": "https://api.github.com/repos/coleifer/peewee/issues/1640/reactions",
"total_count": 4,
"+1": 4,
"-1": 0,
"laugh": 0,
"hooray": 0,
"confused": 0,
"heart": 0,
"rocket": 0,
"eyes": 0
} | https://api.github.com/repos/coleifer/peewee/issues/1640/timeline | null | completed | null | null |
https://api.github.com/repos/coleifer/peewee/issues/1639 | https://api.github.com/repos/coleifer/peewee | https://api.github.com/repos/coleifer/peewee/issues/1639/labels{/name} | https://api.github.com/repos/coleifer/peewee/issues/1639/comments | https://api.github.com/repos/coleifer/peewee/issues/1639/events | https://github.com/coleifer/peewee/issues/1639 | 334,513,405 | MDU6SXNzdWUzMzQ1MTM0MDU= | 1,639 | Mention "register_hstore=True" parameter at "Changes in 3.0" docs page | {
"login": "droserasprout",
"id": 10263434,
"node_id": "MDQ6VXNlcjEwMjYzNDM0",
"avatar_url": "https://avatars.githubusercontent.com/u/10263434?v=4",
"gravatar_id": "",
"url": "https://api.github.com/users/droserasprout",
"html_url": "https://github.com/droserasprout",
"followers_url": "https://api.githu... | [] | closed | false | null | [] | null | [] | 2018-06-21T14:13:19 | 2018-06-21T16:57:48 | 2018-06-21T16:57:48 | NONE | null | We've spent some time to figure out why our HStore fields turned to strings after moving to 3.x peewee branch | {
"url": "https://api.github.com/repos/coleifer/peewee/issues/1639/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/1639/timeline | null | completed | null | null |
https://api.github.com/repos/coleifer/peewee/issues/1638 | https://api.github.com/repos/coleifer/peewee | https://api.github.com/repos/coleifer/peewee/issues/1638/labels{/name} | https://api.github.com/repos/coleifer/peewee/issues/1638/comments | https://api.github.com/repos/coleifer/peewee/issues/1638/events | https://github.com/coleifer/peewee/pull/1638 | 333,413,684 | MDExOlB1bGxSZXF1ZXN0MTk1NjMxOTMy | 1,638 | update_or_create method added | {
"login": "hbasria",
"id": 567055,
"node_id": "MDQ6VXNlcjU2NzA1NQ==",
"avatar_url": "https://avatars.githubusercontent.com/u/567055?v=4",
"gravatar_id": "",
"url": "https://api.github.com/users/hbasria",
"html_url": "https://github.com/hbasria",
"followers_url": "https://api.github.com/users/hbasria/fo... | [] | closed | false | null | [] | null | [
"Thanks, but I am not interested in this functionality."
] | 2018-06-18T19:59:55 | 2018-06-18T20:59:11 | 2018-06-18T20:59:11 | NONE | null | {
"url": "https://api.github.com/repos/coleifer/peewee/issues/1638/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/1638/timeline | null | null | false | {
"url": "https://api.github.com/repos/coleifer/peewee/pulls/1638",
"html_url": "https://github.com/coleifer/peewee/pull/1638",
"diff_url": "https://github.com/coleifer/peewee/pull/1638.diff",
"patch_url": "https://github.com/coleifer/peewee/pull/1638.patch",
"merged_at": null
} | |
https://api.github.com/repos/coleifer/peewee/issues/1637 | https://api.github.com/repos/coleifer/peewee | https://api.github.com/repos/coleifer/peewee/issues/1637/labels{/name} | https://api.github.com/repos/coleifer/peewee/issues/1637/comments | https://api.github.com/repos/coleifer/peewee/issues/1637/events | https://github.com/coleifer/peewee/issues/1637 | 333,101,173 | MDU6SXNzdWUzMzMxMDExNzM= | 1,637 | Inserting pandas DataFrame | {
"login": "GitHubAre",
"id": 17234860,
"node_id": "MDQ6VXNlcjE3MjM0ODYw",
"avatar_url": "https://avatars.githubusercontent.com/u/17234860?v=4",
"gravatar_id": "",
"url": "https://api.github.com/users/GitHubAre",
"html_url": "https://github.com/GitHubAre",
"followers_url": "https://api.github.com/users/... | [] | closed | false | null | [] | null | [
"Can you convert the elements of a `DataFrame` into dictionaries or tuples? I'm not too familiar with Pandas.",
"It supports conversion to dictionary: https://pandas.pydata.org/pandas-docs/stable/generated/pandas.DataFrame.to_dict.html\r\n\r\nWhich basically returns dictionary of dictionaries or a list of diction... | 2018-06-17T23:22:59 | 2019-06-10T16:09:19 | 2018-06-18T14:18:20 | NONE | null | Hello,
Is there a way how to insert pandas DataFrame into a database?
Assuming that I have a class defined with exactly same attributes as the DataFrame's columns are (same data type and column name).
I have been googling and didnt find an answer for that (I found answer on how to select data from database into Da... | {
"url": "https://api.github.com/repos/coleifer/peewee/issues/1637/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/1637/timeline | null | completed | null | null |
https://api.github.com/repos/coleifer/peewee/issues/1636 | https://api.github.com/repos/coleifer/peewee | https://api.github.com/repos/coleifer/peewee/issues/1636/labels{/name} | https://api.github.com/repos/coleifer/peewee/issues/1636/comments | https://api.github.com/repos/coleifer/peewee/issues/1636/events | https://github.com/coleifer/peewee/issues/1636 | 332,525,442 | MDU6SXNzdWUzMzI1MjU0NDI= | 1,636 | Cannot access subquery result through alias [2.10.x -> 3.5.x migration] | {
"login": "rszalski",
"id": 184806,
"node_id": "MDQ6VXNlcjE4NDgwNg==",
"avatar_url": "https://avatars.githubusercontent.com/u/184806?v=4",
"gravatar_id": "",
"url": "https://api.github.com/users/rszalski",
"html_url": "https://github.com/rszalski",
"followers_url": "https://api.github.com/users/rszalsk... | [] | closed | false | null | [] | null | [
"I've got it working, I believe:\r\n\r\n```python\r\nnotes_subq = (Note\r\n .select(Note.notebook, fn.GROUP_CONCAT(\r\n fn.JSON_OBJECT('text', Note.text)).alias('notes'))\r\n .group_by(Note.notebook)\r\n .alias('subq'))\r\n\r\nquery = (Notebook\r\n .se... | 2018-06-14T19:01:14 | 2018-06-15T15:32:14 | 2018-06-15T15:23:07 | NONE | null | Hi,
we are making a heavy use of Peewee and subqueries in our project. Recently we started migrating from Peewee `2.10.0` to `3.5.0` and stumbled upon some subtle issues.
Below is a hopefully clear example of how we use subqieries. I left in all the aliases as well as the `fn`s as they might give you a hint as to... | {
"url": "https://api.github.com/repos/coleifer/peewee/issues/1636/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/1636/timeline | null | completed | null | null |
https://api.github.com/repos/coleifer/peewee/issues/1635 | https://api.github.com/repos/coleifer/peewee | https://api.github.com/repos/coleifer/peewee/issues/1635/labels{/name} | https://api.github.com/repos/coleifer/peewee/issues/1635/comments | https://api.github.com/repos/coleifer/peewee/issues/1635/events | https://github.com/coleifer/peewee/issues/1635 | 332,138,103 | MDU6SXNzdWUzMzIxMzgxMDM= | 1,635 | Composable queries | {
"login": "christianmalek",
"id": 2873986,
"node_id": "MDQ6VXNlcjI4NzM5ODY=",
"avatar_url": "https://avatars.githubusercontent.com/u/2873986?v=4",
"gravatar_id": "",
"url": "https://api.github.com/users/christianmalek",
"html_url": "https://github.com/christianmalek",
"followers_url": "https://api.gith... | [] | closed | false | null | [] | null | [
"Yes and no. Peewee, being written in Python, uses method-chaining to accomplish something like what ecto is doing.\r\n\r\nWith peewee you'd write:\r\n\r\n```python\r\nquery = Post.select() # equiv to \"select * from post\"\r\nquery2 = query.where(Post.published == True) # equiv to select * from post where publis... | 2018-06-13T19:49:10 | 2018-06-13T20:37:34 | 2018-06-13T20:37:34 | NONE | null | Hi,
I'm a elixir guy and use ecto as primary OR mapper. ecto has the nice feature to create composable queries. So you can save queries and then use them as input for other queries.
Example (from https://blog.drewolson.org/composable-queries-ecto/):
```elixir
# query2 uses query as input
query = from p in M... | {
"url": "https://api.github.com/repos/coleifer/peewee/issues/1635/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/1635/timeline | null | completed | null | null |
https://api.github.com/repos/coleifer/peewee/issues/1634 | https://api.github.com/repos/coleifer/peewee | https://api.github.com/repos/coleifer/peewee/issues/1634/labels{/name} | https://api.github.com/repos/coleifer/peewee/issues/1634/comments | https://api.github.com/repos/coleifer/peewee/issues/1634/events | https://github.com/coleifer/peewee/issues/1634 | 330,965,487 | MDU6SXNzdWUzMzA5NjU0ODc= | 1,634 | Join to the same model with different depth | {
"login": "1xinghuan",
"id": 33982538,
"node_id": "MDQ6VXNlcjMzOTgyNTM4",
"avatar_url": "https://avatars.githubusercontent.com/u/33982538?v=4",
"gravatar_id": "",
"url": "https://api.github.com/users/1xinghuan",
"html_url": "https://github.com/1xinghuan",
"followers_url": "https://api.github.com/users/... | [] | closed | false | null | [] | null | [
"You need to use an alias for the 2nd reference:\r\n\r\n```python\r\nStatus2 = Status.alias()\r\nquery = Shot.select()\r\nquery = query.join(Status)...\r\nquery = query.switch(Shot).join(Project).join(Status2)\r\n```",
"Docs: http://docs.peewee-orm.com/en/latest/peewee/querying.html#using-model-aliases"
] | 2018-06-10T12:40:31 | 2018-06-10T16:22:42 | 2018-06-10T16:22:12 | NONE | null | I have models like this:
```
class Status(ModelBase):
name = CharField()
class Project(ModelBase):
name = CharField()
status = ForeignKeyField(Status)
class Shot(ModelBase):
name = CharField()
project = ForeignKeyField(Project)
status = ForeignKeyField(Status)
```
If I want t... | {
"url": "https://api.github.com/repos/coleifer/peewee/issues/1634/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/1634/timeline | null | completed | null | null |
https://api.github.com/repos/coleifer/peewee/issues/1633 | https://api.github.com/repos/coleifer/peewee | https://api.github.com/repos/coleifer/peewee/issues/1633/labels{/name} | https://api.github.com/repos/coleifer/peewee/issues/1633/comments | https://api.github.com/repos/coleifer/peewee/issues/1633/events | https://github.com/coleifer/peewee/issues/1633 | 330,844,608 | MDU6SXNzdWUzMzA4NDQ2MDg= | 1,633 | Benchmark with PostgreSQL gives worse insert results than with MySQL | {
"login": "sapph1re",
"id": 5317413,
"node_id": "MDQ6VXNlcjUzMTc0MTM=",
"avatar_url": "https://avatars.githubusercontent.com/u/5317413?v=4",
"gravatar_id": "",
"url": "https://api.github.com/users/sapph1re",
"html_url": "https://github.com/sapph1re",
"followers_url": "https://api.github.com/users/sapph... | [] | closed | false | null | [] | null | [
"This is such a complicated subject. It depends on many, many variables and config settings. The bench is an internal script I use to profile the code sometimes after making big changes. It's in no way an indication of how well a database is performing. Be smart. Ignore it. It is literally meaningless."
] | 2018-06-09T02:13:42 | 2018-06-09T15:03:17 | 2018-06-09T15:03:17 | NONE | null | I'm running bench.py. Using python 3.5, peewee 3.5.0, on Debian 9 with 64 GB of RAM.
With a MySQL database (driver mysqlclient):
```
insert 0.232
insert_related 0.315
batch_insert 0.227
bulk_insert 0.027
select 0.093
select_related 0.26
select_related_left 0.237
select_related_dicts 0.09
```
With a Post... | {
"url": "https://api.github.com/repos/coleifer/peewee/issues/1633/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/1633/timeline | null | completed | null | null |
https://api.github.com/repos/coleifer/peewee/issues/1632 | https://api.github.com/repos/coleifer/peewee | https://api.github.com/repos/coleifer/peewee/issues/1632/labels{/name} | https://api.github.com/repos/coleifer/peewee/issues/1632/comments | https://api.github.com/repos/coleifer/peewee/issues/1632/events | https://github.com/coleifer/peewee/issues/1632 | 330,772,488 | MDU6SXNzdWUzMzA3NzI0ODg= | 1,632 | Model with ManyToManyField throws NOT NULL constraint failed | {
"login": "kpoman",
"id": 9864839,
"node_id": "MDQ6VXNlcjk4NjQ4Mzk=",
"avatar_url": "https://avatars.githubusercontent.com/u/9864839?v=4",
"gravatar_id": "",
"url": "https://api.github.com/users/kpoman",
"html_url": "https://github.com/kpoman",
"followers_url": "https://api.github.com/users/kpoman/foll... | [] | closed | false | null | [] | null | [
"Yeah, this is expected behavior because how can you create a reference in a through table if the object you're referencing doesn't have a primary key yet? Added a note to the docs to hopefully clarify this a little."
] | 2018-06-08T19:13:04 | 2018-06-10T20:41:19 | 2018-06-10T20:41:18 | NONE | null | Hello,
When creating an object of a Model that uses a ManyToManyField, one cannot set the property of the field before saving the object, otherwise it throws a NOT NULL constraint failed error.
For example:
obj = SomeModel()
obj.some_many2many_field = [1, 2, 3]
obj.save()
fails, but:
obj = SomeModel()
obj.s... | {
"url": "https://api.github.com/repos/coleifer/peewee/issues/1632/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/1632/timeline | null | completed | null | null |
https://api.github.com/repos/coleifer/peewee/issues/1631 | https://api.github.com/repos/coleifer/peewee | https://api.github.com/repos/coleifer/peewee/issues/1631/labels{/name} | https://api.github.com/repos/coleifer/peewee/issues/1631/comments | https://api.github.com/repos/coleifer/peewee/issues/1631/events | https://github.com/coleifer/peewee/issues/1631 | 330,676,810 | MDU6SXNzdWUzMzA2NzY4MTA= | 1,631 | ManyToManyField add multiple (list, tuple) fails on python 2.7 | {
"login": "kpoman",
"id": 9864839,
"node_id": "MDQ6VXNlcjk4NjQ4Mzk=",
"avatar_url": "https://avatars.githubusercontent.com/u/9864839?v=4",
"gravatar_id": "",
"url": "https://api.github.com/users/kpoman",
"html_url": "https://github.com/kpoman",
"followers_url": "https://api.github.com/users/kpoman/foll... | [] | closed | false | null | [] | null | [
"It ran successfully for me using Python 2.7 and Peewee 3.5.",
"My hunch is that your Python 2.7 is linking against an old version of sqlite that may not support bulk inserts. You can verify by:\r\n\r\n```python\r\nimport sqlite3\r\nprint(sqlite3.sqlite_version)\r\n```\r\n\r\nBulk insert was added in sqlite 3.7.1... | 2018-06-08T14:18:14 | 2018-06-10T20:37:46 | 2018-06-10T20:37:46 | NONE | null | Hello,
I am testing my following code using ManyToManyField trying to add multiple relations. It works perfectly on Python 3.6, but fails on 2.7. Here is the error:
The code:
```
import peewee
db = peewee.SqliteDatabase('testdb.sqlite', check_same_thread=False)
SPECIALTY_CHOICES = (
(0, 'Sur mesure'),
... | {
"url": "https://api.github.com/repos/coleifer/peewee/issues/1631/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/1631/timeline | null | completed | null | null |
https://api.github.com/repos/coleifer/peewee/issues/1630 | https://api.github.com/repos/coleifer/peewee | https://api.github.com/repos/coleifer/peewee/issues/1630/labels{/name} | https://api.github.com/repos/coleifer/peewee/issues/1630/comments | https://api.github.com/repos/coleifer/peewee/issues/1630/events | https://github.com/coleifer/peewee/issues/1630 | 330,573,039 | MDU6SXNzdWUzMzA1NzMwMzk= | 1,630 | ForeignField not compatible with BigAutoField | {
"login": "fenngwd",
"id": 8489549,
"node_id": "MDQ6VXNlcjg0ODk1NDk=",
"avatar_url": "https://avatars.githubusercontent.com/u/8489549?v=4",
"gravatar_id": "",
"url": "https://api.github.com/users/fenngwd",
"html_url": "https://github.com/fenngwd",
"followers_url": "https://api.github.com/users/fenngwd/... | [] | closed | false | null | [] | null | [
"Fixed, thanks for the excellent report."
] | 2018-06-08T08:51:48 | 2018-06-10T20:49:54 | 2018-06-10T20:49:41 | CONTRIBUTOR | null | Description:
Column column_a in table B is a foreign key which references to primary_key a in table A. But if field type of primary_key a is BigAutoField, create table B will raise Exception(cann't add foreign key constraint).
How to reproduce the problem?
```python
import peewee as pw
from playhouse import ... | {
"url": "https://api.github.com/repos/coleifer/peewee/issues/1630/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/1630/timeline | null | completed | null | null |
https://api.github.com/repos/coleifer/peewee/issues/1629 | https://api.github.com/repos/coleifer/peewee | https://api.github.com/repos/coleifer/peewee/issues/1629/labels{/name} | https://api.github.com/repos/coleifer/peewee/issues/1629/comments | https://api.github.com/repos/coleifer/peewee/issues/1629/events | https://github.com/coleifer/peewee/issues/1629 | 330,460,457 | MDU6SXNzdWUzMzA0NjA0NTc= | 1,629 | Force one-to-one backref? | {
"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 | [
"No, this isn't supported as-such, but you are on the right track by adding a unique constraint. In this case why not just add a `property` or something to look-up the one-to-one related model?",
"Right, I hadn't thought of using a property but that works nicely. It would be nice if this becomes a feature at some... | 2018-06-07T22:40:23 | 2018-06-10T20:34:08 | 2018-06-10T20:34:08 | NONE | null | Is there a way to force a backref in a foreign key to be one to one? Right now all backrefs seem to create a list even if one takes measures to ensure the relationship is one-to-one (e.g., by making the backref column UNIQUE). In SQLA one can manage this by doing
```
relationship(ToModel, backref=backref(FromModel,... | {
"url": "https://api.github.com/repos/coleifer/peewee/issues/1629/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/1629/timeline | null | completed | null | null |
https://api.github.com/repos/coleifer/peewee/issues/1628 | https://api.github.com/repos/coleifer/peewee | https://api.github.com/repos/coleifer/peewee/issues/1628/labels{/name} | https://api.github.com/repos/coleifer/peewee/issues/1628/comments | https://api.github.com/repos/coleifer/peewee/issues/1628/events | https://github.com/coleifer/peewee/issues/1628 | 330,243,465 | MDU6SXNzdWUzMzAyNDM0NjU= | 1,628 | How to handle "Reference Cycles" | {
"login": "JoshuaC3",
"id": 11645712,
"node_id": "MDQ6VXNlcjExNjQ1NzEy",
"avatar_url": "https://avatars.githubusercontent.com/u/11645712?v=4",
"gravatar_id": "",
"url": "https://api.github.com/users/JoshuaC3",
"html_url": "https://github.com/JoshuaC3",
"followers_url": "https://api.github.com/users/Jos... | [] | closed | false | null | [] | null | [
"http://docs.peewee-orm.com/en/latest/peewee/models.html#circular-foreign-key-dependencies"
] | 2018-06-07T12:08:05 | 2018-06-07T12:58:50 | 2018-06-07T12:58:50 | NONE | null | I have an auto generated db_model using pwiz. However, there is a reference cycle such that
```
class DataFaultReview(BaseModel):
data_fault = ForeignKeyField(column_name='data_fault_id', field='id', model=DataFault)
```
and
```
class DataFault(BaseModel):
current_review = ForeignKeyField(
... | {
"url": "https://api.github.com/repos/coleifer/peewee/issues/1628/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/1628/timeline | null | completed | null | null |
https://api.github.com/repos/coleifer/peewee/issues/1627 | https://api.github.com/repos/coleifer/peewee | https://api.github.com/repos/coleifer/peewee/issues/1627/labels{/name} | https://api.github.com/repos/coleifer/peewee/issues/1627/comments | https://api.github.com/repos/coleifer/peewee/issues/1627/events | https://github.com/coleifer/peewee/issues/1627 | 330,243,443 | MDU6SXNzdWUzMzAyNDM0NDM= | 1,627 | better documentation of the init function | {
"login": "42sol-eu",
"id": 19718152,
"node_id": "MDQ6VXNlcjE5NzE4MTUy",
"avatar_url": "https://avatars.githubusercontent.com/u/19718152?v=4",
"gravatar_id": "",
"url": "https://api.github.com/users/42sol-eu",
"html_url": "https://github.com/42sol-eu",
"followers_url": "https://api.github.com/users/42s... | [] | closed | false | null | [] | null | [
"It's documented here: http://docs.peewee-orm.com/en/latest/peewee/database.html#run-time-database-configuration\r\n\r\nIs there something specific you feel is missing?",
"Yes you are right, we had trouble to find it and it is not in any of the tutorial examples. The usage of None on the first parameter is also n... | 2018-06-07T12:08:02 | 2018-06-10T16:32:15 | 2018-06-10T16:32:15 | NONE | null | The initialization of the Database classes with ``None`` as a name is not very obvious.
In my opinion it would be helpful to add this call directly to the quick start example.
see my suggestion at https://github.com/42sol-eu/peewee/blob/master/docs/peewee/quickstart.rst
What would you suggest?
| {
"url": "https://api.github.com/repos/coleifer/peewee/issues/1627/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/1627/timeline | null | completed | null | null |
https://api.github.com/repos/coleifer/peewee/issues/1626 | https://api.github.com/repos/coleifer/peewee | https://api.github.com/repos/coleifer/peewee/issues/1626/labels{/name} | https://api.github.com/repos/coleifer/peewee/issues/1626/comments | https://api.github.com/repos/coleifer/peewee/issues/1626/events | https://github.com/coleifer/peewee/issues/1626 | 330,200,961 | MDU6SXNzdWUzMzAyMDA5NjE= | 1,626 | MySQLDatabase return "using password: NO" when password is provided | {
"login": "ketozhang",
"id": 13506487,
"node_id": "MDQ6VXNlcjEzNTA2NDg3",
"avatar_url": "https://avatars.githubusercontent.com/u/13506487?v=4",
"gravatar_id": "",
"url": "https://api.github.com/users/ketozhang",
"html_url": "https://github.com/ketozhang",
"followers_url": "https://api.github.com/users/... | [] | closed | false | null | [] | null | [
"Can you connect to this database directly without peewee?",
"@natku\r\n\r\nYes, I can access the database as root and other users.\r\n\r\nI've tried the MySQLDatabase with other users as well.",
"Have you tried using `passwd` instead of `password` for the password field?",
"@coleifer\r\n\r\nYes I have ",
"... | 2018-06-07T09:57:59 | 2019-11-25T17:10:23 | 2018-06-10T16:32:59 | NONE | null | *Version: 3.5.0*
I'm trying to validate my connection via `MySQLDatabase` on a fresh MySQL server (added a user with permission to specified database) but it's not accepting a password:
```py
>>> db = MySQLDatabase('database', user='username', password='***')
>>> db.get_tables()
(1045, "Access denied for user ... | {
"url": "https://api.github.com/repos/coleifer/peewee/issues/1626/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/1626/timeline | null | completed | null | null |
https://api.github.com/repos/coleifer/peewee/issues/1625 | https://api.github.com/repos/coleifer/peewee | https://api.github.com/repos/coleifer/peewee/issues/1625/labels{/name} | https://api.github.com/repos/coleifer/peewee/issues/1625/comments | https://api.github.com/repos/coleifer/peewee/issues/1625/events | https://github.com/coleifer/peewee/issues/1625 | 330,088,738 | MDU6SXNzdWUzMzAwODg3Mzg= | 1,625 | Select column alias fails when alias name == column name | {
"login": "elgow",
"id": 11529401,
"node_id": "MDQ6VXNlcjExNTI5NDAx",
"avatar_url": "https://avatars.githubusercontent.com/u/11529401?v=4",
"gravatar_id": "",
"url": "https://api.github.com/users/elgow",
"html_url": "https://github.com/elgow",
"followers_url": "https://api.github.com/users/elgow/follow... | [] | closed | false | null | [] | null | [
"I should mention that this behavior was not present in Peewee 2.x. I hit it in upgrading to 3.5.0. ",
"Can you create a more concise example? I'm having a very hard time understanding because there's so much noise and nonsense.",
"OK, nevermind, after reading more closely I think I see what you're talking abo... | 2018-06-07T01:49:39 | 2018-06-12T20:43:26 | 2018-06-12T16:10:16 | NONE | null | Aliasing of columns in a select fails when the alias == the actual DB column name.
Results from the test case below show the problem. Look at the dict key for the 1st item in each result set. When the alias != the column name it's correct, but when the alias == the column name it's wrong. Instead of the proper alia... | {
"url": "https://api.github.com/repos/coleifer/peewee/issues/1625/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/1625/timeline | null | completed | null | null |
https://api.github.com/repos/coleifer/peewee/issues/1624 | https://api.github.com/repos/coleifer/peewee | https://api.github.com/repos/coleifer/peewee/issues/1624/labels{/name} | https://api.github.com/repos/coleifer/peewee/issues/1624/comments | https://api.github.com/repos/coleifer/peewee/issues/1624/events | https://github.com/coleifer/peewee/issues/1624 | 330,062,095 | MDU6SXNzdWUzMzAwNjIwOTU= | 1,624 | ManyToManyField doesn't create _through table | {
"login": "kpoman",
"id": 9864839,
"node_id": "MDQ6VXNlcjk4NjQ4Mzk=",
"avatar_url": "https://avatars.githubusercontent.com/u/9864839?v=4",
"gravatar_id": "",
"url": "https://api.github.com/users/kpoman",
"html_url": "https://github.com/kpoman",
"followers_url": "https://api.github.com/users/kpoman/foll... | [] | closed | false | null | [] | null | [
"Ok ! I found the way:\r\n```\r\ndb.create_tables([Jeweler,\r\n SalePoint,\r\n Styles,\r\n Specialties,\r\n Jeweler.styles.get_through_model(),\r\n Jeweler.specialties.get_through_model()])\r\n```\r\nNow I'm trying to figure out ho... | 2018-06-06T23:02:13 | 2018-06-07T12:54:49 | 2018-06-07T12:54:49 | NONE | null | Hello, I am trying to implement a multiple choice of a class (Jeweler) for giving optional Style and Specialties choices. I did as follows:
```
import peewee
db = peewee.SqliteDatabase('theone_ai.sqlite', check_same_thread=False)
SPECIALTY_CHOICES = (
(0, 'Sur mesure'),
(1, 'Reparations'),
... | {
"url": "https://api.github.com/repos/coleifer/peewee/issues/1624/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/1624/timeline | null | completed | null | null |
https://api.github.com/repos/coleifer/peewee/issues/1623 | https://api.github.com/repos/coleifer/peewee | https://api.github.com/repos/coleifer/peewee/issues/1623/labels{/name} | https://api.github.com/repos/coleifer/peewee/issues/1623/comments | https://api.github.com/repos/coleifer/peewee/issues/1623/events | https://github.com/coleifer/peewee/pull/1623 | 329,919,605 | MDExOlB1bGxSZXF1ZXN0MTkzMDUzMzY0 | 1,623 | Add an option to try to guess foreign keys | {
"login": "etiennepouliot",
"id": 5238993,
"node_id": "MDQ6VXNlcjUyMzg5OTM=",
"avatar_url": "https://avatars.githubusercontent.com/u/5238993?v=4",
"gravatar_id": "",
"url": "https://api.github.com/users/etiennepouliot",
"html_url": "https://github.com/etiennepouliot",
"followers_url": "https://api.gith... | [] | closed | false | null | [] | null | [
"I'm not interested in this patch, but thanks."
] | 2018-06-06T15:29:05 | 2018-06-07T13:14:44 | 2018-06-07T13:14:44 | NONE | null | Sometimes the foreign keys constraint arent't defined in the databases. (old version of RoR for example).
With this options, it will try to guess foreign keys with the name of the tables and an "_id" suffix. | {
"url": "https://api.github.com/repos/coleifer/peewee/issues/1623/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/1623/timeline | null | null | false | {
"url": "https://api.github.com/repos/coleifer/peewee/pulls/1623",
"html_url": "https://github.com/coleifer/peewee/pull/1623",
"diff_url": "https://github.com/coleifer/peewee/pull/1623.diff",
"patch_url": "https://github.com/coleifer/peewee/pull/1623.patch",
"merged_at": null
} |
https://api.github.com/repos/coleifer/peewee/issues/1622 | https://api.github.com/repos/coleifer/peewee | https://api.github.com/repos/coleifer/peewee/issues/1622/labels{/name} | https://api.github.com/repos/coleifer/peewee/issues/1622/comments | https://api.github.com/repos/coleifer/peewee/issues/1622/events | https://github.com/coleifer/peewee/issues/1622 | 329,684,340 | MDU6SXNzdWUzMjk2ODQzNDA= | 1,622 | Override Model __repr__ | {
"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 | [
"Well, theoretically in your example you would just:\r\n\r\n```python\r\ndef __str__(self):\r\n return self.label\r\n```\r\n\r\nBut for \"complete\" control...yeah, not do-able at the moment.\r\n\r\nWhat happens when you implement a `__repr__` method on your model class? Are you *also* implementing `__str__()`?... | 2018-06-06T02:04:07 | 2021-09-20T07:50:25 | 2018-06-07T13:20:16 | NONE | null | In peewee 2 I used to be able to override the `__repr__` of a Model by creating a custom class, for example
```python
class MyBase(Model):
def __repr__(self):
return '<{0}: {1}>'.format(self.__class__, self.label)
```
This doesn't seem to work anymore in peewee 3 because the `__repr__` is set in `... | {
"url": "https://api.github.com/repos/coleifer/peewee/issues/1622/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/1622/timeline | null | completed | null | null |
https://api.github.com/repos/coleifer/peewee/issues/1621 | https://api.github.com/repos/coleifer/peewee | https://api.github.com/repos/coleifer/peewee/issues/1621/labels{/name} | https://api.github.com/repos/coleifer/peewee/issues/1621/comments | https://api.github.com/repos/coleifer/peewee/issues/1621/events | https://github.com/coleifer/peewee/issues/1621 | 329,674,681 | MDU6SXNzdWUzMjk2NzQ2ODE= | 1,621 | Upsert documentation is incorrect | {
"login": "bmamouri",
"id": 6419173,
"node_id": "MDQ6VXNlcjY0MTkxNzM=",
"avatar_url": "https://avatars.githubusercontent.com/u/6419173?v=4",
"gravatar_id": "",
"url": "https://api.github.com/users/bmamouri",
"html_url": "https://github.com/bmamouri",
"followers_url": "https://api.github.com/users/bmamo... | [] | closed | false | null | [] | null | [
"The tests have an example:\r\n\r\n```python\r\n def test_update(self):\r\n # Conflict on empno - we'll preserve name and update the ID. This will\r\n # overwrite the previous row and set a new ID.\r\n res = (Emp\r\n .insert(first='foo', last='bar', empno='125')\r\n ... | 2018-06-06T01:00:16 | 2018-06-07T12:50:32 | 2018-06-07T12:50:32 | NONE | null | Upsert [documentation](http://docs.peewee-orm.com/en/latest/peewee/querying.html?highlight=upsert#upsert) refers to `on_conflict` method, but that method does not support `conflict_target` parameter anymore.
It is very confusing on what is the right approach to upsert into Postgresql database. I used this and it wor... | {
"url": "https://api.github.com/repos/coleifer/peewee/issues/1621/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/1621/timeline | null | completed | null | null |
https://api.github.com/repos/coleifer/peewee/issues/1620 | https://api.github.com/repos/coleifer/peewee | https://api.github.com/repos/coleifer/peewee/issues/1620/labels{/name} | https://api.github.com/repos/coleifer/peewee/issues/1620/comments | https://api.github.com/repos/coleifer/peewee/issues/1620/events | https://github.com/coleifer/peewee/issues/1620 | 329,307,199 | MDU6SXNzdWUzMjkzMDcxOTk= | 1,620 | BaseModelSelect.get does not accept a db | {
"login": "rammie",
"id": 554792,
"node_id": "MDQ6VXNlcjU1NDc5Mg==",
"avatar_url": "https://avatars.githubusercontent.com/u/554792?v=4",
"gravatar_id": "",
"url": "https://api.github.com/users/rammie",
"html_url": "https://github.com/rammie",
"followers_url": "https://api.github.com/users/rammie/follow... | [] | closed | false | null | [] | null | [
"When dealing with anything `Model`-related, the convention throughout the code is to rely on the database in `Model._meta.database`. The lower-level query-builder APIs support an explicit database parameter, however. For consistency it would also probably needed to be added everywhere else a model query can be exe... | 2018-06-05T05:30:53 | 2018-06-14T15:05:04 | 2018-06-12T16:33:10 | NONE | null | Could `db` be added as an optional parameter to this function that would be passed to `clone.execute()`? -
https://github.com/coleifer/peewee/blob/master/peewee.py#L5724
This would allow us to have much cleaner code when fetching a single row from a replica. As always, thanks so much for peewee! | {
"url": "https://api.github.com/repos/coleifer/peewee/issues/1620/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/1620/timeline | null | completed | null | null |
https://api.github.com/repos/coleifer/peewee/issues/1619 | https://api.github.com/repos/coleifer/peewee | https://api.github.com/repos/coleifer/peewee/issues/1619/labels{/name} | https://api.github.com/repos/coleifer/peewee/issues/1619/comments | https://api.github.com/repos/coleifer/peewee/issues/1619/events | https://github.com/coleifer/peewee/issues/1619 | 329,148,314 | MDU6SXNzdWUzMjkxNDgzMTQ= | 1,619 | Memory leak when using insert_many | {
"login": "rammie",
"id": 554792,
"node_id": "MDQ6VXNlcjU1NDc5Mg==",
"avatar_url": "https://avatars.githubusercontent.com/u/554792?v=4",
"gravatar_id": "",
"url": "https://api.github.com/users/rammie",
"html_url": "https://github.com/rammie",
"followers_url": "https://api.github.com/users/rammie/follow... | [] | closed | false | null | [] | null | [
"Very likely this did cause a memory issue, because peewee has to literally go through all the items and build up a sql string in-memory as well as a parameter list in-memory. Doing it one-at-a-time in a loop like your second example allows python gc to keep memory down. It's not a leak, just the nature of how it w... | 2018-06-04T17:28:56 | 2018-06-07T13:00:56 | 2018-06-06T06:27:49 | NONE | null | We are ingesting a large feed of data and had issues with ingestion jobs running out of memory. After adding some instrumentation, we were able to narrow down the issue to the peewee insertion code. We replaced the following lines:
```python
with db.database.atomic():
SomeModel.insert_many(items).execute()
``... | {
"url": "https://api.github.com/repos/coleifer/peewee/issues/1619/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/1619/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.