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/814 | https://api.github.com/repos/coleifer/peewee | https://api.github.com/repos/coleifer/peewee/issues/814/labels{/name} | https://api.github.com/repos/coleifer/peewee/issues/814/comments | https://api.github.com/repos/coleifer/peewee/issues/814/events | https://github.com/coleifer/peewee/issues/814 | 126,332,337 | MDU6SXNzdWUxMjYzMzIzMzc= | 814 | PooledMySQLDatabase has cache or buffer?.md | {
"login": "tradaniel",
"id": 10319846,
"node_id": "MDQ6VXNlcjEwMzE5ODQ2",
"avatar_url": "https://avatars.githubusercontent.com/u/10319846?v=4",
"gravatar_id": "",
"url": "https://api.github.com/users/tradaniel",
"html_url": "https://github.com/tradaniel",
"followers_url": "https://api.github.com/users/... | [] | closed | false | null | [] | null | [
"You don't need a pool for multi-threaded, for what it's worth. Peewee correctly handles connections and will open a connection per thread.\n\nThe issue is related to #727 and #806 . I've reverted the change in #727 so this should resolve itself. In the meantime, make sure you are using transactions! Wrap your code... | 2016-01-13T03:23:31 | 2016-01-13T16:29:27 | 2016-01-13T16:29:18 | NONE | null | i create a mysql pool like this:
```
database = PooledMySQLDatabase('test', max_connections=10,
**{'host': 'localhost', 'port': 3306,
'user': 'root', 'password': ''})
class BaseModel(Model):
class Meta:
database = database
class Tb1(BaseModel):
... | {
"url": "https://api.github.com/repos/coleifer/peewee/issues/814/reactions",
"total_count": 0,
"+1": 0,
"-1": 0,
"laugh": 0,
"hooray": 0,
"confused": 0,
"heart": 0,
"rocket": 0,
"eyes": 0
} | https://api.github.com/repos/coleifer/peewee/issues/814/timeline | null | completed | null | null |
https://api.github.com/repos/coleifer/peewee/issues/813 | https://api.github.com/repos/coleifer/peewee | https://api.github.com/repos/coleifer/peewee/issues/813/labels{/name} | https://api.github.com/repos/coleifer/peewee/issues/813/comments | https://api.github.com/repos/coleifer/peewee/issues/813/events | https://github.com/coleifer/peewee/pull/813 | 125,972,752 | MDExOlB1bGxSZXF1ZXN0NTU2MzgyNTU= | 813 | Docs update for #790 | {
"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 | [
"Oh, good deal\n",
"@coleifer Was this meant to be closed without merging? Does it need improvement?\n",
"Whoops!\n"
] | 2016-01-11T15:47:46 | 2016-01-14T16:32:29 | 2016-01-11T16:42:05 | CONTRIBUTOR | null | {
"url": "https://api.github.com/repos/coleifer/peewee/issues/813/reactions",
"total_count": 0,
"+1": 0,
"-1": 0,
"laugh": 0,
"hooray": 0,
"confused": 0,
"heart": 0,
"rocket": 0,
"eyes": 0
} | https://api.github.com/repos/coleifer/peewee/issues/813/timeline | null | null | false | {
"url": "https://api.github.com/repos/coleifer/peewee/pulls/813",
"html_url": "https://github.com/coleifer/peewee/pull/813",
"diff_url": "https://github.com/coleifer/peewee/pull/813.diff",
"patch_url": "https://github.com/coleifer/peewee/pull/813.patch",
"merged_at": "2016-01-11T16:42:05"
} | |
https://api.github.com/repos/coleifer/peewee/issues/812 | https://api.github.com/repos/coleifer/peewee | https://api.github.com/repos/coleifer/peewee/issues/812/labels{/name} | https://api.github.com/repos/coleifer/peewee/issues/812/comments | https://api.github.com/repos/coleifer/peewee/issues/812/events | https://github.com/coleifer/peewee/issues/812 | 125,970,390 | MDU6SXNzdWUxMjU5NzAzOTA= | 812 | Transaction decorator not working with Tornado and Python 3.5's "async" | {
"login": "csytan",
"id": 16357,
"node_id": "MDQ6VXNlcjE2MzU3",
"avatar_url": "https://avatars.githubusercontent.com/u/16357?v=4",
"gravatar_id": "",
"url": "https://api.github.com/users/csytan",
"html_url": "https://github.com/csytan",
"followers_url": "https://api.github.com/users/csytan/followers",
... | [] | closed | false | null | [] | null | [
"This doesn't seem like a peewee issue to me, as peewee doesn't know about your event loop and is designed using normal python APIs. I am not familiar with tornado/twisted so I can't really offer much more in the way of advice for debugging this.\n",
"Understood. Thanks for having a look!\n"
] | 2016-01-11T15:36:07 | 2016-01-11T17:09:28 | 2016-01-11T16:44:10 | NONE | null | The transaction decorator doesn't rollback correctly when used with an async function in Tornado.
```
@database.transaction()
async def test_txn():
Test.create()
raise Exception()
```
Results of test code:
```
$ py peeweetest.py
<function test_asyncio at 0x10e033ea0>
Success
<function test_tornado at 0x10e... | {
"url": "https://api.github.com/repos/coleifer/peewee/issues/812/reactions",
"total_count": 0,
"+1": 0,
"-1": 0,
"laugh": 0,
"hooray": 0,
"confused": 0,
"heart": 0,
"rocket": 0,
"eyes": 0
} | https://api.github.com/repos/coleifer/peewee/issues/812/timeline | null | completed | null | null |
https://api.github.com/repos/coleifer/peewee/issues/811 | https://api.github.com/repos/coleifer/peewee | https://api.github.com/repos/coleifer/peewee/issues/811/labels{/name} | https://api.github.com/repos/coleifer/peewee/issues/811/comments | https://api.github.com/repos/coleifer/peewee/issues/811/events | https://github.com/coleifer/peewee/issues/811 | 125,842,162 | MDU6SXNzdWUxMjU4NDIxNjI= | 811 | MySQL not included in Travis CI | {
"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 | [
"Added this. MySQL has always been a 2nd-class citizen since I don't use it and don't typically even have it installed. I've added it, however, so let's hope things work!\n",
"Well, lots of issues... reopening to fix.\n",
"Admittedly MySQL is a flawed technology in comparison with Postgres, but fwiw MariaDB is ... | 2016-01-10T20:06:30 | 2016-01-14T12:27:29 | 2016-01-14T05:02:49 | CONTRIBUTOR | null | Just looking over [`.travis.yml`](https://github.com/coleifer/peewee/blob/master/.travis.yml), and it appears that MySQL is not included in the backend tests.
Any particular reason for this, or would a PR fix be accepted?
| {
"url": "https://api.github.com/repos/coleifer/peewee/issues/811/reactions",
"total_count": 0,
"+1": 0,
"-1": 0,
"laugh": 0,
"hooray": 0,
"confused": 0,
"heart": 0,
"rocket": 0,
"eyes": 0
} | https://api.github.com/repos/coleifer/peewee/issues/811/timeline | null | completed | null | null |
https://api.github.com/repos/coleifer/peewee/issues/810 | https://api.github.com/repos/coleifer/peewee | https://api.github.com/repos/coleifer/peewee/issues/810/labels{/name} | https://api.github.com/repos/coleifer/peewee/issues/810/comments | https://api.github.com/repos/coleifer/peewee/issues/810/events | https://github.com/coleifer/peewee/issues/810 | 125,489,186 | MDU6SXNzdWUxMjU0ODkxODY= | 810 | add DictField | {
"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 | [
"You can use the `PickledField`, added just now:\n\nhttps://github.com/coleifer/peewee/blob/master/playhouse/fields.py#L293-L302\n\nIf you're using a new-ish version of Postgres you can use the JSON field or the HStore field.\n\nIf you're using a new-ish version of SQLite with the JSON1 extension compiled in or loa... | 2016-01-07T21:34:23 | 2016-01-07T22:46:43 | 2016-01-07T22:46:43 | NONE | null | Hello!
Is it possible to implement DictField (basing for example TextField)?
I need to store unstructed data in model and I think such feature would be useful.
| {
"url": "https://api.github.com/repos/coleifer/peewee/issues/810/reactions",
"total_count": 0,
"+1": 0,
"-1": 0,
"laugh": 0,
"hooray": 0,
"confused": 0,
"heart": 0,
"rocket": 0,
"eyes": 0
} | https://api.github.com/repos/coleifer/peewee/issues/810/timeline | null | completed | null | null |
https://api.github.com/repos/coleifer/peewee/issues/809 | https://api.github.com/repos/coleifer/peewee | https://api.github.com/repos/coleifer/peewee/issues/809/labels{/name} | https://api.github.com/repos/coleifer/peewee/issues/809/comments | https://api.github.com/repos/coleifer/peewee/issues/809/events | https://github.com/coleifer/peewee/issues/809 | 125,170,366 | MDU6SXNzdWUxMjUxNzAzNjY= | 809 | Model object constructor using kwargs puts FKs in weird state on local instance | {
"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 | [
"Yes, its because null=False. That is normal behavior. It happens whether or not you initialize the fk with None, if there is no value. The null False tells us that a missing value is an error.\n"
] | 2016-01-06T12:44:52 | 2016-01-06T18:11:17 | 2016-01-06T18:11:17 | CONTRIBUTOR | null | Hey!
Found an interesting one, and I'm curious if it's intended behavior or a bug. When I create a model object using a dictionary exploded into `kwargs`, if that dictionary has a None for the value of a FK field, I get a `(ModelClass).DoesNotExist` error on the local instance of the model when trying to access that f... | {
"url": "https://api.github.com/repos/coleifer/peewee/issues/809/reactions",
"total_count": 0,
"+1": 0,
"-1": 0,
"laugh": 0,
"hooray": 0,
"confused": 0,
"heart": 0,
"rocket": 0,
"eyes": 0
} | https://api.github.com/repos/coleifer/peewee/issues/809/timeline | null | completed | null | null |
https://api.github.com/repos/coleifer/peewee/issues/808 | https://api.github.com/repos/coleifer/peewee | https://api.github.com/repos/coleifer/peewee/issues/808/labels{/name} | https://api.github.com/repos/coleifer/peewee/issues/808/comments | https://api.github.com/repos/coleifer/peewee/issues/808/events | https://github.com/coleifer/peewee/issues/808 | 125,149,936 | MDU6SXNzdWUxMjUxNDk5MzY= | 808 | IndexError: list index out of range | {
"login": "gjedeer",
"id": 315648,
"node_id": "MDQ6VXNlcjMxNTY0OA==",
"avatar_url": "https://avatars.githubusercontent.com/u/315648?v=4",
"gravatar_id": "",
"url": "https://api.github.com/users/gjedeer",
"html_url": "https://github.com/gjedeer",
"followers_url": "https://api.github.com/users/gjedeer/fo... | [] | closed | false | null | [] | null | [
"There is no object matching your query. Use .get() instead if you only need 1 object.\n"
] | 2016-01-06T10:28:07 | 2016-01-06T18:08:07 | 2016-01-06T18:08:07 | NONE | null | I have a problem that I can't figure out. Npm is a peewee model which I'm using like this:
```
package = Npm.select().where(Npm.id==package_name)[0]
```
However peewee throws an exception which is not very meaningful:
 just ... | 2016-01-06T03:49:05 | 2016-01-06T20:03:13 | 2016-01-06T19:56:25 | NONE | null | Existing SQLite DB defines and created by peewee.
Adding a new table, with a field that has unique=True.
The resulting table does not get the unique constrat added. In my case the line below is needed but not added. I had to remove the entire db to get peewee to add the table correctly.
The table had no ForeignKeyField... | {
"url": "https://api.github.com/repos/coleifer/peewee/issues/807/reactions",
"total_count": 0,
"+1": 0,
"-1": 0,
"laugh": 0,
"hooray": 0,
"confused": 0,
"heart": 0,
"rocket": 0,
"eyes": 0
} | https://api.github.com/repos/coleifer/peewee/issues/807/timeline | null | completed | null | null |
https://api.github.com/repos/coleifer/peewee/issues/806 | https://api.github.com/repos/coleifer/peewee | https://api.github.com/repos/coleifer/peewee/issues/806/labels{/name} | https://api.github.com/repos/coleifer/peewee/issues/806/comments | https://api.github.com/repos/coleifer/peewee/issues/806/events | https://github.com/coleifer/peewee/issues/806 | 124,947,645 | MDU6SXNzdWUxMjQ5NDc2NDU= | 806 | query always return same data even the data is updated in mysql db | {
"login": "dista",
"id": 674913,
"node_id": "MDQ6VXNlcjY3NDkxMw==",
"avatar_url": "https://avatars.githubusercontent.com/u/674913?v=4",
"gravatar_id": "",
"url": "https://api.github.com/users/dista",
"html_url": "https://github.com/dista",
"followers_url": "https://api.github.com/users/dista/followers"... | [] | closed | false | null | [] | null | [
"I turn on mysql log, it seems the query really go to mysql\n\n```\nmysql> select * from mysql.general_log;\n+---------------------+------------------------------------+-----------+-----------+--------------+------------------------------------------------------------------------------------------------------------... | 2016-01-05T11:36:32 | 2019-05-05T22:26:29 | 2016-01-06T01:44:26 | NONE | null | I have encountered such problem:
There is an simple web application that using peewee to retrieve data from db. something like this:
```
@route('/log_cluster/test')
def test():
processes_q = ProcessState.select().where(ProcessState.hostname == "dista81")
for item in processes_q:
print item.start_time... | {
"url": "https://api.github.com/repos/coleifer/peewee/issues/806/reactions",
"total_count": 0,
"+1": 0,
"-1": 0,
"laugh": 0,
"hooray": 0,
"confused": 0,
"heart": 0,
"rocket": 0,
"eyes": 0
} | https://api.github.com/repos/coleifer/peewee/issues/806/timeline | null | completed | null | null |
https://api.github.com/repos/coleifer/peewee/issues/805 | https://api.github.com/repos/coleifer/peewee | https://api.github.com/repos/coleifer/peewee/issues/805/labels{/name} | https://api.github.com/repos/coleifer/peewee/issues/805/comments | https://api.github.com/repos/coleifer/peewee/issues/805/events | https://github.com/coleifer/peewee/issues/805 | 124,626,851 | MDU6SXNzdWUxMjQ2MjY4NTE= | 805 | Some troubles with SQLite autoincrementing primary key. | {
"login": "JoanSoConfused",
"id": 16522559,
"node_id": "MDQ6VXNlcjE2NTIyNTU5",
"avatar_url": "https://avatars.githubusercontent.com/u/16522559?v=4",
"gravatar_id": "",
"url": "https://api.github.com/users/JoanSoConfused",
"html_url": "https://github.com/JoanSoConfused",
"followers_url": "https://api.gi... | [] | closed | false | null | [] | null | [
"You don't need the `force_insert=True` since you are using an auto-incrementing primary key. That might be the first problem.\n\n> When I inspect the person table I see the id field that peewee added does not have autoincrement!\n\nSQLite and autoincrement is more involved than you might think. There's a reason pe... | 2016-01-03T03:41:12 | 2016-01-04T03:26:28 | 2016-01-03T15:03:36 | NONE | null | I am new to the peewee and I am using peewee 2.7.4 with Python 3.5.0 and with SQLite and I am very confused about SQLite autoincrementing primary keys on tables.
The peewee documentations says "peewee will automatically add an auto-incrementing integer primary key field named id."
I am using code based on some docume... | {
"url": "https://api.github.com/repos/coleifer/peewee/issues/805/reactions",
"total_count": 0,
"+1": 0,
"-1": 0,
"laugh": 0,
"hooray": 0,
"confused": 0,
"heart": 0,
"rocket": 0,
"eyes": 0
} | https://api.github.com/repos/coleifer/peewee/issues/805/timeline | null | completed | null | null |
https://api.github.com/repos/coleifer/peewee/issues/804 | https://api.github.com/repos/coleifer/peewee | https://api.github.com/repos/coleifer/peewee/issues/804/labels{/name} | https://api.github.com/repos/coleifer/peewee/issues/804/comments | https://api.github.com/repos/coleifer/peewee/issues/804/events | https://github.com/coleifer/peewee/issues/804 | 124,333,082 | MDU6SXNzdWUxMjQzMzMwODI= | 804 | Proposal for plugins support | {
"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 | [
"+1!\n\n> This could also open the door for potentially cleaning up Playhouse, allowing each of the extensions to be segregated into it's own plugin, keeping the core repo clean and lean.\n\nWould be a really really nice move :)\n",
"Also, see http://www.devork.be/talks/pluggy/pluggy.html about pluggy.py (which l... | 2015-12-30T10:54:40 | 2016-01-29T15:06:38 | 2016-01-21T00:14:59 | CONTRIBUTOR | null | There is currently no easy way to build third party plugins within the same namespace as `peewee`, aside from monkeypatching.
Projects such as [pytest](https://pytest.org/latest/plugins.html) allow plugins to be registered into the Peewee namespace, giving a much cleaner syntax, as seen [here](https://github.com/kissg... | {
"url": "https://api.github.com/repos/coleifer/peewee/issues/804/reactions",
"total_count": 0,
"+1": 0,
"-1": 0,
"laugh": 0,
"hooray": 0,
"confused": 0,
"heart": 0,
"rocket": 0,
"eyes": 0
} | https://api.github.com/repos/coleifer/peewee/issues/804/timeline | null | completed | null | null |
https://api.github.com/repos/coleifer/peewee/issues/803 | https://api.github.com/repos/coleifer/peewee | https://api.github.com/repos/coleifer/peewee/issues/803/labels{/name} | https://api.github.com/repos/coleifer/peewee/issues/803/comments | https://api.github.com/repos/coleifer/peewee/issues/803/events | https://github.com/coleifer/peewee/issues/803 | 124,139,785 | MDU6SXNzdWUxMjQxMzk3ODU= | 803 | Proposal for create/destroy database | {
"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 felt that this type of thing did not belong as a part of peewee. I will pass on this feature.\n",
"Got it, I'll put this into a separate repo, thanks for the quick reply!\n",
"So there is no way to create a database using peewee, right?\n",
"@gitttt -- just use the tool from your vendor. For sqli... | 2015-12-28T23:16:24 | 2017-01-03T23:24:59 | 2015-12-29T00:56:32 | CONTRIBUTOR | null | There is a common use case of creating/destroying databases, for example when running tests.
Currently there is no support for automating detecting the source database and acting appropriately, for example;
``` python
x = SqliteDatabase("file:/tmp/lala.sql", uri=True)
x.create_database() # this would create /tmp/lala... | {
"url": "https://api.github.com/repos/coleifer/peewee/issues/803/reactions",
"total_count": 0,
"+1": 0,
"-1": 0,
"laugh": 0,
"hooray": 0,
"confused": 0,
"heart": 0,
"rocket": 0,
"eyes": 0
} | https://api.github.com/repos/coleifer/peewee/issues/803/timeline | null | completed | null | null |
https://api.github.com/repos/coleifer/peewee/issues/802 | https://api.github.com/repos/coleifer/peewee | https://api.github.com/repos/coleifer/peewee/issues/802/labels{/name} | https://api.github.com/repos/coleifer/peewee/issues/802/comments | https://api.github.com/repos/coleifer/peewee/issues/802/events | https://github.com/coleifer/peewee/pull/802 | 124,089,980 | MDExOlB1bGxSZXF1ZXN0NTQ2Njc4NDI= | 802 | Add support for BINARY field 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 | [
"Needs tests in order to merge.\n",
"You can add tests to the `test_fields.TestFieldTypes` or you can just create a one-off test-case. Either is fine.\n",
"Done. Apologies for the initial lack of tests, I got lazy!\n",
"Those tests don't actually test the binary field.\n",
"Ah crap, it looks like my cherry ... | 2015-12-28T16:47:07 | 2015-12-29T13:35:40 | 2015-12-29T13:35:36 | CONTRIBUTOR | null | See #801
| {
"url": "https://api.github.com/repos/coleifer/peewee/issues/802/reactions",
"total_count": 0,
"+1": 0,
"-1": 0,
"laugh": 0,
"hooray": 0,
"confused": 0,
"heart": 0,
"rocket": 0,
"eyes": 0
} | https://api.github.com/repos/coleifer/peewee/issues/802/timeline | null | null | false | {
"url": "https://api.github.com/repos/coleifer/peewee/pulls/802",
"html_url": "https://github.com/coleifer/peewee/pull/802",
"diff_url": "https://github.com/coleifer/peewee/pull/802.diff",
"patch_url": "https://github.com/coleifer/peewee/pull/802.patch",
"merged_at": "2015-12-29T13:35:36"
} |
https://api.github.com/repos/coleifer/peewee/issues/801 | https://api.github.com/repos/coleifer/peewee | https://api.github.com/repos/coleifer/peewee/issues/801/labels{/name} | https://api.github.com/repos/coleifer/peewee/issues/801/comments | https://api.github.com/repos/coleifer/peewee/issues/801/events | https://github.com/coleifer/peewee/issues/801 | 124,089,739 | MDU6SXNzdWUxMjQwODk3Mzk= | 801 | Support for binary 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 | [
"Thank you, merged #802.\n"
] | 2015-12-28T16:44:57 | 2015-12-29T13:36:10 | 2015-12-29T13:36:10 | CONTRIBUTOR | null | Currently there is no support for creating a `BINARY` field in MySQL. Although you can use `BLOB`, this is not a fixed length and requires an index prefix length to be applied.
| {
"url": "https://api.github.com/repos/coleifer/peewee/issues/801/reactions",
"total_count": 0,
"+1": 0,
"-1": 0,
"laugh": 0,
"hooray": 0,
"confused": 0,
"heart": 0,
"rocket": 0,
"eyes": 0
} | https://api.github.com/repos/coleifer/peewee/issues/801/timeline | null | completed | null | null |
https://api.github.com/repos/coleifer/peewee/issues/800 | https://api.github.com/repos/coleifer/peewee | https://api.github.com/repos/coleifer/peewee/issues/800/labels{/name} | https://api.github.com/repos/coleifer/peewee/issues/800/comments | https://api.github.com/repos/coleifer/peewee/issues/800/events | https://github.com/coleifer/peewee/pull/800 | 124,082,874 | MDExOlB1bGxSZXF1ZXN0NTQ2NjM1OTU= | 800 | Patch proposal for better database routing - see #701 | {
"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 | [
"Although I agree this is a pretty clean patch, I am going to pass on merging.\n\nI think that database routing is a complex enough topic that I do not want to include it in peewee itself (as I don't want to maintain it). One option would be to create a new package `peewee-routing` or something similar that encapsu... | 2015-12-28T15:46:26 | 2015-12-28T22:56:48 | 2015-12-28T22:26:17 | CONTRIBUTOR | null | After several different attempts, this seems to be the cleanest way forward.
For this patch to be merge worthy, I'd need sign off from @coleifer on these questions about `Using()`. Also feedback from @stas and @alexanderad would be appreciated
This has minimal code impact as `_execute()` seems to handle every edge c... | {
"url": "https://api.github.com/repos/coleifer/peewee/issues/800/reactions",
"total_count": 0,
"+1": 0,
"-1": 0,
"laugh": 0,
"hooray": 0,
"confused": 0,
"heart": 0,
"rocket": 0,
"eyes": 0
} | https://api.github.com/repos/coleifer/peewee/issues/800/timeline | null | null | false | {
"url": "https://api.github.com/repos/coleifer/peewee/pulls/800",
"html_url": "https://github.com/coleifer/peewee/pull/800",
"diff_url": "https://github.com/coleifer/peewee/pull/800.diff",
"patch_url": "https://github.com/coleifer/peewee/pull/800.patch",
"merged_at": null
} |
https://api.github.com/repos/coleifer/peewee/issues/799 | https://api.github.com/repos/coleifer/peewee | https://api.github.com/repos/coleifer/peewee/issues/799/labels{/name} | https://api.github.com/repos/coleifer/peewee/issues/799/comments | https://api.github.com/repos/coleifer/peewee/issues/799/events | https://github.com/coleifer/peewee/issues/799 | 124,072,965 | MDU6SXNzdWUxMjQwNzI5NjU= | 799 | Deprecation proposal for Proxy() | {
"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 | [
"The only legit use case I can think of is for circular foreign keys. Which are also a code smell...\n",
"Ah I hadn't considered this. There are some legit situations where you might need circular foreign keys, for example a self relating [hierarchical table](http://stackoverflow.com/a/3891612/1267398) (with most... | 2015-12-28T14:16:09 | 2015-12-29T09:41:34 | 2015-12-29T03:18:26 | CONTRIBUTOR | null | After reviewing docs and source code, it seems that `Proxy()` is somewhat of an anti-pattern, with most (if not all) edge cases handled by simply moving the database initialization routines before the model definitions.
Are there any other edge cases that `Proxy()` solves a particular problem for? If not, I'd propose... | {
"url": "https://api.github.com/repos/coleifer/peewee/issues/799/reactions",
"total_count": 0,
"+1": 0,
"-1": 0,
"laugh": 0,
"hooray": 0,
"confused": 0,
"heart": 0,
"rocket": 0,
"eyes": 0
} | https://api.github.com/repos/coleifer/peewee/issues/799/timeline | null | completed | null | null |
https://api.github.com/repos/coleifer/peewee/issues/798 | https://api.github.com/repos/coleifer/peewee | https://api.github.com/repos/coleifer/peewee/issues/798/labels{/name} | https://api.github.com/repos/coleifer/peewee/issues/798/comments | https://api.github.com/repos/coleifer/peewee/issues/798/events | https://github.com/coleifer/peewee/issues/798 | 123,812,044 | MDU6SXNzdWUxMjM4MTIwNDQ= | 798 | "'playhouse._speedups._ModelQueryResultWrapper' object has no attribute 'next'" with cython | {
"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 | [
"Fixed.\n",
"Thanks :)\n"
] | 2015-12-24T15:12:29 | 2015-12-24T20:03:10 | 2015-12-24T19:38:56 | CONTRIBUTOR | null | With latest master, using cython, doing a `User.select().where(User.id == 1).get()`:
```
def get(self):
clone = self.paginate(1, 1)
try:
> return clone.execute().next()
E AttributeError: 'playhouse._speedups._ModelQueryResultWrapper' object has no attribute 'next'
```
Does that... | {
"url": "https://api.github.com/repos/coleifer/peewee/issues/798/reactions",
"total_count": 0,
"+1": 0,
"-1": 0,
"laugh": 0,
"hooray": 0,
"confused": 0,
"heart": 0,
"rocket": 0,
"eyes": 0
} | https://api.github.com/repos/coleifer/peewee/issues/798/timeline | null | completed | null | null |
https://api.github.com/repos/coleifer/peewee/issues/797 | https://api.github.com/repos/coleifer/peewee | https://api.github.com/repos/coleifer/peewee/issues/797/labels{/name} | https://api.github.com/repos/coleifer/peewee/issues/797/comments | https://api.github.com/repos/coleifer/peewee/issues/797/events | https://github.com/coleifer/peewee/pull/797 | 123,638,860 | MDExOlB1bGxSZXF1ZXN0NTQ0NTg1MDQ= | 797 | Fix PasswordField on postgres (fix #766) | {
"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 | [
"@coleifer any feedback on this? :)\n",
"LGTM. I haven't tested with Postgres, but the changes looks sane. Changing from BaseModel to TestModel allows it to be ran with `--engine postgres`, and changing from TextField to BlobField allows bytes to be stored safely. Needs sign off from @coleifer \n",
"Thank you!\... | 2015-12-23T10:53:00 | 2015-12-29T09:25:49 | 2015-12-28T22:20:46 | CONTRIBUTOR | null | Fix #766
This also makes the PasswordField tests to be ran with postgres.
| {
"url": "https://api.github.com/repos/coleifer/peewee/issues/797/reactions",
"total_count": 0,
"+1": 0,
"-1": 0,
"laugh": 0,
"hooray": 0,
"confused": 0,
"heart": 0,
"rocket": 0,
"eyes": 0
} | https://api.github.com/repos/coleifer/peewee/issues/797/timeline | null | null | false | {
"url": "https://api.github.com/repos/coleifer/peewee/pulls/797",
"html_url": "https://github.com/coleifer/peewee/pull/797",
"diff_url": "https://github.com/coleifer/peewee/pull/797.diff",
"patch_url": "https://github.com/coleifer/peewee/pull/797.patch",
"merged_at": "2015-12-28T22:20:46"
} |
https://api.github.com/repos/coleifer/peewee/issues/796 | https://api.github.com/repos/coleifer/peewee | https://api.github.com/repos/coleifer/peewee/issues/796/labels{/name} | https://api.github.com/repos/coleifer/peewee/issues/796/comments | https://api.github.com/repos/coleifer/peewee/issues/796/events | https://github.com/coleifer/peewee/issues/796 | 122,953,641 | MDU6SXNzdWUxMjI5NTM2NDE= | 796 | PostgresqlDatabase unable to connect with any database | {
"login": "davidthewatson",
"id": 150892,
"node_id": "MDQ6VXNlcjE1MDg5Mg==",
"avatar_url": "https://avatars.githubusercontent.com/u/150892?v=4",
"gravatar_id": "",
"url": "https://api.github.com/users/davidthewatson",
"html_url": "https://github.com/davidthewatson",
"followers_url": "https://api.github... | [] | closed | false | null | [] | null | [
"in case anyone else stumbles upon this combination (Heroku Postgres with peewee), the trick seems to be to parse the Heroku-provided URL first, and then provide the parsed components to the PostgresqlDatabase constructor. It looks like this:\r\n\r\n```python\r\nurl = urlparse.urlparse(os.environ[\"DATABASE_URL\"])... | 2015-12-18T14:02:00 | 2020-12-29T10:19:06 | 2015-12-18T14:29:07 | NONE | null | I have a project with a virtualenv running CPython 2.7 and a pip installed peewee. When I do:
```
psql_db = PostgresqlDatabase('postgres://me@localhost/whatever')
psql_db.connect()
```
on a pre-existing database that has schema, tables, and rows of ... | {
"url": "https://api.github.com/repos/coleifer/peewee/issues/796/reactions",
"total_count": 0,
"+1": 0,
"-1": 0,
"laugh": 0,
"hooray": 0,
"confused": 0,
"heart": 0,
"rocket": 0,
"eyes": 0
} | https://api.github.com/repos/coleifer/peewee/issues/796/timeline | null | completed | null | null |
https://api.github.com/repos/coleifer/peewee/issues/795 | https://api.github.com/repos/coleifer/peewee | https://api.github.com/repos/coleifer/peewee/issues/795/labels{/name} | https://api.github.com/repos/coleifer/peewee/issues/795/comments | https://api.github.com/repos/coleifer/peewee/issues/795/events | https://github.com/coleifer/peewee/pull/795 | 122,771,988 | MDExOlB1bGxSZXF1ZXN0NTM5OTk1MjQ= | 795 | Allow to pass ids to m2m.add and m2m.remove methods | {
"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 | [
"I opted for a slightly different route for getting the ID list. Thanks for the diff.\n"
] | 2015-12-17T16:37:30 | 2015-12-18T16:10:07 | 2015-12-18T16:09:47 | CONTRIBUTOR | null | {
"url": "https://api.github.com/repos/coleifer/peewee/issues/795/reactions",
"total_count": 0,
"+1": 0,
"-1": 0,
"laugh": 0,
"hooray": 0,
"confused": 0,
"heart": 0,
"rocket": 0,
"eyes": 0
} | https://api.github.com/repos/coleifer/peewee/issues/795/timeline | null | null | false | {
"url": "https://api.github.com/repos/coleifer/peewee/pulls/795",
"html_url": "https://github.com/coleifer/peewee/pull/795",
"diff_url": "https://github.com/coleifer/peewee/pull/795.diff",
"patch_url": "https://github.com/coleifer/peewee/pull/795.patch",
"merged_at": null
} | |
https://api.github.com/repos/coleifer/peewee/issues/794 | https://api.github.com/repos/coleifer/peewee | https://api.github.com/repos/coleifer/peewee/issues/794/labels{/name} | https://api.github.com/repos/coleifer/peewee/issues/794/comments | https://api.github.com/repos/coleifer/peewee/issues/794/events | https://github.com/coleifer/peewee/issues/794 | 122,702,357 | MDU6SXNzdWUxMjI3MDIzNTc= | 794 | ManyToManyField not in Model._meta.fields | {
"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 | [
"ManyToManyField does not call `model_class.add_field`, so a \"solution\" may be to just add this to `ManyToManyField.add_to_class`:\n\n```\nmodel_class._meta.fields[name] = self\n```\n\n(It's not DRY, but we can't call `add_field` itself, because it expects the field to have a column, so maybe a bit of refactor is... | 2015-12-17T10:07:33 | 2015-12-18T16:10:53 | 2015-12-18T16:10:53 | CONTRIBUTOR | null | ```
import peewee
from playhouse.fields import ManyToManyField
db = peewee.SqliteDatabase(':memory:')
class Student(peewee.Model):
name = peewee.CharField()
class Meta:
database = db
class Course(peewee.Model):
name = peewee.CharField()
students = ManyToManyField(Student, related_name='cou... | {
"url": "https://api.github.com/repos/coleifer/peewee/issues/794/reactions",
"total_count": 0,
"+1": 0,
"-1": 0,
"laugh": 0,
"hooray": 0,
"confused": 0,
"heart": 0,
"rocket": 0,
"eyes": 0
} | https://api.github.com/repos/coleifer/peewee/issues/794/timeline | null | completed | null | null |
https://api.github.com/repos/coleifer/peewee/issues/793 | https://api.github.com/repos/coleifer/peewee | https://api.github.com/repos/coleifer/peewee/issues/793/labels{/name} | https://api.github.com/repos/coleifer/peewee/issues/793/comments | https://api.github.com/repos/coleifer/peewee/issues/793/events | https://github.com/coleifer/peewee/issues/793 | 122,698,959 | MDU6SXNzdWUxMjI2OTg5NTk= | 793 | Delete/Update Many-to-Many tables | {
"login": "samsoft00",
"id": 5300891,
"node_id": "MDQ6VXNlcjUzMDA4OTE=",
"avatar_url": "https://avatars.githubusercontent.com/u/5300891?v=4",
"gravatar_id": "",
"url": "https://api.github.com/users/samsoft00",
"html_url": "https://github.com/samsoft00",
"followers_url": "https://api.github.com/users/sa... | [] | closed | false | null | [] | null | [
"Wait... I'm confused by your code. You're doing a select? I think you copy/pasted wrong.\n\nThis is really not appropriate for github, please ask on stackoverflow.\n",
"sorry for the mistake in updateEntries method, my intention was to delete all entries in Job table and everything that associate with it using t... | 2015-12-17T09:47:51 | 2015-12-18T14:52:19 | 2015-12-18T00:26:40 | NONE | null | @coleifer great job, kindly help... i'm having challenge deleting and updating many to many tables, below is the model and code
```
class Job(Model):
"""docstring for Jobs"""
url = CharField(max_length=200, unique=True)
title = TextField()
description = TextField()
sponsor = CharField(max_length=10... | {
"url": "https://api.github.com/repos/coleifer/peewee/issues/793/reactions",
"total_count": 0,
"+1": 0,
"-1": 0,
"laugh": 0,
"hooray": 0,
"confused": 0,
"heart": 0,
"rocket": 0,
"eyes": 0
} | https://api.github.com/repos/coleifer/peewee/issues/793/timeline | null | completed | null | null |
https://api.github.com/repos/coleifer/peewee/issues/792 | https://api.github.com/repos/coleifer/peewee | https://api.github.com/repos/coleifer/peewee/issues/792/labels{/name} | https://api.github.com/repos/coleifer/peewee/issues/792/comments | https://api.github.com/repos/coleifer/peewee/issues/792/events | https://github.com/coleifer/peewee/issues/792 | 122,449,334 | MDU6SXNzdWUxMjI0NDkzMzQ= | 792 | load csv into database - boolean values always convert to TRUE | {
"login": "adsahay",
"id": 375799,
"node_id": "MDQ6VXNlcjM3NTc5OQ==",
"avatar_url": "https://avatars.githubusercontent.com/u/375799?v=4",
"gravatar_id": "",
"url": "https://api.github.com/users/adsahay",
"html_url": "https://github.com/adsahay",
"followers_url": "https://api.github.com/users/adsahay/fo... | [] | closed | false | null | [] | null | [
"You need to probably specify a custom `RowConverter` and override the `Loader.get_converter` method to appropriately handle your CSV data.\n",
"You can pass in a custom converter using the `converter` parameter.\n",
"I am trying the following (no luck):\n\n```\n # use a custom RowConverter to handle boolean... | 2015-12-16T08:01:20 | 2015-12-24T07:51:13 | 2015-12-18T16:15:00 | NONE | null | While loading a csv with a boolean field into a db table, the boolean value is always converting to `TRUE`.
Please find reproducible test case on this [gist](https://gist.github.com/adsahay/38d73837beccd560ad66).
Expected behaviour - `0` should map to `false`, `1` should map to `true`.
I have tried using `t/f`, `TR... | {
"url": "https://api.github.com/repos/coleifer/peewee/issues/792/reactions",
"total_count": 0,
"+1": 0,
"-1": 0,
"laugh": 0,
"hooray": 0,
"confused": 0,
"heart": 0,
"rocket": 0,
"eyes": 0
} | https://api.github.com/repos/coleifer/peewee/issues/792/timeline | null | completed | null | null |
https://api.github.com/repos/coleifer/peewee/issues/791 | https://api.github.com/repos/coleifer/peewee | https://api.github.com/repos/coleifer/peewee/issues/791/labels{/name} | https://api.github.com/repos/coleifer/peewee/issues/791/comments | https://api.github.com/repos/coleifer/peewee/issues/791/events | https://github.com/coleifer/peewee/issues/791 | 122,000,780 | MDU6SXNzdWUxMjIwMDA3ODA= | 791 | Custom uint64 field and foreign keys | {
"login": "user5642",
"id": 16286595,
"node_id": "MDQ6VXNlcjE2Mjg2NTk1",
"avatar_url": "https://avatars.githubusercontent.com/u/16286595?v=4",
"gravatar_id": "",
"url": "https://api.github.com/users/user5642",
"html_url": "https://github.com/user5642",
"followers_url": "https://api.github.com/users/use... | [] | closed | false | null | [] | null | [
"SQLite does not have a bigint type natively. Check out the sqlite docs on type affinities. Regarding the specific issue it sounds to me like it's coming from the SQLite driver and not peewee.\n",
"Sorry it was not the best illustration of problem encountered by me. This code should be more demonstrative:\n\n```\... | 2015-12-14T09:05:21 | 2016-01-08T03:35:59 | 2016-01-07T03:11:32 | NONE | null | I needed uint64 field as primary key field for my database, expectedly other models used foreign key to point to this model. Resulting code was something like this:
```
from peewee import *
db = SqliteDatabase('test.db')
class UInt64(Field):
db_field = 'bigint'
def db_value(self, value):
return valu... | {
"url": "https://api.github.com/repos/coleifer/peewee/issues/791/reactions",
"total_count": 0,
"+1": 0,
"-1": 0,
"laugh": 0,
"hooray": 0,
"confused": 0,
"heart": 0,
"rocket": 0,
"eyes": 0
} | https://api.github.com/repos/coleifer/peewee/issues/791/timeline | null | completed | null | null |
https://api.github.com/repos/coleifer/peewee/issues/790 | https://api.github.com/repos/coleifer/peewee | https://api.github.com/repos/coleifer/peewee/issues/790/labels{/name} | https://api.github.com/repos/coleifer/peewee/issues/790/comments | https://api.github.com/repos/coleifer/peewee/issues/790/events | https://github.com/coleifer/peewee/pull/790 | 121,535,007 | MDExOlB1bGxSZXF1ZXN0NTMyODgyOTg= | 790 | Fixes #788 | {
"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 | [
"Sweet, thanks!\n"
] | 2015-12-10T17:14:23 | 2015-12-10T17:49:01 | 2015-12-10T17:48:58 | CONTRIBUTOR | null | Fixes #788
| {
"url": "https://api.github.com/repos/coleifer/peewee/issues/790/reactions",
"total_count": 0,
"+1": 0,
"-1": 0,
"laugh": 0,
"hooray": 0,
"confused": 0,
"heart": 0,
"rocket": 0,
"eyes": 0
} | https://api.github.com/repos/coleifer/peewee/issues/790/timeline | null | null | false | {
"url": "https://api.github.com/repos/coleifer/peewee/pulls/790",
"html_url": "https://github.com/coleifer/peewee/pull/790",
"diff_url": "https://github.com/coleifer/peewee/pull/790.diff",
"patch_url": "https://github.com/coleifer/peewee/pull/790.patch",
"merged_at": "2015-12-10T17:48:58"
} |
https://api.github.com/repos/coleifer/peewee/issues/789 | https://api.github.com/repos/coleifer/peewee | https://api.github.com/repos/coleifer/peewee/issues/789/labels{/name} | https://api.github.com/repos/coleifer/peewee/issues/789/comments | https://api.github.com/repos/coleifer/peewee/issues/789/events | https://github.com/coleifer/peewee/issues/789 | 121,043,664 | MDU6SXNzdWUxMjEwNDM2NjQ= | 789 | More useful error classes | {
"login": "macks22",
"id": 3409997,
"node_id": "MDQ6VXNlcjM0MDk5OTc=",
"avatar_url": "https://avatars.githubusercontent.com/u/3409997?v=4",
"gravatar_id": "",
"url": "https://api.github.com/users/macks22",
"html_url": "https://github.com/macks22",
"followers_url": "https://api.github.com/users/macks22/... | [] | closed | false | null | [] | null | [
"I think I will pass on this functionality.\n",
"@macks22 but you know what key was passed to your function. Why not use it instead of taking this value from the exception? \n",
"@arikfr that's basically what I was getting at...there's no new info there.\n",
"Yes, this is what I ended up doing. I guess I just... | 2015-12-08T16:24:12 | 2015-12-10T12:28:14 | 2015-12-10T11:47:27 | NONE | null | It would be useful to be able to access pieces of the sql query that raised the error. Right now this requires parsing the `message` instance variable of the error. For instance, assume I have some `Model` instance stored in a variable `table` and I run `Model.get` using a key that does not exist. This will raise a `Mo... | {
"url": "https://api.github.com/repos/coleifer/peewee/issues/789/reactions",
"total_count": 0,
"+1": 0,
"-1": 0,
"laugh": 0,
"hooray": 0,
"confused": 0,
"heart": 0,
"rocket": 0,
"eyes": 0
} | https://api.github.com/repos/coleifer/peewee/issues/789/timeline | null | completed | null | null |
https://api.github.com/repos/coleifer/peewee/issues/788 | https://api.github.com/repos/coleifer/peewee | https://api.github.com/repos/coleifer/peewee/issues/788/labels{/name} | https://api.github.com/repos/coleifer/peewee/issues/788/comments | https://api.github.com/repos/coleifer/peewee/issues/788/events | https://github.com/coleifer/peewee/issues/788 | 121,022,986 | MDU6SXNzdWUxMjEwMjI5ODY= | 788 | Better support for UUIDField | {
"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 | [
"Ahh yeah good call, and I should know cause I got bitten by just this issue.\n\nYeah a PR b great, thx\n",
"Awesome, PR coming shortly :)\n",
"Also there could be an argument for storing as `BINARY` instead of TEXT, but I'd need to think about the edge cases. I'll open a new issue if I can think of a compellin... | 2015-12-08T14:50:53 | 2016-01-13T18:31:28 | 2015-12-10T17:48:58 | CONTRIBUTOR | null | As an extension from #780, databases which don't support UUID natively may encounter consistency problems.
Postgres will correctly handle multiple input variants [[1]](http://www.postgresql.org/docs/9.1/static/datatype-uuid.html), such as
`a0eebc99-9c0b-4ef8-bb6d-6bb9bd380a11` and `a0eebc999c0b4ef8bb6d6bb9bd380a11`.
... | {
"url": "https://api.github.com/repos/coleifer/peewee/issues/788/reactions",
"total_count": 0,
"+1": 0,
"-1": 0,
"laugh": 0,
"hooray": 0,
"confused": 0,
"heart": 0,
"rocket": 0,
"eyes": 0
} | https://api.github.com/repos/coleifer/peewee/issues/788/timeline | null | completed | null | null |
https://api.github.com/repos/coleifer/peewee/issues/787 | https://api.github.com/repos/coleifer/peewee | https://api.github.com/repos/coleifer/peewee/issues/787/labels{/name} | https://api.github.com/repos/coleifer/peewee/issues/787/comments | https://api.github.com/repos/coleifer/peewee/issues/787/events | https://github.com/coleifer/peewee/issues/787 | 120,941,116 | MDU6SXNzdWUxMjA5NDExMTY= | 787 | Is it possible to select table data when doing a multiple-join without mentioning every selected table? | {
"login": "perplexedfingers",
"id": 14918698,
"node_id": "MDQ6VXNlcjE0OTE4Njk4",
"avatar_url": "https://avatars.githubusercontent.com/u/14918698?v=4",
"gravatar_id": "",
"url": "https://api.github.com/users/perplexedfingers",
"html_url": "https://github.com/perplexedfingers",
"followers_url": "https://... | [] | closed | false | null | [] | null | [
"You have to join on permission since you're selecting from it. That will never change.\n\nIf you don't need the order by, why are you calling it? I'm confused why that's an issue.\n",
"It requires an action after `join()`.\n",
"I figure it out. Sorry about wasting your time.\n\n``` python\n(PermissionInGroup.s... | 2015-12-08T06:22:16 | 2015-12-09T05:36:49 | 2015-12-09T05:34:45 | NONE | null | The following query does _**not**_ work.
``` python
(PermissionInGroup
.select(PermissionInGroup, Permission, Group)
.join(Group)
.where(Group.app_account == app_account_id,
Group.company_id == company_id)
.join(UserInGroup)
.join(User)
.where(User.ID == user_id)
... | {
"url": "https://api.github.com/repos/coleifer/peewee/issues/787/reactions",
"total_count": 0,
"+1": 0,
"-1": 0,
"laugh": 0,
"hooray": 0,
"confused": 0,
"heart": 0,
"rocket": 0,
"eyes": 0
} | https://api.github.com/repos/coleifer/peewee/issues/787/timeline | null | completed | null | null |
https://api.github.com/repos/coleifer/peewee/issues/786 | https://api.github.com/repos/coleifer/peewee | https://api.github.com/repos/coleifer/peewee/issues/786/labels{/name} | https://api.github.com/repos/coleifer/peewee/issues/786/comments | https://api.github.com/repos/coleifer/peewee/issues/786/events | https://github.com/coleifer/peewee/issues/786 | 120,881,234 | MDU6SXNzdWUxMjA4ODEyMzQ= | 786 | Support for triggers in DDL | {
"login": "macks22",
"id": 3409997,
"node_id": "MDQ6VXNlcjM0MDk5OTc=",
"avatar_url": "https://avatars.githubusercontent.com/u/3409997?v=4",
"gravatar_id": "",
"url": "https://api.github.com/users/macks22",
"html_url": "https://github.com/macks22",
"followers_url": "https://api.github.com/users/macks22/... | [] | closed | false | null | [] | null | [
"You can use the fields constraints param to specify default values: DateTimeField(constraints=(SQL('default now'),))\n\nI do not plan on supporting triggers at this time.\n",
"Got it; thanks for the constraints tip.\n"
] | 2015-12-07T22:17:23 | 2015-12-09T13:43:19 | 2015-12-09T03:45:46 | NONE | null | It would be very useful to be able to define triggers when using `create_table` to create database schemas. [I had this issue and came up with a very simple solution](http://stackoverflow.com/q/34142550/2486302). It fit my use case for a particular type of trigger using sqlite. However, based on my reading of the sourc... | {
"url": "https://api.github.com/repos/coleifer/peewee/issues/786/reactions",
"total_count": 0,
"+1": 0,
"-1": 0,
"laugh": 0,
"hooray": 0,
"confused": 0,
"heart": 0,
"rocket": 0,
"eyes": 0
} | https://api.github.com/repos/coleifer/peewee/issues/786/timeline | null | completed | null | null |
https://api.github.com/repos/coleifer/peewee/issues/785 | https://api.github.com/repos/coleifer/peewee | https://api.github.com/repos/coleifer/peewee/issues/785/labels{/name} | https://api.github.com/repos/coleifer/peewee/issues/785/comments | https://api.github.com/repos/coleifer/peewee/issues/785/events | https://github.com/coleifer/peewee/issues/785 | 120,547,615 | MDU6SXNzdWUxMjA1NDc2MTU= | 785 | how to use "insert ignore" sql in peewee? | {
"login": "pc10201",
"id": 8475089,
"node_id": "MDQ6VXNlcjg0NzUwODk=",
"avatar_url": "https://avatars.githubusercontent.com/u/8475089?v=4",
"gravatar_id": "",
"url": "https://api.github.com/users/pc10201",
"html_url": "https://github.com/pc10201",
"followers_url": "https://api.github.com/users/pc10201/... | [] | closed | false | null | [] | null | [
"http://docs.peewee-orm.com/en/latest/peewee/api.html#InsertQuery.on_conflict\n\nPlease search the docs before posting tickets like this. Github tickets are more appropriate for **bugs**. If you have a question, post to stackoverflow, the mailing list, or the IRC channel. All of these are described in the documenta... | 2015-12-05T11:11:36 | 2015-12-05T15:47:02 | 2015-12-05T15:47:02 | NONE | null | how to use "insert ignore" sql in peewee?
| {
"url": "https://api.github.com/repos/coleifer/peewee/issues/785/reactions",
"total_count": 0,
"+1": 0,
"-1": 0,
"laugh": 0,
"hooray": 0,
"confused": 0,
"heart": 0,
"rocket": 0,
"eyes": 0
} | https://api.github.com/repos/coleifer/peewee/issues/785/timeline | null | completed | null | null |
https://api.github.com/repos/coleifer/peewee/issues/784 | https://api.github.com/repos/coleifer/peewee | https://api.github.com/repos/coleifer/peewee/issues/784/labels{/name} | https://api.github.com/repos/coleifer/peewee/issues/784/comments | https://api.github.com/repos/coleifer/peewee/issues/784/events | https://github.com/coleifer/peewee/issues/784 | 120,540,718 | MDU6SXNzdWUxMjA1NDA3MTg= | 784 | pwiz password | {
"login": "pc10201",
"id": 8475089,
"node_id": "MDQ6VXNlcjg0NzUwODk=",
"avatar_url": "https://avatars.githubusercontent.com/u/8475089?v=4",
"gravatar_id": "",
"url": "https://api.github.com/users/pc10201",
"html_url": "https://github.com/pc10201",
"followers_url": "https://api.github.com/users/pc10201/... | [] | closed | false | null | [] | null | [
"The idea is that it is bad practice to accept passwords on the command-line, since they get written to your bash history, etc.\n",
"So you specify `-P`, then when prompted you enter your password in.\n",
"Interesting that you chose not to accept the passwords on the command line which is an explicit choice tha... | 2015-12-05T08:35:01 | 2021-07-19T12:47:23 | 2015-12-05T15:43:40 | NONE | null | when I run
```
python -m pwiz --host=127.0.0.1 --port=3306 --user=root --password=root -e mysql forex
```
result
```
Usage: pwiz.py [options] database_name
pwiz.py: error: --password option does not take a value
```
when I run
```
python -m pwiz --host=127.0.0.1 --port=3306 --user=root -P root -e mysql forex
```
... | {
"url": "https://api.github.com/repos/coleifer/peewee/issues/784/reactions",
"total_count": 0,
"+1": 0,
"-1": 0,
"laugh": 0,
"hooray": 0,
"confused": 0,
"heart": 0,
"rocket": 0,
"eyes": 0
} | https://api.github.com/repos/coleifer/peewee/issues/784/timeline | null | completed | null | null |
https://api.github.com/repos/coleifer/peewee/issues/783 | https://api.github.com/repos/coleifer/peewee | https://api.github.com/repos/coleifer/peewee/issues/783/labels{/name} | https://api.github.com/repos/coleifer/peewee/issues/783/comments | https://api.github.com/repos/coleifer/peewee/issues/783/events | https://github.com/coleifer/peewee/issues/783 | 120,407,308 | MDU6SXNzdWUxMjA0MDczMDg= | 783 | RetryOperationalError mixin failing on retry w/ error 2006 | {
"login": "bakemecookies",
"id": 2167033,
"node_id": "MDQ6VXNlcjIxNjcwMzM=",
"avatar_url": "https://avatars.githubusercontent.com/u/2167033?v=4",
"gravatar_id": "",
"url": "https://api.github.com/users/bakemecookies",
"html_url": "https://github.com/bakemecookies",
"followers_url": "https://api.github.... | [] | closed | false | null | [] | null | [
"Unfortunately, I don't think I will be going back to the \"sql error handler\" API. I think the implementation in the `RetryOperationalError` mixin is an appropriate way to try to handle re-connect/re-try logic. Maybe you can make some changes to your pool implementation, particularly overriding the `_is_closed()`... | 2015-12-04T14:01:18 | 2015-12-06T02:47:53 | 2015-12-06T02:47:53 | CONTRIBUTOR | null | Tried using the new RetryOperationalError mixin and although it's reaching the exception block properly (known because it's going to shortcuts.py, line 208, execute_sql), the retry fails and raises the same error.
My hunch is that since we're using PooledMySQLDatabase, could it be that we're closing one stale connecti... | {
"url": "https://api.github.com/repos/coleifer/peewee/issues/783/reactions",
"total_count": 0,
"+1": 0,
"-1": 0,
"laugh": 0,
"hooray": 0,
"confused": 0,
"heart": 0,
"rocket": 0,
"eyes": 0
} | https://api.github.com/repos/coleifer/peewee/issues/783/timeline | null | completed | null | null |
https://api.github.com/repos/coleifer/peewee/issues/782 | https://api.github.com/repos/coleifer/peewee | https://api.github.com/repos/coleifer/peewee/issues/782/labels{/name} | https://api.github.com/repos/coleifer/peewee/issues/782/comments | https://api.github.com/repos/coleifer/peewee/issues/782/events | https://github.com/coleifer/peewee/pull/782 | 120,316,770 | MDExOlB1bGxSZXF1ZXN0NTI2MjE3NzA= | 782 | Fix constaints typo | {
"login": "xr09",
"id": 1380243,
"node_id": "MDQ6VXNlcjEzODAyNDM=",
"avatar_url": "https://avatars.githubusercontent.com/u/1380243?v=4",
"gravatar_id": "",
"url": "https://api.github.com/users/xr09",
"html_url": "https://github.com/xr09",
"followers_url": "https://api.github.com/users/xr09/followers",
... | [] | closed | false | null | [] | null | [
"Thnx\n"
] | 2015-12-04T02:14:41 | 2015-12-04T02:53:11 | 2015-12-04T02:53:09 | CONTRIBUTOR | null | Fix constaints typo
| {
"url": "https://api.github.com/repos/coleifer/peewee/issues/782/reactions",
"total_count": 0,
"+1": 0,
"-1": 0,
"laugh": 0,
"hooray": 0,
"confused": 0,
"heart": 0,
"rocket": 0,
"eyes": 0
} | https://api.github.com/repos/coleifer/peewee/issues/782/timeline | null | null | false | {
"url": "https://api.github.com/repos/coleifer/peewee/pulls/782",
"html_url": "https://github.com/coleifer/peewee/pull/782",
"diff_url": "https://github.com/coleifer/peewee/pull/782.diff",
"patch_url": "https://github.com/coleifer/peewee/pull/782.patch",
"merged_at": "2015-12-04T02:53:09"
} |
https://api.github.com/repos/coleifer/peewee/issues/781 | https://api.github.com/repos/coleifer/peewee | https://api.github.com/repos/coleifer/peewee/issues/781/labels{/name} | https://api.github.com/repos/coleifer/peewee/issues/781/comments | https://api.github.com/repos/coleifer/peewee/issues/781/events | https://github.com/coleifer/peewee/issues/781 | 120,275,463 | MDU6SXNzdWUxMjAyNzU0NjM= | 781 | provide an entry_point for third party drivers | {
"login": "mfussenegger",
"id": 38700,
"node_id": "MDQ6VXNlcjM4NzAw",
"avatar_url": "https://avatars.githubusercontent.com/u/38700?v=4",
"gravatar_id": "",
"url": "https://api.github.com/users/mfussenegger",
"html_url": "https://github.com/mfussenegger",
"followers_url": "https://api.github.com/users/m... | [] | closed | false | null | [] | null | [] | 2015-12-03T21:36:30 | 2015-12-03T22:37:51 | 2015-12-03T22:37:51 | NONE | null | As far as I can see there is currently no way for a third party Database drivers to hook into peewees db_url functionality.
It would be great if there was an extension mechanism, maybe similar to how SQLAlchemy does it (see http://sqlalchemy.readthedocs.org/en/latest/core/connections.html#registering-new-dialects) so... | {
"url": "https://api.github.com/repos/coleifer/peewee/issues/781/reactions",
"total_count": 0,
"+1": 0,
"-1": 0,
"laugh": 0,
"hooray": 0,
"confused": 0,
"heart": 0,
"rocket": 0,
"eyes": 0
} | https://api.github.com/repos/coleifer/peewee/issues/781/timeline | null | completed | null | null |
https://api.github.com/repos/coleifer/peewee/issues/780 | https://api.github.com/repos/coleifer/peewee | https://api.github.com/repos/coleifer/peewee/issues/780/labels{/name} | https://api.github.com/repos/coleifer/peewee/issues/780/comments | https://api.github.com/repos/coleifer/peewee/issues/780/events | https://github.com/coleifer/peewee/issues/780 | 120,197,953 | MDU6SXNzdWUxMjAxOTc5NTM= | 780 | Support for UUID in Sqlite3 | {
"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 | [
"LGTM, you're too fast!!\n"
] | 2015-12-03T15:34:38 | 2015-12-04T13:07:56 | 2015-12-03T22:30:27 | CONTRIBUTOR | null | As per the docs, UUID is not natively supported in Sqlite3, resulting in an error when you try and use it;
```
File "/home/vagrant/.virtualenvs/vagrant/lib/python3.4/site-packages/peewee.py", line 1824, in inner
return self.parse_node(fn(*args, **kwargs))
File "/home/vagrant/.virtualenvs/vagrant/lib/python3.4/... | {
"url": "https://api.github.com/repos/coleifer/peewee/issues/780/reactions",
"total_count": 0,
"+1": 0,
"-1": 0,
"laugh": 0,
"hooray": 0,
"confused": 0,
"heart": 0,
"rocket": 0,
"eyes": 0
} | https://api.github.com/repos/coleifer/peewee/issues/780/timeline | null | completed | null | null |
https://api.github.com/repos/coleifer/peewee/issues/779 | https://api.github.com/repos/coleifer/peewee | https://api.github.com/repos/coleifer/peewee/issues/779/labels{/name} | https://api.github.com/repos/coleifer/peewee/issues/779/comments | https://api.github.com/repos/coleifer/peewee/issues/779/events | https://github.com/coleifer/peewee/issues/779 | 119,948,634 | MDU6SXNzdWUxMTk5NDg2MzQ= | 779 | MyModel.DoesNotExist throws TypeError: exceptions must derive from BaseException | {
"login": "amorphic",
"id": 1538480,
"node_id": "MDQ6VXNlcjE1Mzg0ODA=",
"avatar_url": "https://avatars.githubusercontent.com/u/1538480?v=4",
"gravatar_id": "",
"url": "https://api.github.com/users/amorphic",
"html_url": "https://github.com/amorphic",
"followers_url": "https://api.github.com/users/amorp... | [] | closed | false | null | [] | null | [
"Apologies... this had absolutely nothing to do with peewee.\n",
"What was the actual problem? I have a similar error.\n",
"I honestly can't remember but I was doing something stupid which was unrelated to peewee.\n\nThe module I was working on is [here](https://github.com/re-3D/opengb/blob/master/opengb/databa... | 2015-12-02T14:08:35 | 2016-01-14T01:22:14 | 2015-12-02T14:48:44 | NONE | null | Using Python 3.4.0 and Peewee 2.7.3 I am attempting to handle the case where MyModel.get() returns no results as [described in the docs](http://docs.peewee-orm.com/en/latest/peewee/api.html#Model.get). Something like:
```
try:
user = User.get(User.username == 'charlie')
except User.DoesNotExist:
print "No user... | {
"url": "https://api.github.com/repos/coleifer/peewee/issues/779/reactions",
"total_count": 0,
"+1": 0,
"-1": 0,
"laugh": 0,
"hooray": 0,
"confused": 0,
"heart": 0,
"rocket": 0,
"eyes": 0
} | https://api.github.com/repos/coleifer/peewee/issues/779/timeline | null | completed | null | null |
https://api.github.com/repos/coleifer/peewee/issues/778 | https://api.github.com/repos/coleifer/peewee | https://api.github.com/repos/coleifer/peewee/issues/778/labels{/name} | https://api.github.com/repos/coleifer/peewee/issues/778/comments | https://api.github.com/repos/coleifer/peewee/issues/778/events | https://github.com/coleifer/peewee/issues/778 | 119,807,280 | MDU6SXNzdWUxMTk4MDcyODA= | 778 | Deadlock restart | {
"login": "ccario83",
"id": 3374143,
"node_id": "MDQ6VXNlcjMzNzQxNDM=",
"avatar_url": "https://avatars.githubusercontent.com/u/3374143?v=4",
"gravatar_id": "",
"url": "https://api.github.com/users/ccario83",
"html_url": "https://github.com/ccario83",
"followers_url": "https://api.github.com/users/ccari... | [] | closed | false | null | [] | null | [
"> But wouldn't this sort of boilerplate code be better included in peewee itself?\n\nNot in my opinion, no. There are far too many things involved for me to feel comfortable implementing a canonical / library solution to the problem of deadlocks.\n",
"@lucidv01d Did you implement some generic(ish) retry logic or... | 2015-12-01T21:02:20 | 2017-02-06T10:38:26 | 2015-12-01T22:13:34 | NONE | null | I'm running a multi-threaded app with many threads read/writing a central database at the same time. I've wrapped my queries in transactions and have tried to limit their sizes to prevent too many rows from being locked at the same time. However, I still occasionally get **deadlocks**:
`peewee.InternalError: (1213, u'... | {
"url": "https://api.github.com/repos/coleifer/peewee/issues/778/reactions",
"total_count": 0,
"+1": 0,
"-1": 0,
"laugh": 0,
"hooray": 0,
"confused": 0,
"heart": 0,
"rocket": 0,
"eyes": 0
} | https://api.github.com/repos/coleifer/peewee/issues/778/timeline | null | completed | null | null |
https://api.github.com/repos/coleifer/peewee/issues/777 | https://api.github.com/repos/coleifer/peewee | https://api.github.com/repos/coleifer/peewee/issues/777/labels{/name} | https://api.github.com/repos/coleifer/peewee/issues/777/comments | https://api.github.com/repos/coleifer/peewee/issues/777/events | https://github.com/coleifer/peewee/issues/777 | 119,705,229 | MDU6SXNzdWUxMTk3MDUyMjk= | 777 | Aliased column is not converted to attribute when selected as alias as a part of join | {
"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 | [
"Ah, `naive()` can help. Sorry.\n"
] | 2015-12-01T12:18:43 | 2015-12-01T12:23:54 | 2015-12-01T12:23:54 | NONE | null | ``` python
class User(Model):
...
# it works in this way
for user in User.select(User, User.id.alias('some_alias_name'):
print user.some_alias_name
# it does not in this way
for user in User.select(User, Group.id.alias('group_id')).join(Group):
print user.group_id # AttributeError
# however
for user_di... | {
"url": "https://api.github.com/repos/coleifer/peewee/issues/777/reactions",
"total_count": 0,
"+1": 0,
"-1": 0,
"laugh": 0,
"hooray": 0,
"confused": 0,
"heart": 0,
"rocket": 0,
"eyes": 0
} | https://api.github.com/repos/coleifer/peewee/issues/777/timeline | null | completed | null | null |
https://api.github.com/repos/coleifer/peewee/issues/776 | https://api.github.com/repos/coleifer/peewee | https://api.github.com/repos/coleifer/peewee/issues/776/labels{/name} | https://api.github.com/repos/coleifer/peewee/issues/776/comments | https://api.github.com/repos/coleifer/peewee/issues/776/events | https://github.com/coleifer/peewee/issues/776 | 119,674,987 | MDU6SXNzdWUxMTk2NzQ5ODc= | 776 | Question: ability to implicitly select joined model instance | {
"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 | [
"It seems pretty straightforward to me:\n\n``` python\nIn [15]: with assert_query_count(1):\n ....: q = User.select(User, Group).join(Group)\n ....: for user in q:\n ....: print user.username, user.group.name\n ....: \n... prints users and groups ...\n```\n"
] | 2015-12-01T09:26:28 | 2015-12-01T14:44:20 | 2015-12-01T14:44:20 | NONE | null | Given two tables
``` python
class User(Model):
...
class Group(Model):
user = FK(User)
```
and database contains
``` python
user1 = User()
group1 = Group(user=user1)
group2 = Group(user=user1)
```
Is there any way to select group related instance (resolved automatically if any) as a part of `selection`?
`... | {
"url": "https://api.github.com/repos/coleifer/peewee/issues/776/reactions",
"total_count": 0,
"+1": 0,
"-1": 0,
"laugh": 0,
"hooray": 0,
"confused": 0,
"heart": 0,
"rocket": 0,
"eyes": 0
} | https://api.github.com/repos/coleifer/peewee/issues/776/timeline | null | completed | null | null |
https://api.github.com/repos/coleifer/peewee/issues/775 | https://api.github.com/repos/coleifer/peewee | https://api.github.com/repos/coleifer/peewee/issues/775/labels{/name} | https://api.github.com/repos/coleifer/peewee/issues/775/comments | https://api.github.com/repos/coleifer/peewee/issues/775/events | https://github.com/coleifer/peewee/pull/775 | 119,575,101 | MDExOlB1bGxSZXF1ZXN0NTIxNzUxNTE= | 775 | prefetch() now loads all foreign keys to given table | {
"login": "hedger",
"id": 277532,
"node_id": "MDQ6VXNlcjI3NzUzMg==",
"avatar_url": "https://avatars.githubusercontent.com/u/277532?v=4",
"gravatar_id": "",
"url": "https://api.github.com/users/hedger",
"html_url": "https://github.com/hedger",
"followers_url": "https://api.github.com/users/hedger/follow... | [] | closed | false | null | [] | null | [
"Yay, all checks have passed.\n",
"I've pushed a branch that has some of your changes integrated, 89cd2c4f74a526591f3804d04b2252c489be5432\n",
"That's great, thanks!\n",
"Pushed 2f028c32225c5aad9b97f0f451b9d238c3846e0d to the `multiprefetch` branch. Things aren't working quite right in the test-case. I think ... | 2015-11-30T20:32:26 | 2015-12-02T04:39:00 | 2015-12-02T04:39:00 | NONE | null | {
"url": "https://api.github.com/repos/coleifer/peewee/issues/775/reactions",
"total_count": 0,
"+1": 0,
"-1": 0,
"laugh": 0,
"hooray": 0,
"confused": 0,
"heart": 0,
"rocket": 0,
"eyes": 0
} | https://api.github.com/repos/coleifer/peewee/issues/775/timeline | null | null | false | {
"url": "https://api.github.com/repos/coleifer/peewee/pulls/775",
"html_url": "https://github.com/coleifer/peewee/pull/775",
"diff_url": "https://github.com/coleifer/peewee/pull/775.diff",
"patch_url": "https://github.com/coleifer/peewee/pull/775.patch",
"merged_at": null
} | |
https://api.github.com/repos/coleifer/peewee/issues/774 | https://api.github.com/repos/coleifer/peewee | https://api.github.com/repos/coleifer/peewee/issues/774/labels{/name} | https://api.github.com/repos/coleifer/peewee/issues/774/comments | https://api.github.com/repos/coleifer/peewee/issues/774/events | https://github.com/coleifer/peewee/issues/774 | 119,487,952 | MDU6SXNzdWUxMTk0ODc5NTI= | 774 | prefetch() only loads the first ForeignKeyField of given type | {
"login": "hedger",
"id": 277532,
"node_id": "MDQ6VXNlcjI3NzUzMg==",
"avatar_url": "https://avatars.githubusercontent.com/u/277532?v=4",
"gravatar_id": "",
"url": "https://api.github.com/users/hedger",
"html_url": "https://github.com/hedger",
"followers_url": "https://api.github.com/users/hedger/follow... | [] | closed | false | null | [] | null | [
"Tried to fix that, https://github.com/coleifer/peewee/pull/775.\nTested on some backrefs in my project. Still needs more testing.\n",
"Fix merged.\n"
] | 2015-11-30T13:05:01 | 2015-12-02T04:39:12 | 2015-12-02T04:39:12 | NONE | null | ```
class M1(Model):
i1 = IntegerField()
...
class M2(Model):
i2 = IntegerField()
f1 = ForeignKeyField(M1, related_name='origin')
f2 = ForeignKeyField(M1, related_name='target')
...
```
In this example, `prefetch(M2.select().where(M2.i2>10), M1)` only fetches `f1` entries. `f2` is loaded with separate que... | {
"url": "https://api.github.com/repos/coleifer/peewee/issues/774/reactions",
"total_count": 0,
"+1": 0,
"-1": 0,
"laugh": 0,
"hooray": 0,
"confused": 0,
"heart": 0,
"rocket": 0,
"eyes": 0
} | https://api.github.com/repos/coleifer/peewee/issues/774/timeline | null | completed | null | null |
https://api.github.com/repos/coleifer/peewee/issues/773 | https://api.github.com/repos/coleifer/peewee | https://api.github.com/repos/coleifer/peewee/issues/773/labels{/name} | https://api.github.com/repos/coleifer/peewee/issues/773/comments | https://api.github.com/repos/coleifer/peewee/issues/773/events | https://github.com/coleifer/peewee/issues/773 | 119,362,733 | MDU6SXNzdWUxMTkzNjI3MzM= | 773 | Adding request hooks to pyramid | {
"login": "perplexedfingers",
"id": 14918698,
"node_id": "MDQ6VXNlcjE0OTE4Njk4",
"avatar_url": "https://avatars.githubusercontent.com/u/14918698?v=4",
"gravatar_id": "",
"url": "https://api.github.com/users/perplexedfingers",
"html_url": "https://github.com/perplexedfingers",
"followers_url": "https://... | [] | closed | false | null | [] | null | [
"Sure thanks!\n"
] | 2015-11-29T14:33:02 | 2015-11-29T16:37:09 | 2015-11-29T16:37:09 | NONE | null | Although there is already [pyramid_peewee](https://pypi.python.org/pypi/pyramid_peewee), I think it would be great to mention about the possibility to use peewee along with pyramid in the document.
| {
"url": "https://api.github.com/repos/coleifer/peewee/issues/773/reactions",
"total_count": 0,
"+1": 0,
"-1": 0,
"laugh": 0,
"hooray": 0,
"confused": 0,
"heart": 0,
"rocket": 0,
"eyes": 0
} | https://api.github.com/repos/coleifer/peewee/issues/773/timeline | null | completed | null | null |
https://api.github.com/repos/coleifer/peewee/issues/772 | https://api.github.com/repos/coleifer/peewee | https://api.github.com/repos/coleifer/peewee/issues/772/labels{/name} | https://api.github.com/repos/coleifer/peewee/issues/772/comments | https://api.github.com/repos/coleifer/peewee/issues/772/events | https://github.com/coleifer/peewee/issues/772 | 119,353,422 | MDU6SXNzdWUxMTkzNTM0MjI= | 772 | Full migration framework | {
"login": "mekanix",
"id": 610855,
"node_id": "MDQ6VXNlcjYxMDg1NQ==",
"avatar_url": "https://avatars.githubusercontent.com/u/610855?v=4",
"gravatar_id": "",
"url": "https://api.github.com/users/mekanix",
"html_url": "https://github.com/mekanix",
"followers_url": "https://api.github.com/users/mekanix/fo... | [] | closed | false | null | [] | null | [
"@mekanix -- https://github.com/cam-stitt/arnold is one such project I'm aware of. I don't have plans for adding anything more than what is already present in the `playhouse.migrate` module. Perhaps you can bring this up on the mailing list? https://groups.google.com/group/peewee-orm\n"
] | 2015-11-29T11:14:58 | 2015-11-29T16:35:14 | 2015-11-29T16:35:14 | NONE | null | In short, if anyone is working on full fledged migration framework, I'd like to contribute. If nobody is working on it, I'd like to do it. Any pointers on how to contribute/implement migrations ala Django (or maybe something better?) are welcome.
| {
"url": "https://api.github.com/repos/coleifer/peewee/issues/772/reactions",
"total_count": 0,
"+1": 0,
"-1": 0,
"laugh": 0,
"hooray": 0,
"confused": 0,
"heart": 0,
"rocket": 0,
"eyes": 0
} | https://api.github.com/repos/coleifer/peewee/issues/772/timeline | null | completed | null | null |
https://api.github.com/repos/coleifer/peewee/issues/771 | https://api.github.com/repos/coleifer/peewee | https://api.github.com/repos/coleifer/peewee/issues/771/labels{/name} | https://api.github.com/repos/coleifer/peewee/issues/771/comments | https://api.github.com/repos/coleifer/peewee/issues/771/events | https://github.com/coleifer/peewee/issues/771 | 119,250,552 | MDU6SXNzdWUxMTkyNTA1NTI= | 771 | apsw driver rejecting datetime object | {
"login": "rlander",
"id": 368935,
"node_id": "MDQ6VXNlcjM2ODkzNQ==",
"avatar_url": "https://avatars.githubusercontent.com/u/368935?v=4",
"gravatar_id": "",
"url": "https://api.github.com/users/rlander",
"html_url": "https://github.com/rlander",
"followers_url": "https://api.github.com/users/rlander/fo... | [] | closed | false | null | [] | null | [
"```\nPython version: 2.7.9\nSqlite version: 3.9.2\n\npeewee==2.7.3\napsw==3.9.2-r1\n\n\n```\n",
"You need to use the `DateTimeField` object from the `apsw_ext` module.\n\n``` python\nfrom playhouse.apsw_ext import DateTimeField\n```\n"
] | 2015-11-27T21:37:39 | 2015-11-29T16:29:55 | 2015-11-29T16:29:55 | NONE | null | I have a model that looks like this:
``` python
class Log(Model):
name = CharField()
platform = CharField(null=True)
language = CharField(null=True)
created = DateTimeField(default=datetime.datetime.now)
```
When I try to insert a new record
``` python
Log.create(name=agent.name, platform=agent.platf... | {
"url": "https://api.github.com/repos/coleifer/peewee/issues/771/reactions",
"total_count": 0,
"+1": 0,
"-1": 0,
"laugh": 0,
"hooray": 0,
"confused": 0,
"heart": 0,
"rocket": 0,
"eyes": 0
} | https://api.github.com/repos/coleifer/peewee/issues/771/timeline | null | completed | null | null |
https://api.github.com/repos/coleifer/peewee/issues/770 | https://api.github.com/repos/coleifer/peewee | https://api.github.com/repos/coleifer/peewee/issues/770/labels{/name} | https://api.github.com/repos/coleifer/peewee/issues/770/comments | https://api.github.com/repos/coleifer/peewee/issues/770/events | https://github.com/coleifer/peewee/issues/770 | 119,017,544 | MDU6SXNzdWUxMTkwMTc1NDQ= | 770 | Migrator freezes | {
"login": "JornPet",
"id": 9035151,
"node_id": "MDQ6VXNlcjkwMzUxNTE=",
"avatar_url": "https://avatars.githubusercontent.com/u/9035151?v=4",
"gravatar_id": "",
"url": "https://api.github.com/users/JornPet",
"html_url": "https://github.com/JornPet",
"followers_url": "https://api.github.com/users/JornPet/... | [] | closed | false | null | [] | null | [
"I'm not sure, maybe something holding a lock on the table? Are any other processes connected to the db?\n",
"Closing due to lack of feedback.\n"
] | 2015-11-26T10:43:26 | 2015-12-01T14:46:44 | 2015-12-01T14:46:44 | NONE | null | I'm trying to migrate a database using the peewee migrator. I added a column to a table the migrator worked and updated the table. No problem.
I then tried to remove the column again, but in the process it totally froze. I let it run for about 10 minutes, but nothing happened. So I quit it, and dropped and created the ... | {
"url": "https://api.github.com/repos/coleifer/peewee/issues/770/reactions",
"total_count": 0,
"+1": 0,
"-1": 0,
"laugh": 0,
"hooray": 0,
"confused": 0,
"heart": 0,
"rocket": 0,
"eyes": 0
} | https://api.github.com/repos/coleifer/peewee/issues/770/timeline | null | completed | null | null |
https://api.github.com/repos/coleifer/peewee/issues/769 | https://api.github.com/repos/coleifer/peewee | https://api.github.com/repos/coleifer/peewee/issues/769/labels{/name} | https://api.github.com/repos/coleifer/peewee/issues/769/comments | https://api.github.com/repos/coleifer/peewee/issues/769/events | https://github.com/coleifer/peewee/issues/769 | 118,729,714 | MDU6SXNzdWUxMTg3Mjk3MTQ= | 769 | Unexpected parentheses required when using multiple WHERE conditions | {
"login": "martinburch",
"id": 2335284,
"node_id": "MDQ6VXNlcjIzMzUyODQ=",
"avatar_url": "https://avatars.githubusercontent.com/u/2335284?v=4",
"gravatar_id": "",
"url": "https://api.github.com/users/martinburch",
"html_url": "https://github.com/martinburch",
"followers_url": "https://api.github.com/us... | [] | closed | false | null | [] | null | [
"Peewee leans on pythons parser to generate expressions. Because of pythons operator precedence you need parentheses around most comparisons. No magic here, just python.\n",
"And yet I can do this without needed extra parens:\n\n```\n.where(\n (modelObject.field_name << ['a','b','c'] |\n modelObject.field_n... | 2015-11-24T23:59:39 | 2015-11-25T06:30:23 | 2015-11-25T00:51:29 | NONE | null | I would expect to be able to write:
```
where(
(
modelObject.field_name.is_null(True) |
modelObject.field_name == ""
)
)
```
but I must add parentheses around `modelObject.field_name == ""` or the query will be generated improperly. The improperly generated query is essentially
```
WHERE `t1`.`field_... | {
"url": "https://api.github.com/repos/coleifer/peewee/issues/769/reactions",
"total_count": 0,
"+1": 0,
"-1": 0,
"laugh": 0,
"hooray": 0,
"confused": 0,
"heart": 0,
"rocket": 0,
"eyes": 0
} | https://api.github.com/repos/coleifer/peewee/issues/769/timeline | null | completed | null | null |
https://api.github.com/repos/coleifer/peewee/issues/768 | https://api.github.com/repos/coleifer/peewee | https://api.github.com/repos/coleifer/peewee/issues/768/labels{/name} | https://api.github.com/repos/coleifer/peewee/issues/768/comments | https://api.github.com/repos/coleifer/peewee/issues/768/events | https://github.com/coleifer/peewee/pull/768 | 118,367,801 | MDExOlB1bGxSZXF1ZXN0NTE1MTUzNTA= | 768 | Fix _SortedFieldList, Model._meta.remove_field | {
"login": "klen",
"id": 90699,
"node_id": "MDQ6VXNlcjkwNjk5",
"avatar_url": "https://avatars.githubusercontent.com/u/90699?v=4",
"gravatar_id": "",
"url": "https://api.github.com/users/klen",
"html_url": "https://github.com/klen",
"followers_url": "https://api.github.com/users/klen/followers",
"follo... | [] | closed | false | null | [] | null | [
"Thank you!\n"
] | 2015-11-23T12:06:17 | 2015-12-01T15:08:52 | 2015-12-01T15:08:48 | CONTRIBUTOR | null | Hello, the last release has broken migrations, because `Model._meta.remove_fields` actually doesn't work.
The PR fixes it. I'm waiting for your response and new release.
| {
"url": "https://api.github.com/repos/coleifer/peewee/issues/768/reactions",
"total_count": 0,
"+1": 0,
"-1": 0,
"laugh": 0,
"hooray": 0,
"confused": 0,
"heart": 0,
"rocket": 0,
"eyes": 0
} | https://api.github.com/repos/coleifer/peewee/issues/768/timeline | null | null | false | {
"url": "https://api.github.com/repos/coleifer/peewee/pulls/768",
"html_url": "https://github.com/coleifer/peewee/pull/768",
"diff_url": "https://github.com/coleifer/peewee/pull/768.diff",
"patch_url": "https://github.com/coleifer/peewee/pull/768.patch",
"merged_at": "2015-12-01T15:08:48"
} |
https://api.github.com/repos/coleifer/peewee/issues/767 | https://api.github.com/repos/coleifer/peewee | https://api.github.com/repos/coleifer/peewee/issues/767/labels{/name} | https://api.github.com/repos/coleifer/peewee/issues/767/comments | https://api.github.com/repos/coleifer/peewee/issues/767/events | https://github.com/coleifer/peewee/issues/767 | 118,233,745 | MDU6SXNzdWUxMTgyMzM3NDU= | 767 | Test failures in 2.7.3 | {
"login": "felixonmars",
"id": 1006477,
"node_id": "MDQ6VXNlcjEwMDY0Nzc=",
"avatar_url": "https://avatars.githubusercontent.com/u/1006477?v=4",
"gravatar_id": "",
"url": "https://api.github.com/users/felixonmars",
"html_url": "https://github.com/felixonmars",
"followers_url": "https://api.github.com/us... | [] | closed | false | null | [] | null | [
"Looks like you're missing the JSON1 extension. I'll add a conditional.\n"
] | 2015-11-22T02:04:51 | 2015-11-24T15:11:35 | 2015-11-22T02:20:36 | CONTRIBUTOR | null | Hi, I am getting the following failures in 2.7.3, and they are not present in previous versions:
```
======================================================================
ERROR: test_children (playhouse.tests.test_sqlite_ext.TestJSONField)
----------------------------------------------------------------------
Traceba... | {
"url": "https://api.github.com/repos/coleifer/peewee/issues/767/reactions",
"total_count": 0,
"+1": 0,
"-1": 0,
"laugh": 0,
"hooray": 0,
"confused": 0,
"heart": 0,
"rocket": 0,
"eyes": 0
} | https://api.github.com/repos/coleifer/peewee/issues/767/timeline | null | completed | null | null |
https://api.github.com/repos/coleifer/peewee/issues/766 | https://api.github.com/repos/coleifer/peewee | https://api.github.com/repos/coleifer/peewee/issues/766/labels{/name} | https://api.github.com/repos/coleifer/peewee/issues/766/comments | https://api.github.com/repos/coleifer/peewee/issues/766/events | https://github.com/coleifer/peewee/issues/766 | 118,223,951 | MDU6SXNzdWUxMTgyMjM5NTE= | 766 | PasswordField does not seem to work with Postgres | {
"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 | [
"Thanks :)\n",
"Same code, with updated peewee:\n\n```\nTraceback (most recent call last):\n File \"peewee_password_field.py\", line 19, in <module>\n assert user.password.check_password('password')\n File \"/home/ybon/.virtualenvs/p3/local/lib/python3.4/site-packages/playhouse/fields.py\", line 47, in check... | 2015-11-21T22:06:24 | 2015-12-28T22:20:46 | 2015-12-28T22:20:46 | CONTRIBUTOR | null | ``` python
import peewee
from playhouse.fields import PasswordField
db = peewee.PostgresqlDatabase('peewee')
class User(peewee.Model):
username = peewee.CharField(max_length=10)
password = PasswordField()
class Meta:
database = db
if __name__ == '__main__':
User.create_table()
user = U... | {
"url": "https://api.github.com/repos/coleifer/peewee/issues/766/reactions",
"total_count": 0,
"+1": 0,
"-1": 0,
"laugh": 0,
"hooray": 0,
"confused": 0,
"heart": 0,
"rocket": 0,
"eyes": 0
} | https://api.github.com/repos/coleifer/peewee/issues/766/timeline | null | completed | null | null |
https://api.github.com/repos/coleifer/peewee/issues/765 | https://api.github.com/repos/coleifer/peewee | https://api.github.com/repos/coleifer/peewee/issues/765/labels{/name} | https://api.github.com/repos/coleifer/peewee/issues/765/comments | https://api.github.com/repos/coleifer/peewee/issues/765/events | https://github.com/coleifer/peewee/issues/765 | 118,172,423 | MDU6SXNzdWUxMTgxNzI0MjM= | 765 | AttributeError: 'ModelOptions' object has no attribute 'get_sorted_fields' | {
"login": "pawl",
"id": 992533,
"node_id": "MDQ6VXNlcjk5MjUzMw==",
"avatar_url": "https://avatars.githubusercontent.com/u/992533?v=4",
"gravatar_id": "",
"url": "https://api.github.com/users/pawl",
"html_url": "https://github.com/pawl",
"followers_url": "https://api.github.com/users/pawl/followers",
... | [] | closed | false | null | [] | null | [
"I'd look into updating the code to use `.sorted_fields`. there is also `.sorted_field_names`. This is a performance improvement, as that code had potential to be called a _lot_.\n",
"@rudyryk has a good suggestion here for a temporary solution: https://github.com/flask-admin/flask-admin/issues/1117\n\n```\n f... | 2015-11-21T05:40:25 | 2017-08-22T14:51:18 | 2015-11-22T02:42:30 | NONE | null | I noticed `get_sorted_fields()`, `get_field_names()`, and `get_fields()` were removed by these commits: https://github.com/coleifer/peewee/commit/2619fcc12b01e34933861de51918507d118655c4 and https://github.com/coleifer/peewee/commit/50c9c1dd24b7a4c48a396a9f5e88f3ea1647859a
It's causing some flask-admin tests to fail, ... | {
"url": "https://api.github.com/repos/coleifer/peewee/issues/765/reactions",
"total_count": 0,
"+1": 0,
"-1": 0,
"laugh": 0,
"hooray": 0,
"confused": 0,
"heart": 0,
"rocket": 0,
"eyes": 0
} | https://api.github.com/repos/coleifer/peewee/issues/765/timeline | null | completed | null | null |
https://api.github.com/repos/coleifer/peewee/issues/764 | https://api.github.com/repos/coleifer/peewee | https://api.github.com/repos/coleifer/peewee/issues/764/labels{/name} | https://api.github.com/repos/coleifer/peewee/issues/764/comments | https://api.github.com/repos/coleifer/peewee/issues/764/events | https://github.com/coleifer/peewee/issues/764 | 118,169,295 | MDU6SXNzdWUxMTgxNjkyOTU= | 764 | make code more beautiful | {
"login": "olivetree123",
"id": 5275647,
"node_id": "MDQ6VXNlcjUyNzU2NDc=",
"avatar_url": "https://avatars.githubusercontent.com/u/5275647?v=4",
"gravatar_id": "",
"url": "https://api.github.com/users/olivetree123",
"html_url": "https://github.com/olivetree123",
"followers_url": "https://api.github.com... | [] | closed | false | null | [] | null | [
"No, that has been that way since version 0.1.0. Are you serious? Do you think I'd actually change it?\n",
"Also, cluttering up the namespace is grosser to me.\n",
"Also bite me.\n"
] | 2015-11-21T04:25:33 | 2016-01-14T04:56:14 | 2015-11-21T04:27:06 | NONE | null | The 'Meta class' makes code ugly,would you prepare to make code like this:
class Gym(Model):
**db_table** = 'gym'
id = IntegerField(primary_key=True)
| {
"url": "https://api.github.com/repos/coleifer/peewee/issues/764/reactions",
"total_count": 0,
"+1": 0,
"-1": 0,
"laugh": 0,
"hooray": 0,
"confused": 0,
"heart": 0,
"rocket": 0,
"eyes": 0
} | https://api.github.com/repos/coleifer/peewee/issues/764/timeline | null | completed | null | null |
https://api.github.com/repos/coleifer/peewee/issues/763 | https://api.github.com/repos/coleifer/peewee | https://api.github.com/repos/coleifer/peewee/issues/763/labels{/name} | https://api.github.com/repos/coleifer/peewee/issues/763/comments | https://api.github.com/repos/coleifer/peewee/issues/763/events | https://github.com/coleifer/peewee/issues/763 | 118,148,213 | MDU6SXNzdWUxMTgxNDgyMTM= | 763 | Fail to install peewee under WinPython | {
"login": "mindv0rtex",
"id": 10409817,
"node_id": "MDQ6VXNlcjEwNDA5ODE3",
"avatar_url": "https://avatars.githubusercontent.com/u/10409817?v=4",
"gravatar_id": "",
"url": "https://api.github.com/users/mindv0rtex",
"html_url": "https://github.com/mindv0rtex",
"followers_url": "https://api.github.com/use... | [] | closed | false | null | [] | null | [
"Hmm, well this isn't exactly a solution, but I've released a new versoin 2.7.2 that does not build SQLite extension by default.\n\nIf you want the sqlite extension it should be built using `python setup.py build_sqlite_ext`.\n\nI will look into checking the python version and renaming the entry-point per the stack... | 2015-11-20T23:24:31 | 2016-04-24T10:14:38 | 2015-11-21T03:03:19 | NONE | null | Hi guys. I am trying to install peewee under WinPython. It comes with Cython pre-intalled, so peewee attempts to compile extensions and this is where the install fails. It complains about sqlite3.h absence and I don't know how to resolve this. Compiling sqlite3 and putting the .a file in the lib folder did not help... ... | {
"url": "https://api.github.com/repos/coleifer/peewee/issues/763/reactions",
"total_count": 0,
"+1": 0,
"-1": 0,
"laugh": 0,
"hooray": 0,
"confused": 0,
"heart": 0,
"rocket": 0,
"eyes": 0
} | https://api.github.com/repos/coleifer/peewee/issues/763/timeline | null | completed | null | null |
https://api.github.com/repos/coleifer/peewee/issues/762 | https://api.github.com/repos/coleifer/peewee | https://api.github.com/repos/coleifer/peewee/issues/762/labels{/name} | https://api.github.com/repos/coleifer/peewee/issues/762/comments | https://api.github.com/repos/coleifer/peewee/issues/762/events | https://github.com/coleifer/peewee/issues/762 | 118,128,380 | MDU6SXNzdWUxMTgxMjgzODA= | 762 | Escaping `%` for parameterized queries | {
"login": "skatenerd",
"id": 880217,
"node_id": "MDQ6VXNlcjg4MDIxNw==",
"avatar_url": "https://avatars.githubusercontent.com/u/880217?v=4",
"gravatar_id": "",
"url": "https://api.github.com/users/skatenerd",
"html_url": "https://github.com/skatenerd",
"followers_url": "https://api.github.com/users/skat... | [] | closed | false | null | [] | null | [
"Just use `%%` instead of `%`\n"
] | 2015-11-20T21:22:43 | 2015-11-20T21:41:47 | 2015-11-20T21:41:47 | NONE | null | When I try to run the trigram Postgres query:
`db.execute_sql("select * from person where person.name % 'bobby'")`
The query crashes with `tuple index out of range` because it thinks the `%` is an argument
I'm wondering if there's a way to escape the `%` sign, so that can put the `%` in the query safely. If I try to... | {
"url": "https://api.github.com/repos/coleifer/peewee/issues/762/reactions",
"total_count": 0,
"+1": 0,
"-1": 0,
"laugh": 0,
"hooray": 0,
"confused": 0,
"heart": 0,
"rocket": 0,
"eyes": 0
} | https://api.github.com/repos/coleifer/peewee/issues/762/timeline | null | completed | null | null |
https://api.github.com/repos/coleifer/peewee/issues/761 | https://api.github.com/repos/coleifer/peewee | https://api.github.com/repos/coleifer/peewee/issues/761/labels{/name} | https://api.github.com/repos/coleifer/peewee/issues/761/comments | https://api.github.com/repos/coleifer/peewee/issues/761/events | https://github.com/coleifer/peewee/issues/761 | 117,991,168 | MDU6SXNzdWUxMTc5OTExNjg= | 761 | pip install peewee failed | {
"login": "openmartin",
"id": 2059728,
"node_id": "MDQ6VXNlcjIwNTk3Mjg=",
"avatar_url": "https://avatars.githubusercontent.com/u/2059728?v=4",
"gravatar_id": "",
"url": "https://api.github.com/users/openmartin",
"html_url": "https://github.com/openmartin",
"followers_url": "https://api.github.com/users... | [] | closed | false | null | [] | null | [
"on Ubuntu 14.04.2 LTS\npython 2.7.6\n",
"I confirm we got the same issue this morning on our CI.\nOur trace is:\n\n`````` python\nDownloading/unpacking peewee>=2.6.4 (from ...->-r /home/u877/src/repo/app-api/requirements.txt (line 7))\n Running setup.py (path:/home/u877/python-env/build/peewee/setup.py) egg_inf... | 2015-11-20T08:35:41 | 2015-11-20T14:47:25 | 2015-11-20T14:47:25 | NONE | null | (1.0.0)ubuntu@localhost:/home/ubuntu/v_env$ pip install peewee
Collecting peewee
Using cached peewee-2.7.0.tar.gz
Complete output from command python setup.py egg_info:
Traceback (most recent call last):
File "<string>", line 20, in <module>
File "/tmp/pip-build-M40xkD/peewee/setup.py", line 42, i... | {
"url": "https://api.github.com/repos/coleifer/peewee/issues/761/reactions",
"total_count": 0,
"+1": 0,
"-1": 0,
"laugh": 0,
"hooray": 0,
"confused": 0,
"heart": 0,
"rocket": 0,
"eyes": 0
} | https://api.github.com/repos/coleifer/peewee/issues/761/timeline | null | completed | null | null |
https://api.github.com/repos/coleifer/peewee/issues/760 | https://api.github.com/repos/coleifer/peewee | https://api.github.com/repos/coleifer/peewee/issues/760/labels{/name} | https://api.github.com/repos/coleifer/peewee/issues/760/comments | https://api.github.com/repos/coleifer/peewee/issues/760/events | https://github.com/coleifer/peewee/issues/760 | 117,988,840 | MDU6SXNzdWUxMTc5ODg4NDA= | 760 | How to make the result to be dict ? | {
"login": "olivetree123",
"id": 5275647,
"node_id": "MDQ6VXNlcjUyNzU2NDc=",
"avatar_url": "https://avatars.githubusercontent.com/u/5275647?v=4",
"gravatar_id": "",
"url": "https://api.github.com/users/olivetree123",
"html_url": "https://github.com/olivetree123",
"followers_url": "https://api.github.com... | [] | closed | false | null | [] | null | [
"First off this is completely inappropriate for a GitHub issue. Questions go on stack overflow, irc or the mailing list.\n\nSecond, to answer, write:\n\nGym.select().dicts().get()\n"
] | 2015-11-20T08:26:24 | 2015-11-20T16:18:37 | 2015-11-20T16:18:37 | NONE | null | g = Gym.get()
I want to make variable g to be a dict , like g = dict(g) , how could I do ?
| {
"url": "https://api.github.com/repos/coleifer/peewee/issues/760/reactions",
"total_count": 0,
"+1": 0,
"-1": 0,
"laugh": 0,
"hooray": 0,
"confused": 0,
"heart": 0,
"rocket": 0,
"eyes": 0
} | https://api.github.com/repos/coleifer/peewee/issues/760/timeline | null | completed | null | null |
https://api.github.com/repos/coleifer/peewee/issues/759 | https://api.github.com/repos/coleifer/peewee | https://api.github.com/repos/coleifer/peewee/issues/759/labels{/name} | https://api.github.com/repos/coleifer/peewee/issues/759/comments | https://api.github.com/repos/coleifer/peewee/issues/759/events | https://github.com/coleifer/peewee/issues/759 | 117,967,846 | MDU6SXNzdWUxMTc5Njc4NDY= | 759 | The build depends on Cython, not noted in `setup.py` | {
"login": "skatenerd",
"id": 880217,
"node_id": "MDQ6VXNlcjg4MDIxNw==",
"avatar_url": "https://avatars.githubusercontent.com/u/880217?v=4",
"gravatar_id": "",
"url": "https://api.github.com/users/skatenerd",
"html_url": "https://github.com/skatenerd",
"followers_url": "https://api.github.com/users/skat... | [] | closed | false | null | [] | null | [
"Fixed with the 2.7.1 release. Cython is not required, but if you have it peewee will build some c extension.\n"
] | 2015-11-20T05:27:42 | 2015-11-20T14:48:52 | 2015-11-20T14:48:52 | NONE | null | If you don't have Cython, this line:
https://github.com/coleifer/peewee/blob/master/setup.py#L12
Sets `cmdclass` to `None`, which causes the (pip) installation to crash, when `dist.py` tries to iterate over `self.cmdclass`:
https://github.com/jaraco/setuptools/blob/master/setuptools/dist.py#L425
Should we just add an... | {
"url": "https://api.github.com/repos/coleifer/peewee/issues/759/reactions",
"total_count": 0,
"+1": 0,
"-1": 0,
"laugh": 0,
"hooray": 0,
"confused": 0,
"heart": 0,
"rocket": 0,
"eyes": 0
} | https://api.github.com/repos/coleifer/peewee/issues/759/timeline | null | completed | null | null |
https://api.github.com/repos/coleifer/peewee/issues/758 | https://api.github.com/repos/coleifer/peewee | https://api.github.com/repos/coleifer/peewee/issues/758/labels{/name} | https://api.github.com/repos/coleifer/peewee/issues/758/comments | https://api.github.com/repos/coleifer/peewee/issues/758/events | https://github.com/coleifer/peewee/issues/758 | 117,615,159 | MDU6SXNzdWUxMTc2MTUxNTk= | 758 | Creating a custom field that automatically converts between db types and python types | {
"login": "larsks",
"id": 82622,
"node_id": "MDQ6VXNlcjgyNjIy",
"avatar_url": "https://avatars.githubusercontent.com/u/82622?v=4",
"gravatar_id": "",
"url": "https://api.github.com/users/larsks",
"html_url": "https://github.com/larsks",
"followers_url": "https://api.github.com/users/larsks/followers",
... | [] | closed | false | null | [] | null | [
"I would just create wrapper methods that do what you want, since by the time you're calling `python_value()` it's technically too late as the value has already been pulled from the database. As to `db_value()` doing the inverse, that's not really the intended purpose of the method.\n\nSince you're using Postgres, ... | 2015-11-18T15:48:02 | 2021-03-11T07:02:48 | 2015-11-18T18:00:34 | NONE | null | I want to use Peewee to manage a collection of GIS data. I've defined some custom fields to handle the PostGIS `geometry` type:
```
class GeomField(Field):
db_field = 'geometry'
def __init__(self, geom_type=None, geom_srid=None, **kwargs):
self.geom_srid = geom_srid
self.geom_type = geom_typ... | {
"url": "https://api.github.com/repos/coleifer/peewee/issues/758/reactions",
"total_count": 0,
"+1": 0,
"-1": 0,
"laugh": 0,
"hooray": 0,
"confused": 0,
"heart": 0,
"rocket": 0,
"eyes": 0
} | https://api.github.com/repos/coleifer/peewee/issues/758/timeline | null | completed | null | null |
https://api.github.com/repos/coleifer/peewee/issues/757 | https://api.github.com/repos/coleifer/peewee | https://api.github.com/repos/coleifer/peewee/issues/757/labels{/name} | https://api.github.com/repos/coleifer/peewee/issues/757/comments | https://api.github.com/repos/coleifer/peewee/issues/757/events | https://github.com/coleifer/peewee/pull/757 | 117,441,427 | MDExOlB1bGxSZXF1ZXN0NTA5OTg4MTI= | 757 | Pwiz preservation of composite indices and uniques | {
"login": "SarahFowler73",
"id": 5266362,
"node_id": "MDQ6VXNlcjUyNjYzNjI=",
"avatar_url": "https://avatars.githubusercontent.com/u/5266362?v=4",
"gravatar_id": "",
"url": "https://api.github.com/users/SarahFowler73",
"html_url": "https://github.com/SarahFowler73",
"followers_url": "https://api.github.... | [] | closed | false | null | [] | null | [] | 2015-11-17T20:19:40 | 2015-11-18T18:23:41 | 2015-11-18T18:23:41 | NONE | null | When pwiz creates your model, it will preserve the composite indices and composite unique constraints that you have on your tables in your model.
| {
"url": "https://api.github.com/repos/coleifer/peewee/issues/757/reactions",
"total_count": 0,
"+1": 0,
"-1": 0,
"laugh": 0,
"hooray": 0,
"confused": 0,
"heart": 0,
"rocket": 0,
"eyes": 0
} | https://api.github.com/repos/coleifer/peewee/issues/757/timeline | null | null | false | {
"url": "https://api.github.com/repos/coleifer/peewee/pulls/757",
"html_url": "https://github.com/coleifer/peewee/pull/757",
"diff_url": "https://github.com/coleifer/peewee/pull/757.diff",
"patch_url": "https://github.com/coleifer/peewee/pull/757.patch",
"merged_at": null
} |
https://api.github.com/repos/coleifer/peewee/issues/756 | https://api.github.com/repos/coleifer/peewee | https://api.github.com/repos/coleifer/peewee/issues/756/labels{/name} | https://api.github.com/repos/coleifer/peewee/issues/756/comments | https://api.github.com/repos/coleifer/peewee/issues/756/events | https://github.com/coleifer/peewee/pull/756 | 116,963,337 | MDExOlB1bGxSZXF1ZXN0NTA3MzYxODM= | 756 | pwiz: changed to allow for keyboard interactive authentication | {
"login": "therealchalz",
"id": 3590449,
"node_id": "MDQ6VXNlcjM1OTA0NDk=",
"avatar_url": "https://avatars.githubusercontent.com/u/3590449?v=4",
"gravatar_id": "",
"url": "https://api.github.com/users/therealchalz",
"html_url": "https://github.com/therealchalz",
"followers_url": "https://api.github.com... | [] | closed | false | null | [] | null | [] | 2015-11-15T00:31:47 | 2015-11-17T03:31:47 | 2015-11-17T03:31:47 | NONE | null | It's nice to be able to keep your DB password off the command line (and therefore .bash_history or similar logs). This change to pwiz prompts for the DB password if it is not given on the command line.
| {
"url": "https://api.github.com/repos/coleifer/peewee/issues/756/reactions",
"total_count": 0,
"+1": 0,
"-1": 0,
"laugh": 0,
"hooray": 0,
"confused": 0,
"heart": 0,
"rocket": 0,
"eyes": 0
} | https://api.github.com/repos/coleifer/peewee/issues/756/timeline | null | null | false | {
"url": "https://api.github.com/repos/coleifer/peewee/pulls/756",
"html_url": "https://github.com/coleifer/peewee/pull/756",
"diff_url": "https://github.com/coleifer/peewee/pull/756.diff",
"patch_url": "https://github.com/coleifer/peewee/pull/756.patch",
"merged_at": null
} |
https://api.github.com/repos/coleifer/peewee/issues/755 | https://api.github.com/repos/coleifer/peewee | https://api.github.com/repos/coleifer/peewee/issues/755/labels{/name} | https://api.github.com/repos/coleifer/peewee/issues/755/comments | https://api.github.com/repos/coleifer/peewee/issues/755/events | https://github.com/coleifer/peewee/pull/755 | 116,897,768 | MDExOlB1bGxSZXF1ZXN0NTA3MTY3NTc= | 755 | querying.rst: update ManyToManyField module belong | {
"login": "franciscod",
"id": 726447,
"node_id": "MDQ6VXNlcjcyNjQ0Nw==",
"avatar_url": "https://avatars.githubusercontent.com/u/726447?v=4",
"gravatar_id": "",
"url": "https://api.github.com/users/franciscod",
"html_url": "https://github.com/franciscod",
"followers_url": "https://api.github.com/users/f... | [] | closed | false | null | [] | null | [
"Is fields the right ref?\n",
"No sir! It's `extra-fields`! fixing that up, sorry!\n",
"push-forced the changes, but i've not yet built the docs locally so this is untested\n",
"installed sphinx, `make html`, links are working! should I check anything else?\n",
"Thanks a lot!\n"
] | 2015-11-14T05:12:03 | 2015-11-14T13:51:49 | 2015-11-14T13:51:34 | CONTRIBUTOR | null | ManyToManyField is now on the playhouse.fields module, docs were slightly misleading
| {
"url": "https://api.github.com/repos/coleifer/peewee/issues/755/reactions",
"total_count": 0,
"+1": 0,
"-1": 0,
"laugh": 0,
"hooray": 0,
"confused": 0,
"heart": 0,
"rocket": 0,
"eyes": 0
} | https://api.github.com/repos/coleifer/peewee/issues/755/timeline | null | null | false | {
"url": "https://api.github.com/repos/coleifer/peewee/pulls/755",
"html_url": "https://github.com/coleifer/peewee/pull/755",
"diff_url": "https://github.com/coleifer/peewee/pull/755.diff",
"patch_url": "https://github.com/coleifer/peewee/pull/755.patch",
"merged_at": "2015-11-14T13:51:34"
} |
https://api.github.com/repos/coleifer/peewee/issues/754 | https://api.github.com/repos/coleifer/peewee | https://api.github.com/repos/coleifer/peewee/issues/754/labels{/name} | https://api.github.com/repos/coleifer/peewee/issues/754/comments | https://api.github.com/repos/coleifer/peewee/issues/754/events | https://github.com/coleifer/peewee/issues/754 | 116,897,436 | MDU6SXNzdWUxMTY4OTc0MzY= | 754 | When using playground.fields.ManyToManyField, I get "no such table: firstmodel_secondmodel_through" | {
"login": "franciscod",
"id": 726447,
"node_id": "MDQ6VXNlcjcyNjQ0Nw==",
"avatar_url": "https://avatars.githubusercontent.com/u/726447?v=4",
"gravatar_id": "",
"url": "https://api.github.com/users/franciscod",
"html_url": "https://github.com/franciscod",
"followers_url": "https://api.github.com/users/f... | [] | closed | false | null | [] | null | [
"(edited the title so model names are general, mines are `TelegramChat` and `TwitterUser`)\n",
"I'm stupid:\n\n> We still need a junction table to store the relationships between students and courses. This model can be accessed by calling the get_through_model() method. This is useful when creating tables.\n\nhtt... | 2015-11-14T05:08:17 | 2015-11-14T05:17:36 | 2015-11-14T05:14:50 | CONTRIBUTOR | null | Am I missing something silly ***** ? I've already done create_tables on both models (in the same order that they're defined as classes).
I can post a minimal reproduction file if that's useful!
***SPOILERS: YES I WAS**
| {
"url": "https://api.github.com/repos/coleifer/peewee/issues/754/reactions",
"total_count": 0,
"+1": 0,
"-1": 0,
"laugh": 0,
"hooray": 0,
"confused": 0,
"heart": 0,
"rocket": 0,
"eyes": 0
} | https://api.github.com/repos/coleifer/peewee/issues/754/timeline | null | completed | null | null |
https://api.github.com/repos/coleifer/peewee/issues/753 | https://api.github.com/repos/coleifer/peewee | https://api.github.com/repos/coleifer/peewee/issues/753/labels{/name} | https://api.github.com/repos/coleifer/peewee/issues/753/comments | https://api.github.com/repos/coleifer/peewee/issues/753/events | https://github.com/coleifer/peewee/issues/753 | 116,297,852 | MDU6SXNzdWUxMTYyOTc4NTI= | 753 | peewee mysql how to execute 'insert many on duplicate key update' | {
"login": "yangbh",
"id": 7778764,
"node_id": "MDQ6VXNlcjc3Nzg3NjQ=",
"avatar_url": "https://avatars.githubusercontent.com/u/7778764?v=4",
"gravatar_id": "",
"url": "https://api.github.com/users/yangbh",
"html_url": "https://github.com/yangbh",
"followers_url": "https://api.github.com/users/yangbh/foll... | [] | closed | false | null | [] | null | [
"here is my poor solution\n\n```\nq=basicinfo_ip_finger.insert_many(result).sql()\ndb.execute_sql(q[0]+' on duplicate key update hostname=values(hostname),...', q[1])\n```\n\nany good idea?\nthanks\n",
"I looked at the docs and it seems like MySQL supports a command `REPLACE` that does what you want. I've added s... | 2015-11-11T09:38:47 | 2019-11-28T14:38:42 | 2015-11-19T22:33:03 | NONE | null | Hi Charles,
how to execute sql command like
```
insert into table(ip,hostname,...)
values
('','',...)
('','',...)
('','',...)
...
on duplicate key update hostname=values(hostname),
```
upsert and on_conflict does not work
```
In [49]: result
Out[49]:
[{'country': '',
'guid': '122.225.227.21:80',
'head': '',
'... | {
"url": "https://api.github.com/repos/coleifer/peewee/issues/753/reactions",
"total_count": 0,
"+1": 0,
"-1": 0,
"laugh": 0,
"hooray": 0,
"confused": 0,
"heart": 0,
"rocket": 0,
"eyes": 0
} | https://api.github.com/repos/coleifer/peewee/issues/753/timeline | null | completed | null | null |
https://api.github.com/repos/coleifer/peewee/issues/752 | https://api.github.com/repos/coleifer/peewee | https://api.github.com/repos/coleifer/peewee/issues/752/labels{/name} | https://api.github.com/repos/coleifer/peewee/issues/752/comments | https://api.github.com/repos/coleifer/peewee/issues/752/events | https://github.com/coleifer/peewee/issues/752 | 116,169,293 | MDU6SXNzdWUxMTYxNjkyOTM= | 752 | How to design models in a ManyToManyField with a through_model | {
"login": "bcthomas",
"id": 86821,
"node_id": "MDQ6VXNlcjg2ODIx",
"avatar_url": "https://avatars.githubusercontent.com/u/86821?v=4",
"gravatar_id": "",
"url": "https://api.github.com/users/bcthomas",
"html_url": "https://github.com/bcthomas",
"followers_url": "https://api.github.com/users/bcthomas/foll... | [] | closed | false | null | [] | null | [
"You can use the `Proxy` object [see circular foreign keys](http://docs.peewee-orm.com/en/latest/peewee/models.html#circular-foreign-key-dependencies).\n\n``` python\nclass User(BaseModel):\n email = CharField(unique=True)\n\nProjectUserProxy = Proxy()\n\nclass Project(BaseModel):\n name = CharField(null=True)\n ... | 2015-11-10T18:15:59 | 2015-11-10T21:18:36 | 2015-11-10T21:18:36 | NONE | null | (new to peewee/python orms, coming from a "legacy" rails database)
I'm trying to model 2 elements in a many to many relationship, using a join table;
I have a User and a Project, and a join table called ProjectUser.
I've tried this, and I'm getting circular dependency errors because as is ProjectUser is not defined i... | {
"url": "https://api.github.com/repos/coleifer/peewee/issues/752/reactions",
"total_count": 0,
"+1": 0,
"-1": 0,
"laugh": 0,
"hooray": 0,
"confused": 0,
"heart": 0,
"rocket": 0,
"eyes": 0
} | https://api.github.com/repos/coleifer/peewee/issues/752/timeline | null | completed | null | null |
https://api.github.com/repos/coleifer/peewee/issues/751 | https://api.github.com/repos/coleifer/peewee | https://api.github.com/repos/coleifer/peewee/issues/751/labels{/name} | https://api.github.com/repos/coleifer/peewee/issues/751/comments | https://api.github.com/repos/coleifer/peewee/issues/751/events | https://github.com/coleifer/peewee/issues/751 | 116,153,562 | MDU6SXNzdWUxMTYxNTM1NjI= | 751 | AttributeError: 'bool' object has no attribute 'is_pk' in migrator | {
"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 | [
"The problem, not obvious at all, is that the `ticket` column is not found. I bet that if you change it to `ticket_id` you will be set:\n\n``` python\nfrom playhouse.migrate import MySQLMigrator, migrate\nmigrator = MySQLMigrator(db.database)\nmigrate(migrator.drop_not_null('emailsending', 'ticket_id'))\n```\n",
... | 2015-11-10T17:09:56 | 2015-11-15T19:44:31 | 2015-11-11T17:06:48 | NONE | null | I've successfully used the peewee migrator to add and drop columns, and today I wanted to use the migrator for the first time to drop a not null constrain on a column. In my model I added and set the null constraint to `True`:
```
ticket = ForeignKeyField(Ticket, related_name='sent_to_email_addresses', null=True)
```
... | {
"url": "https://api.github.com/repos/coleifer/peewee/issues/751/reactions",
"total_count": 0,
"+1": 0,
"-1": 0,
"laugh": 0,
"hooray": 0,
"confused": 0,
"heart": 0,
"rocket": 0,
"eyes": 0
} | https://api.github.com/repos/coleifer/peewee/issues/751/timeline | null | completed | null | null |
https://api.github.com/repos/coleifer/peewee/issues/750 | https://api.github.com/repos/coleifer/peewee | https://api.github.com/repos/coleifer/peewee/issues/750/labels{/name} | https://api.github.com/repos/coleifer/peewee/issues/750/comments | https://api.github.com/repos/coleifer/peewee/issues/750/events | https://github.com/coleifer/peewee/pull/750 | 115,536,711 | MDExOlB1bGxSZXF1ZXN0NDk5NzI2NDg= | 750 | Add connection management documentation for Falcon | {
"login": "arpankapoor",
"id": 3677810,
"node_id": "MDQ6VXNlcjM2Nzc4MTA=",
"avatar_url": "https://avatars.githubusercontent.com/u/3677810?v=4",
"gravatar_id": "",
"url": "https://api.github.com/users/arpankapoor",
"html_url": "https://github.com/arpankapoor",
"followers_url": "https://api.github.com/us... | [] | closed | false | null | [] | null | [
"Does the response middleware method not need to return anything? (Or the request middleware for that matter)\n",
"Nothing needs to be returned.\n\nThe middleware methods may modify the request and response objects passed in as parameters. These objects are routed to the appropriate responder method by Falcon.\n\... | 2015-11-06T16:16:48 | 2019-03-28T14:21:35 | 2015-11-06T20:27:49 | CONTRIBUTOR | null | Middleware components in Falcon framework (http://falconframework.org/)
can be used to add database connection management.
| {
"url": "https://api.github.com/repos/coleifer/peewee/issues/750/reactions",
"total_count": 0,
"+1": 0,
"-1": 0,
"laugh": 0,
"hooray": 0,
"confused": 0,
"heart": 0,
"rocket": 0,
"eyes": 0
} | https://api.github.com/repos/coleifer/peewee/issues/750/timeline | null | null | false | {
"url": "https://api.github.com/repos/coleifer/peewee/pulls/750",
"html_url": "https://github.com/coleifer/peewee/pull/750",
"diff_url": "https://github.com/coleifer/peewee/pull/750.diff",
"patch_url": "https://github.com/coleifer/peewee/pull/750.patch",
"merged_at": "2015-11-06T20:27:49"
} |
https://api.github.com/repos/coleifer/peewee/issues/749 | https://api.github.com/repos/coleifer/peewee | https://api.github.com/repos/coleifer/peewee/issues/749/labels{/name} | https://api.github.com/repos/coleifer/peewee/issues/749/comments | https://api.github.com/repos/coleifer/peewee/issues/749/events | https://github.com/coleifer/peewee/issues/749 | 115,534,412 | MDU6SXNzdWUxMTU1MzQ0MTI= | 749 | Filter does not behave like where with NULL ForeignKey | {
"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 | [
"You need to use `.filter(one__is=None)`\n",
"To be more specific, the filter API has been deprecated since 2.0.0. Why are you using it?\n",
"> You need to use .filter(one__is=None)\n\nAh, ok, thanks.\n\n> To be more specific, the filter API has been deprecated since 2.0.0. Why are you using it?\n- Easier to bu... | 2015-11-06T16:09:06 | 2016-02-02T10:29:05 | 2015-11-06T16:20:31 | CONTRIBUTOR | null | ``` python
import peewee
db = peewee.SqliteDatabase(':memory:')
class One(peewee.Model):
name = peewee.CharField()
class Meta:
database = db
class Two(peewee.Model):
name = peewee.CharField()
one = peewee.ForeignKeyField(One, null=True)
class Meta:
database = db
if __name... | {
"url": "https://api.github.com/repos/coleifer/peewee/issues/749/reactions",
"total_count": 0,
"+1": 0,
"-1": 0,
"laugh": 0,
"hooray": 0,
"confused": 0,
"heart": 0,
"rocket": 0,
"eyes": 0
} | https://api.github.com/repos/coleifer/peewee/issues/749/timeline | null | completed | null | null |
https://api.github.com/repos/coleifer/peewee/issues/748 | https://api.github.com/repos/coleifer/peewee | https://api.github.com/repos/coleifer/peewee/issues/748/labels{/name} | https://api.github.com/repos/coleifer/peewee/issues/748/comments | https://api.github.com/repos/coleifer/peewee/issues/748/events | https://github.com/coleifer/peewee/issues/748 | 115,128,919 | MDU6SXNzdWUxMTUxMjg5MTk= | 748 | OperationalError when deferring foreign keys | {
"login": "notdaniel",
"id": 3722519,
"node_id": "MDQ6VXNlcjM3MjI1MTk=",
"avatar_url": "https://avatars.githubusercontent.com/u/3722519?v=4",
"gravatar_id": "",
"url": "https://api.github.com/users/notdaniel",
"html_url": "https://github.com/notdaniel",
"followers_url": "https://api.github.com/users/no... | [] | closed | false | null | [] | null | [
"What database are you using?\n",
"Ha! I was using SQLite (which I usually use when starting something out) but after your response, I just tried it with Postgres and it worked fine. Is this a SQLite limitation, then? Either way, this is helpful since I was going to move this to Postgres eventually anyway.\n",
... | 2015-11-04T19:28:13 | 2015-11-06T04:19:03 | 2015-11-06T04:18:58 | NONE | null | I've been trying to use the Proxy() trick, followed by its initialization, then table creation, and finally foreign key creation, exactly as shown in the [Circular foreign key dependencies](https://peewee.readthedocs.org/en/latest/peewee/models.html?highlight=defer#circular-foreign-key-dependencies) documentation. Howe... | {
"url": "https://api.github.com/repos/coleifer/peewee/issues/748/reactions",
"total_count": 0,
"+1": 0,
"-1": 0,
"laugh": 0,
"hooray": 0,
"confused": 0,
"heart": 0,
"rocket": 0,
"eyes": 0
} | https://api.github.com/repos/coleifer/peewee/issues/748/timeline | null | completed | null | null |
https://api.github.com/repos/coleifer/peewee/issues/747 | https://api.github.com/repos/coleifer/peewee | https://api.github.com/repos/coleifer/peewee/issues/747/labels{/name} | https://api.github.com/repos/coleifer/peewee/issues/747/comments | https://api.github.com/repos/coleifer/peewee/issues/747/events | https://github.com/coleifer/peewee/issues/747 | 114,927,277 | MDU6SXNzdWUxMTQ5MjcyNzc= | 747 | `model_to_dict`'s `extra_attrs` only applies to the top-level object in the case where `recurse=True` | {
"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 | [
"Immediately after posting it I of course thought of the way a method or property lives on the class level, and how it might be difficult to reconcile to an instance's bound method. Hmm...\n",
"I'm seeing the difficulty here. If you pass in the unbound method, there's no (apparent) way to match a bound instance m... | 2015-11-03T22:42:02 | 2023-03-11T07:57:17 | 2015-11-05T04:14:31 | CONTRIBUTOR | null | Might I suggest a couple of solutions:
1) Have `extra_attrs` actually take in the attributes as the list members -- so instead of:
```
model_to_dict(x, extra_attrs=['method_bar', 'property_foo']
```
You would see:
```
model_to_dict(x, extra_attrs=[ClassX.method_bar, ClassX.property_foo])
```
This interface is more... | {
"url": "https://api.github.com/repos/coleifer/peewee/issues/747/reactions",
"total_count": 0,
"+1": 0,
"-1": 0,
"laugh": 0,
"hooray": 0,
"confused": 0,
"heart": 0,
"rocket": 0,
"eyes": 0
} | https://api.github.com/repos/coleifer/peewee/issues/747/timeline | null | completed | null | null |
https://api.github.com/repos/coleifer/peewee/issues/746 | https://api.github.com/repos/coleifer/peewee | https://api.github.com/repos/coleifer/peewee/issues/746/labels{/name} | https://api.github.com/repos/coleifer/peewee/issues/746/comments | https://api.github.com/repos/coleifer/peewee/issues/746/events | https://github.com/coleifer/peewee/issues/746 | 114,903,698 | MDU6SXNzdWUxMTQ5MDM2OTg= | 746 | Support declaring non-serializable fields on a Model | {
"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 | [
"I am going to pass on this particular API or implementation. The `model_to_dict` is a simple but flexible piece of code, but it mostly stands on its own. Introducing APIs at the model level seems like too tight a coupling.\n"
] | 2015-11-03T20:36:34 | 2015-11-05T04:13:29 | 2015-11-05T04:13:29 | CONTRIBUTOR | null | Hey,
Can you help me think of a way to blacklist certain model fields from being serialized in `model_to_dict`? I can see something like the `Meta` class having a field you can populate with a list of fields, and `model_to_dict` respecting that. The issue I'm running into is that because of the recursive nature of `mo... | {
"url": "https://api.github.com/repos/coleifer/peewee/issues/746/reactions",
"total_count": 0,
"+1": 0,
"-1": 0,
"laugh": 0,
"hooray": 0,
"confused": 0,
"heart": 0,
"rocket": 0,
"eyes": 0
} | https://api.github.com/repos/coleifer/peewee/issues/746/timeline | null | completed | null | null |
https://api.github.com/repos/coleifer/peewee/issues/745 | https://api.github.com/repos/coleifer/peewee | https://api.github.com/repos/coleifer/peewee/issues/745/labels{/name} | https://api.github.com/repos/coleifer/peewee/issues/745/comments | https://api.github.com/repos/coleifer/peewee/issues/745/events | https://github.com/coleifer/peewee/issues/745 | 114,647,678 | MDU6SXNzdWUxMTQ2NDc2Nzg= | 745 | Error when using JSONField() with case() | {
"login": "scribu",
"id": 225715,
"node_id": "MDQ6VXNlcjIyNTcxNQ==",
"avatar_url": "https://avatars.githubusercontent.com/u/225715?v=4",
"gravatar_id": "",
"url": "https://api.github.com/users/scribu",
"html_url": "https://github.com/scribu",
"followers_url": "https://api.github.com/users/scribu/follow... | [] | closed | false | null | [] | null | [
"Postgres is actually right in this case, and this isn't a bug in peewee. It looks like the value returned by the attribute lookup is not numeric. You can cast it, but you have to cast both return values it seems.\n\nOne way that seemed to work was:\n\n``` sql\nSELECT \nCASE \"t1\".\"price_info\"->>'currency' \nWHE... | 2015-11-02T17:51:51 | 2015-11-03T15:09:43 | 2015-11-02T20:55:01 | NONE | null | Here's my simplified model:
``` python
from peewee import *
from playhouse.postgres_ext import *
db = PostgresqlExtDatabase('mobster')
class Posting(BaseModel):
class Meta:
database = db
price_info = JSONField()
```
And here's a query I'm trying to make:
``` python
from playhouse.shortcuts import ... | {
"url": "https://api.github.com/repos/coleifer/peewee/issues/745/reactions",
"total_count": 0,
"+1": 0,
"-1": 0,
"laugh": 0,
"hooray": 0,
"confused": 0,
"heart": 0,
"rocket": 0,
"eyes": 0
} | https://api.github.com/repos/coleifer/peewee/issues/745/timeline | null | completed | null | null |
https://api.github.com/repos/coleifer/peewee/issues/744 | https://api.github.com/repos/coleifer/peewee | https://api.github.com/repos/coleifer/peewee/issues/744/labels{/name} | https://api.github.com/repos/coleifer/peewee/issues/744/comments | https://api.github.com/repos/coleifer/peewee/issues/744/events | https://github.com/coleifer/peewee/pull/744 | 114,598,358 | MDExOlB1bGxSZXF1ZXN0NDk0MzM2ODc= | 744 | readme: typo on irc.freenode hostname | {
"login": "franciscod",
"id": 726447,
"node_id": "MDQ6VXNlcjcyNjQ0Nw==",
"avatar_url": "https://avatars.githubusercontent.com/u/726447?v=4",
"gravatar_id": "",
"url": "https://api.github.com/users/franciscod",
"html_url": "https://github.com/franciscod",
"followers_url": "https://api.github.com/users/f... | [] | closed | false | null | [] | null | [
"Thank you!\n",
"np! :)\n"
] | 2015-11-02T13:55:48 | 2015-11-14T05:12:42 | 2015-11-02T14:51:03 | CONTRIBUTOR | null | {
"url": "https://api.github.com/repos/coleifer/peewee/issues/744/reactions",
"total_count": 0,
"+1": 0,
"-1": 0,
"laugh": 0,
"hooray": 0,
"confused": 0,
"heart": 0,
"rocket": 0,
"eyes": 0
} | https://api.github.com/repos/coleifer/peewee/issues/744/timeline | null | null | false | {
"url": "https://api.github.com/repos/coleifer/peewee/pulls/744",
"html_url": "https://github.com/coleifer/peewee/pull/744",
"diff_url": "https://github.com/coleifer/peewee/pull/744.diff",
"patch_url": "https://github.com/coleifer/peewee/pull/744.patch",
"merged_at": "2015-11-02T14:51:03"
} | |
https://api.github.com/repos/coleifer/peewee/issues/743 | https://api.github.com/repos/coleifer/peewee | https://api.github.com/repos/coleifer/peewee/issues/743/labels{/name} | https://api.github.com/repos/coleifer/peewee/issues/743/comments | https://api.github.com/repos/coleifer/peewee/issues/743/events | https://github.com/coleifer/peewee/pull/743 | 114,488,094 | MDExOlB1bGxSZXF1ZXN0NDkzNzg4OTE= | 743 | Foreign key to the composite primary key | {
"login": "Maillol",
"id": 2394534,
"node_id": "MDQ6VXNlcjIzOTQ1MzQ=",
"avatar_url": "https://avatars.githubusercontent.com/u/2394534?v=4",
"gravatar_id": "",
"url": "https://api.github.com/users/Maillol",
"html_url": "https://github.com/Maillol",
"followers_url": "https://api.github.com/users/Maillol/... | [] | closed | false | null | [] | null | [
"I've waffled about this some. I dislike implicitly creating the columns. Additionally, when querying, things seem like they might get a little weird, e.g.:\n\n``` python\nclass Person(Model):\n first_name = CharField()\n last_name = CharField()\n class Meta:\n primary_key = CompositeKey('first_name... | 2015-11-01T19:38:36 | 2015-11-07T05:34:39 | 2015-11-07T05:34:05 | NONE | null | Create unit test in order to reproduce bug when we create foreign key to the
composite primary key.
| {
"url": "https://api.github.com/repos/coleifer/peewee/issues/743/reactions",
"total_count": 0,
"+1": 0,
"-1": 0,
"laugh": 0,
"hooray": 0,
"confused": 0,
"heart": 0,
"rocket": 0,
"eyes": 0
} | https://api.github.com/repos/coleifer/peewee/issues/743/timeline | null | null | false | {
"url": "https://api.github.com/repos/coleifer/peewee/pulls/743",
"html_url": "https://github.com/coleifer/peewee/pull/743",
"diff_url": "https://github.com/coleifer/peewee/pull/743.diff",
"patch_url": "https://github.com/coleifer/peewee/pull/743.patch",
"merged_at": null
} |
https://api.github.com/repos/coleifer/peewee/issues/742 | https://api.github.com/repos/coleifer/peewee | https://api.github.com/repos/coleifer/peewee/issues/742/labels{/name} | https://api.github.com/repos/coleifer/peewee/issues/742/comments | https://api.github.com/repos/coleifer/peewee/issues/742/events | https://github.com/coleifer/peewee/pull/742 | 114,443,759 | MDExOlB1bGxSZXF1ZXN0NDkzNjMxODg= | 742 | Remove extraneous replacement field | {
"login": "bakemecookies",
"id": 2167033,
"node_id": "MDQ6VXNlcjIxNjcwMzM=",
"avatar_url": "https://avatars.githubusercontent.com/u/2167033?v=4",
"gravatar_id": "",
"url": "https://api.github.com/users/bakemecookies",
"html_url": "https://github.com/bakemecookies",
"followers_url": "https://api.github.... | [] | closed | false | null | [] | null | [] | 2015-11-01T01:18:26 | 2015-11-01T02:16:10 | 2015-11-01T02:16:10 | CONTRIBUTOR | null | There is a mismatch between the number of arguments (two) and the number of fields (three) and the sample output implies that there is an unnecessary replacement field in the format string.
| {
"url": "https://api.github.com/repos/coleifer/peewee/issues/742/reactions",
"total_count": 0,
"+1": 0,
"-1": 0,
"laugh": 0,
"hooray": 0,
"confused": 0,
"heart": 0,
"rocket": 0,
"eyes": 0
} | https://api.github.com/repos/coleifer/peewee/issues/742/timeline | null | null | false | {
"url": "https://api.github.com/repos/coleifer/peewee/pulls/742",
"html_url": "https://github.com/coleifer/peewee/pull/742",
"diff_url": "https://github.com/coleifer/peewee/pull/742.diff",
"patch_url": "https://github.com/coleifer/peewee/pull/742.patch",
"merged_at": "2015-11-01T02:16:10"
} |
https://api.github.com/repos/coleifer/peewee/issues/741 | https://api.github.com/repos/coleifer/peewee | https://api.github.com/repos/coleifer/peewee/issues/741/labels{/name} | https://api.github.com/repos/coleifer/peewee/issues/741/comments | https://api.github.com/repos/coleifer/peewee/issues/741/events | https://github.com/coleifer/peewee/issues/741 | 113,862,248 | MDU6SXNzdWUxMTM4NjIyNDg= | 741 | Issue with `test_database()` helper | {
"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 | [
"The code indicates that `create_tables=True`:\n\n``` python\nclass test_database(object):\n def __init__(self, db, models, create_tables=True, drop_tables=True,\n fail_silently=False):\n self.db = db\n self.models = models\n self.create_tables = create_tables\n self.d... | 2015-10-28T16:31:40 | 2015-10-29T00:23:19 | 2015-10-29T00:23:19 | OWNER | null | VIA: http://stackoverflow.com/a/33346767/254346
When using `test_database` I encountered problems with `test_db` not being initialized:
```
nose.proxy.Exception: Error, database not properly initialized before opening connection
-------------------- >> begin captured logging << --------------------
peewee: DEBUG: ('S... | {
"url": "https://api.github.com/repos/coleifer/peewee/issues/741/reactions",
"total_count": 0,
"+1": 0,
"-1": 0,
"laugh": 0,
"hooray": 0,
"confused": 0,
"heart": 0,
"rocket": 0,
"eyes": 0
} | https://api.github.com/repos/coleifer/peewee/issues/741/timeline | null | completed | null | null |
https://api.github.com/repos/coleifer/peewee/issues/740 | https://api.github.com/repos/coleifer/peewee | https://api.github.com/repos/coleifer/peewee/issues/740/labels{/name} | https://api.github.com/repos/coleifer/peewee/issues/740/comments | https://api.github.com/repos/coleifer/peewee/issues/740/events | https://github.com/coleifer/peewee/issues/740 | 113,853,207 | MDU6SXNzdWUxMTM4NTMyMDc= | 740 | Foreign key collision regarding related_name | {
"login": "dzeban",
"id": 230409,
"node_id": "MDQ6VXNlcjIzMDQwOQ==",
"avatar_url": "https://avatars.githubusercontent.com/u/230409?v=4",
"gravatar_id": "",
"url": "https://api.github.com/users/dzeban",
"html_url": "https://github.com/dzeban",
"followers_url": "https://api.github.com/users/dzeban/follow... | [] | closed | false | null | [] | null | [
"I wouldn't consider this an error per se, just a quirk of the way peewee does backref validation. If you want to suppress the error, just declare your model with `validate_backrefs = False`:\n\n``` python\nclass Entry(BaseModel):\n class Meta:\n validate_backrefs = False\n```\n"
] | 2015-10-28T15:50:52 | 2015-10-29T00:19:41 | 2015-10-29T00:19:41 | NONE | null | I have 2 tables
``` sql
CREATE TABLE "Feed"
(
id serial NOT NULL,
url text,
CONSTRAINT "Feed_pkey" PRIMARY KEY (id)
)
CREATE TABLE "Entry"
(
id serial NOT NULL,
link text,
feed_id integer,
CONSTRAINT "Entry_pkey" PRIMARY KEY (id),
CONSTRAINT "Entry_feed_id_fkey" FOREIGN KEY (feed_id)
REFERENCES "... | {
"url": "https://api.github.com/repos/coleifer/peewee/issues/740/reactions",
"total_count": 0,
"+1": 0,
"-1": 0,
"laugh": 0,
"hooray": 0,
"confused": 0,
"heart": 0,
"rocket": 0,
"eyes": 0
} | https://api.github.com/repos/coleifer/peewee/issues/740/timeline | null | completed | null | null |
https://api.github.com/repos/coleifer/peewee/issues/739 | https://api.github.com/repos/coleifer/peewee | https://api.github.com/repos/coleifer/peewee/issues/739/labels{/name} | https://api.github.com/repos/coleifer/peewee/issues/739/comments | https://api.github.com/repos/coleifer/peewee/issues/739/events | https://github.com/coleifer/peewee/issues/739 | 113,455,460 | MDU6SXNzdWUxMTM0NTU0NjA= | 739 | Ability to verify inputs based on field type | {
"login": "kostasdizas",
"id": 254960,
"node_id": "MDQ6VXNlcjI1NDk2MA==",
"avatar_url": "https://avatars.githubusercontent.com/u/254960?v=4",
"gravatar_id": "",
"url": "https://api.github.com/users/kostasdizas",
"html_url": "https://github.com/kostasdizas",
"followers_url": "https://api.github.com/user... | [] | closed | false | null | [] | null | [
"Peewee does not do any validation. The field's value is converted (if necessary) when the field is used in a query. When reading values from a cursor, the value is converted to Python when the model object is created.\n\nI suppose you could add validation of some kind to your fields, but that would exist outside o... | 2015-10-26T21:30:16 | 2015-10-27T00:20:57 | 2015-10-27T00:20:57 | NONE | null | Hello,
is it possible to verify whether a value is appropriate for a specific field? Is there a comparison/verification function? Is the equivalent primitive type stored somewhere in the field type (after a very quick search I didn't find one) in order to compare it with the type of the input value?
What's the best wa... | {
"url": "https://api.github.com/repos/coleifer/peewee/issues/739/reactions",
"total_count": 0,
"+1": 0,
"-1": 0,
"laugh": 0,
"hooray": 0,
"confused": 0,
"heart": 0,
"rocket": 0,
"eyes": 0
} | https://api.github.com/repos/coleifer/peewee/issues/739/timeline | null | completed | null | null |
https://api.github.com/repos/coleifer/peewee/issues/738 | https://api.github.com/repos/coleifer/peewee | https://api.github.com/repos/coleifer/peewee/issues/738/labels{/name} | https://api.github.com/repos/coleifer/peewee/issues/738/comments | https://api.github.com/repos/coleifer/peewee/issues/738/events | https://github.com/coleifer/peewee/issues/738 | 113,148,177 | MDU6SXNzdWUxMTMxNDgxNzc= | 738 | create_tables() fails | {
"login": "timeyyy",
"id": 6135075,
"node_id": "MDQ6VXNlcjYxMzUwNzU=",
"avatar_url": "https://avatars.githubusercontent.com/u/6135075?v=4",
"gravatar_id": "",
"url": "https://api.github.com/users/timeyyy",
"html_url": "https://github.com/timeyyy",
"followers_url": "https://api.github.com/users/timeyyy/... | [] | closed | false | null | [] | null | [
"You can pass `safe=True` and Peewee will not try to create it if it already exists.\n"
] | 2015-10-24T09:48:51 | 2015-10-25T18:20:40 | 2015-10-25T18:20:40 | NONE | null | on a sqlitedatabase, using create_tables() results in a
peewee.OperationalError, table xyz already exists,
i am able to create the tables if i use create_tables()
| {
"url": "https://api.github.com/repos/coleifer/peewee/issues/738/reactions",
"total_count": 0,
"+1": 0,
"-1": 0,
"laugh": 0,
"hooray": 0,
"confused": 0,
"heart": 0,
"rocket": 0,
"eyes": 0
} | https://api.github.com/repos/coleifer/peewee/issues/738/timeline | null | completed | null | null |
https://api.github.com/repos/coleifer/peewee/issues/737 | https://api.github.com/repos/coleifer/peewee | https://api.github.com/repos/coleifer/peewee/issues/737/labels{/name} | https://api.github.com/repos/coleifer/peewee/issues/737/comments | https://api.github.com/repos/coleifer/peewee/issues/737/events | https://github.com/coleifer/peewee/issues/737 | 113,062,499 | MDU6SXNzdWUxMTMwNjI0OTk= | 737 | peewee.IntegrityError: (1452, 'Cannot add or update a child row: a foreign key constraint fails (test_peewee_tree.node, CONSTRAINT node_ibfk_1 FOREIGN KEY (parent_id) REFERENCES node (id))') db = MySQLDatabase | {
"login": "slukin1",
"id": 3098561,
"node_id": "MDQ6VXNlcjMwOTg1NjE=",
"avatar_url": "https://avatars.githubusercontent.com/u/3098561?v=4",
"gravatar_id": "",
"url": "https://api.github.com/users/slukin1",
"html_url": "https://github.com/slukin1",
"followers_url": "https://api.github.com/users/slukin1/... | [] | closed | false | null | [] | null | [
"Uhh, did you make the `parent` foreign key nullable? This looks like a data integrity error rather than peewee.\n",
"Yes, parent foreign ey made nullable:\n\n``` python\nmysql_db = MySQLDatabase('test_peewee_tree')\nclass BaseModel(Model):\nclass Meta:\n database = mysql_db\nclass Node(BaseModel):\n la... | 2015-10-23T17:18:00 | 2015-10-26T07:06:32 | 2015-10-26T07:06:32 | NONE | null | peewee.IntegrityError: (1452, 'Cannot add or update a child row: a foreign key constraint fails (test_peewee_tree.node, CONSTRAINT node_ibfk_1 FOREIGN KEY (parent_id) REFERENCES node (id))')
db = MySQLDatabase
| {
"url": "https://api.github.com/repos/coleifer/peewee/issues/737/reactions",
"total_count": 0,
"+1": 0,
"-1": 0,
"laugh": 0,
"hooray": 0,
"confused": 0,
"heart": 0,
"rocket": 0,
"eyes": 0
} | https://api.github.com/repos/coleifer/peewee/issues/737/timeline | null | completed | null | null |
https://api.github.com/repos/coleifer/peewee/issues/736 | https://api.github.com/repos/coleifer/peewee | https://api.github.com/repos/coleifer/peewee/issues/736/labels{/name} | https://api.github.com/repos/coleifer/peewee/issues/736/comments | https://api.github.com/repos/coleifer/peewee/issues/736/events | https://github.com/coleifer/peewee/issues/736 | 112,969,256 | MDU6SXNzdWUxMTI5NjkyNTY= | 736 | psycopg2.InternalError when skipping duplicate records | {
"login": "dzeban",
"id": 230409,
"node_id": "MDQ6VXNlcjIzMDQwOQ==",
"avatar_url": "https://avatars.githubusercontent.com/u/230409?v=4",
"gravatar_id": "",
"url": "https://api.github.com/users/dzeban",
"html_url": "https://github.com/dzeban",
"followers_url": "https://api.github.com/users/dzeban/follow... | [] | closed | false | null | [] | null | [
"You need to recover, as your connection is in a bad state after the integrity error. One way is to write:\n\n``` python\n try:\n with database.atomic():\n Feed.create(**d)\n except peewee.IntegrityError:\n print('Skipping duplicate')\n```\n\nWrapping it this way will roll back the tr... | 2015-10-23T07:43:10 | 2015-10-25T14:40:30 | 2015-10-25T14:40:30 | NONE | null | Fedora 22
Python 3.4.2
Peewee version 2.6.4
PostgreSQL 9.4
I have a simple table with pwiz generated model
``` python
from peewee import *
database = PostgresqlDatabase('ribbo', **{'password': 'secret', 'host': 'localhost', 'user': 'ribbo'})
class UnknownField(object):
pass
class BaseModel(Model):
class Me... | {
"url": "https://api.github.com/repos/coleifer/peewee/issues/736/reactions",
"total_count": 0,
"+1": 0,
"-1": 0,
"laugh": 0,
"hooray": 0,
"confused": 0,
"heart": 0,
"rocket": 0,
"eyes": 0
} | https://api.github.com/repos/coleifer/peewee/issues/736/timeline | null | completed | null | null |
https://api.github.com/repos/coleifer/peewee/issues/735 | https://api.github.com/repos/coleifer/peewee | https://api.github.com/repos/coleifer/peewee/issues/735/labels{/name} | https://api.github.com/repos/coleifer/peewee/issues/735/comments | https://api.github.com/repos/coleifer/peewee/issues/735/events | https://github.com/coleifer/peewee/pull/735 | 112,678,881 | MDExOlB1bGxSZXF1ZXN0NDgzODc3Nzc= | 735 | adding a .collate_nocase() query feature | {
"login": "aerickson",
"id": 47889,
"node_id": "MDQ6VXNlcjQ3ODg5",
"avatar_url": "https://avatars.githubusercontent.com/u/47889?v=4",
"gravatar_id": "",
"url": "https://api.github.com/users/aerickson",
"html_url": "https://github.com/aerickson",
"followers_url": "https://api.github.com/users/aerickson/... | [] | closed | false | null | [] | null | [
"I guess this is unnecessary and only works on Sqlite.\n\nfn.Lower() seems to work fine.\n\n```\norder_by(fn.Lower(Object.name))\n```\n",
"Yeah you can also do:\n\n.order_by(Clause(Model.field, SQL(' collate nocase')))\n"
] | 2015-10-21T21:06:31 | 2015-10-21T21:55:58 | 2015-10-21T21:55:58 | NONE | null | Please let me know if you'd like me to make test and/or documentation changes.
Usage example:
```
order_by(Object.name).collate_nocase()
```
| {
"url": "https://api.github.com/repos/coleifer/peewee/issues/735/reactions",
"total_count": 0,
"+1": 0,
"-1": 0,
"laugh": 0,
"hooray": 0,
"confused": 0,
"heart": 0,
"rocket": 0,
"eyes": 0
} | https://api.github.com/repos/coleifer/peewee/issues/735/timeline | null | null | false | {
"url": "https://api.github.com/repos/coleifer/peewee/pulls/735",
"html_url": "https://github.com/coleifer/peewee/pull/735",
"diff_url": "https://github.com/coleifer/peewee/pull/735.diff",
"patch_url": "https://github.com/coleifer/peewee/pull/735.patch",
"merged_at": null
} |
https://api.github.com/repos/coleifer/peewee/issues/734 | https://api.github.com/repos/coleifer/peewee | https://api.github.com/repos/coleifer/peewee/issues/734/labels{/name} | https://api.github.com/repos/coleifer/peewee/issues/734/comments | https://api.github.com/repos/coleifer/peewee/issues/734/events | https://github.com/coleifer/peewee/pull/734 | 112,504,987 | MDExOlB1bGxSZXF1ZXN0NDgyODQ0NTA= | 734 | Enable automated testing with Python 3.5 | {
"login": "felixonmars",
"id": 1006477,
"node_id": "MDQ6VXNlcjEwMDY0Nzc=",
"avatar_url": "https://avatars.githubusercontent.com/u/1006477?v=4",
"gravatar_id": "",
"url": "https://api.github.com/users/felixonmars",
"html_url": "https://github.com/felixonmars",
"followers_url": "https://api.github.com/us... | [] | closed | false | null | [] | null | [
"Thanks!\n"
] | 2015-10-21T03:28:04 | 2015-10-21T13:28:17 | 2015-10-21T13:28:05 | CONTRIBUTOR | null | {
"url": "https://api.github.com/repos/coleifer/peewee/issues/734/reactions",
"total_count": 0,
"+1": 0,
"-1": 0,
"laugh": 0,
"hooray": 0,
"confused": 0,
"heart": 0,
"rocket": 0,
"eyes": 0
} | https://api.github.com/repos/coleifer/peewee/issues/734/timeline | null | null | false | {
"url": "https://api.github.com/repos/coleifer/peewee/pulls/734",
"html_url": "https://github.com/coleifer/peewee/pull/734",
"diff_url": "https://github.com/coleifer/peewee/pull/734.diff",
"patch_url": "https://github.com/coleifer/peewee/pull/734.patch",
"merged_at": "2015-10-21T13:28:05"
} | |
https://api.github.com/repos/coleifer/peewee/issues/733 | https://api.github.com/repos/coleifer/peewee | https://api.github.com/repos/coleifer/peewee/issues/733/labels{/name} | https://api.github.com/repos/coleifer/peewee/issues/733/comments | https://api.github.com/repos/coleifer/peewee/issues/733/events | https://github.com/coleifer/peewee/issues/733 | 112,467,864 | MDU6SXNzdWUxMTI0Njc4NjQ= | 733 | Problem with alias when joining subquery | {
"login": "srolija",
"id": 307150,
"node_id": "MDQ6VXNlcjMwNzE1MA==",
"avatar_url": "https://avatars.githubusercontent.com/u/307150?v=4",
"gravatar_id": "",
"url": "https://api.github.com/users/srolija",
"html_url": "https://github.com/srolija",
"followers_url": "https://api.github.com/users/srolija/fo... | [] | closed | false | null | [] | null | [
"What exactly is your query supposed to be calculating? It seems odd that you've got a `group_by(Scan.code)` but no aggregation. Additionally, you're explicitly selecting all the columns from `Scan` in your subquery. Typically when grouping you select only the column(s) that you want to group by.\n\nTo get tickets ... | 2015-10-20T21:50:13 | 2015-10-23T21:49:33 | 2015-10-21T01:41:50 | NONE | null | Maybe I assume wrong that following sould work, but there seems to be a issue with alias when I join subquery with table. Since entire subquery will be inserted in SELECT and JOIN clause but should be only in JOIN. Following is simplified version that includes most basic form where I could show problem.
```
from peewe... | {
"url": "https://api.github.com/repos/coleifer/peewee/issues/733/reactions",
"total_count": 0,
"+1": 0,
"-1": 0,
"laugh": 0,
"hooray": 0,
"confused": 0,
"heart": 0,
"rocket": 0,
"eyes": 0
} | https://api.github.com/repos/coleifer/peewee/issues/733/timeline | null | completed | null | null |
https://api.github.com/repos/coleifer/peewee/issues/732 | https://api.github.com/repos/coleifer/peewee | https://api.github.com/repos/coleifer/peewee/issues/732/labels{/name} | https://api.github.com/repos/coleifer/peewee/issues/732/comments | https://api.github.com/repos/coleifer/peewee/issues/732/events | https://github.com/coleifer/peewee/pull/732 | 112,137,382 | MDExOlB1bGxSZXF1ZXN0NDgwNjY4NjU= | 732 | Fix typo | {
"login": "bakemecookies",
"id": 2167033,
"node_id": "MDQ6VXNlcjIxNjcwMzM=",
"avatar_url": "https://avatars.githubusercontent.com/u/2167033?v=4",
"gravatar_id": "",
"url": "https://api.github.com/users/bakemecookies",
"html_url": "https://github.com/bakemecookies",
"followers_url": "https://api.github.... | [] | closed | false | null | [] | null | [
"Thanks!\n"
] | 2015-10-19T12:48:37 | 2015-10-21T01:21:40 | 2015-10-21T01:21:37 | CONTRIBUTOR | null | {
"url": "https://api.github.com/repos/coleifer/peewee/issues/732/reactions",
"total_count": 0,
"+1": 0,
"-1": 0,
"laugh": 0,
"hooray": 0,
"confused": 0,
"heart": 0,
"rocket": 0,
"eyes": 0
} | https://api.github.com/repos/coleifer/peewee/issues/732/timeline | null | null | false | {
"url": "https://api.github.com/repos/coleifer/peewee/pulls/732",
"html_url": "https://github.com/coleifer/peewee/pull/732",
"diff_url": "https://github.com/coleifer/peewee/pull/732.diff",
"patch_url": "https://github.com/coleifer/peewee/pull/732.patch",
"merged_at": "2015-10-21T01:21:37"
} | |
https://api.github.com/repos/coleifer/peewee/issues/731 | https://api.github.com/repos/coleifer/peewee | https://api.github.com/repos/coleifer/peewee/issues/731/labels{/name} | https://api.github.com/repos/coleifer/peewee/issues/731/comments | https://api.github.com/repos/coleifer/peewee/issues/731/events | https://github.com/coleifer/peewee/issues/731 | 112,040,899 | MDU6SXNzdWUxMTIwNDA4OTk= | 731 | [Support Request] Threadlocals and pooled connections | {
"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 | [
"> My question is once that thread completes the connection will be returned to the pool, since it's returned will it ever be picked up by any other thread? Or is it orphaned never to be used again?\n\nAre you calling `close()` from the thread, when it finishes?\n\nCan you share some code?\n",
"I'm not explicitly... | 2015-10-18T20:59:25 | 2015-10-18T21:53:16 | 2015-10-18T21:42:48 | CONTRIBUTOR | null | Hi Charles,
Not sure if this is the best place for support advice so feel free to direct me elsewhere.
I'm using `PooledPostgresqlExtDatabase` class with `threadlocals=True` and `max_connections=50`. We're hitting the max number of connections within ~24 hours and I think I've narrowed down the problem to some backgr... | {
"url": "https://api.github.com/repos/coleifer/peewee/issues/731/reactions",
"total_count": 0,
"+1": 0,
"-1": 0,
"laugh": 0,
"hooray": 0,
"confused": 0,
"heart": 0,
"rocket": 0,
"eyes": 0
} | https://api.github.com/repos/coleifer/peewee/issues/731/timeline | null | completed | null | null |
https://api.github.com/repos/coleifer/peewee/issues/730 | https://api.github.com/repos/coleifer/peewee | https://api.github.com/repos/coleifer/peewee/issues/730/labels{/name} | https://api.github.com/repos/coleifer/peewee/issues/730/comments | https://api.github.com/repos/coleifer/peewee/issues/730/events | https://github.com/coleifer/peewee/issues/730 | 112,024,895 | MDU6SXNzdWUxMTIwMjQ4OTU= | 730 | In meta ,how to set "order by synax" | {
"login": "rfyiamcool",
"id": 3785409,
"node_id": "MDQ6VXNlcjM3ODU0MDk=",
"avatar_url": "https://avatars.githubusercontent.com/u/3785409?v=4",
"gravatar_id": "",
"url": "https://api.github.com/users/rfyiamcool",
"html_url": "https://github.com/rfyiamcool",
"followers_url": "https://api.github.com/users... | [] | closed | false | null | [] | null | [
"Well, I think setting a default ordering is _always_ a bad idea, but since you asked:\n\n``` python\nclass Meta:\n order_by = ('location', '-position')\n```\n\n`order_by` is a tuple. The elements of the tuple are field names. If prefixed by a \"-\", then the field is ordered descending.\n",
"6969201d22676e4e7... | 2015-10-18T15:13:28 | 2015-10-18T16:52:41 | 2015-10-18T16:44:24 | NONE | null | I'm use Peewee ORM.
I have a class such as this:
``` python
class Sample(PMBaseModel):
id = peewee.PrimaryKeyField()
location = peewee.CharField(max_length=255)
position = peewee.IntegerField()
class Meta:
db_table = 'sample'
```
how i can use Meta Class for set default ordering and define O... | {
"url": "https://api.github.com/repos/coleifer/peewee/issues/730/reactions",
"total_count": 0,
"+1": 0,
"-1": 0,
"laugh": 0,
"hooray": 0,
"confused": 0,
"heart": 0,
"rocket": 0,
"eyes": 0
} | https://api.github.com/repos/coleifer/peewee/issues/730/timeline | null | completed | null | null |
https://api.github.com/repos/coleifer/peewee/issues/729 | https://api.github.com/repos/coleifer/peewee | https://api.github.com/repos/coleifer/peewee/issues/729/labels{/name} | https://api.github.com/repos/coleifer/peewee/issues/729/comments | https://api.github.com/repos/coleifer/peewee/issues/729/events | https://github.com/coleifer/peewee/issues/729 | 111,732,703 | MDU6SXNzdWUxMTE3MzI3MDM= | 729 | Exceeded maximum connections. | {
"login": "Darnok99",
"id": 341063,
"node_id": "MDQ6VXNlcjM0MTA2Mw==",
"avatar_url": "https://avatars.githubusercontent.com/u/341063?v=4",
"gravatar_id": "",
"url": "https://api.github.com/users/Darnok99",
"html_url": "https://github.com/Darnok99",
"followers_url": "https://api.github.com/users/Darnok9... | [] | closed | false | null | [] | null | [
"`self._connections` and `self._in_use` should be mutually exclusive, though, right? i.e., the pool of connections we are pulling the connection /from/ should not be in use. The second branch there, the `elif key in self._in_use:` is there to pre-emptively remove stale connections on close, i.e. if the conn was ver... | 2015-10-16T00:09:58 | 2015-10-16T03:46:59 | 2015-10-16T03:46:59 | NONE | null | We're using PooledPostgresqlExtDatabase in our application but it looks like it doesn't clean closed connections what leads to error from the subject. After digging a little in the PooledDatabase class i think the problem is when connection is stale. Then _connect invokes _close with parameter close_conn=True
``` pyth... | {
"url": "https://api.github.com/repos/coleifer/peewee/issues/729/reactions",
"total_count": 0,
"+1": 0,
"-1": 0,
"laugh": 0,
"hooray": 0,
"confused": 0,
"heart": 0,
"rocket": 0,
"eyes": 0
} | https://api.github.com/repos/coleifer/peewee/issues/729/timeline | null | completed | null | null |
https://api.github.com/repos/coleifer/peewee/issues/728 | https://api.github.com/repos/coleifer/peewee | https://api.github.com/repos/coleifer/peewee/issues/728/labels{/name} | https://api.github.com/repos/coleifer/peewee/issues/728/comments | https://api.github.com/repos/coleifer/peewee/issues/728/events | https://github.com/coleifer/peewee/issues/728 | 110,860,330 | MDU6SXNzdWUxMTA4NjAzMzA= | 728 | commit_on_success raises an OperationalError after db.begin() since 2.4.5 | {
"login": "felixonmars",
"id": 1006477,
"node_id": "MDQ6VXNlcjEwMDY0Nzc=",
"avatar_url": "https://avatars.githubusercontent.com/u/1006477?v=4",
"gravatar_id": "",
"url": "https://api.github.com/users/felixonmars",
"html_url": "https://github.com/felixonmars",
"followers_url": "https://api.github.com/us... | [] | closed | false | null | [] | null | [
"Your code is very strange. Why are you beginning a transaction explicitly? I don't think this is a bug.\n",
"This snippet is simplified from deepin-movie's source code, and as I am only porting the software to Arch, I am not very sure the original purpose of delayCommit either.\n\nLink to original code that havi... | 2015-10-11T14:42:05 | 2015-10-12T05:46:34 | 2015-10-12T02:48:51 | CONTRIBUTOR | null | The following code works with peewee 2.4.4 but fails with 2.4.5+. Replacing the commit_on_success part with a simple `db.commit()` won't fail, though. Any hints for the behavior change?
```
from peewee import SqliteDatabase
db = SqliteDatabase(":memory:")
db.set_autocommit(False)
db.connect()
db.begin()
db.set_autoco... | {
"url": "https://api.github.com/repos/coleifer/peewee/issues/728/reactions",
"total_count": 0,
"+1": 0,
"-1": 0,
"laugh": 0,
"hooray": 0,
"confused": 0,
"heart": 0,
"rocket": 0,
"eyes": 0
} | https://api.github.com/repos/coleifer/peewee/issues/728/timeline | null | completed | null | null |
https://api.github.com/repos/coleifer/peewee/issues/727 | https://api.github.com/repos/coleifer/peewee | https://api.github.com/repos/coleifer/peewee/issues/727/labels{/name} | https://api.github.com/repos/coleifer/peewee/issues/727/comments | https://api.github.com/repos/coleifer/peewee/issues/727/events | https://github.com/coleifer/peewee/issues/727 | 109,629,962 | MDU6SXNzdWUxMDk2Mjk5NjI= | 727 | MySQLDatabase missing __init__ function, cannot set commit_select when constructing connection | {
"login": "pushinginertia",
"id": 1499061,
"node_id": "MDQ6VXNlcjE0OTkwNjE=",
"avatar_url": "https://avatars.githubusercontent.com/u/1499061?v=4",
"gravatar_id": "",
"url": "https://api.github.com/users/pushinginertia",
"html_url": "https://github.com/pushinginertia",
"followers_url": "https://api.gith... | [] | closed | false | null | [] | null | [
"> It seems to me that defaulting to NOT committing on all select queries should be the default since select is a non-mutating operation\n\nI pushed a commit to remove it in master, which will be in the next release. I know with postgres the reason I was doing that was to avoid connections hanging idle in transacti... | 2015-10-03T16:04:00 | 2016-01-13T16:27:31 | 2015-10-03T19:16:01 | NONE | null | This is related to issue #431.
In order to use a cursor with MySQL and avoid an out of memory error, I need to use the `MySQLdb.cursors.SSCursor` class and disable commits on select.
It seems to me that defaulting to NOT committing on all select queries should be the default since select is a non-mutating operation, ... | {
"url": "https://api.github.com/repos/coleifer/peewee/issues/727/reactions",
"total_count": 0,
"+1": 0,
"-1": 0,
"laugh": 0,
"hooray": 0,
"confused": 0,
"heart": 0,
"rocket": 0,
"eyes": 0
} | https://api.github.com/repos/coleifer/peewee/issues/727/timeline | null | completed | null | null |
https://api.github.com/repos/coleifer/peewee/issues/726 | https://api.github.com/repos/coleifer/peewee | https://api.github.com/repos/coleifer/peewee/issues/726/labels{/name} | https://api.github.com/repos/coleifer/peewee/issues/726/comments | https://api.github.com/repos/coleifer/peewee/issues/726/events | https://github.com/coleifer/peewee/issues/726 | 109,522,246 | MDU6SXNzdWUxMDk1MjIyNDY= | 726 | Maximum recursion depth exceeded | {
"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 | [
"I don't seem to be able to replicate this:\n\n``` python\nIn [1]: from peewee import *\n\nIn [2]: db = SqliteDatabase(':memory:')\n\nIn [3]: class User(Model):\n ...: username = CharField()\n ...: class Meta:\n ...: database = db\n ...: \n\nIn [4]: User.create_table()\n\nIn [5]: Use... | 2015-10-02T16:09:56 | 2015-10-02T17:16:02 | 2015-10-02T17:16:02 | NONE | null | Hi, how are you?
I have installed peewee 2.6.4 and have simple sqlite db with one User record.
when I try to run query as this
User.get(User.id == 1)
I am getting maximum recursion depth error
User.select().where(User.id == 1) # works fine
| {
"url": "https://api.github.com/repos/coleifer/peewee/issues/726/reactions",
"total_count": 0,
"+1": 0,
"-1": 0,
"laugh": 0,
"hooray": 0,
"confused": 0,
"heart": 0,
"rocket": 0,
"eyes": 0
} | https://api.github.com/repos/coleifer/peewee/issues/726/timeline | null | completed | null | null |
https://api.github.com/repos/coleifer/peewee/issues/725 | https://api.github.com/repos/coleifer/peewee | https://api.github.com/repos/coleifer/peewee/issues/725/labels{/name} | https://api.github.com/repos/coleifer/peewee/issues/725/comments | https://api.github.com/repos/coleifer/peewee/issues/725/events | https://github.com/coleifer/peewee/issues/725 | 108,680,404 | MDU6SXNzdWUxMDg2ODA0MDQ= | 725 | Confused about inconsistency of *DoesNotExist exceptions | {
"login": "pitchforks",
"id": 4378791,
"node_id": "MDQ6VXNlcjQzNzg3OTE=",
"avatar_url": "https://avatars.githubusercontent.com/u/4378791?v=4",
"gravatar_id": "",
"url": "https://api.github.com/users/pitchforks",
"html_url": "https://github.com/pitchforks",
"followers_url": "https://api.github.com/users... | [] | closed | false | null | [] | null | [
"For anyone like me who stumbles upon this from google with the same question, just use the exception at the top level of the package, and ignore the concatenation of your model name onto the exception in the traceback. For example, for model `MyModel` with id field `id`:\r\n```python\r\nimport peewee\r\nfrom my_ap... | 2015-09-28T15:18:48 | 2019-04-15T18:49:43 | 2015-09-29T01:59:14 | NONE | null | peewee-2.6.4
Suppose I have a model named `MyModel`.
I am trying to fetch a `my_model` row by using `MyModel.get(CONDITION)`. If such a row can't be found - an exception is raised. The displayed traceback says `peewee.MyModelDoesNotExist`.
If I try to catch this exception - the result does not change! Diving deeper ... | {
"url": "https://api.github.com/repos/coleifer/peewee/issues/725/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/725/timeline | null | completed | null | null |
https://api.github.com/repos/coleifer/peewee/issues/724 | https://api.github.com/repos/coleifer/peewee | https://api.github.com/repos/coleifer/peewee/issues/724/labels{/name} | https://api.github.com/repos/coleifer/peewee/issues/724/comments | https://api.github.com/repos/coleifer/peewee/issues/724/events | https://github.com/coleifer/peewee/issues/724 | 108,509,959 | MDU6SXNzdWUxMDg1MDk5NTk= | 724 | Testing IS NULL for JSONFields fails | {
"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 | [
"Hello, I'm not sure if you've wrapped this up into your package yet, but in version 2.5.1 this is still an issue with [](as opposed to None):\n\n```\nTraceback (most recent call last):\n File \"/opt/corndog/pagerDutyDumper.py\", line 73, in run\n self.dump()\n File \"/opt/corndog/pagerDutyDumper.py\", line 57... | 2015-09-27T03:03:02 | 2015-10-05T23:56:04 | 2015-09-27T14:44:26 | CONTRIBUTOR | null | Hi Charles,
Just found a nice little one.
```
from peewee import *
from playhouse.postgres_ext import JSONField
db = PostgresqlDatabase('mydb', user="postgres")
class MyModel(Model):
data = JSONField(null=True)
class Meta:
database = db
MyModel.create_table()
query = MyModel.select().where(MyMode... | {
"url": "https://api.github.com/repos/coleifer/peewee/issues/724/reactions",
"total_count": 0,
"+1": 0,
"-1": 0,
"laugh": 0,
"hooray": 0,
"confused": 0,
"heart": 0,
"rocket": 0,
"eyes": 0
} | https://api.github.com/repos/coleifer/peewee/issues/724/timeline | null | completed | null | null |
https://api.github.com/repos/coleifer/peewee/issues/723 | https://api.github.com/repos/coleifer/peewee | https://api.github.com/repos/coleifer/peewee/issues/723/labels{/name} | https://api.github.com/repos/coleifer/peewee/issues/723/comments | https://api.github.com/repos/coleifer/peewee/issues/723/events | https://github.com/coleifer/peewee/issues/723 | 108,499,317 | MDU6SXNzdWUxMDg0OTkzMTc= | 723 | Columns disappear on INSERT, UPDATE with UUID foreign key | {
"login": "kennethklee",
"id": 838810,
"node_id": "MDQ6VXNlcjgzODgxMA==",
"avatar_url": "https://avatars.githubusercontent.com/u/838810?v=4",
"gravatar_id": "",
"url": "https://api.github.com/users/kennethklee",
"html_url": "https://github.com/kennethklee",
"followers_url": "https://api.github.com/user... | [] | closed | false | null | [] | null | [
"Should note that updates work except when I change the `user` field. Column seems to just, disappear from the query.\n",
"That's bizarre. What version of peewee are you using? Can you put together a small snippet so I can replicate the bug?\n",
"peewee==2.6.4\n\nRequires postgres, with a db and user already cr... | 2015-09-26T22:23:09 | 2015-09-28T00:26:06 | 2015-09-27T01:55:15 | NONE | null | Cannot insert, update the uuid foreign key with this model:
``` python
class UnitRevision(BaseModel):
id = UUIDField(primary_key=True, default=uuid.uuid4, null=False)
user = ForeignKeyField(User, null=False) # uuid relationship
created_at = DateTimeField(default=datetime.now, null=False, verbose_name='Crea... | {
"url": "https://api.github.com/repos/coleifer/peewee/issues/723/reactions",
"total_count": 0,
"+1": 0,
"-1": 0,
"laugh": 0,
"hooray": 0,
"confused": 0,
"heart": 0,
"rocket": 0,
"eyes": 0
} | https://api.github.com/repos/coleifer/peewee/issues/723/timeline | null | completed | null | null |
https://api.github.com/repos/coleifer/peewee/issues/722 | https://api.github.com/repos/coleifer/peewee | https://api.github.com/repos/coleifer/peewee/issues/722/labels{/name} | https://api.github.com/repos/coleifer/peewee/issues/722/comments | https://api.github.com/repos/coleifer/peewee/issues/722/events | https://github.com/coleifer/peewee/issues/722 | 108,417,693 | MDU6SXNzdWUxMDg0MTc2OTM= | 722 | How do I avoid circular imports? | {
"login": "danieldiekmeier",
"id": 2098462,
"node_id": "MDQ6VXNlcjIwOTg0NjI=",
"avatar_url": "https://avatars.githubusercontent.com/u/2098462?v=4",
"gravatar_id": "",
"url": "https://api.github.com/users/danieldiekmeier",
"html_url": "https://github.com/danieldiekmeier",
"followers_url": "https://api.g... | [] | closed | false | null | [] | null | [
"One possibility is, of course, to move the import of Resolution into the `resolution` function. This definitely works, but it feels dirty. :(\n",
"You can use `Proxy` for this.\n\nhttp://docs.peewee-orm.com/en/latest/peewee/models.html?highlight=proxy#circular-foreign-key-dependencies\n"
] | 2015-09-25T22:27:51 | 2015-09-26T13:28:31 | 2015-09-26T13:28:31 | NONE | null | I use peewee in my webapp http://lesetagebu.ch, and it's great! Thank you. But I have a problem:
All my models lived in a models.py, but the file was several hundred lines long and hard to manage. So I refactored each model into its own file in ./models.
But now I have problems with circular imports. For example:
``... | {
"url": "https://api.github.com/repos/coleifer/peewee/issues/722/reactions",
"total_count": 0,
"+1": 0,
"-1": 0,
"laugh": 0,
"hooray": 0,
"confused": 0,
"heart": 0,
"rocket": 0,
"eyes": 0
} | https://api.github.com/repos/coleifer/peewee/issues/722/timeline | null | completed | null | null |
https://api.github.com/repos/coleifer/peewee/issues/721 | https://api.github.com/repos/coleifer/peewee | https://api.github.com/repos/coleifer/peewee/issues/721/labels{/name} | https://api.github.com/repos/coleifer/peewee/issues/721/comments | https://api.github.com/repos/coleifer/peewee/issues/721/events | https://github.com/coleifer/peewee/pull/721 | 108,181,484 | MDExOlB1bGxSZXF1ZXN0NDU5MjgzNTk= | 721 | Make array field adapter independent from the connection. | {
"login": "stas",
"id": 112147,
"node_id": "MDQ6VXNlcjExMjE0Nw==",
"avatar_url": "https://avatars.githubusercontent.com/u/112147?v=4",
"gravatar_id": "",
"url": "https://api.github.com/users/stas",
"html_url": "https://github.com/stas",
"followers_url": "https://api.github.com/users/stas/followers",
... | [] | closed | false | null | [] | null | [
"Hmm, it looks like there's something strange with the way py3 handles the unicode string adapter.\n\nThis could be related to psycopg/psycopg2#331\nI've tried a couple of things, including calling `adapted.prepare(conn)` and explicitly setting the connection encoding to `UTF8`, still on py3 I get the adapter resul... | 2015-09-24T17:55:59 | 2015-09-24T21:19:37 | 2015-09-24T21:19:37 | NONE | null | Since the field does not depend on the database OIDs, calling `prepare()` is not necessary. This is also mentioned in the docs[1](http://initd.org/psycopg/docs/extensions.html#psycopg2.extensions.ISQLQuote.prepare). The reason this is not dependent on the connection since we don't try to adapt any special OIDs that can... | {
"url": "https://api.github.com/repos/coleifer/peewee/issues/721/reactions",
"total_count": 0,
"+1": 0,
"-1": 0,
"laugh": 0,
"hooray": 0,
"confused": 0,
"heart": 0,
"rocket": 0,
"eyes": 0
} | https://api.github.com/repos/coleifer/peewee/issues/721/timeline | null | null | false | {
"url": "https://api.github.com/repos/coleifer/peewee/pulls/721",
"html_url": "https://github.com/coleifer/peewee/pull/721",
"diff_url": "https://github.com/coleifer/peewee/pull/721.diff",
"patch_url": "https://github.com/coleifer/peewee/pull/721.patch",
"merged_at": null
} |
https://api.github.com/repos/coleifer/peewee/issues/720 | https://api.github.com/repos/coleifer/peewee | https://api.github.com/repos/coleifer/peewee/issues/720/labels{/name} | https://api.github.com/repos/coleifer/peewee/issues/720/comments | https://api.github.com/repos/coleifer/peewee/issues/720/events | https://github.com/coleifer/peewee/issues/720 | 107,964,786 | MDU6SXNzdWUxMDc5NjQ3ODY= | 720 | Wrong code sample in docs | {
"login": "ael-code",
"id": 4229536,
"node_id": "MDQ6VXNlcjQyMjk1MzY=",
"avatar_url": "https://avatars.githubusercontent.com/u/4229536?v=4",
"gravatar_id": "",
"url": "https://api.github.com/users/ael-code",
"html_url": "https://github.com/ael-code",
"followers_url": "https://api.github.com/users/ael-c... | [] | closed | false | null | [] | null | [] | 2015-09-23T17:11:02 | 2015-09-23T17:24:23 | 2015-09-23T17:24:23 | NONE | null | I'm using peewee for the first time but it seems to me that the docs on [querying#joining-on-multiple-tables](http://peewee.readthedocs.org/en/latest/peewee/querying.html#joining-on-multiple-tables) has two wrong code samples:
``` python
User.join(Tweet).join(Comment)
```
``` python
# Join the Artist table on both `A... | {
"url": "https://api.github.com/repos/coleifer/peewee/issues/720/reactions",
"total_count": 0,
"+1": 0,
"-1": 0,
"laugh": 0,
"hooray": 0,
"confused": 0,
"heart": 0,
"rocket": 0,
"eyes": 0
} | https://api.github.com/repos/coleifer/peewee/issues/720/timeline | null | completed | null | null |
https://api.github.com/repos/coleifer/peewee/issues/719 | https://api.github.com/repos/coleifer/peewee | https://api.github.com/repos/coleifer/peewee/issues/719/labels{/name} | https://api.github.com/repos/coleifer/peewee/issues/719/comments | https://api.github.com/repos/coleifer/peewee/issues/719/events | https://github.com/coleifer/peewee/issues/719 | 107,878,750 | MDU6SXNzdWUxMDc4Nzg3NTA= | 719 | deferred ManyToManyField assignment | {
"login": "ael-code",
"id": 4229536,
"node_id": "MDQ6VXNlcjQyMjk1MzY=",
"avatar_url": "https://avatars.githubusercontent.com/u/4229536?v=4",
"gravatar_id": "",
"url": "https://api.github.com/users/ael-code",
"html_url": "https://github.com/ael-code",
"followers_url": "https://api.github.com/users/ael-c... | [] | closed | false | null | [] | null | [
"> Is this normal?\n\nOke I've read [peewee.py#L4194](https://github.com/coleifer/peewee/blob/master/peewee.py#L4194). and I've understood that Fields are replaced on class creation, so you cannot deferred Model fields definition. In some cases you can you can use model proxies as workaround.\n\nAm I wrong?\n",
"... | 2015-09-23T09:18:38 | 2023-04-25T15:19:15 | 2015-09-23T17:26:54 | NONE | null | If the `ManyToManyField` assignment is made after class declaration you will encounter errors.
The following code represent the scenario.
``` python
from peewee import PrimaryKeyField, CharField,\
Model, SqliteDatabase
from playhouse.fields import ManyToManyField
db = SqliteDatabase(':memory:')
class BaseModel... | {
"url": "https://api.github.com/repos/coleifer/peewee/issues/719/reactions",
"total_count": 0,
"+1": 0,
"-1": 0,
"laugh": 0,
"hooray": 0,
"confused": 0,
"heart": 0,
"rocket": 0,
"eyes": 0
} | https://api.github.com/repos/coleifer/peewee/issues/719/timeline | null | completed | null | null |
https://api.github.com/repos/coleifer/peewee/issues/718 | https://api.github.com/repos/coleifer/peewee | https://api.github.com/repos/coleifer/peewee/issues/718/labels{/name} | https://api.github.com/repos/coleifer/peewee/issues/718/comments | https://api.github.com/repos/coleifer/peewee/issues/718/events | https://github.com/coleifer/peewee/issues/718 | 107,843,645 | MDU6SXNzdWUxMDc4NDM2NDU= | 718 | return " ProgrammingError: execute() first" in sql_error_handler | {
"login": "Funnyhao",
"id": 864265,
"node_id": "MDQ6VXNlcjg2NDI2NQ==",
"avatar_url": "https://avatars.githubusercontent.com/u/864265?v=4",
"gravatar_id": "",
"url": "https://api.github.com/users/Funnyhao",
"html_url": "https://github.com/Funnyhao",
"followers_url": "https://api.github.com/users/Funnyha... | [] | closed | false | null | [] | null | [
"I don't see how this is a bug in peewee.\n",
"it's not possible to allow returning a new cursor to execute_sql when \"Mysql gone away\" happens?\n",
"Hmm, that would change the contract of the function and I'm not sure I'd like to make the change.\n\nI do see, though, how returning the old cursor from before t... | 2015-09-23T03:35:14 | 2015-10-05T14:17:41 | 2015-09-30T03:34:20 | NONE | null | class MyMYSQL(MySQLDatabase):
```
def sql_error_handler(self,exception,sql,params,require_commit):
db.close();
db.connect();
db.execute_sql(sql, params or (), require_commit = require_commit);
return False;
```
I find test sql_error_handler with kill mysql process but it gets :
```
File "/data1/we... | {
"url": "https://api.github.com/repos/coleifer/peewee/issues/718/reactions",
"total_count": 0,
"+1": 0,
"-1": 0,
"laugh": 0,
"hooray": 0,
"confused": 0,
"heart": 0,
"rocket": 0,
"eyes": 0
} | https://api.github.com/repos/coleifer/peewee/issues/718/timeline | null | completed | null | null |
https://api.github.com/repos/coleifer/peewee/issues/717 | https://api.github.com/repos/coleifer/peewee | https://api.github.com/repos/coleifer/peewee/issues/717/labels{/name} | https://api.github.com/repos/coleifer/peewee/issues/717/comments | https://api.github.com/repos/coleifer/peewee/issues/717/events | https://github.com/coleifer/peewee/issues/717 | 107,609,514 | MDU6SXNzdWUxMDc2MDk1MTQ= | 717 | New release soon? | {
"login": "bahadir",
"id": 655413,
"node_id": "MDQ6VXNlcjY1NTQxMw==",
"avatar_url": "https://avatars.githubusercontent.com/u/655413?v=4",
"gravatar_id": "",
"url": "https://api.github.com/users/bahadir",
"html_url": "https://github.com/bahadir",
"followers_url": "https://api.github.com/users/bahadir/fo... | [] | closed | false | null | [] | null | [
"Released 2.6.4: https://pypi.python.org/pypi/peewee/\n\nChanges: https://github.com/coleifer/peewee/releases/tag/2.6.4\n"
] | 2015-09-21T22:15:34 | 2015-09-22T03:32:58 | 2015-09-22T03:32:58 | NONE | null | Hi, I'm happy with changes after last tagged release and I want to use peewee without messing my requirements.txt / setup.py.
Are you planning to tag a new release soon?
Thanks & keep up the great work!
| {
"url": "https://api.github.com/repos/coleifer/peewee/issues/717/reactions",
"total_count": 0,
"+1": 0,
"-1": 0,
"laugh": 0,
"hooray": 0,
"confused": 0,
"heart": 0,
"rocket": 0,
"eyes": 0
} | https://api.github.com/repos/coleifer/peewee/issues/717/timeline | null | completed | null | null |
https://api.github.com/repos/coleifer/peewee/issues/716 | https://api.github.com/repos/coleifer/peewee | https://api.github.com/repos/coleifer/peewee/issues/716/labels{/name} | https://api.github.com/repos/coleifer/peewee/issues/716/comments | https://api.github.com/repos/coleifer/peewee/issues/716/events | https://github.com/coleifer/peewee/issues/716 | 107,364,229 | MDU6SXNzdWUxMDczNjQyMjk= | 716 | PostgresqlExtDatabase unsupported psycopg2cffi | {
"login": "cutso",
"id": 237805,
"node_id": "MDQ6VXNlcjIzNzgwNQ==",
"avatar_url": "https://avatars.githubusercontent.com/u/237805?v=4",
"gravatar_id": "",
"url": "https://api.github.com/users/cutso",
"html_url": "https://github.com/cutso",
"followers_url": "https://api.github.com/users/cutso/followers"... | [] | closed | false | null | [] | null | [
"Try passing in `register_hstore=False`:\n\n``` python\ndb = PostgresqlExtDatabase('my_db', register_hstore=False)\n```\n\nLooks like the psycopg2.extras helper I was using to register_hstore does not accept the psycopg2cffi `Connection` object.\n"
] | 2015-09-20T00:30:35 | 2015-09-21T13:05:14 | 2015-09-21T13:05:14 | NONE | null | Peewee is a nice project, thank you!
Today, i have a problem with peewee when used psycopg2cffi connect to postgresql.
As i run programm under a virtual environ with pypy-2.6.1, that can not install psycopg2, so i used psycpog2cffi instead.
Everything wroks well but PostgresqlExtDatabase.
I do not know why, then i ... | {
"url": "https://api.github.com/repos/coleifer/peewee/issues/716/reactions",
"total_count": 0,
"+1": 0,
"-1": 0,
"laugh": 0,
"hooray": 0,
"confused": 0,
"heart": 0,
"rocket": 0,
"eyes": 0
} | https://api.github.com/repos/coleifer/peewee/issues/716/timeline | null | completed | null | null |
https://api.github.com/repos/coleifer/peewee/issues/715 | https://api.github.com/repos/coleifer/peewee | https://api.github.com/repos/coleifer/peewee/issues/715/labels{/name} | https://api.github.com/repos/coleifer/peewee/issues/715/comments | https://api.github.com/repos/coleifer/peewee/issues/715/events | https://github.com/coleifer/peewee/issues/715 | 107,361,754 | MDU6SXNzdWUxMDczNjE3NTQ= | 715 | Peewee multiple join with same table | {
"login": "serkandaglioglu",
"id": 1669906,
"node_id": "MDQ6VXNlcjE2Njk5MDY=",
"avatar_url": "https://avatars.githubusercontent.com/u/1669906?v=4",
"gravatar_id": "",
"url": "https://api.github.com/users/serkandaglioglu",
"html_url": "https://github.com/serkandaglioglu",
"followers_url": "https://api.g... | [] | closed | false | null | [] | null | [
"Try this:\n\n``` python\nt = (Test\n .select(Test,A,B)\n .join(A, on=(Test.a == A.test2_id) )\n .switch(Test) # set query ctx back to test \n .join(B, on=(Test.b == B.test2_id) )\n .where( Test.test_id==1 )\n t.get()\n )\n```\n\nIf you are still having trouble try explicitly aliasing the join ... | 2015-09-19T23:25:02 | 2015-11-19T22:37:44 | 2015-09-20T02:52:45 | NONE | null | ```
class Test2(BaseModel):
test2_id = PrimaryKeyField()
test2_name = CharField(null=True)
class Meta:
db_table = 'test2'
order_by = ('test2_id',)
class Test(BaseModel):
test_id = PrimaryKeyField()
test_name = CharField(null=True)
a = ForeignKeyField(Test2,db_column="a_id",t... | {
"url": "https://api.github.com/repos/coleifer/peewee/issues/715/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/715/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.