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/914 | https://api.github.com/repos/coleifer/peewee | https://api.github.com/repos/coleifer/peewee/issues/914/labels{/name} | https://api.github.com/repos/coleifer/peewee/issues/914/comments | https://api.github.com/repos/coleifer/peewee/issues/914/events | https://github.com/coleifer/peewee/issues/914 | 149,680,922 | MDU6SXNzdWUxNDk2ODA5MjI= | 914 | Sqlite datetime with timezone is not converted into datetime | {
"login": "goir",
"id": 586209,
"node_id": "MDQ6VXNlcjU4NjIwOQ==",
"avatar_url": "https://avatars.githubusercontent.com/u/586209?v=4",
"gravatar_id": "",
"url": "https://api.github.com/users/goir",
"html_url": "https://github.com/goir",
"followers_url": "https://api.github.com/users/goir/followers",
... | [] | closed | false | null | [] | null | [
"SQLite will store timezone info, but I'm not sure what facilities it provides for sorting when you've got a mixture of timezones (without involving various date functions). You'll probably want to read up on it here: https://www.sqlite.org/lang_datefunc.html -- It might be more convenient to convert to UTC in your... | 2016-04-20T07:16:21 | 2016-05-30T23:28:39 | 2016-05-30T23:28:39 | NONE | null | If you store a timezone aware datetime in sqlite the selected value is a unicode and not a datetime object.
```
import datetime
import pytz
from peewee import SqliteDatabase, PrimaryKeyField, DateTimeField, Model
db = SqliteDatabase('test.db')
class ModelA(Model):
id = PrimaryKeyField()
date = DateTimeFiel... | {
"url": "https://api.github.com/repos/coleifer/peewee/issues/914/reactions",
"total_count": 2,
"+1": 2,
"-1": 0,
"laugh": 0,
"hooray": 0,
"confused": 0,
"heart": 0,
"rocket": 0,
"eyes": 0
} | https://api.github.com/repos/coleifer/peewee/issues/914/timeline | null | completed | null | null |
https://api.github.com/repos/coleifer/peewee/issues/913 | https://api.github.com/repos/coleifer/peewee | https://api.github.com/repos/coleifer/peewee/issues/913/labels{/name} | https://api.github.com/repos/coleifer/peewee/issues/913/comments | https://api.github.com/repos/coleifer/peewee/issues/913/events | https://github.com/coleifer/peewee/issues/913 | 149,336,398 | MDU6SXNzdWUxNDkzMzYzOTg= | 913 | Genarated query problem | {
"login": "ck196",
"id": 1131215,
"node_id": "MDQ6VXNlcjExMzEyMTU=",
"avatar_url": "https://avatars.githubusercontent.com/u/1131215?v=4",
"gravatar_id": "",
"url": "https://api.github.com/users/ck196",
"html_url": "https://github.com/ck196",
"followers_url": "https://api.github.com/users/ck196/follower... | [] | closed | false | null | [] | null | [
"Please fix the formatting of code.\n",
"Sorry, i've updated code formatting.\n",
"To fix this I believe if you explicitly select the Video ID column you'll be set:\n\n``` python\nvideo = Video.select(Video.id).where(Video.name == 'v5.mp4')\nquery = Relationship.delete().where(Relationship.video == video)\nprin... | 2016-04-19T03:16:08 | 2016-04-23T02:34:00 | 2016-04-23T02:33:18 | NONE | null | I do deleted query on Relationship table
`
query = Relationship.delete().where(Relationship.video == video)
`
<class 'libs.basemodel.Relationship'> DELETE FROM "relationship" WHERE ("video_id" = (SELECT "t2"."id" FROM "video" AS t1 WHERE ("t1"."name" = ?) ORDER BY "t1"."add_date" DESC)) [u'v5.mp4']
Problem:
Operatio... | {
"url": "https://api.github.com/repos/coleifer/peewee/issues/913/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/913/timeline | null | completed | null | null |
https://api.github.com/repos/coleifer/peewee/issues/912 | https://api.github.com/repos/coleifer/peewee | https://api.github.com/repos/coleifer/peewee/issues/912/labels{/name} | https://api.github.com/repos/coleifer/peewee/issues/912/comments | https://api.github.com/repos/coleifer/peewee/issues/912/events | https://github.com/coleifer/peewee/issues/912 | 149,105,893 | MDU6SXNzdWUxNDkxMDU4OTM= | 912 | Please support cockroachdb | {
"login": "jet10000",
"id": 2258120,
"node_id": "MDQ6VXNlcjIyNTgxMjA=",
"avatar_url": "https://avatars.githubusercontent.com/u/2258120?v=4",
"gravatar_id": "",
"url": "https://api.github.com/users/jet10000",
"html_url": "https://github.com/jet10000",
"followers_url": "https://api.github.com/users/jet10... | [] | closed | false | null | [] | null | [
"Peewee should work with any Python DB-API 2.0 driver. It looks like work has started on adding one for cockroachdb:\n\nhttps://github.com/cockroachdb/cockroach-python/pull/12\n\nAfter that, follow the instructions here to integrate with Peewee:\n\nhttp://docs.peewee-orm.com/en/latest/peewee/database.html#adding-a-... | 2016-04-18T10:07:37 | 2016-04-19T18:20:11 | 2016-04-19T18:20:11 | NONE | null | https://www.cockroachlabs.com/
| {
"url": "https://api.github.com/repos/coleifer/peewee/issues/912/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/912/timeline | null | completed | null | null |
https://api.github.com/repos/coleifer/peewee/issues/911 | https://api.github.com/repos/coleifer/peewee | https://api.github.com/repos/coleifer/peewee/issues/911/labels{/name} | https://api.github.com/repos/coleifer/peewee/issues/911/comments | https://api.github.com/repos/coleifer/peewee/issues/911/events | https://github.com/coleifer/peewee/pull/911 | 147,836,704 | MDExOlB1bGxSZXF1ZXN0NjYyMDU5Nzg= | 911 | Change description of options in Using class docs | {
"login": "ahessert",
"id": 10226899,
"node_id": "MDQ6VXNlcjEwMjI2ODk5",
"avatar_url": "https://avatars.githubusercontent.com/u/10226899?v=4",
"gravatar_id": "",
"url": "https://api.github.com/users/ahessert",
"html_url": "https://github.com/ahessert",
"followers_url": "https://api.github.com/users/ahe... | [] | closed | false | null | [] | null | [
"Thanks!\n"
] | 2016-04-12T18:34:46 | 2016-04-12T21:35:41 | 2016-04-12T21:35:33 | CONTRIBUTOR | null | Previous description implied that the default for the "with_transaction" kwarg was False, while the default is True. Developers must specify "with_transaction=False" if they don't want to use a transaction block with the Using class context.
| {
"url": "https://api.github.com/repos/coleifer/peewee/issues/911/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/911/timeline | null | null | false | {
"url": "https://api.github.com/repos/coleifer/peewee/pulls/911",
"html_url": "https://github.com/coleifer/peewee/pull/911",
"diff_url": "https://github.com/coleifer/peewee/pull/911.diff",
"patch_url": "https://github.com/coleifer/peewee/pull/911.patch",
"merged_at": "2016-04-12T21:35:33"
} |
https://api.github.com/repos/coleifer/peewee/issues/910 | https://api.github.com/repos/coleifer/peewee | https://api.github.com/repos/coleifer/peewee/issues/910/labels{/name} | https://api.github.com/repos/coleifer/peewee/issues/910/comments | https://api.github.com/repos/coleifer/peewee/issues/910/events | https://github.com/coleifer/peewee/issues/910 | 147,648,191 | MDU6SXNzdWUxNDc2NDgxOTE= | 910 | cache result? | {
"login": "daoiqi",
"id": 2141872,
"node_id": "MDQ6VXNlcjIxNDE4NzI=",
"avatar_url": "https://avatars.githubusercontent.com/u/2141872?v=4",
"gravatar_id": "",
"url": "https://api.github.com/users/daoiqi",
"html_url": "https://github.com/daoiqi",
"followers_url": "https://api.github.com/users/daoiqi/foll... | [] | closed | false | null | [] | null | [
"Yes, try wrapping your select in an atomic block:\n\n``` python\nwith database.atomic():\n a = TVm.select()...\n```\n",
"``` python\nwhile True:\n uuid = '8d443fb7-3e30-4149-bb32-89ee5532eddc'\n a = TVm.select().where(\n TVm.uuid == uuid)\n for x in a:\n print x.crea... | 2016-04-12T06:39:42 | 2016-04-13T04:50:51 | 2016-04-12T14:42:46 | NONE | null | ``` python
class MyRetryDB(RetryOperationalError, MySQLDatabase):
pass
database = MyRetryDB(DB_CFG['db'],
**{'host': DB_CFG['host'],
'password': DB_CFG['passwd'],
'port': DB_CFG['port'], 'user': DB_CFG['user']})
class UnknownField(object):
... | {
"url": "https://api.github.com/repos/coleifer/peewee/issues/910/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/910/timeline | null | completed | null | null |
https://api.github.com/repos/coleifer/peewee/issues/909 | https://api.github.com/repos/coleifer/peewee | https://api.github.com/repos/coleifer/peewee/issues/909/labels{/name} | https://api.github.com/repos/coleifer/peewee/issues/909/comments | https://api.github.com/repos/coleifer/peewee/issues/909/events | https://github.com/coleifer/peewee/issues/909 | 147,321,856 | MDU6SXNzdWUxNDczMjE4NTY= | 909 | create new record can't get the database default value. | {
"login": "Dongin",
"id": 4242860,
"node_id": "MDQ6VXNlcjQyNDI4NjA=",
"avatar_url": "https://avatars.githubusercontent.com/u/4242860?v=4",
"gravatar_id": "",
"url": "https://api.github.com/users/Dongin",
"html_url": "https://github.com/Dongin",
"followers_url": "https://api.github.com/users/Dongin/foll... | [] | closed | false | null | [] | null | [
"Correct, because peewee is not magical, it will not magically retrieve a value that was created by the database server.\n\nYou look to be using MySQL, which AFAIK does not support INSERT ... RETURNING. So you will need to re-fetch the record or alternatively create the timestamp in Python and send it to the server... | 2016-04-11T05:42:49 | 2016-04-11T20:36:14 | 2016-04-11T20:36:14 | NONE | null | ```
class MyModel(Model):
create_at = DateTimeField(constraints=[SQL('DEFAULT CURRENT_TIMESTAMP')],
formats='%Y-%m-%d %H:%M:%S', verbose_name=‘Created time')
other_fields = xxx
inst = MyModel.create(other_fields=xxx)
print inst.create_at is None
```
The output is **True**.
| {
"url": "https://api.github.com/repos/coleifer/peewee/issues/909/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/909/timeline | null | completed | null | null |
https://api.github.com/repos/coleifer/peewee/issues/908 | https://api.github.com/repos/coleifer/peewee | https://api.github.com/repos/coleifer/peewee/issues/908/labels{/name} | https://api.github.com/repos/coleifer/peewee/issues/908/comments | https://api.github.com/repos/coleifer/peewee/issues/908/events | https://github.com/coleifer/peewee/pull/908 | 146,988,919 | MDExOlB1bGxSZXF1ZXN0NjU4MTk2MTU= | 908 | Update playhouse.rst | {
"login": "aaronwp",
"id": 1002418,
"node_id": "MDQ6VXNlcjEwMDI0MTg=",
"avatar_url": "https://avatars.githubusercontent.com/u/1002418?v=4",
"gravatar_id": "",
"url": "https://api.github.com/users/aaronwp",
"html_url": "https://github.com/aaronwp",
"followers_url": "https://api.github.com/users/aaronwp/... | [] | closed | false | null | [] | null | [
"Hmm, but `tuple` does have `len`...\n\n``` python\nIn [1]: x = (1,2,3)\n\nIn [2]: len(x)\nOut[2]: 3\n```\n",
"See my sample code below. For some reason I was thinking it was just a documentation issue, but perhaps it's a bug...? \n\n```\nmysql_db = PooledMySQLDatabase('dbname',\n h... | 2016-04-08T17:26:49 | 2016-04-09T21:19:43 | 2016-04-09T21:19:43 | NONE | null | I think read_slaves needs to be a list not a tuple. I was getting `TypeError: object of type '....' has no len()` until I made this change.
| {
"url": "https://api.github.com/repos/coleifer/peewee/issues/908/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/908/timeline | null | null | false | {
"url": "https://api.github.com/repos/coleifer/peewee/pulls/908",
"html_url": "https://github.com/coleifer/peewee/pull/908",
"diff_url": "https://github.com/coleifer/peewee/pull/908.diff",
"patch_url": "https://github.com/coleifer/peewee/pull/908.patch",
"merged_at": null
} |
https://api.github.com/repos/coleifer/peewee/issues/907 | https://api.github.com/repos/coleifer/peewee | https://api.github.com/repos/coleifer/peewee/issues/907/labels{/name} | https://api.github.com/repos/coleifer/peewee/issues/907/comments | https://api.github.com/repos/coleifer/peewee/issues/907/events | https://github.com/coleifer/peewee/issues/907 | 146,743,240 | MDU6SXNzdWUxNDY3NDMyNDA= | 907 | pskel not included in install | {
"login": "charleschen",
"id": 698190,
"node_id": "MDQ6VXNlcjY5ODE5MA==",
"avatar_url": "https://avatars.githubusercontent.com/u/698190?v=4",
"gravatar_id": "",
"url": "https://api.github.com/users/charleschen",
"html_url": "https://github.com/charleschen",
"followers_url": "https://api.github.com/user... | [] | closed | false | null | [] | null | [
"Not sure what happened...It doesn't look to have been in any release, so I guess I just spaced out. It will be included in the next release to pypi, which should be in the upcoming week or two.\n",
"thanks!\n"
] | 2016-04-07T21:10:12 | 2016-04-11T21:57:13 | 2016-04-11T20:49:48 | NONE | null | installing latest version of peewee doesn't include pskel. was there a reason not to include it in the setup.py?
| {
"url": "https://api.github.com/repos/coleifer/peewee/issues/907/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/907/timeline | null | completed | null | null |
https://api.github.com/repos/coleifer/peewee/issues/906 | https://api.github.com/repos/coleifer/peewee | https://api.github.com/repos/coleifer/peewee/issues/906/labels{/name} | https://api.github.com/repos/coleifer/peewee/issues/906/comments | https://api.github.com/repos/coleifer/peewee/issues/906/events | https://github.com/coleifer/peewee/issues/906 | 146,343,120 | MDU6SXNzdWUxNDYzNDMxMjA= | 906 | NoneType error when deleting an instance with multiple null foreign keys | {
"login": "nomorepanic",
"id": 9201926,
"node_id": "MDQ6VXNlcjkyMDE5MjY=",
"avatar_url": "https://avatars.githubusercontent.com/u/9201926?v=4",
"gravatar_id": "",
"url": "https://api.github.com/users/nomorepanic",
"html_url": "https://github.com/nomorepanic",
"followers_url": "https://api.github.com/us... | [] | closed | false | null | [] | null | [
"Pushed a testcase... It passed locally on py2.7 with sqlite, so we'll see what's up.\n",
"I found what's happening. My model has a nullable 'delete' field and that overwrites the delete method. \nThank you for prompt reply but it was my distraction :)\n\nYou could consider renaming the delete method to _delete, ... | 2016-04-06T15:05:39 | 2016-04-07T16:00:44 | 2016-04-07T16:00:44 | NONE | null | peewee raises a NoneType error when deleting an instance with multiple null foreign keys, e.g.:
```
Schools(Base):
id = PrimaryKeyField(primary_key=True)
name = CharField()
Parent(Base):
id = PrimaryKeyField(primary_key=True)
name = CharField()
Children(Base):
id = PrimaryKeyField(primary_key=Tru... | {
"url": "https://api.github.com/repos/coleifer/peewee/issues/906/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/906/timeline | null | completed | null | null |
https://api.github.com/repos/coleifer/peewee/issues/905 | https://api.github.com/repos/coleifer/peewee | https://api.github.com/repos/coleifer/peewee/issues/905/labels{/name} | https://api.github.com/repos/coleifer/peewee/issues/905/comments | https://api.github.com/repos/coleifer/peewee/issues/905/events | https://github.com/coleifer/peewee/pull/905 | 145,890,284 | MDExOlB1bGxSZXF1ZXN0NjUyNTI2NzA= | 905 | doc shows wrong default value for wrapped_count parameter | {
"login": "lixxu",
"id": 264487,
"node_id": "MDQ6VXNlcjI2NDQ4Nw==",
"avatar_url": "https://avatars.githubusercontent.com/u/264487?v=4",
"gravatar_id": "",
"url": "https://api.github.com/users/lixxu",
"html_url": "https://github.com/lixxu",
"followers_url": "https://api.github.com/users/lixxu/followers"... | [] | closed | false | null | [] | null | [
"Thank you for this!\n"
] | 2016-04-05T05:22:27 | 2016-04-07T18:47:22 | 2016-04-07T18:47:17 | CONTRIBUTOR | null | `wrapped_count` has default value `False` for `clear_limit`, but the doc shows `True`
| {
"url": "https://api.github.com/repos/coleifer/peewee/issues/905/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/905/timeline | null | null | false | {
"url": "https://api.github.com/repos/coleifer/peewee/pulls/905",
"html_url": "https://github.com/coleifer/peewee/pull/905",
"diff_url": "https://github.com/coleifer/peewee/pull/905.diff",
"patch_url": "https://github.com/coleifer/peewee/pull/905.patch",
"merged_at": "2016-04-07T18:47:17"
} |
https://api.github.com/repos/coleifer/peewee/issues/904 | https://api.github.com/repos/coleifer/peewee | https://api.github.com/repos/coleifer/peewee/issues/904/labels{/name} | https://api.github.com/repos/coleifer/peewee/issues/904/comments | https://api.github.com/repos/coleifer/peewee/issues/904/events | https://github.com/coleifer/peewee/pull/904 | 145,387,464 | MDExOlB1bGxSZXF1ZXN0NjUwNDE1NjM= | 904 | Removed side effects while cleaning prefetch query | {
"login": "kammala",
"id": 4599701,
"node_id": "MDQ6VXNlcjQ1OTk3MDE=",
"avatar_url": "https://avatars.githubusercontent.com/u/4599701?v=4",
"gravatar_id": "",
"url": "https://api.github.com/users/kammala",
"html_url": "https://github.com/kammala",
"followers_url": "https://api.github.com/users/kammala/... | [] | closed | false | null | [] | null | [
"Nice pull request, and nice catch. Thanks!\n"
] | 2016-04-02T15:55:10 | 2016-04-03T02:40:00 | 2016-04-03T02:39:53 | CONTRIBUTOR | null | There was a strange behaviour: then you do prefetch on complex query with some grouping, you will have some kind of exception or incorrect result. The reason of this is simple: `clean_prefetch_query` removes any information about grouping from query before placing it as subquery in prefetch queries, but it is done on o... | {
"url": "https://api.github.com/repos/coleifer/peewee/issues/904/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/904/timeline | null | null | false | {
"url": "https://api.github.com/repos/coleifer/peewee/pulls/904",
"html_url": "https://github.com/coleifer/peewee/pull/904",
"diff_url": "https://github.com/coleifer/peewee/pull/904.diff",
"patch_url": "https://github.com/coleifer/peewee/pull/904.patch",
"merged_at": "2016-04-03T02:39:53"
} |
https://api.github.com/repos/coleifer/peewee/issues/903 | https://api.github.com/repos/coleifer/peewee | https://api.github.com/repos/coleifer/peewee/issues/903/labels{/name} | https://api.github.com/repos/coleifer/peewee/issues/903/comments | https://api.github.com/repos/coleifer/peewee/issues/903/events | https://github.com/coleifer/peewee/issues/903 | 145,362,472 | MDU6SXNzdWUxNDUzNjI0NzI= | 903 | Polymorphic relationships | {
"login": "smilledge",
"id": 1536407,
"node_id": "MDQ6VXNlcjE1MzY0MDc=",
"avatar_url": "https://avatars.githubusercontent.com/u/1536407?v=4",
"gravatar_id": "",
"url": "https://api.github.com/users/smilledge",
"html_url": "https://github.com/smilledge",
"followers_url": "https://api.github.com/users/sm... | [] | closed | false | null | [] | null | [
"It's named Generic Foreign Keys. Check the Playhouse docs.\nOn Apr 2, 2016 2:07 PM, \"Sam Milledge\" notifications@github.com wrote:\n\n> Does peewee support polymorphic relationships?\n> \n> Would be awesome to have something similar to what is provided by Laravel\n> and Rails:\n> https://laravel.com/docs/5.1/elo... | 2016-04-02T11:07:41 | 2018-03-19T09:27:44 | 2016-04-03T00:46:38 | NONE | null | Does peewee support polymorphic relationships?
Would be awesome to have something similar to what is provided by Laravel and Rails:
https://laravel.com/docs/5.1/eloquent-relationships#polymorphic-relations
http://guides.rubyonrails.org/association_basics.html#polymorphic-associations
| {
"url": "https://api.github.com/repos/coleifer/peewee/issues/903/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/903/timeline | null | completed | null | null |
https://api.github.com/repos/coleifer/peewee/issues/902 | https://api.github.com/repos/coleifer/peewee | https://api.github.com/repos/coleifer/peewee/issues/902/labels{/name} | https://api.github.com/repos/coleifer/peewee/issues/902/comments | https://api.github.com/repos/coleifer/peewee/issues/902/events | https://github.com/coleifer/peewee/issues/902 | 144,563,715 | MDU6SXNzdWUxNDQ1NjM3MTU= | 902 | TypeError: unhashable type: 'list' when using playhouse.dataset with Postgres | {
"login": "mivade",
"id": 2805515,
"node_id": "MDQ6VXNlcjI4MDU1MTU=",
"avatar_url": "https://avatars.githubusercontent.com/u/2805515?v=4",
"gravatar_id": "",
"url": "https://api.github.com/users/mivade",
"html_url": "https://github.com/mivade",
"followers_url": "https://api.github.com/users/mivade/foll... | [] | closed | false | null | [] | null | [
"I'm a bit at a loss. Can you tell me what `table.model._meta.primary_key` returns? As well as `table._meta.fields`. Thanks!\n",
"Basically it looks like your table has a composite primary key, and when asked for `table.model._meta.primary_key.field_names`, it's returning a list of lists?\n",
"Hm, that could be... | 2016-03-30T11:44:16 | 2016-03-31T21:03:26 | 2016-03-31T21:03:26 | NONE | null | I'm attempting to use the `playhouse.dataset` to lazily write data to a Postgres database. The data looks like this:
``` python
{'beat1_lb_mon': 10.0,
'beat1_lb_status': 0,
'beat1_signal': 0.750122,
'beat1_signalaux': 0.377197,
'beat1_waveplate': 32830.0,
'beat2_lb_mon': 10.0,
'beat2_lb_status': 0,
'beat2_signa... | {
"url": "https://api.github.com/repos/coleifer/peewee/issues/902/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/902/timeline | null | completed | null | null |
https://api.github.com/repos/coleifer/peewee/issues/901 | https://api.github.com/repos/coleifer/peewee | https://api.github.com/repos/coleifer/peewee/issues/901/labels{/name} | https://api.github.com/repos/coleifer/peewee/issues/901/comments | https://api.github.com/repos/coleifer/peewee/issues/901/events | https://github.com/coleifer/peewee/issues/901 | 144,405,924 | MDU6SXNzdWUxNDQ0MDU5MjQ= | 901 | Migration to change CharField max_length | {
"login": "josefdlange",
"id": 1062835,
"node_id": "MDQ6VXNlcjEwNjI4MzU=",
"avatar_url": "https://avatars.githubusercontent.com/u/1062835?v=4",
"gravatar_id": "",
"url": "https://api.github.com/users/josefdlange",
"html_url": "https://github.com/josefdlange",
"followers_url": "https://api.github.com/us... | [] | closed | false | null | [] | null | [
"Indeed, for that you will need to probably consult the postgres manual for the correct SQL. Peewee handles most things, but this is one of the ones it doesn't.\n"
] | 2016-03-29T22:19:01 | 2016-03-30T04:13:39 | 2016-03-30T04:13:39 | CONTRIBUTOR | null | The title says the most of it. I'm using `arnold` for migrations on my PostgreSQL database, and I think I'd want to do something like:
```
def up():
config.DB.execute_sql("SOME arbitrary SQL to MODIFY column;")
def down():
config.DB.execute_sql("OPPOSITE of ABOVE SQL code;")
```
Does that sound about right?... | {
"url": "https://api.github.com/repos/coleifer/peewee/issues/901/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/901/timeline | null | completed | null | null |
https://api.github.com/repos/coleifer/peewee/issues/900 | https://api.github.com/repos/coleifer/peewee | https://api.github.com/repos/coleifer/peewee/issues/900/labels{/name} | https://api.github.com/repos/coleifer/peewee/issues/900/comments | https://api.github.com/repos/coleifer/peewee/issues/900/events | https://github.com/coleifer/peewee/issues/900 | 143,987,019 | MDU6SXNzdWUxNDM5ODcwMTk= | 900 | Can I define a default ORDER BY for a relationship? | {
"login": "maaaks",
"id": 3010238,
"node_id": "MDQ6VXNlcjMwMTAyMzg=",
"avatar_url": "https://avatars.githubusercontent.com/u/3010238?v=4",
"gravatar_id": "",
"url": "https://api.github.com/users/maaaks",
"html_url": "https://github.com/maaaks",
"followers_url": "https://api.github.com/users/maaaks/foll... | [] | closed | false | null | [] | null | [
"Your example foreign key definition doesn't make much sense...why would the foreign key be called \"child\" when it points at a Parent? I'm just going to assume this is a meaningless example...\n\nAt any rate, you can always just do:\n\n``` python\nclass Category(Model):\n parent = ForeignKeyField(\"self\", rel... | 2016-03-28T14:16:07 | 2016-03-29T18:56:51 | 2016-03-29T18:56:51 | CONTRIBUTOR | null | I want something like this:
``` python
child = ForeignKeyField(Parent, related_name="children", default_order_by="birthday")
```
| {
"url": "https://api.github.com/repos/coleifer/peewee/issues/900/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/900/timeline | null | completed | null | null |
https://api.github.com/repos/coleifer/peewee/issues/899 | https://api.github.com/repos/coleifer/peewee | https://api.github.com/repos/coleifer/peewee/issues/899/labels{/name} | https://api.github.com/repos/coleifer/peewee/issues/899/comments | https://api.github.com/repos/coleifer/peewee/issues/899/events | https://github.com/coleifer/peewee/issues/899 | 143,778,546 | MDU6SXNzdWUxNDM3Nzg1NDY= | 899 | Constraints not generated when using `DeferredRelation` with `ForeignKeyField` | {
"login": "frnhr",
"id": 1173748,
"node_id": "MDQ6VXNlcjExNzM3NDg=",
"avatar_url": "https://avatars.githubusercontent.com/u/1173748?v=4",
"gravatar_id": "",
"url": "https://api.github.com/users/frnhr",
"html_url": "https://github.com/frnhr",
"followers_url": "https://api.github.com/users/frnhr/follower... | [] | closed | false | null | [] | null | [
"http://docs.peewee-orm.com/en/latest/peewee/models.html#circular-foreign-key-dependencies\n\nIf you read through that section, you'll see towards the end that you need to explicitly create the foreign key constraint:\n\n> After initializing the deferred relation, the foreign key fields are now correctly set up. Th... | 2016-03-27T05:36:44 | 2016-03-29T21:23:18 | 2016-03-29T19:04:21 | NONE | null | When using `DeferredRelation` with a `ForeignKeyField`, resulting MySQL table is missing a foreign key constraint. This constraint is present when regular model is passed to `ForeignKeyField`.
Complete code to replicate the issue...
foo.py:
```
""" Three models:
PostNotDeferred ---< User >--- PostThatsDeferred
... | {
"url": "https://api.github.com/repos/coleifer/peewee/issues/899/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/899/timeline | null | completed | null | null |
https://api.github.com/repos/coleifer/peewee/issues/898 | https://api.github.com/repos/coleifer/peewee | https://api.github.com/repos/coleifer/peewee/issues/898/labels{/name} | https://api.github.com/repos/coleifer/peewee/issues/898/comments | https://api.github.com/repos/coleifer/peewee/issues/898/events | https://github.com/coleifer/peewee/issues/898 | 143,776,432 | MDU6SXNzdWUxNDM3NzY0MzI= | 898 | Is it possible to do a coalesce with peewee? | {
"login": "KrisSiegel",
"id": 1885826,
"node_id": "MDQ6VXNlcjE4ODU4MjY=",
"avatar_url": "https://avatars.githubusercontent.com/u/1885826?v=4",
"gravatar_id": "",
"url": "https://api.github.com/users/KrisSiegel",
"html_url": "https://github.com/KrisSiegel",
"followers_url": "https://api.github.com/users... | [] | closed | false | null | [] | null | [
"Yep, it's possible.\n\ne.g.:\n\n``` python\nSomeModel.select(fn.COALESCE(SomeModel.field_a, SomeModel.field_b).alias('the_value))\n```\n",
"Thanks, didn't see that in the documentation anywhere.\n",
"It's described here:\n\nhttp://docs.peewee-orm.com/en/latest/peewee/querying.html#sql-functions-subqueries-and-... | 2016-03-27T04:42:03 | 2020-10-10T17:26:22 | 2016-03-29T19:08:58 | NONE | null | I have 3 fields that I want to return as one field (2 of the 3 will _always_ be NULL so I only want the one with a value) but I haven't been able to find any documentation that shows a way to handle this in PeeWee. Am I missing something?
| {
"url": "https://api.github.com/repos/coleifer/peewee/issues/898/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/898/timeline | null | completed | null | null |
https://api.github.com/repos/coleifer/peewee/issues/897 | https://api.github.com/repos/coleifer/peewee | https://api.github.com/repos/coleifer/peewee/issues/897/labels{/name} | https://api.github.com/repos/coleifer/peewee/issues/897/comments | https://api.github.com/repos/coleifer/peewee/issues/897/events | https://github.com/coleifer/peewee/issues/897 | 143,462,314 | MDU6SXNzdWUxNDM0NjIzMTQ= | 897 | Is it possible to load multiple JOINed models using a RawQuery? | {
"login": "maaaks",
"id": 3010238,
"node_id": "MDQ6VXNlcjMwMTAyMzg=",
"avatar_url": "https://avatars.githubusercontent.com/u/3010238?v=4",
"gravatar_id": "",
"url": "https://api.github.com/users/maaaks",
"html_url": "https://github.com/maaaks",
"followers_url": "https://api.github.com/users/maaaks/foll... | [] | closed | false | null | [] | null | [
"As far as I understand, [`generate_column_map()`](https://github.com/coleifer/peewee/blob/65dbfc5b3b406278df15d55bd48dbfc4ab6f7d6f/peewee.py#L2205) generates a list containing every field in every model mentioned in `select()`, in the same order as they are defined in classes. Can I consider this a defined behavio... | 2016-03-25T09:20:06 | 2016-04-23T17:20:13 | 2016-04-23T02:40:18 | CONTRIBUTOR | null | If yes, how should I write the query, which aliases to use for rows?
For example, I want to load a `Site` object with joined `Page` objects which should be loaded using a custom recursive query.
| {
"url": "https://api.github.com/repos/coleifer/peewee/issues/897/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/897/timeline | null | completed | null | null |
https://api.github.com/repos/coleifer/peewee/issues/896 | https://api.github.com/repos/coleifer/peewee | https://api.github.com/repos/coleifer/peewee/issues/896/labels{/name} | https://api.github.com/repos/coleifer/peewee/issues/896/comments | https://api.github.com/repos/coleifer/peewee/issues/896/events | https://github.com/coleifer/peewee/issues/896 | 142,968,771 | MDU6SXNzdWUxNDI5Njg3NzE= | 896 | Commit after select | {
"login": "asztalosdani",
"id": 9664767,
"node_id": "MDQ6VXNlcjk2NjQ3Njc=",
"avatar_url": "https://avatars.githubusercontent.com/u/9664767?v=4",
"gravatar_id": "",
"url": "https://api.github.com/users/asztalosdani",
"html_url": "https://github.com/asztalosdani",
"followers_url": "https://api.github.com... | [] | closed | false | null | [] | null | [
"Actually, `PostgresqlDatabase` does call commit after every select query. How are you declaring / instantiating your database? What type of app is this?\n",
"It's a QT app, working in Maya, connecting to DB to select the project, then the asset you will work on.\nPostgresqlDatabase was instanciated with autocomm... | 2016-03-23T14:07:45 | 2017-03-06T15:40:05 | 2016-03-23T16:24:20 | NONE | null | Hi!
I am using peewee with PostgreSQL. I have tons of connections, which are 'idle in transaction', even if they use only select statements. If I call commit(), it becomes 'idle'. Why is there a transaction for the selects? Do I need to explicitly call commit?
Example:
```
plist = Person.select()
for person in plist... | {
"url": "https://api.github.com/repos/coleifer/peewee/issues/896/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/896/timeline | null | completed | null | null |
https://api.github.com/repos/coleifer/peewee/issues/895 | https://api.github.com/repos/coleifer/peewee | https://api.github.com/repos/coleifer/peewee/issues/895/labels{/name} | https://api.github.com/repos/coleifer/peewee/issues/895/comments | https://api.github.com/repos/coleifer/peewee/issues/895/events | https://github.com/coleifer/peewee/issues/895 | 142,964,920 | MDU6SXNzdWUxNDI5NjQ5MjA= | 895 | How do I update a foreign key directly? | {
"login": "maaaks",
"id": 3010238,
"node_id": "MDQ6VXNlcjMwMTAyMzg=",
"avatar_url": "https://avatars.githubusercontent.com/u/3010238?v=4",
"gravatar_id": "",
"url": "https://api.github.com/users/maaaks",
"html_url": "https://github.com/maaaks",
"followers_url": "https://api.github.com/users/maaaks/foll... | [] | closed | false | null | [] | null | [
"Fixed, thanks for reporting.\n",
"For what it's worth you can always set the actual foreign key field to an integer ID:\n\n``` python\nmodel.relatedmodel = 1\n```\n",
"This is great. It always seemed odd to me to assign an integer to an attribute that really should be an object.\n\nDoes this change also allow ... | 2016-03-23T13:52:48 | 2016-05-04T20:28:16 | 2016-05-04T20:28:16 | CONTRIBUTOR | null | This doesn't seem to work:
``` python
model.relatedmodel_id = 1
```
| {
"url": "https://api.github.com/repos/coleifer/peewee/issues/895/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/895/timeline | null | completed | null | null |
https://api.github.com/repos/coleifer/peewee/issues/894 | https://api.github.com/repos/coleifer/peewee | https://api.github.com/repos/coleifer/peewee/issues/894/labels{/name} | https://api.github.com/repos/coleifer/peewee/issues/894/comments | https://api.github.com/repos/coleifer/peewee/issues/894/events | https://github.com/coleifer/peewee/issues/894 | 142,748,363 | MDU6SXNzdWUxNDI3NDgzNjM= | 894 | Blob fields of variable (possibly huge) size? | {
"login": "gitttt",
"id": 9463528,
"node_id": "MDQ6VXNlcjk0NjM1Mjg=",
"avatar_url": "https://avatars.githubusercontent.com/u/9463528?v=4",
"gravatar_id": "",
"url": "https://api.github.com/users/gitttt",
"html_url": "https://github.com/gitttt",
"followers_url": "https://api.github.com/users/gitttt/foll... | [] | closed | false | null | [] | null | [
"Wow, I'm not sure how to advise you, I'd suggest consulting the MySQL documentation and if that doesn't help, seeing about reaching out on whatever support channels they have...or StackOverflow?\n\nIf you want to do a LONGBLOB field in peewee, you'll need to add a custom field type for it as blob fields correspond... | 2016-03-22T19:07:50 | 2016-03-25T15:49:30 | 2016-03-23T14:55:56 | NONE | null | Is it possible to create fields of variable (possibly huge) size?
I am currently using `memory_content = BlobField(null=True)`. This seems not to be the right choice as I get
`/opt/Python2.7-32bit/lib/python2.7/site-packages/pymysql/cursors.py:158: Warning: Data truncated for column 'memory_content' at row 1`
I am u... | {
"url": "https://api.github.com/repos/coleifer/peewee/issues/894/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/894/timeline | null | completed | null | null |
https://api.github.com/repos/coleifer/peewee/issues/893 | https://api.github.com/repos/coleifer/peewee | https://api.github.com/repos/coleifer/peewee/issues/893/labels{/name} | https://api.github.com/repos/coleifer/peewee/issues/893/comments | https://api.github.com/repos/coleifer/peewee/issues/893/events | https://github.com/coleifer/peewee/pull/893 | 142,600,293 | MDExOlB1bGxSZXF1ZXN0NjM2OTQ3NzE= | 893 | Fix logic error | {
"login": "lneoe",
"id": 2282449,
"node_id": "MDQ6VXNlcjIyODI0NDk=",
"avatar_url": "https://avatars.githubusercontent.com/u/2282449?v=4",
"gravatar_id": "",
"url": "https://api.github.com/users/lneoe",
"html_url": "https://github.com/lneoe",
"followers_url": "https://api.github.com/users/lneoe/follower... | [] | closed | false | null | [] | null | [
"Thanks, I've committed equivalent patch with a testcase. I appreciate this fix!!\n"
] | 2016-03-22T10:04:06 | 2016-03-23T14:52:01 | 2016-03-23T14:51:42 | NONE | null | ## Fixed
- fix logic error in `playhouse.shortcuts.model_to_dict`
if `backrefs = True`, only `descriptor` and `foreign_key` fields both not in the `only` will excute `continue`
```
class User(Model):
name = CharField()
class Tweet(Model):
use = ForeignKeyField(User, related_name='tweets')
user = User(name... | {
"url": "https://api.github.com/repos/coleifer/peewee/issues/893/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/893/timeline | null | null | false | {
"url": "https://api.github.com/repos/coleifer/peewee/pulls/893",
"html_url": "https://github.com/coleifer/peewee/pull/893",
"diff_url": "https://github.com/coleifer/peewee/pull/893.diff",
"patch_url": "https://github.com/coleifer/peewee/pull/893.patch",
"merged_at": null
} |
https://api.github.com/repos/coleifer/peewee/issues/892 | https://api.github.com/repos/coleifer/peewee | https://api.github.com/repos/coleifer/peewee/issues/892/labels{/name} | https://api.github.com/repos/coleifer/peewee/issues/892/comments | https://api.github.com/repos/coleifer/peewee/issues/892/events | https://github.com/coleifer/peewee/issues/892 | 142,380,397 | MDU6SXNzdWUxNDIzODAzOTc= | 892 | Create makes table, but no columns | {
"login": "Neotric",
"id": 17950579,
"node_id": "MDQ6VXNlcjE3OTUwNTc5",
"avatar_url": "https://avatars.githubusercontent.com/u/17950579?v=4",
"gravatar_id": "",
"url": "https://api.github.com/users/Neotric",
"html_url": "https://github.com/Neotric",
"followers_url": "https://api.github.com/users/Neotri... | [] | closed | false | null | [] | null | [
"I am positive there is a bug in your code somewhere. I'd suggest posting on stackoverflow and INCLUDE YOUR MODEL DEFINITION and code you're using to create the table. That'll help get the problem fixed the fastest.\n\nThis page is for tracking bugs with peewee and creating tables is covered extensively by tests.\n... | 2016-03-21T15:18:27 | 2016-03-21T15:25:46 | 2016-03-21T15:25:46 | NONE | null | Hello,
Tried my first steps with peewee, looks good, but....
I did a create_table(mytable), the table was created, but none of the defined columns in the class mytable. I want three columns, all CharField(). I only get an column "id" INTEGER NOT NULL PRIMARY KEY. On data insertion rows are created with one column ("id"... | {
"url": "https://api.github.com/repos/coleifer/peewee/issues/892/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/892/timeline | null | completed | null | null |
https://api.github.com/repos/coleifer/peewee/issues/891 | https://api.github.com/repos/coleifer/peewee | https://api.github.com/repos/coleifer/peewee/issues/891/labels{/name} | https://api.github.com/repos/coleifer/peewee/issues/891/comments | https://api.github.com/repos/coleifer/peewee/issues/891/events | https://github.com/coleifer/peewee/issues/891 | 142,194,454 | MDU6SXNzdWUxNDIxOTQ0NTQ= | 891 | What is the reason to use keyword argument in positional style? | {
"login": "kiddten",
"id": 9250239,
"node_id": "MDQ6VXNlcjkyNTAyMzk=",
"avatar_url": "https://avatars.githubusercontent.com/u/9250239?v=4",
"gravatar_id": "",
"url": "https://api.github.com/users/kiddten",
"html_url": "https://github.com/kiddten",
"followers_url": "https://api.github.com/users/kiddten/... | [] | closed | false | null | [] | null | [
"No, it's not better. It's just that you think it's better.\n"
] | 2016-03-20T19:17:05 | 2016-03-21T14:26:25 | 2016-03-21T14:26:25 | NONE | null | https://peewee.readthedocs.org/en/2.0.2/peewee/cookbook.html#using-with-postgresql
``` python
psql_db = PostgresqlDatabase('my_database', user='code')
```
Isn't
``` python
psql_db = PostgresqlDatabase(database='my_database', user='code')
```
better?
I understand that that is matter of taste. But it's kind of offi... | {
"url": "https://api.github.com/repos/coleifer/peewee/issues/891/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/891/timeline | null | completed | null | null |
https://api.github.com/repos/coleifer/peewee/issues/890 | https://api.github.com/repos/coleifer/peewee | https://api.github.com/repos/coleifer/peewee/issues/890/labels{/name} | https://api.github.com/repos/coleifer/peewee/issues/890/comments | https://api.github.com/repos/coleifer/peewee/issues/890/events | https://github.com/coleifer/peewee/issues/890 | 142,073,140 | MDU6SXNzdWUxNDIwNzMxNDA= | 890 | VersionedModel | {
"login": "kramer65",
"id": 596581,
"node_id": "MDQ6VXNlcjU5NjU4MQ==",
"avatar_url": "https://avatars.githubusercontent.com/u/596581?v=4",
"gravatar_id": "",
"url": "https://api.github.com/users/kramer65",
"html_url": "https://github.com/kramer65",
"followers_url": "https://api.github.com/users/kramer6... | [] | closed | false | null | [] | null | [
"This is neat, but I think it would be more appropriate as a separate library. There are quite a few opinions in this code, and I prefer to keep the playhouse stuff a bit more generic than this module.\n\nBe happy to add a link in the docs if you end up releasing it as a library.\n",
"@coleifer \n\nThanks for you... | 2016-03-19T15:40:31 | 2016-03-20T08:29:59 | 2016-03-19T21:59:11 | NONE | null | Hi @coleifer
I needed a way to keep the full history of all records so that after an update I know what changed or after a delete I know what was deleted. So I had a brilliant programmer (not me) create some code, which I [just committed here](https://github.com/kramer65/peewee/blob/feature/versioned/playhouse/versio... | {
"url": "https://api.github.com/repos/coleifer/peewee/issues/890/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/890/timeline | null | completed | null | null |
https://api.github.com/repos/coleifer/peewee/issues/889 | https://api.github.com/repos/coleifer/peewee | https://api.github.com/repos/coleifer/peewee/issues/889/labels{/name} | https://api.github.com/repos/coleifer/peewee/issues/889/comments | https://api.github.com/repos/coleifer/peewee/issues/889/events | https://github.com/coleifer/peewee/issues/889 | 141,833,950 | MDU6SXNzdWUxNDE4MzM5NTA= | 889 | LookupError: unknown encoding: utf8mb4 | {
"login": "fraba",
"id": 4167193,
"node_id": "MDQ6VXNlcjQxNjcxOTM=",
"avatar_url": "https://avatars.githubusercontent.com/u/4167193?v=4",
"gravatar_id": "",
"url": "https://api.github.com/users/fraba",
"html_url": "https://github.com/fraba",
"followers_url": "https://api.github.com/users/fraba/follower... | [] | closed | false | null | [] | null | [
"This error is coming from the MySQL driver so I suspect that peewee isn't the issue... But.\n\nDoes peewee need to run any special queries before the create table query?\n"
] | 2016-03-18T10:53:16 | 2016-03-21T15:13:45 | 2016-03-21T15:13:45 | NONE | null | I'm not sure whether the problem is linked to my specific settings, but it seems I can't do `table_exists` on connection with a mysql database using `charset = utf8mb4`.
I previously altered my database with
```
SET NAMES utf8mb4;
ALTER DATABASE my_database CHARACTER SET = utf8mb4 COLLATE = utf8mb4_unicode_ci;
```
... | {
"url": "https://api.github.com/repos/coleifer/peewee/issues/889/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/889/timeline | null | completed | null | null |
https://api.github.com/repos/coleifer/peewee/issues/888 | https://api.github.com/repos/coleifer/peewee | https://api.github.com/repos/coleifer/peewee/issues/888/labels{/name} | https://api.github.com/repos/coleifer/peewee/issues/888/comments | https://api.github.com/repos/coleifer/peewee/issues/888/events | https://github.com/coleifer/peewee/issues/888 | 141,289,552 | MDU6SXNzdWUxNDEyODk1NTI= | 888 | Can't do eager loading | {
"login": "maaaks",
"id": 3010238,
"node_id": "MDQ6VXNlcjMwMTAyMzg=",
"avatar_url": "https://avatars.githubusercontent.com/u/3010238?v=4",
"gravatar_id": "",
"url": "https://api.github.com/users/maaaks",
"html_url": "https://github.com/maaaks",
"followers_url": "https://api.github.com/users/maaaks/foll... | [] | closed | false | null | [] | null | [
"You have a couple options, as described in the docs:\n\nhttp://docs.peewee-orm.com/en/latest/peewee/querying.html#avoiding-n-1-queries\n\nUse prefetch (my recommendation). This will run 4 queries (one for each table). Duplicates are not fetched, so there is no de-duping required.\n\n``` python\nhosted = HostedSite... | 2016-03-16T14:21:15 | 2016-03-17T12:44:42 | 2016-03-17T07:05:05 | CONTRIBUTOR | null | Hello. Please help me.
I'm beginning to use Peewee for a project, and I don't understand how to make it eagerly load everything I need in the following situation.
I have a model called HostedSite, which contains (one-to-many) zero or more HostedSitePage's, each of which is connected (many-to-many) with zero or more O... | {
"url": "https://api.github.com/repos/coleifer/peewee/issues/888/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/888/timeline | null | completed | null | null |
https://api.github.com/repos/coleifer/peewee/issues/887 | https://api.github.com/repos/coleifer/peewee | https://api.github.com/repos/coleifer/peewee/issues/887/labels{/name} | https://api.github.com/repos/coleifer/peewee/issues/887/comments | https://api.github.com/repos/coleifer/peewee/issues/887/events | https://github.com/coleifer/peewee/issues/887 | 140,601,108 | MDU6SXNzdWUxNDA2MDExMDg= | 887 | does peewee support tormysql? | {
"login": "indoorwise",
"id": 8873448,
"node_id": "MDQ6VXNlcjg4NzM0NDg=",
"avatar_url": "https://avatars.githubusercontent.com/u/8873448?v=4",
"gravatar_id": "",
"url": "https://api.github.com/users/indoorwise",
"html_url": "https://github.com/indoorwise",
"followers_url": "https://api.github.com/users... | [] | closed | false | null | [] | null | [
"I am not sure, but my guess is no. If you want some inspiration about implementing Peewee with event loops, check out https://github.com/05bit/peewee-async/blob/master/peewee_async.py\n"
] | 2016-03-14T07:55:45 | 2016-03-14T13:22:32 | 2016-03-14T13:22:31 | NONE | null | examples of peewee with mysql use pymysql,but this library is synchronized,tormysql is asynchoronized library, peewee can support it?
| {
"url": "https://api.github.com/repos/coleifer/peewee/issues/887/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/887/timeline | null | completed | null | null |
https://api.github.com/repos/coleifer/peewee/issues/886 | https://api.github.com/repos/coleifer/peewee | https://api.github.com/repos/coleifer/peewee/issues/886/labels{/name} | https://api.github.com/repos/coleifer/peewee/issues/886/comments | https://api.github.com/repos/coleifer/peewee/issues/886/events | https://github.com/coleifer/peewee/issues/886 | 140,453,937 | MDU6SXNzdWUxNDA0NTM5Mzc= | 886 | count() doesn't work properly using UNION | {
"login": "tarot231",
"id": 17806922,
"node_id": "MDQ6VXNlcjE3ODA2OTIy",
"avatar_url": "https://avatars.githubusercontent.com/u/17806922?v=4",
"gravatar_id": "",
"url": "https://api.github.com/users/tarot231",
"html_url": "https://github.com/tarot231",
"followers_url": "https://api.github.com/users/tar... | [] | closed | false | null | [] | null | [
"Thank you, fixed.\n"
] | 2016-03-13T06:16:34 | 2016-03-13T19:06:27 | 2016-03-13T19:06:09 | NONE | null | Hello,
following code currently doesn't work properly.
```
q = (q1 | q2)
print(q.count())
```
I tested to modify peewee.py as follows.
```
def count(self, clear_limit=False):
if self._distinct or self._group_by or self._limit or self._offset or \
isinstance(self, CompoundSelect):
... | {
"url": "https://api.github.com/repos/coleifer/peewee/issues/886/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/886/timeline | null | completed | null | null |
https://api.github.com/repos/coleifer/peewee/issues/885 | https://api.github.com/repos/coleifer/peewee | https://api.github.com/repos/coleifer/peewee/issues/885/labels{/name} | https://api.github.com/repos/coleifer/peewee/issues/885/comments | https://api.github.com/repos/coleifer/peewee/issues/885/events | https://github.com/coleifer/peewee/issues/885 | 140,393,125 | MDU6SXNzdWUxNDAzOTMxMjU= | 885 | model_to_dict with DateField | {
"login": "alexpantyukhin",
"id": 6513121,
"node_id": "MDQ6VXNlcjY1MTMxMjE=",
"avatar_url": "https://avatars.githubusercontent.com/u/6513121?v=4",
"gravatar_id": "",
"url": "https://api.github.com/users/alexpantyukhin",
"html_url": "https://github.com/alexpantyukhin",
"followers_url": "https://api.gith... | [] | closed | false | null | [] | null | [
"But `model_to_dict` doesn't do any json serialization?\n",
"Sorry. found the reason it was another\n",
"alexpantyukhin , what was the reason? I am having the same problem.\n",
"model_to_dict returns a dict, not a JSON object, so I'm not sure what the confusion is about.\n",
"Sorry, model_to_dict is working... | 2016-03-12T15:33:32 | 2016-03-31T21:29:43 | 2016-03-12T17:11:07 | NONE | null | Hi!
I have such model:
```
class User(BaseModel, UserMixin):
birth_date = DateField(null=True)
......
```
And when I try to do this:
`model_to_dict(current_user)`
I'm getting this error:
TypeError: datetime.date(1989, 8, 9) is not JSON serializable
| {
"url": "https://api.github.com/repos/coleifer/peewee/issues/885/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/885/timeline | null | completed | null | null |
https://api.github.com/repos/coleifer/peewee/issues/884 | https://api.github.com/repos/coleifer/peewee | https://api.github.com/repos/coleifer/peewee/issues/884/labels{/name} | https://api.github.com/repos/coleifer/peewee/issues/884/comments | https://api.github.com/repos/coleifer/peewee/issues/884/events | https://github.com/coleifer/peewee/issues/884 | 140,178,027 | MDU6SXNzdWUxNDAxNzgwMjc= | 884 | SELECT FOUND_ROWS() | {
"login": "daoiqi",
"id": 2141872,
"node_id": "MDQ6VXNlcjIxNDE4NzI=",
"avatar_url": "https://avatars.githubusercontent.com/u/2141872?v=4",
"gravatar_id": "",
"url": "https://api.github.com/users/daoiqi",
"html_url": "https://github.com/daoiqi",
"followers_url": "https://api.github.com/users/daoiqi/foll... | [] | closed | false | null | [] | null | [
"use `wrapped_count()`\n\nhttp://docs.peewee-orm.com/en/latest/peewee/api.html#SelectQuery.wrapped_count\n"
] | 2016-03-11T13:00:49 | 2016-03-11T14:32:55 | 2016-03-11T14:32:55 | NONE | null | ``` sql
select * from t_table where id > 10;
SELECT FOUND_ROWS();
```
peewee has found rows ?
need do it by self?
``` sql
select * from t_table where id > 10 limit 10;
select count(0) from t_table where id > 10;
```
| {
"url": "https://api.github.com/repos/coleifer/peewee/issues/884/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/884/timeline | null | completed | null | null |
https://api.github.com/repos/coleifer/peewee/issues/883 | https://api.github.com/repos/coleifer/peewee | https://api.github.com/repos/coleifer/peewee/issues/883/labels{/name} | https://api.github.com/repos/coleifer/peewee/issues/883/comments | https://api.github.com/repos/coleifer/peewee/issues/883/events | https://github.com/coleifer/peewee/issues/883 | 139,855,726 | MDU6SXNzdWUxMzk4NTU3MjY= | 883 | Building complex queries programmatically. | {
"login": "brijeshb42",
"id": 717550,
"node_id": "MDQ6VXNlcjcxNzU1MA==",
"avatar_url": "https://avatars.githubusercontent.com/u/717550?v=4",
"gravatar_id": "",
"url": "https://api.github.com/users/brijeshb42",
"html_url": "https://github.com/brijeshb42",
"followers_url": "https://api.github.com/users/b... | [] | closed | false | null | [] | null | [
"This type of question is not really appropriate for the peewee issue tracker.\n"
] | 2016-03-10T11:05:04 | 2016-03-10T14:21:45 | 2016-03-10T14:21:45 | NONE | null | This is not an issue but a question.
I have to build complex queries programmatically.
For ex:
For this model:
``` python
class Article(Model):
title = CharField(null=False, unique=False, index=True)
permalink = CharField(default=None, unique=True, null=True)
tags = ArrayField(CharField, null=True, defau... | {
"url": "https://api.github.com/repos/coleifer/peewee/issues/883/reactions",
"total_count": 2,
"+1": 2,
"-1": 0,
"laugh": 0,
"hooray": 0,
"confused": 0,
"heart": 0,
"rocket": 0,
"eyes": 0
} | https://api.github.com/repos/coleifer/peewee/issues/883/timeline | null | completed | null | null |
https://api.github.com/repos/coleifer/peewee/issues/882 | https://api.github.com/repos/coleifer/peewee | https://api.github.com/repos/coleifer/peewee/issues/882/labels{/name} | https://api.github.com/repos/coleifer/peewee/issues/882/comments | https://api.github.com/repos/coleifer/peewee/issues/882/events | https://github.com/coleifer/peewee/issues/882 | 139,767,814 | MDU6SXNzdWUxMzk3Njc4MTQ= | 882 | Compound searches | {
"login": "samizdis",
"id": 11559853,
"node_id": "MDQ6VXNlcjExNTU5ODUz",
"avatar_url": "https://avatars.githubusercontent.com/u/11559853?v=4",
"gravatar_id": "",
"url": "https://api.github.com/users/samizdis",
"html_url": "https://github.com/samizdis",
"followers_url": "https://api.github.com/users/sam... | [] | closed | false | null | [] | null | [
"One way to accomplish the \"posts without badtag\" might be:\n\n``` python\n(Post\n .select()\n .where(~fn.EXISTS(\n Tag.select().where(\n (Tag.post == Post.id) & (Tag.name == 'BadTag'))))\n```\n\nAnother might be:\n\n``` python\n(Post\n .select(Post, fn.COUNT(Tag.id))\n .join(Tag, JOIN.LEFT_OUTER)\n... | 2016-03-10T02:49:39 | 2016-03-10T14:19:15 | 2016-03-10T14:19:15 | NONE | null | ```
select * from post t1
where not exists
(select 1 from tag t2
where t1.id == t2.post_id and t2.name=='BadTag');
```
finds all posts which haven't any associated tags named 'BadTag'.
Is there a way to do this naturally in Peewee?
```
Post.select().where(
~Tag.select()
.where(Post.id == Tag.post & Tag.na... | {
"url": "https://api.github.com/repos/coleifer/peewee/issues/882/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/882/timeline | null | completed | null | null |
https://api.github.com/repos/coleifer/peewee/issues/881 | https://api.github.com/repos/coleifer/peewee | https://api.github.com/repos/coleifer/peewee/issues/881/labels{/name} | https://api.github.com/repos/coleifer/peewee/issues/881/comments | https://api.github.com/repos/coleifer/peewee/issues/881/events | https://github.com/coleifer/peewee/issues/881 | 139,588,378 | MDU6SXNzdWUxMzk1ODgzNzg= | 881 | Key Error where query jsonb in postgresql with peewee | {
"login": "bukun",
"id": 6925146,
"node_id": "MDQ6VXNlcjY5MjUxNDY=",
"avatar_url": "https://avatars.githubusercontent.com/u/6925146?v=4",
"gravatar_id": "",
"url": "https://api.github.com/users/bukun",
"html_url": "https://github.com/bukun",
"followers_url": "https://api.github.com/users/bukun/follower... | [] | closed | false | null | [] | null | [
"I have tried with Python 2.7 and Python 3.5.\n",
"Are you absolutely positive that your model class is using `PostgresqlExtDatabase` as it's database class?\n",
"Greate! thanks very much. I have tried several time, and could not find any information with google.\nshould be:\n\n```\nfrom playhouse.postgres_ext ... | 2016-03-09T14:18:40 | 2016-03-09T14:43:53 | 2016-03-09T14:43:38 | NONE | null | I'm user peewee for PostgreSQL query with Python 3.5 under Debian Jessis. Everythin goes well untill querying Jsonb field.
The script:
```
import peewee
from playhouse.postgres_ext import BinaryJSONField
dbconnect = peewee.PostgresqlDatabase(
'pycate',
user='yunsuan',
password='passhere',
host='127.0... | {
"url": "https://api.github.com/repos/coleifer/peewee/issues/881/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/881/timeline | null | completed | null | null |
https://api.github.com/repos/coleifer/peewee/issues/880 | https://api.github.com/repos/coleifer/peewee | https://api.github.com/repos/coleifer/peewee/issues/880/labels{/name} | https://api.github.com/repos/coleifer/peewee/issues/880/comments | https://api.github.com/repos/coleifer/peewee/issues/880/events | https://github.com/coleifer/peewee/issues/880 | 139,432,472 | MDU6SXNzdWUxMzk0MzI0NzI= | 880 | Handling of extra fields during create and insert | {
"login": "poliquin",
"id": 360123,
"node_id": "MDQ6VXNlcjM2MDEyMw==",
"avatar_url": "https://avatars.githubusercontent.com/u/360123?v=4",
"gravatar_id": "",
"url": "https://api.github.com/users/poliquin",
"html_url": "https://github.com/poliquin",
"followers_url": "https://api.github.com/users/poliqui... | [] | closed | false | null | [] | null | [
"> Is there a reason for Model.create to ignore \"extra\" keyword arguments and for Model.insert to throw an error?\n\nIt's just an oversight on my part. At present, I am not inclined to change this as people may have code that relies on the behavior of `create()`. Additionally, `create()` is a bit semantically dif... | 2016-03-09T00:08:06 | 2016-03-09T22:15:57 | 2016-03-09T14:44:04 | NONE | null | The `create` and `insert` methods of `Model` treat extra keys differently. The following toy example demonstrates what I mean:
``` python
from peewee import Model, SqliteDatabase, IntegerField
db = SqliteDatabase(':memory:')
class ToyModel(Model):
x = IntegerField()
y = IntegerField()
class Meta:
... | {
"url": "https://api.github.com/repos/coleifer/peewee/issues/880/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/880/timeline | null | completed | null | null |
https://api.github.com/repos/coleifer/peewee/issues/879 | https://api.github.com/repos/coleifer/peewee | https://api.github.com/repos/coleifer/peewee/issues/879/labels{/name} | https://api.github.com/repos/coleifer/peewee/issues/879/comments | https://api.github.com/repos/coleifer/peewee/issues/879/events | https://github.com/coleifer/peewee/issues/879 | 138,798,894 | MDU6SXNzdWUxMzg3OTg4OTQ= | 879 | Missing implementation of __hash__ in Model | {
"login": "kramer65",
"id": 596581,
"node_id": "MDQ6VXNlcjU5NjU4MQ==",
"avatar_url": "https://avatars.githubusercontent.com/u/596581?v=4",
"gravatar_id": "",
"url": "https://api.github.com/users/kramer65",
"html_url": "https://github.com/kramer65",
"followers_url": "https://api.github.com/users/kramer6... | [] | closed | false | null | [] | null | [] | 2016-03-06T15:03:47 | 2016-03-06T15:31:04 | 2016-03-06T15:31:04 | NONE | null | I'm using peewee in several of my projects, and I love it. Today I found a weird behaviour of testing whether models already exist in a dict. I asked a question about it on Stackoverflow: http://stackoverflow.com/questions/35826534/object-in-list-behaves-different-from-object-in-dict
[The answer](http://stackoverflow.... | {
"url": "https://api.github.com/repos/coleifer/peewee/issues/879/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/879/timeline | null | completed | null | null |
https://api.github.com/repos/coleifer/peewee/issues/878 | https://api.github.com/repos/coleifer/peewee | https://api.github.com/repos/coleifer/peewee/issues/878/labels{/name} | https://api.github.com/repos/coleifer/peewee/issues/878/comments | https://api.github.com/repos/coleifer/peewee/issues/878/events | https://github.com/coleifer/peewee/issues/878 | 138,068,574 | MDU6SXNzdWUxMzgwNjg1NzQ= | 878 | limit(0) has no effect | {
"login": "ameade",
"id": 847570,
"node_id": "MDQ6VXNlcjg0NzU3MA==",
"avatar_url": "https://avatars.githubusercontent.com/u/847570?v=4",
"gravatar_id": "",
"url": "https://api.github.com/users/ameade",
"html_url": "https://github.com/ameade",
"followers_url": "https://api.github.com/users/ameade/follow... | [] | closed | false | null | [] | null | [] | 2016-03-03T03:56:53 | 2016-03-03T15:19:23 | 2016-03-03T15:19:23 | NONE | null | When doing for example 'User.select().limit(0)' all users will be returned. Changing the 0 to a positive integer seems to work correctly and a negative integer raises an error as expected. This is frustrating when programmatically calculated limit and expecting limit(0) to work as 'LIMIT 0' is valid sql.
| {
"url": "https://api.github.com/repos/coleifer/peewee/issues/878/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/878/timeline | null | completed | null | null |
https://api.github.com/repos/coleifer/peewee/issues/877 | https://api.github.com/repos/coleifer/peewee | https://api.github.com/repos/coleifer/peewee/issues/877/labels{/name} | https://api.github.com/repos/coleifer/peewee/issues/877/comments | https://api.github.com/repos/coleifer/peewee/issues/877/events | https://github.com/coleifer/peewee/issues/877 | 138,002,020 | MDU6SXNzdWUxMzgwMDIwMjA= | 877 | Playhouse speedups | {
"login": "stanep",
"id": 3240661,
"node_id": "MDQ6VXNlcjMyNDA2NjE=",
"avatar_url": "https://avatars.githubusercontent.com/u/3240661?v=4",
"gravatar_id": "",
"url": "https://api.github.com/users/stanep",
"html_url": "https://github.com/stanep",
"followers_url": "https://api.github.com/users/stanep/foll... | [] | closed | false | null | [] | null | [
"Just pass `use_speedups=False` when you are instantiating your Database object. That should address the issue. Peewee implements some cursor iteration helpers in Cython and expects the rows to be tuples, hence the issue you're seeing.\n\nLet me know if the above fix addresses the problem.\n",
"Yes this fix the p... | 2016-03-02T21:46:16 | 2016-03-03T14:17:46 | 2016-03-03T14:17:46 | NONE | null | Hi, using a new peewee (2.8.0) (pip install -U peewee) I got compiled playhouse._speedups file.
Now I am using SQL Server 2012 and pyodbc with peewee and so far it works but when I install latest version I got error running simple select statements.
File "\playhouse\speedups.pyx", line 179, in playhouse._speedups._Que... | {
"url": "https://api.github.com/repos/coleifer/peewee/issues/877/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/877/timeline | null | completed | null | null |
https://api.github.com/repos/coleifer/peewee/issues/876 | https://api.github.com/repos/coleifer/peewee | https://api.github.com/repos/coleifer/peewee/issues/876/labels{/name} | https://api.github.com/repos/coleifer/peewee/issues/876/comments | https://api.github.com/repos/coleifer/peewee/issues/876/events | https://github.com/coleifer/peewee/issues/876 | 137,627,410 | MDU6SXNzdWUxMzc2Mjc0MTA= | 876 | default_index cannot be None in IndexedFieldMixin | {
"login": "IxDay",
"id": 2128384,
"node_id": "MDQ6VXNlcjIxMjgzODQ=",
"avatar_url": "https://avatars.githubusercontent.com/u/2128384?v=4",
"gravatar_id": "",
"url": "https://api.github.com/users/IxDay",
"html_url": "https://github.com/IxDay",
"followers_url": "https://api.github.com/users/IxDay/follower... | [] | closed | false | null | [] | null | [
"This is fixed by 2fca64c482f536f280303a77fe8e9c040a0c96b3\n\nTo indicate that there should be no index, simply specify `index=False` when instantiating your `ArrayField`.\n",
"(the same goes for any other field that mixes in `IndexedFieldMixin`.)\n",
"Great thanks !\n",
"Thanks for reporting the issue, I app... | 2016-03-01T16:47:57 | 2016-03-13T19:53:58 | 2016-03-13T19:25:43 | NONE | null | As in the constructor we setup the index like this:
https://github.com/coleifer/peewee/blob/master/playhouse/postgres_ext.py#L129
``` python
self.index_type = index_type or self.default_index_type
```
I cannot specify at Field declaration that I do not want any index, as if I explicitly define `index_type` to be Non... | {
"url": "https://api.github.com/repos/coleifer/peewee/issues/876/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/876/timeline | null | completed | null | null |
https://api.github.com/repos/coleifer/peewee/issues/875 | https://api.github.com/repos/coleifer/peewee | https://api.github.com/repos/coleifer/peewee/issues/875/labels{/name} | https://api.github.com/repos/coleifer/peewee/issues/875/comments | https://api.github.com/repos/coleifer/peewee/issues/875/events | https://github.com/coleifer/peewee/issues/875 | 137,208,995 | MDU6SXNzdWUxMzcyMDg5OTU= | 875 | Create type | {
"login": "IxDay",
"id": 2128384,
"node_id": "MDQ6VXNlcjIxMjgzODQ=",
"avatar_url": "https://avatars.githubusercontent.com/u/2128384?v=4",
"gravatar_id": "",
"url": "https://api.github.com/users/IxDay",
"html_url": "https://github.com/IxDay",
"followers_url": "https://api.github.com/users/IxDay/follower... | [] | closed | false | null | [] | null | [
"Unfortunately, you'll need to call `register_fields` to use custom types:\n\n``` python\nclass DirectionField(...):\n db_type = 'direction'\n\nPostgresqlDatabase.register_fields({\n 'direction': 'direction',\n})\n```\n\nHope to get rid/clean-up that boiler plate in a later version of peewee but for now it is... | 2016-02-29T10:12:48 | 2016-02-29T12:40:30 | 2016-02-29T12:40:30 | NONE | null | As I use custom types, is there a way to perform this in peewee or do I have to add a create_type method in the QueryCompiler class? If so, are you interested in the implementation of this feature ?
Here is an example of the code I use
``` sql
CREATE TYPE direction AS (title varchar(50), text text);
```
| {
"url": "https://api.github.com/repos/coleifer/peewee/issues/875/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/875/timeline | null | completed | null | null |
https://api.github.com/repos/coleifer/peewee/issues/874 | https://api.github.com/repos/coleifer/peewee | https://api.github.com/repos/coleifer/peewee/issues/874/labels{/name} | https://api.github.com/repos/coleifer/peewee/issues/874/comments | https://api.github.com/repos/coleifer/peewee/issues/874/events | https://github.com/coleifer/peewee/issues/874 | 137,098,485 | MDU6SXNzdWUxMzcwOTg0ODU= | 874 | peewee.OperationalError: database is locked using threadlocals and SqliteDatabase | {
"login": "cryzed",
"id": 1429103,
"node_id": "MDQ6VXNlcjE0MjkxMDM=",
"avatar_url": "https://avatars.githubusercontent.com/u/1429103?v=4",
"gravatar_id": "",
"url": "https://api.github.com/users/cryzed",
"html_url": "https://github.com/cryzed",
"followers_url": "https://api.github.com/users/cryzed/foll... | [] | closed | false | null | [] | null | [
"I'm almost sure I fixed the problem [here](https://github.com/cryzed/Feedbuffer/commit/3b29434de92c8d0c47b90761858239ee1df08cd8). I'm just speculating, but I think the problem arose because I created the CherryPy server object in a [different thread](https://github.com/cryzed/Feedbuffer/commit/3b29434de92c8d0c47b9... | 2016-02-28T21:35:09 | 2016-02-29T01:50:01 | 2016-02-29T01:50:01 | NONE | null | Hey, I recently made this: [Feedbuffer](https://github.com/cryzed/Feedbuffer) and decided to use peewee for the database interface. I know it's not really your task to review my code, but I feel my problem would be easiest to explain if I linked you the file that manages the database communication [here](https://github... | {
"url": "https://api.github.com/repos/coleifer/peewee/issues/874/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/874/timeline | null | completed | null | null |
https://api.github.com/repos/coleifer/peewee/issues/873 | https://api.github.com/repos/coleifer/peewee | https://api.github.com/repos/coleifer/peewee/issues/873/labels{/name} | https://api.github.com/repos/coleifer/peewee/issues/873/comments | https://api.github.com/repos/coleifer/peewee/issues/873/events | https://github.com/coleifer/peewee/issues/873 | 137,051,683 | MDU6SXNzdWUxMzcwNTE2ODM= | 873 | get_or_create without autocommit | {
"login": "Gagaro",
"id": 3845486,
"node_id": "MDQ6VXNlcjM4NDU0ODY=",
"avatar_url": "https://avatars.githubusercontent.com/u/3845486?v=4",
"gravatar_id": "",
"url": "https://api.github.com/users/Gagaro",
"html_url": "https://github.com/Gagaro",
"followers_url": "https://api.github.com/users/Gagaro/foll... | [] | closed | false | null | [] | null | [
"It creates an exception (or savepoint, if a transaction is present) to ensure the connection can be restored to a good state after an IntegrityError. Postgres, for instance, is rather unforgiving regarding this.\n\nI'll add something to the docs, but for now I don't really see this as a bug.\n",
"In your example... | 2016-02-28T13:12:29 | 2016-02-29T12:38:45 | 2016-02-29T02:00:00 | NONE | null | Hello,
`get_or_create` and `create_or_get` fails if autocommit is set to False due to the use of a transaction inside these methods:
https://github.com/coleifer/peewee/blob/master/peewee.py#L4562
https://github.com/coleifer/peewee/blob/master/peewee.py#L4573
I created a test demonstrating this issue:
https://github... | {
"url": "https://api.github.com/repos/coleifer/peewee/issues/873/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/873/timeline | null | completed | null | null |
https://api.github.com/repos/coleifer/peewee/issues/872 | https://api.github.com/repos/coleifer/peewee | https://api.github.com/repos/coleifer/peewee/issues/872/labels{/name} | https://api.github.com/repos/coleifer/peewee/issues/872/comments | https://api.github.com/repos/coleifer/peewee/issues/872/events | https://github.com/coleifer/peewee/issues/872 | 136,817,508 | MDU6SXNzdWUxMzY4MTc1MDg= | 872 | Query Error using APSW | {
"login": "mox1",
"id": 6137131,
"node_id": "MDQ6VXNlcjYxMzcxMzE=",
"avatar_url": "https://avatars.githubusercontent.com/u/6137131?v=4",
"gravatar_id": "",
"url": "https://api.github.com/users/mox1",
"html_url": "https://github.com/mox1",
"followers_url": "https://api.github.com/users/mox1/followers",
... | [] | closed | false | null | [] | null | [
"0e055df5317e9966831b760a5a2aa8990f759207\n",
"Thank you for the excellent bug report, this should now be fixed.\n",
"You may need to update your apsw version, because in the latest versions it _does_ support `fetchone()`. I had to revert my commit that fixed the issue, due to MySQL python driver not implementi... | 2016-02-26T21:20:42 | 2016-02-29T03:42:47 | 2016-02-27T17:28:14 | NONE | null | When using the apsw_ext module, I receive the following error when performing queries:
```
>>> x = SomeModel.select().where(SomeModel.col1 == "test").exists()
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "peewee.py", line 2896, in exists
return bool(clone.scalar())
File "peewee... | {
"url": "https://api.github.com/repos/coleifer/peewee/issues/872/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/872/timeline | null | completed | null | null |
https://api.github.com/repos/coleifer/peewee/issues/871 | https://api.github.com/repos/coleifer/peewee | https://api.github.com/repos/coleifer/peewee/issues/871/labels{/name} | https://api.github.com/repos/coleifer/peewee/issues/871/comments | https://api.github.com/repos/coleifer/peewee/issues/871/events | https://github.com/coleifer/peewee/issues/871 | 136,738,698 | MDU6SXNzdWUxMzY3Mzg2OTg= | 871 | Problem with pymysql + python 2.7 | {
"login": "foxx",
"id": 651797,
"node_id": "MDQ6VXNlcjY1MTc5Nw==",
"avatar_url": "https://avatars.githubusercontent.com/u/651797?v=4",
"gravatar_id": "",
"url": "https://api.github.com/users/foxx",
"html_url": "https://github.com/foxx",
"followers_url": "https://api.github.com/users/foxx/followers",
... | [] | closed | false | null | [] | null | [
"I'm not quite sure I understand... what's going on here?\n",
"Sorry here's an exact code snippet to reproduce the problem with `pymysql` and `python 2.7.11`.\n\nThe same code works as expected with `sqlite` and `postgres`.\n\n``` python\nfrom peewee import BlobField, Model\nfrom playhouse.db_url import connect\n... | 2016-02-26T16:07:54 | 2016-06-19T11:08:52 | 2016-02-29T14:33:08 | CONTRIBUTOR | null | Came across this problem when running a full test suite using `pymysql` with `Python 2.7`.
If you attempt to pass in a binary to `BlobField`, it results in the following error upon execution.
```
build/bdist.linux-x86_64/egg/peewee.py:4494: in create
???
build/bdist.linux-x86_64/egg/peewee.py:4680: in save
??... | {
"url": "https://api.github.com/repos/coleifer/peewee/issues/871/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/871/timeline | null | completed | null | null |
https://api.github.com/repos/coleifer/peewee/issues/870 | https://api.github.com/repos/coleifer/peewee | https://api.github.com/repos/coleifer/peewee/issues/870/labels{/name} | https://api.github.com/repos/coleifer/peewee/issues/870/comments | https://api.github.com/repos/coleifer/peewee/issues/870/events | https://github.com/coleifer/peewee/issues/870 | 136,512,019 | MDU6SXNzdWUxMzY1MTIwMTk= | 870 | Document `playhouse` model paths | {
"login": "MinchinWeb",
"id": 1548809,
"node_id": "MDQ6VXNlcjE1NDg4MDk=",
"avatar_url": "https://avatars.githubusercontent.com/u/1548809?v=4",
"gravatar_id": "",
"url": "https://api.github.com/users/MinchinWeb",
"html_url": "https://github.com/MinchinWeb",
"followers_url": "https://api.github.com/users... | [] | closed | false | null | [] | null | [
"Awesome, thanks!\n"
] | 2016-02-25T21:05:30 | 2016-02-27T23:16:19 | 2016-02-26T18:05:24 | NONE | null | I was working through the peewee documentation on [PickledField](http://docs.peewee-orm.com/en/latest/peewee/playhouse.html#PickledField). However, I could find nowhere in the documentation where to import this from.
I tried:
- the documentation page, near as I can tell, doesn't list this directly
- looking at the pag... | {
"url": "https://api.github.com/repos/coleifer/peewee/issues/870/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/870/timeline | null | completed | null | null |
https://api.github.com/repos/coleifer/peewee/issues/869 | https://api.github.com/repos/coleifer/peewee | https://api.github.com/repos/coleifer/peewee/issues/869/labels{/name} | https://api.github.com/repos/coleifer/peewee/issues/869/comments | https://api.github.com/repos/coleifer/peewee/issues/869/events | https://github.com/coleifer/peewee/pull/869 | 136,276,149 | MDExOlB1bGxSZXF1ZXN0NjA2MjMyMTY= | 869 | Enable syntax highlight in Python snippet codes | {
"login": "mazulo",
"id": 1661112,
"node_id": "MDQ6VXNlcjE2NjExMTI=",
"avatar_url": "https://avatars.githubusercontent.com/u/1661112?v=4",
"gravatar_id": "",
"url": "https://api.github.com/users/mazulo",
"html_url": "https://github.com/mazulo",
"followers_url": "https://api.github.com/users/mazulo/foll... | [] | closed | false | null | [] | null | [
"Thank you!\nOn Feb 24, 2016 10:19 PM, \"Patrick Mazulo\" notifications@github.com wrote:\n\n> ## Improve the read of the code\n> \n> You can view, comment on, or merge this pull request online at:\n> \n> https://github.com/coleifer/peewee/pull/869\n> Commit Summary\n> - Enable syntax highlight\n> - Merge pull re... | 2016-02-25T04:19:18 | 2016-02-25T14:06:25 | 2016-02-25T14:05:50 | CONTRIBUTOR | null | Improve the read of the code
| {
"url": "https://api.github.com/repos/coleifer/peewee/issues/869/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/869/timeline | null | null | false | {
"url": "https://api.github.com/repos/coleifer/peewee/pulls/869",
"html_url": "https://github.com/coleifer/peewee/pull/869",
"diff_url": "https://github.com/coleifer/peewee/pull/869.diff",
"patch_url": "https://github.com/coleifer/peewee/pull/869.patch",
"merged_at": "2016-02-25T14:05:50"
} |
https://api.github.com/repos/coleifer/peewee/issues/868 | https://api.github.com/repos/coleifer/peewee | https://api.github.com/repos/coleifer/peewee/issues/868/labels{/name} | https://api.github.com/repos/coleifer/peewee/issues/868/comments | https://api.github.com/repos/coleifer/peewee/issues/868/events | https://github.com/coleifer/peewee/issues/868 | 136,243,207 | MDU6SXNzdWUxMzYyNDMyMDc= | 868 | Spatialite Extension "Function not found" | {
"login": "disarticulate",
"id": 17464125,
"node_id": "MDQ6VXNlcjE3NDY0MTI1",
"avatar_url": "https://avatars.githubusercontent.com/u/17464125?v=4",
"gravatar_id": "",
"url": "https://api.github.com/users/disarticulate",
"html_url": "https://github.com/disarticulate",
"followers_url": "https://api.githu... | [] | closed | false | null | [] | null | [
"You need to load the extension every time you connect... Could that be the issue?\n",
"```\ndatabase.connect()\ndatabase.load_extension('mod_spatialite')\nsql = 'SELECT sqlite_version(), spatialite_version()'\nprint(database.execute_sql(sql).fetchall())\nLocations.insert(geometry=geometryFromWKT('POINT(4 9 3 `2)... | 2016-02-25T01:19:38 | 2016-02-26T18:22:55 | 2016-02-26T18:07:43 | NONE | null | following this issue resolution:
https://github.com/coleifer/peewee/issues/292
I'm just plain confused, if the version pops up correctly, this should mean the extension loaded:
I'm getting:
> OperationalError: no such function: ST_GeomFromText
> ([(http://www.gaia-gis.it/gaia-sins/spatialite-sql-4.3.0.html)](http://... | {
"url": "https://api.github.com/repos/coleifer/peewee/issues/868/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/868/timeline | null | completed | null | null |
https://api.github.com/repos/coleifer/peewee/issues/867 | https://api.github.com/repos/coleifer/peewee | https://api.github.com/repos/coleifer/peewee/issues/867/labels{/name} | https://api.github.com/repos/coleifer/peewee/issues/867/comments | https://api.github.com/repos/coleifer/peewee/issues/867/events | https://github.com/coleifer/peewee/issues/867 | 135,405,932 | MDU6SXNzdWUxMzU0MDU5MzI= | 867 | http://www.peewee-orm.com/ gives "Not found." | {
"login": "kramer65",
"id": 596581,
"node_id": "MDQ6VXNlcjU5NjU4MQ==",
"avatar_url": "https://avatars.githubusercontent.com/u/596581?v=4",
"gravatar_id": "",
"url": "https://api.github.com/users/kramer65",
"html_url": "https://github.com/kramer65",
"followers_url": "https://api.github.com/users/kramer6... | [] | closed | false | null | [] | null | [
"Actually it used to do that so I was surprised by your note. I went in and looked at the nginx config and realized I hadn't updated it for when I removed Varnish from my site. The redirects should be working now. Thank you!\n"
] | 2016-02-22T12:41:27 | 2016-02-22T15:06:13 | 2016-02-22T15:06:13 | NONE | null | Although I know the docs can be found at http://docs.peewee-orm.com/ , it looks pretty crappy if the root of a website gives an Error.
Maybe it would be good to redirect http://www.peewee-orm.com/ to http://docs.peewee-orm.com/
Cheers!
| {
"url": "https://api.github.com/repos/coleifer/peewee/issues/867/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/867/timeline | null | completed | null | null |
https://api.github.com/repos/coleifer/peewee/issues/866 | https://api.github.com/repos/coleifer/peewee | https://api.github.com/repos/coleifer/peewee/issues/866/labels{/name} | https://api.github.com/repos/coleifer/peewee/issues/866/comments | https://api.github.com/repos/coleifer/peewee/issues/866/events | https://github.com/coleifer/peewee/pull/866 | 135,276,884 | MDExOlB1bGxSZXF1ZXN0NjAxMTAyMDc= | 866 | Added SmallIntegerField to __all__ | {
"login": "bcattle",
"id": 620058,
"node_id": "MDQ6VXNlcjYyMDA1OA==",
"avatar_url": "https://avatars.githubusercontent.com/u/620058?v=4",
"gravatar_id": "",
"url": "https://api.github.com/users/bcattle",
"html_url": "https://github.com/bcattle",
"followers_url": "https://api.github.com/users/bcattle/fo... | [] | closed | false | null | [] | null | [] | 2016-02-21T23:45:01 | 2016-02-22T03:39:43 | 2016-02-22T03:39:43 | CONTRIBUTOR | null | `SmallIntegerField` wasn't listed in the peewee module `__all__` list.
| {
"url": "https://api.github.com/repos/coleifer/peewee/issues/866/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/866/timeline | null | null | false | {
"url": "https://api.github.com/repos/coleifer/peewee/pulls/866",
"html_url": "https://github.com/coleifer/peewee/pull/866",
"diff_url": "https://github.com/coleifer/peewee/pull/866.diff",
"patch_url": "https://github.com/coleifer/peewee/pull/866.patch",
"merged_at": "2016-02-22T03:39:43"
} |
https://api.github.com/repos/coleifer/peewee/issues/865 | https://api.github.com/repos/coleifer/peewee | https://api.github.com/repos/coleifer/peewee/issues/865/labels{/name} | https://api.github.com/repos/coleifer/peewee/issues/865/comments | https://api.github.com/repos/coleifer/peewee/issues/865/events | https://github.com/coleifer/peewee/issues/865 | 135,102,379 | MDU6SXNzdWUxMzUxMDIzNzk= | 865 | Documentation, code example for webapp2 | {
"login": "onel",
"id": 1862405,
"node_id": "MDQ6VXNlcjE4NjI0MDU=",
"avatar_url": "https://avatars.githubusercontent.com/u/1862405?v=4",
"gravatar_id": "",
"url": "https://api.github.com/users/onel",
"html_url": "https://github.com/onel",
"followers_url": "https://api.github.com/users/onel/followers",
... | [] | closed | false | null | [] | null | [
"Going to pass as this is a pretty obscure framework.\n",
"We use this framework (webapp2) with peewee. We never call connect() or close(). Is that bad?",
"@savraj -- Probably... I don't know webapp2, but my guess is that you aren't getting the concurrency you think you might be if you're running in certain ty... | 2016-02-20T17:11:14 | 2018-03-07T02:04:22 | 2016-02-20T17:18:40 | NONE | null | I know webapp2 is mainly used with app engine, but I started using it ouside of GAE and with peewee.
You can add the documentation for the db opening, closing on each request
``` python
class BaseHandler(webapp2.RequestHandler):
def dispatch(self):
db.connect()
try:
# Dispatch the re... | {
"url": "https://api.github.com/repos/coleifer/peewee/issues/865/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/865/timeline | null | completed | null | null |
https://api.github.com/repos/coleifer/peewee/issues/864 | https://api.github.com/repos/coleifer/peewee | https://api.github.com/repos/coleifer/peewee/issues/864/labels{/name} | https://api.github.com/repos/coleifer/peewee/issues/864/comments | https://api.github.com/repos/coleifer/peewee/issues/864/events | https://github.com/coleifer/peewee/issues/864 | 135,029,767 | MDU6SXNzdWUxMzUwMjk3Njc= | 864 | RHEL python 3.4 Unable to create SQLITE db | {
"login": "sripathivenky",
"id": 2147479,
"node_id": "MDQ6VXNlcjIxNDc0Nzk=",
"avatar_url": "https://avatars.githubusercontent.com/u/2147479?v=4",
"gravatar_id": "",
"url": "https://api.github.com/users/sripathivenky",
"html_url": "https://github.com/sripathivenky",
"followers_url": "https://api.github.... | [] | closed | false | null | [] | null | [
"No idea, but somehow your install isn't finding a python sqlite driver.\n"
] | 2016-02-20T03:57:59 | 2016-02-20T03:59:12 | 2016-02-20T03:59:12 | NONE | null | Keep running into
> Traceback (most recent call last):
> File "db_test.py", line 2, in <module>
> from playhouse.sqlite_ext import SqliteExtDatabase
> File "/home/srujan/pyats/pyats/lib/python3.4/site-packages/playhouse/sqlite_ext.py", line 74, in <module>
> FTS_VER = sqlite3.sqlite_version_info[:3] >= (3... | {
"url": "https://api.github.com/repos/coleifer/peewee/issues/864/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/864/timeline | null | completed | null | null |
https://api.github.com/repos/coleifer/peewee/issues/863 | https://api.github.com/repos/coleifer/peewee | https://api.github.com/repos/coleifer/peewee/issues/863/labels{/name} | https://api.github.com/repos/coleifer/peewee/issues/863/comments | https://api.github.com/repos/coleifer/peewee/issues/863/events | https://github.com/coleifer/peewee/issues/863 | 134,969,950 | MDU6SXNzdWUxMzQ5Njk5NTA= | 863 | Can't create index on TextField. Database is MySQL | {
"login": "tgrant59",
"id": 4661702,
"node_id": "MDQ6VXNlcjQ2NjE3MDI=",
"avatar_url": "https://avatars.githubusercontent.com/u/4661702?v=4",
"gravatar_id": "",
"url": "https://api.github.com/users/tgrant59",
"html_url": "https://github.com/tgrant59",
"followers_url": "https://api.github.com/users/tgran... | [] | closed | false | null | [] | null | [
"Yeah, that's a limitation of MySQL -- you need to specify a length to index when you have a `TextField`.\n"
] | 2016-02-19T20:46:57 | 2016-02-20T03:36:14 | 2016-02-20T03:36:14 | NONE | null | When I run create_table() on a model with a TextField(index=True) column, it fails with this error:
```
peewee.OperationalError: (1170, "BLOB/TEXT column 'keywords' used in key specification without a key length")
```
The table is created successfully, but the index is not.
Here's a simple example which reproduces th... | {
"url": "https://api.github.com/repos/coleifer/peewee/issues/863/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/863/timeline | null | completed | null | null |
https://api.github.com/repos/coleifer/peewee/issues/862 | https://api.github.com/repos/coleifer/peewee | https://api.github.com/repos/coleifer/peewee/issues/862/labels{/name} | https://api.github.com/repos/coleifer/peewee/issues/862/comments | https://api.github.com/repos/coleifer/peewee/issues/862/events | https://github.com/coleifer/peewee/pull/862 | 134,872,872 | MDExOlB1bGxSZXF1ZXN0NTk5NTI4NjA= | 862 | Implement TRUNCATE TABLE ... as truncate_table() | {
"login": "dev-zero",
"id": 11307,
"node_id": "MDQ6VXNlcjExMzA3",
"avatar_url": "https://avatars.githubusercontent.com/u/11307?v=4",
"gravatar_id": "",
"url": "https://api.github.com/users/dev-zero",
"html_url": "https://github.com/dev-zero",
"followers_url": "https://api.github.com/users/dev-zero/foll... | [] | closed | false | null | [] | null | [
"Looks nice, add a couple tests and I'll merge.\n"
] | 2016-02-19T14:03:21 | 2016-02-20T03:51:08 | 2016-02-20T03:51:08 | NONE | null | Implemented by MySQL and PostgreSQL (and SQL2008), only PostgreSQL supports `CASCADE`.
| {
"url": "https://api.github.com/repos/coleifer/peewee/issues/862/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/862/timeline | null | null | false | {
"url": "https://api.github.com/repos/coleifer/peewee/pulls/862",
"html_url": "https://github.com/coleifer/peewee/pull/862",
"diff_url": "https://github.com/coleifer/peewee/pull/862.diff",
"patch_url": "https://github.com/coleifer/peewee/pull/862.patch",
"merged_at": null
} |
https://api.github.com/repos/coleifer/peewee/issues/861 | https://api.github.com/repos/coleifer/peewee | https://api.github.com/repos/coleifer/peewee/issues/861/labels{/name} | https://api.github.com/repos/coleifer/peewee/issues/861/comments | https://api.github.com/repos/coleifer/peewee/issues/861/events | https://github.com/coleifer/peewee/issues/861 | 134,680,260 | MDU6SXNzdWUxMzQ2ODAyNjA= | 861 | 2.8.0 breaks custom Field subclasses that don't check for None | {
"login": "josefdlange",
"id": 1062835,
"node_id": "MDQ6VXNlcjEwNjI4MzU=",
"avatar_url": "https://avatars.githubusercontent.com/u/1062835?v=4",
"gravatar_id": "",
"url": "https://api.github.com/users/josefdlange",
"html_url": "https://github.com/josefdlange",
"followers_url": "https://api.github.com/us... | [] | closed | false | null | [] | null | [
"My best guess is that a DB value of `None` would, in prior versions, never get passed to the `Field` subclass's `python_value` method but instead short-circuit to just returning `None`.\n\nThis is kind of a breaking change that isn't noted in the `CHANGELOG` if it proves to be what I'm experiencing. Granted I shou... | 2016-02-18T20:00:26 | 2016-02-19T02:34:03 | 2016-02-19T02:32:38 | CONTRIBUTOR | null | This is a lot of conjecture (and I'm moving at a pace too quick to really reproduce and test this out), but I'm pretty sure 2.8.0 breaks a Field subclass defined like this:
```
class MyField(Field):
def python_value(value):
return some_thing_that_cant_take_none(value)
```
I had to change a `Field` subclas... | {
"url": "https://api.github.com/repos/coleifer/peewee/issues/861/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/861/timeline | null | completed | null | null |
https://api.github.com/repos/coleifer/peewee/issues/860 | https://api.github.com/repos/coleifer/peewee | https://api.github.com/repos/coleifer/peewee/issues/860/labels{/name} | https://api.github.com/repos/coleifer/peewee/issues/860/comments | https://api.github.com/repos/coleifer/peewee/issues/860/events | https://github.com/coleifer/peewee/issues/860 | 134,530,846 | MDU6SXNzdWUxMzQ1MzA4NDY= | 860 | Using << with an empty list creates an invalid SQL query | {
"login": "Prillan",
"id": 1675190,
"node_id": "MDQ6VXNlcjE2NzUxOTA=",
"avatar_url": "https://avatars.githubusercontent.com/u/1675190?v=4",
"gravatar_id": "",
"url": "https://api.github.com/users/Prillan",
"html_url": "https://github.com/Prillan",
"followers_url": "https://api.github.com/users/Prillan/... | [] | closed | false | null | [] | null | [
"Rather than modify the SQL behind-the-scenes, you should check your list at run-time.\n",
"I get that, I'm fine with checking if the list is empty. I'm just against creating an invalid query since it results in a syntax error. The error should be thrown before it gets to the database and not in it. To me this is... | 2016-02-18T09:49:52 | 2016-02-18T16:24:23 | 2016-02-18T14:38:45 | NONE | null | ```
psycopg2.ProgrammingError: syntax error at or near ")"
```
I think either of the following solutions are acceptable:
- Throw an error in peewee indicating that the list (iterator) is empty.
- Transform `column << []` into `False` before compiling to SQL.
Not handling this before sending it to the database causes ... | {
"url": "https://api.github.com/repos/coleifer/peewee/issues/860/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/860/timeline | null | completed | null | null |
https://api.github.com/repos/coleifer/peewee/issues/859 | https://api.github.com/repos/coleifer/peewee | https://api.github.com/repos/coleifer/peewee/issues/859/labels{/name} | https://api.github.com/repos/coleifer/peewee/issues/859/comments | https://api.github.com/repos/coleifer/peewee/issues/859/events | https://github.com/coleifer/peewee/pull/859 | 134,461,955 | MDExOlB1bGxSZXF1ZXN0NTk3NDE0NTg= | 859 | Get extra connection args from query string in db_url | {
"login": "RealSalmon",
"id": 943086,
"node_id": "MDQ6VXNlcjk0MzA4Ng==",
"avatar_url": "https://avatars.githubusercontent.com/u/943086?v=4",
"gravatar_id": "",
"url": "https://api.github.com/users/RealSalmon",
"html_url": "https://github.com/RealSalmon",
"followers_url": "https://api.github.com/users/R... | [] | closed | false | null | [] | null | [
"Looks good, just one thing to change and I'll be happy to merge.\n",
"Actually that dictionary comprehension breaks in Python 2.6 (forgot about that). I didn't notice it before because travis didn't pick up the PR initially.\n",
"A few fixes were required for Python 2.6.\n"
] | 2016-02-18T02:18:22 | 2016-02-18T16:12:37 | 2016-02-18T16:12:37 | CONTRIBUTOR | null | ### Changes
- As discussed in #858, this adds support for supplying extra connection args in the query string when using playhouse.db_url
| {
"url": "https://api.github.com/repos/coleifer/peewee/issues/859/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/859/timeline | null | null | false | {
"url": "https://api.github.com/repos/coleifer/peewee/pulls/859",
"html_url": "https://github.com/coleifer/peewee/pull/859",
"diff_url": "https://github.com/coleifer/peewee/pull/859.diff",
"patch_url": "https://github.com/coleifer/peewee/pull/859.patch",
"merged_at": "2016-02-18T16:12:37"
} |
https://api.github.com/repos/coleifer/peewee/issues/858 | https://api.github.com/repos/coleifer/peewee | https://api.github.com/repos/coleifer/peewee/issues/858/labels{/name} | https://api.github.com/repos/coleifer/peewee/issues/858/comments | https://api.github.com/repos/coleifer/peewee/issues/858/events | https://github.com/coleifer/peewee/issues/858 | 134,399,177 | MDU6SXNzdWUxMzQzOTkxNzc= | 858 | Add support for additional connect args as query string in db_url | {
"login": "RealSalmon",
"id": 943086,
"node_id": "MDQ6VXNlcjk0MzA4Ng==",
"avatar_url": "https://avatars.githubusercontent.com/u/943086?v=4",
"gravatar_id": "",
"url": "https://api.github.com/users/RealSalmon",
"html_url": "https://github.com/RealSalmon",
"followers_url": "https://api.github.com/users/R... | [] | closed | false | null | [] | null | [
"Yes!\n",
"Great, I'll start messing around with it this evening (real life permitting . . . ). \n",
"That's cool but how could we set False (eg. register_hstore) via url? Should parse the query string with `keep_blank_values=True`, right?\n"
] | 2016-02-17T21:05:04 | 2016-05-24T13:43:39 | 2016-02-20T03:36:29 | CONTRIBUTOR | null | I'm happy to take a stab at this, but I thought it best to first propose it prior to spending any time . . .
When using playhouse.db_url for connections, it is not currently possible to include additional connect args directly in the connection string. These must instead be supplied as separate keyword args.
``` pyt... | {
"url": "https://api.github.com/repos/coleifer/peewee/issues/858/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/858/timeline | null | completed | null | null |
https://api.github.com/repos/coleifer/peewee/issues/857 | https://api.github.com/repos/coleifer/peewee | https://api.github.com/repos/coleifer/peewee/issues/857/labels{/name} | https://api.github.com/repos/coleifer/peewee/issues/857/comments | https://api.github.com/repos/coleifer/peewee/issues/857/events | https://github.com/coleifer/peewee/issues/857 | 134,389,581 | MDU6SXNzdWUxMzQzODk1ODE= | 857 | deferred pool | {
"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 | [
"dc258ae727620c01d300c67ab58a73c9d1a15b7e\n"
] | 2016-02-17T20:22:00 | 2016-02-20T03:40:50 | 2016-02-20T03:40:42 | OWNER | null | I have a question regarding run-time database configuration as described here: http://docs.peewee-orm.com/en/latest/peewee/database.html#run-time-database-configuration
Is this technique expected to work with the connection pooling extensions in playhouse.pool? e.g. . . .
db = PooledMySQLDatabase(None)
I end up ... | {
"url": "https://api.github.com/repos/coleifer/peewee/issues/857/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/857/timeline | null | completed | null | null |
https://api.github.com/repos/coleifer/peewee/issues/856 | https://api.github.com/repos/coleifer/peewee | https://api.github.com/repos/coleifer/peewee/issues/856/labels{/name} | https://api.github.com/repos/coleifer/peewee/issues/856/comments | https://api.github.com/repos/coleifer/peewee/issues/856/events | https://github.com/coleifer/peewee/issues/856 | 134,110,986 | MDU6SXNzdWUxMzQxMTA5ODY= | 856 | Peewee calls __init__ on model unexpectedly | {
"login": "jrs65",
"id": 695206,
"node_id": "MDQ6VXNlcjY5NTIwNg==",
"avatar_url": "https://avatars.githubusercontent.com/u/695206?v=4",
"gravatar_id": "",
"url": "https://api.github.com/users/jrs65",
"html_url": "https://github.com/jrs65",
"followers_url": "https://api.github.com/users/jrs65/followers"... | [] | closed | false | null | [] | null | [
"Try modifying your `__init__` to:\n\n```\ndef __init__(self, a=2, **kwargs):\n pw.Model.__init__(self, a=a, **kwargs)\n```\n",
"@lez is correct. Models that override `__init__()` should accept arbitrary kwargs and pass them to the parent constructor. Really, you should not be overriding `__init__()` in the fi... | 2016-02-16T22:10:12 | 2022-04-28T00:02:06 | 2016-02-17T18:18:32 | NONE | null | We've run into some trouble when upgrading to peewee 2.8.0, when we have a custom `__init__` defined on our models. This behaviour worked fine when on earlier versions (2.7.3 is the other version I tested).
``` python
import peewee as pw
db = pw.SqliteDatabase(':memory:')
class TestTable1(pw.Model):
a = pw.Int... | {
"url": "https://api.github.com/repos/coleifer/peewee/issues/856/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/856/timeline | null | completed | null | null |
https://api.github.com/repos/coleifer/peewee/issues/855 | https://api.github.com/repos/coleifer/peewee | https://api.github.com/repos/coleifer/peewee/issues/855/labels{/name} | https://api.github.com/repos/coleifer/peewee/issues/855/comments | https://api.github.com/repos/coleifer/peewee/issues/855/events | https://github.com/coleifer/peewee/pull/855 | 134,089,097 | MDExOlB1bGxSZXF1ZXN0NTk1NDk0NTg= | 855 | pyramid integration docs updated | {
"login": "lez",
"id": 203039,
"node_id": "MDQ6VXNlcjIwMzAzOQ==",
"avatar_url": "https://avatars.githubusercontent.com/u/203039?v=4",
"gravatar_id": "",
"url": "https://api.github.com/users/lez",
"html_url": "https://github.com/lez",
"followers_url": "https://api.github.com/users/lez/followers",
"fol... | [] | closed | false | null | [] | null | [] | 2016-02-16T20:30:29 | 2016-02-17T00:25:49 | 2016-02-17T00:25:49 | NONE | null | pyramid_peewee had been removed because
- it's overly complicated
- uses monkeypatching instead of well documented pyramid hooks
- does more than just integration - overrides database exception types
| {
"url": "https://api.github.com/repos/coleifer/peewee/issues/855/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/855/timeline | null | null | false | {
"url": "https://api.github.com/repos/coleifer/peewee/pulls/855",
"html_url": "https://github.com/coleifer/peewee/pull/855",
"diff_url": "https://github.com/coleifer/peewee/pull/855.diff",
"patch_url": "https://github.com/coleifer/peewee/pull/855.patch",
"merged_at": "2016-02-17T00:25:49"
} |
https://api.github.com/repos/coleifer/peewee/issues/854 | https://api.github.com/repos/coleifer/peewee | https://api.github.com/repos/coleifer/peewee/issues/854/labels{/name} | https://api.github.com/repos/coleifer/peewee/issues/854/comments | https://api.github.com/repos/coleifer/peewee/issues/854/events | https://github.com/coleifer/peewee/issues/854 | 133,808,531 | MDU6SXNzdWUxMzM4MDg1MzE= | 854 | Possibility to see what changes with a save? | {
"login": "kramer65",
"id": 596581,
"node_id": "MDQ6VXNlcjU5NjU4MQ==",
"avatar_url": "https://avatars.githubusercontent.com/u/596581?v=4",
"gravatar_id": "",
"url": "https://api.github.com/users/kramer65",
"html_url": "https://github.com/kramer65",
"followers_url": "https://api.github.com/users/kramer6... | [] | closed | false | null | [] | null | [
"Well, peewee knows that you set attributes so those are stored in the `dirty_fields` attribute. But there's no checking to see if it differed from the previous value. Any additional logic will have to live in your app itself.\n",
"You can do `model.save(only=model.dirty_fields)`, if you just want to save those t... | 2016-02-15T20:25:36 | 2016-12-14T21:54:24 | 2016-02-18T02:43:48 | NONE | null | Let's say I've got a `User` model from which I start a new record as follows:
```
u = User()
u.username = 'bob'
u.location = 'home'
u.save()
```
I now use the same user instance and write two values of which one is the same:
```
u.username = 'bob' # stays the same
u.location = 'work' # changes
u.save()
```
When s... | {
"url": "https://api.github.com/repos/coleifer/peewee/issues/854/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/854/timeline | null | completed | null | null |
https://api.github.com/repos/coleifer/peewee/issues/853 | https://api.github.com/repos/coleifer/peewee | https://api.github.com/repos/coleifer/peewee/issues/853/labels{/name} | https://api.github.com/repos/coleifer/peewee/issues/853/comments | https://api.github.com/repos/coleifer/peewee/issues/853/events | https://github.com/coleifer/peewee/issues/853 | 133,219,416 | MDU6SXNzdWUxMzMyMTk0MTY= | 853 | Support for conditional insert/update based on EXISTS/NOT EXISTS | {
"login": "dev-zero",
"id": 11307,
"node_id": "MDQ6VXNlcjExMzA3",
"avatar_url": "https://avatars.githubusercontent.com/u/11307?v=4",
"gravatar_id": "",
"url": "https://api.github.com/users/dev-zero",
"html_url": "https://github.com/dev-zero",
"followers_url": "https://api.github.com/users/dev-zero/foll... | [] | closed | false | null | [] | null | [
"Here's an example of how to insert with a select query:\n\nhttp://docs.peewee-orm.com/en/latest/peewee/api.html#Model.insert_from\n\nFor postgres, you can use the on_conflict method:\n\nhttp://docs.peewee-orm.com/en/latest/peewee/api.html#InsertQuery.on_conflict\n\nI'll need to check if it works with postgres, as ... | 2016-02-12T11:39:32 | 2017-07-07T04:17:01 | 2017-07-07T04:17:01 | NONE | null | I couldn't figure out how to do an "INSERT IF NOT EXISTS" according to http://stackoverflow.com/questions/15710162/conditional-insert-into-statement-in-postgres in PostgreSQL. I am now using `create_or_get` instead, but it would be nice if peewee would support the general "exists/not exists" in the `when` function.
Lik... | {
"url": "https://api.github.com/repos/coleifer/peewee/issues/853/reactions",
"total_count": 5,
"+1": 5,
"-1": 0,
"laugh": 0,
"hooray": 0,
"confused": 0,
"heart": 0,
"rocket": 0,
"eyes": 0
} | https://api.github.com/repos/coleifer/peewee/issues/853/timeline | null | completed | null | null |
https://api.github.com/repos/coleifer/peewee/issues/852 | https://api.github.com/repos/coleifer/peewee | https://api.github.com/repos/coleifer/peewee/issues/852/labels{/name} | https://api.github.com/repos/coleifer/peewee/issues/852/comments | https://api.github.com/repos/coleifer/peewee/issues/852/events | https://github.com/coleifer/peewee/issues/852 | 133,200,861 | MDU6SXNzdWUxMzMyMDA4NjE= | 852 | old SQLite3 has no sqlite3_compileoption_used function | {
"login": "gilchris",
"id": 6995188,
"node_id": "MDQ6VXNlcjY5OTUxODg=",
"avatar_url": "https://avatars.githubusercontent.com/u/6995188?v=4",
"gravatar_id": "",
"url": "https://api.github.com/users/gilchris",
"html_url": "https://github.com/gilchris",
"followers_url": "https://api.github.com/users/gilch... | [] | closed | false | null | [] | null | [
"That's one old ass sqlite.\n"
] | 2016-02-12T10:09:49 | 2016-02-12T14:39:27 | 2016-02-12T14:39:19 | NONE | null | If installed SQLite3 version is less than 2.6.23, [BerkeleyDatabase.check_libsqlite() function in berkeleydb.py](https://github.com/coleifer/peewee/blob/master/playhouse/berkeleydb.py#L102) raise AttributeError.
sqlite3_compileoption_used function in SQlite is added on 2.6.23. [link](https://www.sqlite.org/releaselog/... | {
"url": "https://api.github.com/repos/coleifer/peewee/issues/852/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/852/timeline | null | completed | null | null |
https://api.github.com/repos/coleifer/peewee/issues/851 | https://api.github.com/repos/coleifer/peewee | https://api.github.com/repos/coleifer/peewee/issues/851/labels{/name} | https://api.github.com/repos/coleifer/peewee/issues/851/comments | https://api.github.com/repos/coleifer/peewee/issues/851/events | https://github.com/coleifer/peewee/issues/851 | 133,109,489 | MDU6SXNzdWUxMzMxMDk0ODk= | 851 | Postgresql Foreign key Migrations fail to rename columns | {
"login": "Hendler",
"id": 144833,
"node_id": "MDQ6VXNlcjE0NDgzMw==",
"avatar_url": "https://avatars.githubusercontent.com/u/144833?v=4",
"gravatar_id": "",
"url": "https://api.github.com/users/Hendler",
"html_url": "https://github.com/Hendler",
"followers_url": "https://api.github.com/users/Hendler/fo... | [] | closed | false | null | [] | null | [
"Peewee uses the convention that foreign key columns end with \"_id\". No bug. Either change your migration to use user_id as the column, or in your field on the model specify db_column='user'\n",
"Thanks I got confused by the create_table and column specific operations. \n"
] | 2016-02-11T22:54:17 | 2016-02-22T22:33:52 | 2016-02-12T02:00:52 | NONE | null | First, thanks for peewee.
I've tried to include relevant bits for this example. Maybe I'm doing something wrong.
```
import basemodel
from peewee import CharField, DateTimeField, BigIntegerField, BooleanField, IntegerField, ForeignKeyField, Proxy, TextField, PrimaryKeyField
from playhouse.postgres_ext import BinaryJ... | {
"url": "https://api.github.com/repos/coleifer/peewee/issues/851/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/851/timeline | null | completed | null | null |
https://api.github.com/repos/coleifer/peewee/issues/850 | https://api.github.com/repos/coleifer/peewee | https://api.github.com/repos/coleifer/peewee/issues/850/labels{/name} | https://api.github.com/repos/coleifer/peewee/issues/850/comments | https://api.github.com/repos/coleifer/peewee/issues/850/events | https://github.com/coleifer/peewee/issues/850 | 132,922,086 | MDU6SXNzdWUxMzI5MjIwODY= | 850 | ALTER_COLUMN with MariaDB | {
"login": "ptbrowne",
"id": 465582,
"node_id": "MDQ6VXNlcjQ2NTU4Mg==",
"avatar_url": "https://avatars.githubusercontent.com/u/465582?v=4",
"gravatar_id": "",
"url": "https://api.github.com/users/ptbrowne",
"html_url": "https://github.com/ptbrowne",
"followers_url": "https://api.github.com/users/ptbrown... | [] | closed | false | null | [] | null | [
"That's odd, are you using the `MySQLMigrator`? The `add_not_null()` method appears to be using the \"MODIFY\" syntax.\n",
"My bad... That was it, I was using PostgreSQLMigrator >< Thanks\n"
] | 2016-02-11T09:08:32 | 2016-02-12T09:09:58 | 2016-02-12T09:08:29 | NONE | null | Hi,
I am using MariaDB (10.1.10 released on 2015-12.24) and peewee 2.8.0 and I am having trouble with a migration.
``` python
no_newsletter = BooleanField(default=False)
migrator.add_column(
'user', 'user_no_newsletter', no_newsletter),
)
```
The SQL issued is:
```
('ALTER TABLE `user` ADD COLUMN `user_no_news... | {
"url": "https://api.github.com/repos/coleifer/peewee/issues/850/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/850/timeline | null | completed | null | null |
https://api.github.com/repos/coleifer/peewee/issues/849 | https://api.github.com/repos/coleifer/peewee | https://api.github.com/repos/coleifer/peewee/issues/849/labels{/name} | https://api.github.com/repos/coleifer/peewee/issues/849/comments | https://api.github.com/repos/coleifer/peewee/issues/849/events | https://github.com/coleifer/peewee/issues/849 | 132,666,887 | MDU6SXNzdWUxMzI2NjY4ODc= | 849 | Subquery join replaces primary key | {
"login": "purpurpur",
"id": 7671808,
"node_id": "MDQ6VXNlcjc2NzE4MDg=",
"avatar_url": "https://avatars.githubusercontent.com/u/7671808?v=4",
"gravatar_id": "",
"url": "https://api.github.com/users/purpurpur",
"html_url": "https://github.com/purpurpur",
"followers_url": "https://api.github.com/users/pu... | [] | closed | false | null | [] | null | [
"@embali you should use [code formatting](https://guides.github.com/features/mastering-markdown/#GitHub-flavored-markdown) to make your issue more readable.\n",
"Indeed, I'm confused why people expect me to spend time answering the question they were too lazy to write properly.\n",
"Try changing the join on the... | 2016-02-10T10:54:59 | 2016-02-11T15:23:17 | 2016-02-11T15:23:17 | NONE | null | Hello,
I have models
Category:
uid - primary key
Tag:
uid - primary key
CategoryTag:
uid - promary key
category - foreign key to Category
tag - foreign key to Tag
And using this to get all categories with tag uid list for each category:
``` python
categories_ = models.Category\
.select()\
... | {
"url": "https://api.github.com/repos/coleifer/peewee/issues/849/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/849/timeline | null | completed | null | null |
https://api.github.com/repos/coleifer/peewee/issues/848 | https://api.github.com/repos/coleifer/peewee | https://api.github.com/repos/coleifer/peewee/issues/848/labels{/name} | https://api.github.com/repos/coleifer/peewee/issues/848/comments | https://api.github.com/repos/coleifer/peewee/issues/848/events | https://github.com/coleifer/peewee/pull/848 | 132,468,838 | MDExOlB1bGxSZXF1ZXN0NTg3NzM4Nzc= | 848 | Use current class as reverse ManyToManyField (cf #838) | {
"login": "yohanboniface",
"id": 146023,
"node_id": "MDQ6VXNlcjE0NjAyMw==",
"avatar_url": "https://avatars.githubusercontent.com/u/146023?v=4",
"gravatar_id": "",
"url": "https://api.github.com/users/yohanboniface",
"html_url": "https://github.com/yohanboniface",
"followers_url": "https://api.github.co... | [] | closed | false | null | [] | null | [
"Humm, why? :s\nThat does not seem to hurt anything while allowing more DRYer overriding of ManyToManyField.\n"
] | 2016-02-09T16:42:02 | 2016-03-11T12:52:11 | 2016-02-20T12:19:59 | CONTRIBUTOR | null | Thanks :)
| {
"url": "https://api.github.com/repos/coleifer/peewee/issues/848/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/848/timeline | null | null | false | {
"url": "https://api.github.com/repos/coleifer/peewee/pulls/848",
"html_url": "https://github.com/coleifer/peewee/pull/848",
"diff_url": "https://github.com/coleifer/peewee/pull/848.diff",
"patch_url": "https://github.com/coleifer/peewee/pull/848.patch",
"merged_at": null
} |
https://api.github.com/repos/coleifer/peewee/issues/847 | https://api.github.com/repos/coleifer/peewee | https://api.github.com/repos/coleifer/peewee/issues/847/labels{/name} | https://api.github.com/repos/coleifer/peewee/issues/847/comments | https://api.github.com/repos/coleifer/peewee/issues/847/events | https://github.com/coleifer/peewee/issues/847 | 132,291,124 | MDU6SXNzdWUxMzIyOTExMjQ= | 847 | Database name necessary? | {
"login": "startakovsky",
"id": 689723,
"node_id": "MDQ6VXNlcjY4OTcyMw==",
"avatar_url": "https://avatars.githubusercontent.com/u/689723?v=4",
"gravatar_id": "",
"url": "https://api.github.com/users/startakovsky",
"html_url": "https://github.com/startakovsky",
"followers_url": "https://api.github.com/u... | [] | closed | false | null | [] | null | [
"Peewee needs to know which database to connect to, so yes, this is a requirement.\n"
] | 2016-02-08T23:50:09 | 2016-02-09T01:29:22 | 2016-02-09T01:29:22 | NONE | null | Maybe this is a feature improvement, but why does peewee require the database name in the url?
mysql://{username}:{password}@{host}:{port} gives an error for something like this only in peewee, not sqlalchemy.
| {
"url": "https://api.github.com/repos/coleifer/peewee/issues/847/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/847/timeline | null | completed | null | null |
https://api.github.com/repos/coleifer/peewee/issues/846 | https://api.github.com/repos/coleifer/peewee | https://api.github.com/repos/coleifer/peewee/issues/846/labels{/name} | https://api.github.com/repos/coleifer/peewee/issues/846/comments | https://api.github.com/repos/coleifer/peewee/issues/846/events | https://github.com/coleifer/peewee/pull/846 | 131,709,756 | MDExOlB1bGxSZXF1ZXN0NTg0NjIwNDM= | 846 | Proposed fix for #845 | {
"login": "cledoux",
"id": 573298,
"node_id": "MDQ6VXNlcjU3MzI5OA==",
"avatar_url": "https://avatars.githubusercontent.com/u/573298?v=4",
"gravatar_id": "",
"url": "https://api.github.com/users/cledoux",
"html_url": "https://github.com/cledoux",
"followers_url": "https://api.github.com/users/cledoux/fo... | [] | closed | false | null | [] | null | [
"Merged a slightly different fix. Thanks for bringing this to my attention.\n"
] | 2016-02-05T17:53:57 | 2016-02-05T18:21:37 | 2016-02-05T18:21:37 | NONE | null | APSWDatabase _connect() without also making a call to _add_conn_hooks().
This was resulting in the pragmas keyword for **init** being ignored as the call to _set_pragmas was never made.
I've added test cases that illustrate my original problem and added the call to _add_conn_hooks() to APSWDatabase._connect().
| {
"url": "https://api.github.com/repos/coleifer/peewee/issues/846/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/846/timeline | null | null | false | {
"url": "https://api.github.com/repos/coleifer/peewee/pulls/846",
"html_url": "https://github.com/coleifer/peewee/pull/846",
"diff_url": "https://github.com/coleifer/peewee/pull/846.diff",
"patch_url": "https://github.com/coleifer/peewee/pull/846.patch",
"merged_at": null
} |
https://api.github.com/repos/coleifer/peewee/issues/845 | https://api.github.com/repos/coleifer/peewee | https://api.github.com/repos/coleifer/peewee/issues/845/labels{/name} | https://api.github.com/repos/coleifer/peewee/issues/845/comments | https://api.github.com/repos/coleifer/peewee/issues/845/events | https://github.com/coleifer/peewee/issues/845 | 131,708,614 | MDU6SXNzdWUxMzE3MDg2MTQ= | 845 | APSWDatabase not respecting pragmas keyword. | {
"login": "cledoux",
"id": 573298,
"node_id": "MDQ6VXNlcjU3MzI5OA==",
"avatar_url": "https://avatars.githubusercontent.com/u/573298?v=4",
"gravatar_id": "",
"url": "https://api.github.com/users/cledoux",
"html_url": "https://github.com/cledoux",
"followers_url": "https://api.github.com/users/cledoux/fo... | [] | closed | false | null | [] | null | [
"I've created a pull request with test cases that illustrate the issue along with a potential fix.\n\nAPSWDatabase overwrites _connect without calling _add_conn_hooks. I added this missing call.\n",
"Thanks for the amazingly fast turnaround!\n"
] | 2016-02-05T17:49:03 | 2016-02-05T18:29:40 | 2016-02-05T18:21:21 | NONE | null | When initializing an apsw database with pragmas, these pragmas seem completly ignored. This problem is not seen in the parent class, SqliteExtDatabase.
```
>>> db = APSWDatabase('/tmp/apsw.sqlite', pragmas=(('journal_mode', 'WAL'),))
>>> db.connect()
>>> db.execute_sql('PRAGMA journal_mode;').fetchone()[0]
'delete'
>>... | {
"url": "https://api.github.com/repos/coleifer/peewee/issues/845/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/845/timeline | null | completed | null | null |
https://api.github.com/repos/coleifer/peewee/issues/844 | https://api.github.com/repos/coleifer/peewee | https://api.github.com/repos/coleifer/peewee/issues/844/labels{/name} | https://api.github.com/repos/coleifer/peewee/issues/844/comments | https://api.github.com/repos/coleifer/peewee/issues/844/events | https://github.com/coleifer/peewee/pull/844 | 131,702,491 | MDExOlB1bGxSZXF1ZXN0NTg0NTg2Mzc= | 844 | Allow to make dynamic related name with current class | {
"login": "yohanboniface",
"id": 146023,
"node_id": "MDQ6VXNlcjE0NjAyMw==",
"avatar_url": "https://avatars.githubusercontent.com/u/146023?v=4",
"gravatar_id": "",
"url": "https://api.github.com/users/yohanboniface",
"html_url": "https://github.com/yohanboniface",
"followers_url": "https://api.github.co... | [] | closed | false | null | [] | null | [
"What you have there is really no different from the current behavior. For instance:\n\n``` python\nIn [1]: from peewee import *\n\nIn [2]: class User(Model):\n ...: username = CharField()\n ...: \n\nIn [3]: class BaseTweet(Model):\n ...: user = ForeignKeyField(User)\n ...: \n\nIn [4]: class... | 2016-02-05T17:26:46 | 2016-02-09T11:35:20 | 2016-02-05T18:05:51 | CONTRIBUTOR | null | When declaring a ForeignKey in an abstract class, this allows
to customize the related_name for each child.
For example:
``` python
class Other:
pass
class Abstract:
# Will create Other.child1_foo and Other.child2_foo accessors.
other = ForeignKey(Other, related_name='{classname}_foo')
class Child1(Abst... | {
"url": "https://api.github.com/repos/coleifer/peewee/issues/844/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/844/timeline | null | null | false | {
"url": "https://api.github.com/repos/coleifer/peewee/pulls/844",
"html_url": "https://github.com/coleifer/peewee/pull/844",
"diff_url": "https://github.com/coleifer/peewee/pull/844.diff",
"patch_url": "https://github.com/coleifer/peewee/pull/844.patch",
"merged_at": null
} |
https://api.github.com/repos/coleifer/peewee/issues/843 | https://api.github.com/repos/coleifer/peewee | https://api.github.com/repos/coleifer/peewee/issues/843/labels{/name} | https://api.github.com/repos/coleifer/peewee/issues/843/comments | https://api.github.com/repos/coleifer/peewee/issues/843/events | https://github.com/coleifer/peewee/issues/843 | 131,022,395 | MDU6SXNzdWUxMzEwMjIzOTU= | 843 | Support for `flat` tuples | {
"login": "alexanderad",
"id": 888394,
"node_id": "MDQ6VXNlcjg4ODM5NA==",
"avatar_url": "https://avatars.githubusercontent.com/u/888394?v=4",
"gravatar_id": "",
"url": "https://api.github.com/users/alexanderad",
"html_url": "https://github.com/alexanderad",
"followers_url": "https://api.github.com/user... | [] | closed | false | null | [] | null | [
"You can use `more_itertools` to flatten that.\n\n``` python\nIn [1]: import more_itertools\n\nIn [2]: l = [(1,), (2, ), (3, )]\n\nIn [3]: list(more_itertools.flatten(l))\nOut[3]: [1, 2, 3]\n```\n",
"I can use `itertools` as well (which is part of stdlib contrary to `more_itertools`), but this is not a question _... | 2016-02-03T13:18:30 | 2016-04-29T07:41:45 | 2016-02-03T16:50:17 | NONE | null | While working with peewee we often query database for a bunch of records on a single field and it is handy in this case to have a flat, chained resultset (functionality similar to [values_list(flat=True)](https://docs.djangoproject.com/en/1.9/ref/models/querysets/#values-list))
So instead of having
``` python
>>> Use... | {
"url": "https://api.github.com/repos/coleifer/peewee/issues/843/reactions",
"total_count": 3,
"+1": 3,
"-1": 0,
"laugh": 0,
"hooray": 0,
"confused": 0,
"heart": 0,
"rocket": 0,
"eyes": 0
} | https://api.github.com/repos/coleifer/peewee/issues/843/timeline | null | completed | null | null |
https://api.github.com/repos/coleifer/peewee/issues/842 | https://api.github.com/repos/coleifer/peewee | https://api.github.com/repos/coleifer/peewee/issues/842/labels{/name} | https://api.github.com/repos/coleifer/peewee/issues/842/comments | https://api.github.com/repos/coleifer/peewee/issues/842/events | https://github.com/coleifer/peewee/issues/842 | 130,652,166 | MDU6SXNzdWUxMzA2NTIxNjY= | 842 | Support for MySQL STRAIGHT_JOIN | {
"login": "fmazan",
"id": 12230333,
"node_id": "MDQ6VXNlcjEyMjMwMzMz",
"avatar_url": "https://avatars.githubusercontent.com/u/12230333?v=4",
"gravatar_id": "",
"url": "https://api.github.com/users/fmazan",
"html_url": "https://github.com/fmazan",
"followers_url": "https://api.github.com/users/fmazan/fo... | [] | closed | false | null | [] | null | [
"Just do this:\n\n``` python\nfrom peewee import *\nJOIN['STRAIGHT'] = 'STRAIGHT'\n\nmy_query = SomeObj.select().join(SomeOther, JOIN.STRAIGHT)\n```\n",
"This doesn't work anymore in version 3, due to:\r\n\r\n\r\n```\r\nclass Join(BaseTable):\r\n...\r\n def __sql__(self, ctx):\r\n (ctx\r\n .sql(... | 2016-02-02T11:18:20 | 2018-02-26T17:08:36 | 2018-02-26T17:08:36 | NONE | null | Would it be possible to somehow perform STRAIGHT_JOIN on MySQL tables due to its poor query optimizer except using raw SQL query?
The syntax according to [http://dev.mysql.com/doc/refman/5.7/en/join.html](http://dev.mysql.com/doc/refman/5.7/en/join.html) is:
> join_table:
> table_reference [INNER | CROSS] JOIN ta... | {
"url": "https://api.github.com/repos/coleifer/peewee/issues/842/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/842/timeline | null | completed | null | null |
https://api.github.com/repos/coleifer/peewee/issues/841 | https://api.github.com/repos/coleifer/peewee | https://api.github.com/repos/coleifer/peewee/issues/841/labels{/name} | https://api.github.com/repos/coleifer/peewee/issues/841/comments | https://api.github.com/repos/coleifer/peewee/issues/841/events | https://github.com/coleifer/peewee/issues/841 | 130,432,668 | MDU6SXNzdWUxMzA0MzI2Njg= | 841 | Namespace collision with another pip module | {
"login": "n3storm",
"id": 220748,
"node_id": "MDQ6VXNlcjIyMDc0OA==",
"avatar_url": "https://avatars.githubusercontent.com/u/220748?v=4",
"gravatar_id": "",
"url": "https://api.github.com/users/n3storm",
"html_url": "https://github.com/n3storm",
"followers_url": "https://api.github.com/users/n3storm/fo... | [] | closed | false | null | [] | null | [
"WTF... I have to say this does not appear to be a peewee issue to me, I'm at a loss. Peewee doesn't do anything weird regarding imports so I'm laying this at the doorstep of the thing that's jacking with imports and doing dark magic.\n",
"I have peeked into peewee repo and looks like you are right, so pluginbase... | 2016-02-01T17:50:59 | 2016-02-01T21:38:58 | 2016-02-01T17:55:47 | NONE | null | Looks like if you install peewee and PluginBase from pocoo then python, pluginbase and peewee goes crazy. Took me 1 hour before realizing this.
http://pluginbase.pocoo.org/
```
from goingpostal.contrib.group.models import Member, Queue, Archive, database
File "/usr/local/lib/python2.7/dist-packages/pluginbase.py... | {
"url": "https://api.github.com/repos/coleifer/peewee/issues/841/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/841/timeline | null | completed | null | null |
https://api.github.com/repos/coleifer/peewee/issues/840 | https://api.github.com/repos/coleifer/peewee | https://api.github.com/repos/coleifer/peewee/issues/840/labels{/name} | https://api.github.com/repos/coleifer/peewee/issues/840/comments | https://api.github.com/repos/coleifer/peewee/issues/840/events | https://github.com/coleifer/peewee/issues/840 | 129,981,986 | MDU6SXNzdWUxMjk5ODE5ODY= | 840 | Blog example: werkzeug error | {
"login": "rubensoleao",
"id": 7544470,
"node_id": "MDQ6VXNlcjc1NDQ0NzA=",
"avatar_url": "https://avatars.githubusercontent.com/u/7544470?v=4",
"gravatar_id": "",
"url": "https://api.github.com/users/rubensoleao",
"html_url": "https://github.com/rubensoleao",
"followers_url": "https://api.github.com/us... | [] | closed | false | null | [] | null | [
"I've noticed that this starts happening when I put youtube videos in my blog entries.\n\nSometimes I also get this error:\n\n> peewee.IntegrityError\n> \n> IntegrityError: UNIQUE constraint failed: entry.slug\n> Traceback (most recent call last)\n> \n> ```\n> File \"/home/lubens/Documents/CACIC/Site/blog/lib/pytho... | 2016-01-30T12:37:08 | 2016-05-20T19:03:51 | 2016-01-30T16:45:04 | NONE | null | When I run the blog, I randomly get this werkzeug error.
> Exception happened during processing of request from ('127.0.0.1', 38174)
> Traceback (most recent call last):
> File "/usr/lib/python2.7/SocketServer.py", line 295, in _handle_request_noblock
> self.process_request(request, client_address)
> File "/us... | {
"url": "https://api.github.com/repos/coleifer/peewee/issues/840/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/840/timeline | null | completed | null | null |
https://api.github.com/repos/coleifer/peewee/issues/839 | https://api.github.com/repos/coleifer/peewee | https://api.github.com/repos/coleifer/peewee/issues/839/labels{/name} | https://api.github.com/repos/coleifer/peewee/issues/839/comments | https://api.github.com/repos/coleifer/peewee/issues/839/events | https://github.com/coleifer/peewee/issues/839 | 129,917,578 | MDU6SXNzdWUxMjk5MTc1Nzg= | 839 | Documentation Idea: Alternative way to using same model with multiple databases | {
"login": "shirish93",
"id": 3619659,
"node_id": "MDQ6VXNlcjM2MTk2NTk=",
"avatar_url": "https://avatars.githubusercontent.com/u/3619659?v=4",
"gravatar_id": "",
"url": "https://api.github.com/users/shirish93",
"html_url": "https://github.com/shirish93",
"followers_url": "https://api.github.com/users/sh... | [] | closed | false | null | [] | null | [
"I don't mean to offend, but this is just basic Python. I don't think it's necessarily worth documenting, but thank you for sharing your thoughts on the issue.\n"
] | 2016-01-30T00:16:17 | 2016-01-30T16:41:15 | 2016-01-30T16:41:15 | NONE | null | Hey @coleifer ,
I've asked this question in the mailing list, but I believe I've come up with a more elegant idea to use a model with multiple databases. The user defines a Model, but encapsulates it in a function. The function takes the name of the database to be used, and returns the Model that uses the specified d... | {
"url": "https://api.github.com/repos/coleifer/peewee/issues/839/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/839/timeline | null | completed | null | null |
https://api.github.com/repos/coleifer/peewee/issues/838 | https://api.github.com/repos/coleifer/peewee | https://api.github.com/repos/coleifer/peewee/issues/838/labels{/name} | https://api.github.com/repos/coleifer/peewee/issues/838/comments | https://api.github.com/repos/coleifer/peewee/issues/838/events | https://github.com/coleifer/peewee/issues/838 | 129,712,187 | MDU6SXNzdWUxMjk3MTIxODc= | 838 | Custom ManyToManyQuery? | {
"login": "yohanboniface",
"id": 146023,
"node_id": "MDQ6VXNlcjE0NjAyMw==",
"avatar_url": "https://avatars.githubusercontent.com/u/146023?v=4",
"gravatar_id": "",
"url": "https://api.github.com/users/yohanboniface",
"html_url": "https://github.com/yohanboniface",
"followers_url": "https://api.github.co... | [] | closed | false | null | [] | null | [
"See f1988db for the changes.\n",
"Thanks for the quick fix @coleifer!\n\nThat fixes the main issues, though I'd still need to overwrite and copy-paste [`ManyToManyFieldDescriptor.__get__`](https://github.com/coleifer/peewee/blob/master/playhouse/fields.py#L169) and [`ManyToManyQuery.clone`](https://github.com/co... | 2016-01-29T09:24:12 | 2016-02-05T14:35:37 | 2016-01-29T15:46:35 | CONTRIBUTOR | null | I'd like to implement a custom result wrapper for my ManyToManyQuery (already done a custom [SelectQuery](https://github.com/etalab/ban/blob/master/ban/db/model.py#L6)), but currently the `ManyToManyQuery` is hardcoded in the [ManyToManyFieldDescriptor](https://github.com/coleifer/peewee/blob/master/playhouse/fields.py... | {
"url": "https://api.github.com/repos/coleifer/peewee/issues/838/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/838/timeline | null | completed | null | null |
https://api.github.com/repos/coleifer/peewee/issues/837 | https://api.github.com/repos/coleifer/peewee | https://api.github.com/repos/coleifer/peewee/issues/837/labels{/name} | https://api.github.com/repos/coleifer/peewee/issues/837/comments | https://api.github.com/repos/coleifer/peewee/issues/837/events | https://github.com/coleifer/peewee/pull/837 | 129,317,368 | MDExOlB1bGxSZXF1ZXN0NTc0NDg1Mzg= | 837 | fix for issue #836 | {
"login": "ronyb29",
"id": 1606872,
"node_id": "MDQ6VXNlcjE2MDY4NzI=",
"avatar_url": "https://avatars.githubusercontent.com/u/1606872?v=4",
"gravatar_id": "",
"url": "https://api.github.com/users/ronyb29",
"html_url": "https://github.com/ronyb29",
"followers_url": "https://api.github.com/users/ronyb29/... | [] | closed | false | null | [] | null | [
"This is not the intended behavior of last_insert_id() -- the intended behavior is to return the last inserted `rowid`. For auto-incrementing primary key fields, this works as expected.\n\nIf you have a user-defined primary key, then presumably you know what it is beforehand so there's no need to return it (and iss... | 2016-01-28T03:07:29 | 2016-01-28T15:55:16 | 2016-01-28T03:20:38 | CONTRIBUTOR | null | fix for issue #836
| {
"url": "https://api.github.com/repos/coleifer/peewee/issues/837/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/837/timeline | null | null | false | {
"url": "https://api.github.com/repos/coleifer/peewee/pulls/837",
"html_url": "https://github.com/coleifer/peewee/pull/837",
"diff_url": "https://github.com/coleifer/peewee/pull/837.diff",
"patch_url": "https://github.com/coleifer/peewee/pull/837.patch",
"merged_at": null
} |
https://api.github.com/repos/coleifer/peewee/issues/836 | https://api.github.com/repos/coleifer/peewee | https://api.github.com/repos/coleifer/peewee/issues/836/labels{/name} | https://api.github.com/repos/coleifer/peewee/issues/836/comments | https://api.github.com/repos/coleifer/peewee/issues/836/events | https://github.com/coleifer/peewee/issues/836 | 129,316,867 | MDU6SXNzdWUxMjkzMTY4Njc= | 836 | apsw and non integer PK | {
"login": "ronyb29",
"id": 1606872,
"node_id": "MDQ6VXNlcjE2MDY4NzI=",
"avatar_url": "https://avatars.githubusercontent.com/u/1606872?v=4",
"gravatar_id": "",
"url": "https://api.github.com/users/ronyb29",
"html_url": "https://github.com/ronyb29",
"followers_url": "https://api.github.com/users/ronyb29/... | [] | closed | false | null | [] | null | [
"https://github.com/coleifer/peewee/pull/837#issuecomment-175938671\n",
"I see the issue now. Normally, last_insert_id() checks first that the model has an auto incrementing pk.\n\n``` python\ndef last_insert_id(self, cursor, model):\n if model._meta.auto_increment:\n return cursor.lastrowid\n``... | 2016-01-28T03:04:41 | 2016-01-29T00:09:15 | 2016-01-29T00:09:15 | CONTRIBUTOR | null | the apsw driver currently returns the last [rowid](https://www.sqlite.org/c3ref/last_insert_rowid.html) instead of the las inserted PK, this causes problems for any non int pk (like a UUID)
| {
"url": "https://api.github.com/repos/coleifer/peewee/issues/836/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/836/timeline | null | completed | null | null |
https://api.github.com/repos/coleifer/peewee/issues/835 | https://api.github.com/repos/coleifer/peewee | https://api.github.com/repos/coleifer/peewee/issues/835/labels{/name} | https://api.github.com/repos/coleifer/peewee/issues/835/comments | https://api.github.com/repos/coleifer/peewee/issues/835/events | https://github.com/coleifer/peewee/issues/835 | 128,818,211 | MDU6SXNzdWUxMjg4MTgyMTE= | 835 | Signal Support and Identifying Models | {
"login": "jimjkelly",
"id": 68440,
"node_id": "MDQ6VXNlcjY4NDQw",
"avatar_url": "https://avatars.githubusercontent.com/u/68440?v=4",
"gravatar_id": "",
"url": "https://api.github.com/users/jimjkelly",
"html_url": "https://github.com/jimjkelly",
"followers_url": "https://api.github.com/users/jimjkelly/... | [] | closed | false | null | [] | null | [
"This is not a peewee problem, but a problem with the way you're importing and managing your models.\n\nPython loads your imported modules into memory and you're double-loading them (foo.Model and models.foo.Model). Python sees this as two different modules and in fact they are essentially two different models. Wha... | 2016-01-26T13:22:59 | 2016-01-27T11:59:22 | 2016-01-27T04:42:58 | NONE | null | Hi - so I have a setup where I've abstracted my models out into a pip installable package so that they can be used in multiple places in my infrastructure. This works great except when trying to get signals working. Essentially, things aren't working because of the check here:
https://github.com/coleifer/peewee/blob... | {
"url": "https://api.github.com/repos/coleifer/peewee/issues/835/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/835/timeline | null | completed | null | null |
https://api.github.com/repos/coleifer/peewee/issues/834 | https://api.github.com/repos/coleifer/peewee | https://api.github.com/repos/coleifer/peewee/issues/834/labels{/name} | https://api.github.com/repos/coleifer/peewee/issues/834/comments | https://api.github.com/repos/coleifer/peewee/issues/834/events | https://github.com/coleifer/peewee/issues/834 | 128,432,172 | MDU6SXNzdWUxMjg0MzIxNzI= | 834 | Python 3 PasswordField Bug AttributeError encode | {
"login": "mosquito",
"id": 792981,
"node_id": "MDQ6VXNlcjc5Mjk4MQ==",
"avatar_url": "https://avatars.githubusercontent.com/u/792981?v=4",
"gravatar_id": "",
"url": "https://api.github.com/users/mosquito",
"html_url": "https://github.com/mosquito",
"followers_url": "https://api.github.com/users/mosquit... | [] | closed | false | null | [] | null | [
"I believe the code was correct, but needed to just check for a unicode type rather than assuming one.\n"
] | 2016-01-24T23:11:56 | 2016-01-25T04:58:24 | 2016-01-25T04:58:07 | NONE | null | The class PasswordHash was inherited from bytes. For python 3 it's wrong because python's 3 bytes not provide "encode" method and this code:
```
class PasswordField(BlobField):
def __init__(self, iterations=12, *args, **kwargs):
if None in (hashpw, gensalt):
raise ValueError('Missing library re... | {
"url": "https://api.github.com/repos/coleifer/peewee/issues/834/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/834/timeline | null | completed | null | null |
https://api.github.com/repos/coleifer/peewee/issues/833 | https://api.github.com/repos/coleifer/peewee | https://api.github.com/repos/coleifer/peewee/issues/833/labels{/name} | https://api.github.com/repos/coleifer/peewee/issues/833/comments | https://api.github.com/repos/coleifer/peewee/issues/833/events | https://github.com/coleifer/peewee/issues/833 | 128,414,857 | MDU6SXNzdWUxMjg0MTQ4NTc= | 833 | Feauture proposal for playhouse: Option to store binary blobs in compressed form | {
"login": "shirish93",
"id": 3619659,
"node_id": "MDQ6VXNlcjM2MTk2NTk=",
"avatar_url": "https://avatars.githubusercontent.com/u/3619659?v=4",
"gravatar_id": "",
"url": "https://api.github.com/users/shirish93",
"html_url": "https://github.com/shirish93",
"followers_url": "https://api.github.com/users/sh... | [] | closed | false | null | [] | null | [
"You should check the `CompressedField`. It supports zlib and bz2.\n\nhttp://docs.peewee-orm.com/en/latest/peewee/playhouse.html#CompressedField\n",
"Oh dear! Totally missed out on that. Thanks!\n"
] | 2016-01-24T18:14:57 | 2016-01-24T21:00:47 | 2016-01-24T20:48:05 | NONE | null | Hello,
I've been working with peewee lately, and since my data is a lot of repeating text information, it's being compressed. It would seem that such a feature might be useful for everyday peewee users too, considering that most common compression algorithms have much shorter decompression times than compression times... | {
"url": "https://api.github.com/repos/coleifer/peewee/issues/833/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/833/timeline | null | completed | null | null |
https://api.github.com/repos/coleifer/peewee/issues/832 | https://api.github.com/repos/coleifer/peewee | https://api.github.com/repos/coleifer/peewee/issues/832/labels{/name} | https://api.github.com/repos/coleifer/peewee/issues/832/comments | https://api.github.com/repos/coleifer/peewee/issues/832/events | https://github.com/coleifer/peewee/issues/832 | 128,328,386 | MDU6SXNzdWUxMjgzMjgzODY= | 832 | Support for RethinkDB | {
"login": "foxx",
"id": 651797,
"node_id": "MDQ6VXNlcjY1MTc5Nw==",
"avatar_url": "https://avatars.githubusercontent.com/u/651797?v=4",
"gravatar_id": "",
"url": "https://api.github.com/users/foxx",
"html_url": "https://github.com/foxx",
"followers_url": "https://api.github.com/users/foxx/followers",
... | [] | closed | false | null | [] | null | [
"Sure, a rethinkdb backend would be pretty neat!\n",
"Okay awesome, I'll let you know once I have something ready for review (an early preview would be appreciated, as you can spot any design flaws much sooner!)\n",
"What's going on with this issue? You know, as I'm thinking about it, this would probably benefi... | 2016-01-23T13:26:21 | 2016-03-13T21:01:31 | 2016-03-13T19:26:45 | CONTRIBUTOR | null | I'm looking at the possibility of adding support for [RethinkDB](https://www.rethinkdb.com/) into Peewee. It recently became stable and so far looks absolutely [amazing](http://rob.conery.io/2015/04/17/rethinkdb-2-0-is-amazing/). After looking at some of the other extensions in playhouse, this seems to be a straight fo... | {
"url": "https://api.github.com/repos/coleifer/peewee/issues/832/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/832/timeline | null | completed | null | null |
https://api.github.com/repos/coleifer/peewee/issues/831 | https://api.github.com/repos/coleifer/peewee | https://api.github.com/repos/coleifer/peewee/issues/831/labels{/name} | https://api.github.com/repos/coleifer/peewee/issues/831/comments | https://api.github.com/repos/coleifer/peewee/issues/831/events | https://github.com/coleifer/peewee/issues/831 | 128,223,567 | MDU6SXNzdWUxMjgyMjM1Njc= | 831 | Unable to install in Windows + Python3 | {
"login": "shirish93",
"id": 3619659,
"node_id": "MDQ6VXNlcjM2MTk2NTk=",
"avatar_url": "https://avatars.githubusercontent.com/u/3619659?v=4",
"gravatar_id": "",
"url": "https://api.github.com/users/shirish93",
"html_url": "https://github.com/shirish93",
"followers_url": "https://api.github.com/users/sh... | [] | closed | false | null | [] | null | [
"Just saw https://github.com/coleifer/peewee/issues/763 . Closing this as it is a duplicate.\n"
] | 2016-01-22T19:12:27 | 2016-01-22T19:13:38 | 2016-01-22T19:13:38 | NONE | null | When trying to install peewee in Windows (with WinPython), I get the following error:
`
copying playhouse\__init__.py -> build\lib.win32-3.4\playhouse
running build_ext
cythoning playhouse/speedups.pyx to playhouse\speedups.c
building 'playhouse._speedups' extension
error: Unable to find vcvarsall.bat
`
This SO threa... | {
"url": "https://api.github.com/repos/coleifer/peewee/issues/831/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/831/timeline | null | completed | null | null |
https://api.github.com/repos/coleifer/peewee/issues/830 | https://api.github.com/repos/coleifer/peewee | https://api.github.com/repos/coleifer/peewee/issues/830/labels{/name} | https://api.github.com/repos/coleifer/peewee/issues/830/comments | https://api.github.com/repos/coleifer/peewee/issues/830/events | https://github.com/coleifer/peewee/issues/830 | 127,900,863 | MDU6SXNzdWUxMjc5MDA4NjM= | 830 | Support for SmallInteger | {
"login": "foxx",
"id": 651797,
"node_id": "MDQ6VXNlcjY1MTc5Nw==",
"avatar_url": "https://avatars.githubusercontent.com/u/651797?v=4",
"gravatar_id": "",
"url": "https://api.github.com/users/foxx",
"html_url": "https://github.com/foxx",
"followers_url": "https://api.github.com/users/foxx/followers",
... | [] | closed | false | null | [] | null | [
"No, I'll whip up an implementation, seems useful.\n",
"Beautiful, thank you!\n"
] | 2016-01-21T11:09:40 | 2016-01-21T15:06:17 | 2016-01-21T14:56:51 | CONTRIBUTOR | null | Doesn't appear to be a cross database compatible field for representing `smallint`.
[Postgres](http://www.postgresql.org/docs/9.1/static/datatype-numeric.html), [MySQL](https://dev.mysql.com/doc/refman/5.5/en/integer-types.html) and [SQLite](https://www.sqlite.org/datatype3.html) seem to handle `smallint` in the same ... | {
"url": "https://api.github.com/repos/coleifer/peewee/issues/830/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/830/timeline | null | completed | null | null |
https://api.github.com/repos/coleifer/peewee/issues/829 | https://api.github.com/repos/coleifer/peewee | https://api.github.com/repos/coleifer/peewee/issues/829/labels{/name} | https://api.github.com/repos/coleifer/peewee/issues/829/comments | https://api.github.com/repos/coleifer/peewee/issues/829/events | https://github.com/coleifer/peewee/issues/829 | 127,861,796 | MDU6SXNzdWUxMjc4NjE3OTY= | 829 | too many clients already | {
"login": "strongant",
"id": 7685936,
"node_id": "MDQ6VXNlcjc2ODU5MzY=",
"avatar_url": "https://avatars.githubusercontent.com/u/7685936?v=4",
"gravatar_id": "",
"url": "https://api.github.com/users/strongant",
"html_url": "https://github.com/strongant",
"followers_url": "https://api.github.com/users/st... | [] | closed | false | null | [] | null | [
"This just means your database is rejecting the connection because there are too many clients connected.\n",
"I don't see how this is a peewee issue. Probably check your connection management code, maybe you're not properly closing connections.\n\nIn the future please provide some shred of useful information in a... | 2016-01-21T07:18:11 | 2016-01-21T14:30:16 | 2016-01-21T14:30:16 | NONE | null | OperationalError: FATAL: sorry, too many clients already
FATAL: sorry, too many clients already
| {
"url": "https://api.github.com/repos/coleifer/peewee/issues/829/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/829/timeline | null | completed | null | null |
https://api.github.com/repos/coleifer/peewee/issues/828 | https://api.github.com/repos/coleifer/peewee | https://api.github.com/repos/coleifer/peewee/issues/828/labels{/name} | https://api.github.com/repos/coleifer/peewee/issues/828/comments | https://api.github.com/repos/coleifer/peewee/issues/828/events | https://github.com/coleifer/peewee/issues/828 | 127,820,252 | MDU6SXNzdWUxMjc4MjAyNTI= | 828 | Make signals respect transactions? | {
"login": "josefdlange",
"id": 1062835,
"node_id": "MDQ6VXNlcjEwNjI4MzU=",
"avatar_url": "https://avatars.githubusercontent.com/u/1062835?v=4",
"gravatar_id": "",
"url": "https://api.github.com/users/josefdlange",
"html_url": "https://github.com/josefdlange",
"followers_url": "https://api.github.com/us... | [] | closed | false | null | [] | null | [
"Or, just a thought that popped into my head, maybe on [`transaction`](https://github.com/coleifer/peewee/blob/master/peewee.py#L3995) we could add in the ability to set a callable value to be executed on commit? (and rollback I suppose).\n",
"Peewee is active record, so the concept of tracking models throughout ... | 2016-01-21T00:52:41 | 2016-01-21T15:53:53 | 2016-01-21T15:02:56 | CONTRIBUTOR | null | I have a feeling the answer will be "no, definitely not" but I thought I'd pick your brain on this.
I've got a variety of functions that do a variety of things, some calling others, etc, and some of these functions in effect send push notifications and the like to clients based on the data they've created/changed/int... | {
"url": "https://api.github.com/repos/coleifer/peewee/issues/828/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/828/timeline | null | completed | null | null |
https://api.github.com/repos/coleifer/peewee/issues/827 | https://api.github.com/repos/coleifer/peewee | https://api.github.com/repos/coleifer/peewee/issues/827/labels{/name} | https://api.github.com/repos/coleifer/peewee/issues/827/comments | https://api.github.com/repos/coleifer/peewee/issues/827/events | https://github.com/coleifer/peewee/issues/827 | 127,659,957 | MDU6SXNzdWUxMjc2NTk5NTc= | 827 | Support for sophisticated migrations | {
"login": "foxx",
"id": 651797,
"node_id": "MDQ6VXNlcjY1MTc5Nw==",
"avatar_url": "https://avatars.githubusercontent.com/u/651797?v=4",
"gravatar_id": "",
"url": "https://api.github.com/users/foxx",
"html_url": "https://github.com/foxx",
"followers_url": "https://api.github.com/users/foxx/followers",
... | [] | closed | false | null | [] | null | [
"I've always maintained the view that anything beyond the APIs currently available would be best suited for a third party package, and I believe maybe one or two such exist. Any type of automatic schema migrator seems like an invitation to disaster and will never be included as part of peewee.\n",
"Thanks for the... | 2016-01-20T11:10:59 | 2016-03-28T18:39:06 | 2016-01-20T14:24:35 | CONTRIBUTOR | null | As mentioned in [Peewee Docs](http://docs.peewee-orm.com/en/latest/peewee/playhouse.html#schema-migrations);
> This engine provides the basis on which a more sophisticated tool could some day be built.
Other framework implementations, such as South and Django Migrations, are quite infuriating to use so I'd be interes... | {
"url": "https://api.github.com/repos/coleifer/peewee/issues/827/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/827/timeline | null | completed | null | null |
https://api.github.com/repos/coleifer/peewee/issues/826 | https://api.github.com/repos/coleifer/peewee | https://api.github.com/repos/coleifer/peewee/issues/826/labels{/name} | https://api.github.com/repos/coleifer/peewee/issues/826/comments | https://api.github.com/repos/coleifer/peewee/issues/826/events | https://github.com/coleifer/peewee/issues/826 | 127,607,004 | MDU6SXNzdWUxMjc2MDcwMDQ= | 826 | [Feature Req] Ability to order by column with NULL preference | {
"login": "alexlatchford",
"id": 628146,
"node_id": "MDQ6VXNlcjYyODE0Ng==",
"avatar_url": "https://avatars.githubusercontent.com/u/628146?v=4",
"gravatar_id": "",
"url": "https://api.github.com/users/alexlatchford",
"html_url": "https://github.com/alexlatchford",
"followers_url": "https://api.github.co... | [] | closed | false | null | [] | null | [
"I do not plan on supporting that as a Meta option, but you can write a wrapper method on your model class that sorts the table correctly. You can pass arbitrary SQL nodes into order_by(), so:\n\nMyModel.select().order_by(SQL('the_col nulls last'))\n",
"Awesome! Thought it might be possible but wasn't sure how, t... | 2016-01-20T05:21:20 | 2016-01-20T21:45:55 | 2016-01-20T14:19:07 | CONTRIBUTOR | null | Currently you can use the `order_by` metaclass property to assign default sort ordering. I have a requirement to be able to sort a column and also have it respect sort order for nulls, I've been looking through the docs and can't seem to find support for it so I'd like to propose a syntax for potentially adding the fea... | {
"url": "https://api.github.com/repos/coleifer/peewee/issues/826/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/826/timeline | null | completed | null | null |
https://api.github.com/repos/coleifer/peewee/issues/825 | https://api.github.com/repos/coleifer/peewee | https://api.github.com/repos/coleifer/peewee/issues/825/labels{/name} | https://api.github.com/repos/coleifer/peewee/issues/825/comments | https://api.github.com/repos/coleifer/peewee/issues/825/events | https://github.com/coleifer/peewee/issues/825 | 127,497,081 | MDU6SXNzdWUxMjc0OTcwODE= | 825 | Allow Meta `database` to be callable | {
"login": "foxx",
"id": 651797,
"node_id": "MDQ6VXNlcjY1MTc5Nw==",
"avatar_url": "https://avatars.githubusercontent.com/u/651797?v=4",
"gravatar_id": "",
"url": "https://api.github.com/users/foxx",
"html_url": "https://github.com/foxx",
"followers_url": "https://api.github.com/users/foxx/followers",
... | [] | closed | false | null | [] | null | [
"In the event that callable support is not added to the core, here is the updated version of the monkeypatch which can be injected at any point during the runtime. There is a discussion in #804 about why this approach is required for some patches (due to bugs in Python core).\n\n``` python\ndef ModelOptions__getatt... | 2016-01-19T17:26:27 | 2016-02-12T14:33:58 | 2016-01-20T16:48:29 | CONTRIBUTOR | null | As per other issues, I'm currently implementing a database router and connection manager for Peewee.
This allows me to do stuff like;
``` python
class User(Model):
class Meta:
# in this example, current_app() is a global context manager which
# uses thread locals to determine the current applicati... | {
"url": "https://api.github.com/repos/coleifer/peewee/issues/825/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/825/timeline | null | completed | null | null |
https://api.github.com/repos/coleifer/peewee/issues/824 | https://api.github.com/repos/coleifer/peewee | https://api.github.com/repos/coleifer/peewee/issues/824/labels{/name} | https://api.github.com/repos/coleifer/peewee/issues/824/comments | https://api.github.com/repos/coleifer/peewee/issues/824/events | https://github.com/coleifer/peewee/issues/824 | 127,141,809 | MDU6SXNzdWUxMjcxNDE4MDk= | 824 | Using ArrayField w/ BinaryJSONField (PostgreSQL) | {
"login": "tantona",
"id": 6251606,
"node_id": "MDQ6VXNlcjYyNTE2MDY=",
"avatar_url": "https://avatars.githubusercontent.com/u/6251606?v=4",
"gravatar_id": "",
"url": "https://api.github.com/users/tantona",
"html_url": "https://github.com/tantona",
"followers_url": "https://api.github.com/users/tantona/... | [] | closed | false | null | [] | null | [
"Well...since JSON fields themselves can contain arrays, I'm not sure how crucial I feel it is to address this use-case. If peewee is not supporting this, then I'll just defer and mark this wontfix.\n"
] | 2016-01-18T02:17:53 | 2016-01-18T16:12:21 | 2016-01-18T16:12:21 | NONE | null | I was unable to use these two postgres extensions in conjunction. I scoured the internet for an answer but all I found was http://stackoverflow.com/questions/18099589/postgres-array-of-json-avoid-casting
My solution (which is a hack) was this
```
def postgresJsonArrayString(array):
return "".join(["{", ", ".joi... | {
"url": "https://api.github.com/repos/coleifer/peewee/issues/824/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/824/timeline | null | completed | null | null |
https://api.github.com/repos/coleifer/peewee/issues/823 | https://api.github.com/repos/coleifer/peewee | https://api.github.com/repos/coleifer/peewee/issues/823/labels{/name} | https://api.github.com/repos/coleifer/peewee/issues/823/comments | https://api.github.com/repos/coleifer/peewee/issues/823/events | https://github.com/coleifer/peewee/pull/823 | 127,044,673 | MDExOlB1bGxSZXF1ZXN0NTYyNTk3MDc= | 823 | PaginatedQuery should not throw 404 on empty query | {
"login": "econne01",
"id": 3346056,
"node_id": "MDQ6VXNlcjMzNDYwNTY=",
"avatar_url": "https://avatars.githubusercontent.com/u/3346056?v=4",
"gravatar_id": "",
"url": "https://api.github.com/users/econne01",
"html_url": "https://github.com/econne01",
"followers_url": "https://api.github.com/users/econn... | [] | closed | false | null | [] | null | [
"The behavior is intended\n",
"I see. Ok, thanks\n"
] | 2016-01-16T18:32:21 | 2016-01-16T18:37:33 | 2016-01-16T18:36:37 | NONE | null | Working through the [Flask Blog in an hour or less tutorial](https://github.com/econne01/peewee.git), I noticed 404 errors are being thrown when the database is empty.
I think `PaginatedQuery` class should gracefully handle an empty query and return empty set when the query returns no results.
| {
"url": "https://api.github.com/repos/coleifer/peewee/issues/823/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/823/timeline | null | null | false | {
"url": "https://api.github.com/repos/coleifer/peewee/pulls/823",
"html_url": "https://github.com/coleifer/peewee/pull/823",
"diff_url": "https://github.com/coleifer/peewee/pull/823.diff",
"patch_url": "https://github.com/coleifer/peewee/pull/823.patch",
"merged_at": null
} |
https://api.github.com/repos/coleifer/peewee/issues/822 | https://api.github.com/repos/coleifer/peewee | https://api.github.com/repos/coleifer/peewee/issues/822/labels{/name} | https://api.github.com/repos/coleifer/peewee/issues/822/comments | https://api.github.com/repos/coleifer/peewee/issues/822/events | https://github.com/coleifer/peewee/pull/822 | 126,897,182 | MDExOlB1bGxSZXF1ZXN0NTYxODM4NzA= | 822 | _is_closed check doesn't work with PooledMySQLDatabase and pymysql | {
"login": "decoratorz",
"id": 8288881,
"node_id": "MDQ6VXNlcjgyODg4ODE=",
"avatar_url": "https://avatars.githubusercontent.com/u/8288881?v=4",
"gravatar_id": "",
"url": "https://api.github.com/users/decoratorz",
"html_url": "https://github.com/decoratorz",
"followers_url": "https://api.github.com/users... | [] | closed | false | null | [] | null | [
"Nice, I tested this out and it appears to work correctly. Thanks!\n"
] | 2016-01-15T15:40:44 | 2016-01-15T22:16:33 | 2016-01-15T22:16:21 | NONE | null | We encountered the same problem as described here: https://github.com/coleifer/peewee/issues/783
Our connections in the pool were closed by MySQL with the 2006 error after reaching server-side timeout. Because we don't always control the environment we run in, we didn't want to guess the my.cnf wait_timeout value and ... | {
"url": "https://api.github.com/repos/coleifer/peewee/issues/822/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/822/timeline | null | null | false | {
"url": "https://api.github.com/repos/coleifer/peewee/pulls/822",
"html_url": "https://github.com/coleifer/peewee/pull/822",
"diff_url": "https://github.com/coleifer/peewee/pull/822.diff",
"patch_url": "https://github.com/coleifer/peewee/pull/822.patch",
"merged_at": null
} |
https://api.github.com/repos/coleifer/peewee/issues/821 | https://api.github.com/repos/coleifer/peewee | https://api.github.com/repos/coleifer/peewee/issues/821/labels{/name} | https://api.github.com/repos/coleifer/peewee/issues/821/comments | https://api.github.com/repos/coleifer/peewee/issues/821/events | https://github.com/coleifer/peewee/pull/821 | 126,782,731 | MDExOlB1bGxSZXF1ZXN0NTYxMTY3OTc= | 821 | Fallback gracefully in the face of ancient (and probably broken) Cython versions | {
"login": "jherre",
"id": 391020,
"node_id": "MDQ6VXNlcjM5MTAyMA==",
"avatar_url": "https://avatars.githubusercontent.com/u/391020?v=4",
"gravatar_id": "",
"url": "https://api.github.com/users/jherre",
"html_url": "https://github.com/jherre",
"followers_url": "https://api.github.com/users/jherre/follow... | [] | closed | false | null | [] | null | [
"Where did you arrive at that version number? I'm leery of merging this as I think it might cause some false positives.\n",
"I ran a matrix of all versions of Cython since 0.21 using py27, py34 and py35 using the peewee tests.\n\nUsing versions prior to 0.22.1 doesn't work. Failures happen during cythonization. ... | 2016-01-15T00:47:47 | 2016-01-15T21:54:41 | 2016-01-15T21:54:41 | NONE | null | Some folks have dependencies that won't support easy Cython upgrades. Ignore incompatible Cython installations - same thing as not having it at all...
Tested on py27, py34 and py35 and all versions of Cython up to 0.23.4
| {
"url": "https://api.github.com/repos/coleifer/peewee/issues/821/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/821/timeline | null | null | false | {
"url": "https://api.github.com/repos/coleifer/peewee/pulls/821",
"html_url": "https://github.com/coleifer/peewee/pull/821",
"diff_url": "https://github.com/coleifer/peewee/pull/821.diff",
"patch_url": "https://github.com/coleifer/peewee/pull/821.patch",
"merged_at": null
} |
https://api.github.com/repos/coleifer/peewee/issues/820 | https://api.github.com/repos/coleifer/peewee | https://api.github.com/repos/coleifer/peewee/issues/820/labels{/name} | https://api.github.com/repos/coleifer/peewee/issues/820/comments | https://api.github.com/repos/coleifer/peewee/issues/820/events | https://github.com/coleifer/peewee/issues/820 | 126,746,981 | MDU6SXNzdWUxMjY3NDY5ODE= | 820 | cython compilation failing w/ python3.4 | {
"login": "jherre",
"id": 391020,
"node_id": "MDQ6VXNlcjM5MTAyMA==",
"avatar_url": "https://avatars.githubusercontent.com/u/391020?v=4",
"gravatar_id": "",
"url": "https://api.github.com/users/jherre",
"html_url": "https://github.com/jherre",
"followers_url": "https://api.github.com/users/jherre/follow... | [] | closed | false | null | [] | null | [
"Python 3.4.3\nCython version 0.21.1\ngcc version 4.9.2 (Ubuntu 4.9.2-10ubuntu13) \n",
"Try upgrading your Cython?\n",
"Using Python 3.5 and Cython 0.23.4 no issues.\n",
"Using Python 3.4.3 and Cython 0.23.4 also no issues\n",
"So that is to confirm that it works correctly after upgrading your Cython?\n",
... | 2016-01-14T21:00:31 | 2016-02-05T08:36:11 | 2016-01-14T21:29:53 | NONE | null | Will update with more details as I find time. Pinning to peewee 2.7 for now
```
Running setup.py install for peewee
Complete output from command /vagrant/.tox/py34/bin/python3.4 -c "import setuptools, tokenize;__file__='/tmp/pip-build-gasvyut8/peewee/setup.py';exec(compile(getattr(tokenize, 'open', open)(__file... | {
"url": "https://api.github.com/repos/coleifer/peewee/issues/820/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/820/timeline | null | completed | null | null |
https://api.github.com/repos/coleifer/peewee/issues/819 | https://api.github.com/repos/coleifer/peewee | https://api.github.com/repos/coleifer/peewee/issues/819/labels{/name} | https://api.github.com/repos/coleifer/peewee/issues/819/comments | https://api.github.com/repos/coleifer/peewee/issues/819/events | https://github.com/coleifer/peewee/pull/819 | 126,706,589 | MDExOlB1bGxSZXF1ZXN0NTYwNjc0MDg= | 819 | Fixed broken BlobField/BinaryField in MySQL | {
"login": "foxx",
"id": 651797,
"node_id": "MDQ6VXNlcjY1MTc5Nw==",
"avatar_url": "https://avatars.githubusercontent.com/u/651797?v=4",
"gravatar_id": "",
"url": "https://api.github.com/users/foxx",
"html_url": "https://github.com/foxx",
"followers_url": "https://api.github.com/users/foxx/followers",
... | [] | closed | false | null | [] | null | [
"This will need sign off and review from @coleifer before merge. I'm about 90% happy with the code, but there could be some edge cases I haven't considered.\n",
"I'm leaning towards killing off the binary field altogether.\n",
"@coleifer Yeah I just updated the original issue with my conclusion, lemme know your... | 2016-01-14T17:32:59 | 2016-01-14T21:35:07 | 2016-01-14T21:35:07 | CONTRIBUTOR | null | Fixes #818
| {
"url": "https://api.github.com/repos/coleifer/peewee/issues/819/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/819/timeline | null | null | false | {
"url": "https://api.github.com/repos/coleifer/peewee/pulls/819",
"html_url": "https://github.com/coleifer/peewee/pull/819",
"diff_url": "https://github.com/coleifer/peewee/pull/819.diff",
"patch_url": "https://github.com/coleifer/peewee/pull/819.patch",
"merged_at": null
} |
https://api.github.com/repos/coleifer/peewee/issues/818 | https://api.github.com/repos/coleifer/peewee | https://api.github.com/repos/coleifer/peewee/issues/818/labels{/name} | https://api.github.com/repos/coleifer/peewee/issues/818/comments | https://api.github.com/repos/coleifer/peewee/issues/818/events | https://github.com/coleifer/peewee/issues/818 | 126,690,880 | MDU6SXNzdWUxMjY2OTA4ODA= | 818 | BinaryField/BlobField/UUIDField is broken with MySQL | {
"login": "foxx",
"id": 651797,
"node_id": "MDQ6VXNlcjY1MTc5Nw==",
"avatar_url": "https://avatars.githubusercontent.com/u/651797?v=4",
"gravatar_id": "",
"url": "https://api.github.com/users/foxx",
"html_url": "https://github.com/foxx",
"followers_url": "https://api.github.com/users/foxx/followers",
... | [] | closed | false | null | [] | null | [
"Just looking into this a bit deeper, it seems that `BlobField` is actually broken in MySQL as well, as data was being truncated and not detected by tests, due to [this](https://github.com/coleifer/peewee/blob/master/playhouse/tests/test_fields.py#L320). As you can see, the test was referencing `blob` rather than `... | 2016-01-14T16:28:20 | 2016-01-23T13:18:55 | 2016-01-14T23:01:55 | CONTRIBUTOR | null | Looks like both `BlobField` and `BinaryField` in MySQL are actually broken, because MySQL expects a `max_length`, and thus all values are being truncated down to 1 byte.
The most obvious fix seems to be;
```
class BinaryField(BlobField):
db_field = 'varbinary'
class FixedBinaryField(CharField):
db_field = 'b... | {
"url": "https://api.github.com/repos/coleifer/peewee/issues/818/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/818/timeline | null | completed | null | null |
https://api.github.com/repos/coleifer/peewee/issues/817 | https://api.github.com/repos/coleifer/peewee | https://api.github.com/repos/coleifer/peewee/issues/817/labels{/name} | https://api.github.com/repos/coleifer/peewee/issues/817/comments | https://api.github.com/repos/coleifer/peewee/issues/817/events | https://github.com/coleifer/peewee/pull/817 | 126,681,524 | MDExOlB1bGxSZXF1ZXN0NTYwNTE4Njc= | 817 | Proposal to rename `safe` to `fail_silently` | {
"login": "foxx",
"id": 651797,
"node_id": "MDQ6VXNlcjY1MTc5Nw==",
"avatar_url": "https://avatars.githubusercontent.com/u/651797?v=4",
"gravatar_id": "",
"url": "https://api.github.com/users/foxx",
"html_url": "https://github.com/foxx",
"followers_url": "https://api.github.com/users/foxx/followers",
... | [] | closed | false | null | [] | null | [] | 2016-01-14T15:45:45 | 2016-01-14T16:32:35 | 2016-01-14T16:32:35 | CONTRIBUTOR | null | There seems to be two keywords that have the same meaning, `safe` and `fail_silently`. Is there any reason not to use one, rather than both?
PS) This will need a docs update before it can be merged.
PS) This is also backwards incompatible
| {
"url": "https://api.github.com/repos/coleifer/peewee/issues/817/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/817/timeline | null | null | false | {
"url": "https://api.github.com/repos/coleifer/peewee/pulls/817",
"html_url": "https://github.com/coleifer/peewee/pull/817",
"diff_url": "https://github.com/coleifer/peewee/pull/817.diff",
"patch_url": "https://github.com/coleifer/peewee/pull/817.patch",
"merged_at": null
} |
https://api.github.com/repos/coleifer/peewee/issues/816 | https://api.github.com/repos/coleifer/peewee | https://api.github.com/repos/coleifer/peewee/issues/816/labels{/name} | https://api.github.com/repos/coleifer/peewee/issues/816/comments | https://api.github.com/repos/coleifer/peewee/issues/816/events | https://github.com/coleifer/peewee/issues/816 | 126,452,409 | MDU6SXNzdWUxMjY0NTI0MDk= | 816 | Support for model mixins? | {
"login": "foxx",
"id": 651797,
"node_id": "MDQ6VXNlcjY1MTc5Nw==",
"avatar_url": "https://avatars.githubusercontent.com/u/651797?v=4",
"gravatar_id": "",
"url": "https://api.github.com/users/foxx",
"html_url": "https://github.com/foxx",
"followers_url": "https://api.github.com/users/foxx/followers",
... | [] | closed | false | null | [] | null | [
"@foxx, try with:\n\n```\nclass BaseModelMixin(Model):\n```\n",
"@yohanboniface has it right.\n",
"Additional nit, you don't need `unique=True` for a primary key.\n",
"Ahh okay, so the mixins have to have subclass `Model`, I'm guessing due to metaclass magic of some sort. Looks to be working now, thanks both ... | 2016-01-13T16:06:31 | 2016-01-13T16:34:18 | 2016-01-13T16:31:19 | CONTRIBUTOR | null | Currently it's not possible to do the following;
``` python
class BaseModelMixin(object):
id = UUIDField(default=uuid1, primary_key=True, unique=True)
class BaseModel(BaseModelMixin, Model):
pass
class User(BaseModel):
pass
```
It's surprising behaviour that I can't construct models from a set of mixins... | {
"url": "https://api.github.com/repos/coleifer/peewee/issues/816/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/816/timeline | null | completed | null | null |
https://api.github.com/repos/coleifer/peewee/issues/815 | https://api.github.com/repos/coleifer/peewee | https://api.github.com/repos/coleifer/peewee/issues/815/labels{/name} | https://api.github.com/repos/coleifer/peewee/issues/815/comments | https://api.github.com/repos/coleifer/peewee/issues/815/events | https://github.com/coleifer/peewee/issues/815 | 126,390,428 | MDU6SXNzdWUxMjYzOTA0Mjg= | 815 | Incorrect SQL generated for OVER clause | {
"login": "liato",
"id": 47819,
"node_id": "MDQ6VXNlcjQ3ODE5",
"avatar_url": "https://avatars.githubusercontent.com/u/47819?v=4",
"gravatar_id": "",
"url": "https://api.github.com/users/liato",
"html_url": "https://github.com/liato",
"followers_url": "https://api.github.com/users/liato/followers",
"f... | [] | closed | false | null | [] | null | [
"Instead of using `.challenge_id` can you use `.challenge` instead? Let me know. PS I had to reformat your code so I could read it without scrolling -- please add linebreaks for long chunks of code.\n",
"Closing. Please reopen if this does not address your concern.\n",
"Thanks! Stupid mistake by me. Using `.cha... | 2016-01-13T10:40:33 | 2016-01-14T12:09:24 | 2016-01-14T05:03:13 | NONE | null | I'm trying to implement sub ordering on my table based on the `challenge_id`field using the following peewee query:
``` python
(ChallengeResult
.select(
ChallengeResult,
fn.row_number().over(
partition_by=[ChallengeResult.challenge_id],
order_by=[ChallengeResult.length.desc()]).alias("row_number"))
... | {
"url": "https://api.github.com/repos/coleifer/peewee/issues/815/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/815/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.