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/714 | https://api.github.com/repos/coleifer/peewee | https://api.github.com/repos/coleifer/peewee/issues/714/labels{/name} | https://api.github.com/repos/coleifer/peewee/issues/714/comments | https://api.github.com/repos/coleifer/peewee/issues/714/events | https://github.com/coleifer/peewee/issues/714 | 106,660,748 | MDU6SXNzdWUxMDY2NjA3NDg= | 714 | Backreference relationship signal | {
"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 do not think that I would merge such functionality into peewee, but if you end up implementing it on you r own I'd love to see the diff. Maybe you could post it to this issue?\n",
"Haven't implemented yet, but I'm imagining this. This is not using the signals architecture as I'm not too well-read on your imple... | 2015-09-15T22:28:30 | 2015-09-18T14:03:54 | 2015-09-18T01:18:15 | CONTRIBUTOR | null | Hey! I have a suggestion for an addition (and perhaps I could even undertake implementation if you think it's worthwhile and would accept changes!) to the signal support in `playhouse`. It's a little hard to articulate, but I think there might be value in a signal that fires for some model instance, let's call it `Bana... | {
"url": "https://api.github.com/repos/coleifer/peewee/issues/714/reactions",
"total_count": 0,
"+1": 0,
"-1": 0,
"laugh": 0,
"hooray": 0,
"confused": 0,
"heart": 0,
"rocket": 0,
"eyes": 0
} | https://api.github.com/repos/coleifer/peewee/issues/714/timeline | null | completed | null | null |
https://api.github.com/repos/coleifer/peewee/issues/713 | https://api.github.com/repos/coleifer/peewee | https://api.github.com/repos/coleifer/peewee/issues/713/labels{/name} | https://api.github.com/repos/coleifer/peewee/issues/713/comments | https://api.github.com/repos/coleifer/peewee/issues/713/events | https://github.com/coleifer/peewee/pull/713 | 106,579,758 | MDExOlB1bGxSZXF1ZXN0NDUwNjMxODM= | 713 | - Fixed column_name_re not working with ` characters. | {
"login": "sroebert",
"id": 81575,
"node_id": "MDQ6VXNlcjgxNTc1",
"avatar_url": "https://avatars.githubusercontent.com/u/81575?v=4",
"gravatar_id": "",
"url": "https://api.github.com/users/sroebert",
"html_url": "https://github.com/sroebert",
"followers_url": "https://api.github.com/users/sroebert/foll... | [] | closed | false | null | [] | null | [
"Thank you!\n"
] | 2015-09-15T15:21:37 | 2015-09-17T00:05:39 | 2015-09-17T00:05:37 | CONTRIBUTOR | null | This fixes #712, where migration of a sqlite database is not working when the `CREATE TABLE` query contains newlines or `.
| {
"url": "https://api.github.com/repos/coleifer/peewee/issues/713/reactions",
"total_count": 0,
"+1": 0,
"-1": 0,
"laugh": 0,
"hooray": 0,
"confused": 0,
"heart": 0,
"rocket": 0,
"eyes": 0
} | https://api.github.com/repos/coleifer/peewee/issues/713/timeline | null | null | false | {
"url": "https://api.github.com/repos/coleifer/peewee/pulls/713",
"html_url": "https://github.com/coleifer/peewee/pull/713",
"diff_url": "https://github.com/coleifer/peewee/pull/713.diff",
"patch_url": "https://github.com/coleifer/peewee/pull/713.patch",
"merged_at": "2015-09-17T00:05:37"
} |
https://api.github.com/repos/coleifer/peewee/issues/712 | https://api.github.com/repos/coleifer/peewee | https://api.github.com/repos/coleifer/peewee/issues/712/labels{/name} | https://api.github.com/repos/coleifer/peewee/issues/712/comments | https://api.github.com/repos/coleifer/peewee/issues/712/events | https://github.com/coleifer/peewee/issues/712 | 106,579,242 | MDU6SXNzdWUxMDY1NzkyNDI= | 712 | SQLite migration cannot handle all CREATE TABLE queries | {
"login": "sroebert",
"id": 81575,
"node_id": "MDQ6VXNlcjgxNTc1",
"avatar_url": "https://avatars.githubusercontent.com/u/81575?v=4",
"gravatar_id": "",
"url": "https://api.github.com/users/sroebert",
"html_url": "https://github.com/sroebert",
"followers_url": "https://api.github.com/users/sroebert/foll... | [] | closed | false | null | [] | null | [] | 2015-09-15T15:19:11 | 2015-09-17T00:05:37 | 2015-09-17T00:05:37 | CONTRIBUTOR | null | I was implementing the use of the `drop_column` method in the `SqliteMigrator` when I found a bug.
I tested the result by changing my database model using sqlitebrowser. The `CREATE TABLE` query sqlitebrowser generates, contains newlines and ` characters around the table name. This differs from the peewee `CREATE TAB... | {
"url": "https://api.github.com/repos/coleifer/peewee/issues/712/reactions",
"total_count": 0,
"+1": 0,
"-1": 0,
"laugh": 0,
"hooray": 0,
"confused": 0,
"heart": 0,
"rocket": 0,
"eyes": 0
} | https://api.github.com/repos/coleifer/peewee/issues/712/timeline | null | completed | null | null |
https://api.github.com/repos/coleifer/peewee/issues/711 | https://api.github.com/repos/coleifer/peewee | https://api.github.com/repos/coleifer/peewee/issues/711/labels{/name} | https://api.github.com/repos/coleifer/peewee/issues/711/comments | https://api.github.com/repos/coleifer/peewee/issues/711/events | https://github.com/coleifer/peewee/issues/711 | 106,567,851 | MDU6SXNzdWUxMDY1Njc4NTE= | 711 | Problem with playhouse.db_url.connect query params | {
"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 | [
"Well, technically I think you can specify those using PRAGMAs, can't you? Or as manual params with `connect()`...\n\nBut isn't the `uri` aspect fairly new to pysqlite, or am I mistaken?\n",
"It looks also like it's a Python3 only thing at the moment, added in 3.4, so I'm going to hold off on supporting that dire... | 2015-09-15T14:27:18 | 2015-12-28T13:55:59 | 2015-09-17T00:04:27 | CONTRIBUTOR | null | Due to an outstanding [bug](https://bugs.python.org/issue24887) in sqlite3, some connection flags such as `mode=memory/cache=shared` can only be passed in via URI.
However, `playhouse.db_url.connect()` [converts](https://github.com/coleifer/peewee/blob/master/playhouse/db_url.py#L68) these query string parameters into... | {
"url": "https://api.github.com/repos/coleifer/peewee/issues/711/reactions",
"total_count": 0,
"+1": 0,
"-1": 0,
"laugh": 0,
"hooray": 0,
"confused": 0,
"heart": 0,
"rocket": 0,
"eyes": 0
} | https://api.github.com/repos/coleifer/peewee/issues/711/timeline | null | completed | null | null |
https://api.github.com/repos/coleifer/peewee/issues/710 | https://api.github.com/repos/coleifer/peewee | https://api.github.com/repos/coleifer/peewee/issues/710/labels{/name} | https://api.github.com/repos/coleifer/peewee/issues/710/comments | https://api.github.com/repos/coleifer/peewee/issues/710/events | https://github.com/coleifer/peewee/issues/710 | 106,156,441 | MDU6SXNzdWUxMDYxNTY0NDE= | 710 | Output null values for missing dates | {
"login": "aidanheerdegen",
"id": 6063709,
"node_id": "MDQ6VXNlcjYwNjM3MDk=",
"avatar_url": "https://avatars.githubusercontent.com/u/6063709?v=4",
"gravatar_id": "",
"url": "https://api.github.com/users/aidanheerdegen",
"html_url": "https://github.com/aidanheerdegen",
"followers_url": "https://api.gith... | [] | closed | false | null | [] | null | [
"If you're using SQLite, then while Peewee supports RIGHT OUTER, SQLite itself does not. Can you simply switch the order of your joins and use a left outer?\n",
"You may need to add clauses to your where or join as well that allow for the date to be NULL. But, basically this is a SQL question not a peewee bug.\n"... | 2015-09-12T12:59:28 | 2015-09-12T17:54:59 | 2015-09-12T17:54:59 | NONE | null | Hi,
I've tried and I've failed.
I have a table like so
``` python
class ShortUsage(BaseModel):
projid = ForeignKeyField(Project, to_field="projid")
folder = CharField(index=True)
user = ForeignKeyField(User, to_field="username")
# Support only dates. Don't want sub-day timescales, makes it harder to... | {
"url": "https://api.github.com/repos/coleifer/peewee/issues/710/reactions",
"total_count": 0,
"+1": 0,
"-1": 0,
"laugh": 0,
"hooray": 0,
"confused": 0,
"heart": 0,
"rocket": 0,
"eyes": 0
} | https://api.github.com/repos/coleifer/peewee/issues/710/timeline | null | completed | null | null |
https://api.github.com/repos/coleifer/peewee/issues/709 | https://api.github.com/repos/coleifer/peewee | https://api.github.com/repos/coleifer/peewee/issues/709/labels{/name} | https://api.github.com/repos/coleifer/peewee/issues/709/comments | https://api.github.com/repos/coleifer/peewee/issues/709/events | https://github.com/coleifer/peewee/issues/709 | 105,968,303 | MDU6SXNzdWUxMDU5NjgzMDM= | 709 | Ability to get a bare cursor | {
"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 | [
"Peewee does not alter the isolation level of the postgres connection, unfortunately the `autocommit` parameter is poorly named. When True, it means basically: \"pass queries through the DB-API driver normally and call connection.commit() afterwards\". If False, then you need to call commit() yourself.\n\nWorking w... | 2015-09-11T08:41:35 | 2015-09-30T03:43:17 | 2015-09-30T03:43:17 | NONE | null | Hello.
I'm trying to get a bare, out of transaction context cursor from within peewee, but for some reason this does not work for me.
``` python
from peewee import *
database = PostgresqlDatabase('test')
database.set_autocommit(False)
database.execute_sql('VACUUM FULL', require_commit=False)
database.set_autocommit... | {
"url": "https://api.github.com/repos/coleifer/peewee/issues/709/reactions",
"total_count": 0,
"+1": 0,
"-1": 0,
"laugh": 0,
"hooray": 0,
"confused": 0,
"heart": 0,
"rocket": 0,
"eyes": 0
} | https://api.github.com/repos/coleifer/peewee/issues/709/timeline | null | completed | null | null |
https://api.github.com/repos/coleifer/peewee/issues/708 | https://api.github.com/repos/coleifer/peewee | https://api.github.com/repos/coleifer/peewee/issues/708/labels{/name} | https://api.github.com/repos/coleifer/peewee/issues/708/comments | https://api.github.com/repos/coleifer/peewee/issues/708/events | https://github.com/coleifer/peewee/issues/708 | 105,443,959 | MDU6SXNzdWUxMDU0NDM5NTk= | 708 | Creating relationships using the backref | {
"login": "kolanos",
"id": 17498,
"node_id": "MDQ6VXNlcjE3NDk4",
"avatar_url": "https://avatars.githubusercontent.com/u/17498?v=4",
"gravatar_id": "",
"url": "https://api.github.com/users/kolanos",
"html_url": "https://github.com/kolanos",
"followers_url": "https://api.github.com/users/kolanos/follower... | [] | closed | false | null | [] | null | [
"Good question, no I hadn't thought about a corollary to the many-to-many add, but that seems useful. I will add it.\n",
"Well, I forgot that the reverse fk descriptor exposes a plain old select query. It seems smelly to me to special case the select query returned by the fk descriptor. Similarly, I don't know th... | 2015-09-08T18:33:19 | 2015-09-09T22:14:05 | 2015-09-09T02:44:56 | NONE | null | First off, I'd just like to say that peewee is awesome. I'm currently working on a peewee backend for potion, a REST API library for flask. Here's what I have so far:
https://github.com/biosustain/potion/pull/28
But I'm running into an issue (or possible limitation) of peewee when creating relationships between mode... | {
"url": "https://api.github.com/repos/coleifer/peewee/issues/708/reactions",
"total_count": 0,
"+1": 0,
"-1": 0,
"laugh": 0,
"hooray": 0,
"confused": 0,
"heart": 0,
"rocket": 0,
"eyes": 0
} | https://api.github.com/repos/coleifer/peewee/issues/708/timeline | null | completed | null | null |
https://api.github.com/repos/coleifer/peewee/issues/707 | https://api.github.com/repos/coleifer/peewee | https://api.github.com/repos/coleifer/peewee/issues/707/labels{/name} | https://api.github.com/repos/coleifer/peewee/issues/707/comments | https://api.github.com/repos/coleifer/peewee/issues/707/events | https://github.com/coleifer/peewee/issues/707 | 105,149,109 | MDU6SXNzdWUxMDUxNDkxMDk= | 707 | Prefetch problem | {
"login": "anjianshi",
"id": 5005012,
"node_id": "MDQ6VXNlcjUwMDUwMTI=",
"avatar_url": "https://avatars.githubusercontent.com/u/5005012?v=4",
"gravatar_id": "",
"url": "https://api.github.com/users/anjianshi",
"html_url": "https://github.com/anjianshi",
"followers_url": "https://api.github.com/users/an... | [] | closed | false | null | [] | null | [
"Unfortunately not right now, though that's a deficiency in the API I've definitely thought about before. I will think about improving it.\n",
"Ok!\n\nI've done some fix, if someone else have this requirement, maybe they can use this as a temporary solution. ^_^\n\n``` python\nimport peewee\nfrom peewee import Pr... | 2015-09-07T05:37:16 | 2015-10-02T01:08:47 | 2015-10-02T01:08:47 | NONE | null | Is there a way to manually specify which foreign key to use, if a model has multiple foreign keys?
For example, there's 4 tables:
```
School
id
name
SchoolClass
id
school (foreign key)
name
Club
id
school (foreign key)
name
Student
id
school (foreign key)
school_class... | {
"url": "https://api.github.com/repos/coleifer/peewee/issues/707/reactions",
"total_count": 0,
"+1": 0,
"-1": 0,
"laugh": 0,
"hooray": 0,
"confused": 0,
"heart": 0,
"rocket": 0,
"eyes": 0
} | https://api.github.com/repos/coleifer/peewee/issues/707/timeline | null | completed | null | null |
https://api.github.com/repos/coleifer/peewee/issues/706 | https://api.github.com/repos/coleifer/peewee | https://api.github.com/repos/coleifer/peewee/issues/706/labels{/name} | https://api.github.com/repos/coleifer/peewee/issues/706/comments | https://api.github.com/repos/coleifer/peewee/issues/706/events | https://github.com/coleifer/peewee/issues/706 | 105,089,314 | MDU6SXNzdWUxMDUwODkzMTQ= | 706 | peewee+MySQL TimeField returns timedelta object | {
"login": "ibushong",
"id": 9298422,
"node_id": "MDQ6VXNlcjkyOTg0MjI=",
"avatar_url": "https://avatars.githubusercontent.com/u/9298422?v=4",
"gravatar_id": "",
"url": "https://api.github.com/users/ibushong",
"html_url": "https://github.com/ibushong",
"followers_url": "https://api.github.com/users/ibush... | [] | closed | false | null | [] | null | [
"The fix does not work. The `elif` branch is never reached because the timedelta object evaluates to `True`, so the behavior is the same as before.\n"
] | 2015-09-06T11:42:00 | 2015-09-23T10:14:26 | 2015-09-09T02:48:45 | NONE | null | When using MySQL, the `value` that gets passed into `TimeField.python_value(value)` is a `timedelta` object, which doesn't get properly handled (to turn it into a `time` object).
Modifying `TimeField.python_value` to the following fixes the issue (note the `is None`, as `time(0)` (midnight) evaluates to `False`):
```... | {
"url": "https://api.github.com/repos/coleifer/peewee/issues/706/reactions",
"total_count": 0,
"+1": 0,
"-1": 0,
"laugh": 0,
"hooray": 0,
"confused": 0,
"heart": 0,
"rocket": 0,
"eyes": 0
} | https://api.github.com/repos/coleifer/peewee/issues/706/timeline | null | completed | null | null |
https://api.github.com/repos/coleifer/peewee/issues/705 | https://api.github.com/repos/coleifer/peewee | https://api.github.com/repos/coleifer/peewee/issues/705/labels{/name} | https://api.github.com/repos/coleifer/peewee/issues/705/comments | https://api.github.com/repos/coleifer/peewee/issues/705/events | https://github.com/coleifer/peewee/pull/705 | 105,072,434 | MDExOlB1bGxSZXF1ZXN0NDQyOTYwNDE= | 705 | Fix small typo in docs | {
"login": "jnovinger",
"id": 103499,
"node_id": "MDQ6VXNlcjEwMzQ5OQ==",
"avatar_url": "https://avatars.githubusercontent.com/u/103499?v=4",
"gravatar_id": "",
"url": "https://api.github.com/users/jnovinger",
"html_url": "https://github.com/jnovinger",
"followers_url": "https://api.github.com/users/jnov... | [] | closed | false | null | [] | null | [
"Wontfix\n"
] | 2015-09-06T05:32:38 | 2015-09-06T07:04:36 | 2015-09-06T07:04:36 | CONTRIBUTOR | null | {
"url": "https://api.github.com/repos/coleifer/peewee/issues/705/reactions",
"total_count": 0,
"+1": 0,
"-1": 0,
"laugh": 0,
"hooray": 0,
"confused": 0,
"heart": 0,
"rocket": 0,
"eyes": 0
} | https://api.github.com/repos/coleifer/peewee/issues/705/timeline | null | null | false | {
"url": "https://api.github.com/repos/coleifer/peewee/pulls/705",
"html_url": "https://github.com/coleifer/peewee/pull/705",
"diff_url": "https://github.com/coleifer/peewee/pull/705.diff",
"patch_url": "https://github.com/coleifer/peewee/pull/705.patch",
"merged_at": "2015-09-06T07:04:36"
} | |
https://api.github.com/repos/coleifer/peewee/issues/704 | https://api.github.com/repos/coleifer/peewee | https://api.github.com/repos/coleifer/peewee/issues/704/labels{/name} | https://api.github.com/repos/coleifer/peewee/issues/704/comments | https://api.github.com/repos/coleifer/peewee/issues/704/events | https://github.com/coleifer/peewee/issues/704 | 105,030,933 | MDU6SXNzdWUxMDUwMzA5MzM= | 704 | db.atomic() select query cache problem | {
"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 | [
"Can you provide more information? What database are you using? What is actually failing? You've shown the delete call, but not the select portion.\n\nI added a test-case and it is passing, so I'm confused what might be going wrong:\n\n``` diff\n\n+\n+ def test_atomic_with_delete(self):\n+ for i in range(... | 2015-09-05T14:56:26 | 2015-09-06T09:47:04 | 2015-09-05T15:12:05 | NONE | null | When i use transaction with with db.atomic() after delete or update queries, selecting from database still get same results.
For example, deleting a user.
```
with db.atomic() as txn:
User.get(User.user_id==3).delete_instance()
```
After delete query `User.select()` still include user (user_id=3). If I use tra... | {
"url": "https://api.github.com/repos/coleifer/peewee/issues/704/reactions",
"total_count": 0,
"+1": 0,
"-1": 0,
"laugh": 0,
"hooray": 0,
"confused": 0,
"heart": 0,
"rocket": 0,
"eyes": 0
} | https://api.github.com/repos/coleifer/peewee/issues/704/timeline | null | completed | null | null |
https://api.github.com/repos/coleifer/peewee/issues/703 | https://api.github.com/repos/coleifer/peewee | https://api.github.com/repos/coleifer/peewee/issues/703/labels{/name} | https://api.github.com/repos/coleifer/peewee/issues/703/comments | https://api.github.com/repos/coleifer/peewee/issues/703/events | https://github.com/coleifer/peewee/issues/703 | 104,907,081 | MDU6SXNzdWUxMDQ5MDcwODE= | 703 | Model.update() not firing pre_save signal | {
"login": "rvindas-gap",
"id": 8330613,
"node_id": "MDQ6VXNlcjgzMzA2MTM=",
"avatar_url": "https://avatars.githubusercontent.com/u/8330613?v=4",
"gravatar_id": "",
"url": "https://api.github.com/users/rvindas-gap",
"html_url": "https://github.com/rvindas-gap",
"followers_url": "https://api.github.com/us... | [] | closed | false | null | [] | null | [
"Yes this is a known (and obvious) limitation. You'll want to look into triggers.\n",
"Not looking to resurrect the dead here, but could there perhaps be a docs update to reflect this? It says:\n\n> Provides an additional keyword argument created, indicating whether the model is being saved for the first time or ... | 2015-09-04T14:57:49 | 2016-04-13T19:59:04 | 2015-09-04T15:02:20 | NONE | null | I have this import in my models: `from playhouse.signals import Model, pre_save` and have a model that inherits from that 'Model' class. I also added the pre_save signal implementation which gets fired when I execute Model.create() or Model.save().
But executing a Model.update().execute() updates the record correctly b... | {
"url": "https://api.github.com/repos/coleifer/peewee/issues/703/reactions",
"total_count": 0,
"+1": 0,
"-1": 0,
"laugh": 0,
"hooray": 0,
"confused": 0,
"heart": 0,
"rocket": 0,
"eyes": 0
} | https://api.github.com/repos/coleifer/peewee/issues/703/timeline | null | completed | null | null |
https://api.github.com/repos/coleifer/peewee/issues/702 | https://api.github.com/repos/coleifer/peewee | https://api.github.com/repos/coleifer/peewee/issues/702/labels{/name} | https://api.github.com/repos/coleifer/peewee/issues/702/comments | https://api.github.com/repos/coleifer/peewee/issues/702/events | https://github.com/coleifer/peewee/issues/702 | 104,900,472 | MDU6SXNzdWUxMDQ5MDA0NzI= | 702 | AttributeError: 'Database' object has no attribute 'compiler' | {
"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 | [
"Is database the flask peewee wrapper? Have you tried database.database in that case?\n",
"Awesome! That was indeed the problem!\n\nThanks a million. Both for solving this, and for creating Peewee. We're already using it in several websites now. Big thumbs up!\n"
] | 2015-09-04T14:25:27 | 2015-09-08T15:36:34 | 2015-09-08T15:36:34 | NONE | null | I'm trying to use the peewee migration [described here](http://peewee.readthedocs.org/en/latest/peewee/playhouse.html#schema-migrations). But when running the migrate command I get the error below this message.
I'm on Ubuntu 14.04 with Python 2.7 with the regular MySQL from the apt repos.
Anybody any idea what could... | {
"url": "https://api.github.com/repos/coleifer/peewee/issues/702/reactions",
"total_count": 0,
"+1": 0,
"-1": 0,
"laugh": 0,
"hooray": 0,
"confused": 0,
"heart": 0,
"rocket": 0,
"eyes": 0
} | https://api.github.com/repos/coleifer/peewee/issues/702/timeline | null | completed | null | null |
https://api.github.com/repos/coleifer/peewee/issues/701 | https://api.github.com/repos/coleifer/peewee | https://api.github.com/repos/coleifer/peewee/issues/701/labels{/name} | https://api.github.com/repos/coleifer/peewee/issues/701/comments | https://api.github.com/repos/coleifer/peewee/issues/701/events | https://github.com/coleifer/peewee/issues/701 | 104,893,641 | MDU6SXNzdWUxMDQ4OTM2NDE= | 701 | Better support for database routing | {
"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 | [
"Relevant https://github.com/coleifer/peewee/issues/689#issuecomment-133063492\n",
"> - Add two new methods on Model called get_read_db() and get_write_db(). Both of which return cls._meta.database by default, ensuring backwards compatibility\n> - Modify anywhere which uses cls._meta.database to use these methods... | 2015-09-04T13:42:34 | 2015-12-04T13:08:41 | 2015-12-02T04:54:18 | CONTRIBUTOR | null | As an extension from the discussions in #582 and #583, I'd like to propose a few changes. The implementation of #583 was rejected on the basis of design, as it would have required a connection manager, something which `peewee` does not handle by design (and rightly so).
Playhouse module [ReadSlave](https://github.com/... | {
"url": "https://api.github.com/repos/coleifer/peewee/issues/701/reactions",
"total_count": 0,
"+1": 0,
"-1": 0,
"laugh": 0,
"hooray": 0,
"confused": 0,
"heart": 0,
"rocket": 0,
"eyes": 0
} | https://api.github.com/repos/coleifer/peewee/issues/701/timeline | null | completed | null | null |
https://api.github.com/repos/coleifer/peewee/issues/700 | https://api.github.com/repos/coleifer/peewee | https://api.github.com/repos/coleifer/peewee/issues/700/labels{/name} | https://api.github.com/repos/coleifer/peewee/issues/700/comments | https://api.github.com/repos/coleifer/peewee/issues/700/events | https://github.com/coleifer/peewee/pull/700 | 104,803,584 | MDExOlB1bGxSZXF1ZXN0NDQxNzEwNTk= | 700 | Add sensible default from Field if Database() wasn't initialized with fields argument | {
"login": "bdpdx",
"id": 3167275,
"node_id": "MDQ6VXNlcjMxNjcyNzU=",
"avatar_url": "https://avatars.githubusercontent.com/u/3167275?v=4",
"gravatar_id": "",
"url": "https://api.github.com/users/bdpdx",
"html_url": "https://github.com/bdpdx",
"followers_url": "https://api.github.com/users/bdpdx/follower... | [] | closed | false | null | [] | null | [
"Cool, let's try it out!\n"
] | 2015-09-03T23:53:46 | 2015-09-04T01:37:00 | 2015-09-04T01:36:56 | CONTRIBUTOR | null | Modified QueryCompiler.get_column_type to return an uppercase version of the f argument if the field type doesn't exist in _field_map.
This enables a sensible default if a Field subclass defines a type supported by the underlying database that isn't passed into the Database() constructor via its fields initializer.
| {
"url": "https://api.github.com/repos/coleifer/peewee/issues/700/reactions",
"total_count": 0,
"+1": 0,
"-1": 0,
"laugh": 0,
"hooray": 0,
"confused": 0,
"heart": 0,
"rocket": 0,
"eyes": 0
} | https://api.github.com/repos/coleifer/peewee/issues/700/timeline | null | null | false | {
"url": "https://api.github.com/repos/coleifer/peewee/pulls/700",
"html_url": "https://github.com/coleifer/peewee/pull/700",
"diff_url": "https://github.com/coleifer/peewee/pull/700.diff",
"patch_url": "https://github.com/coleifer/peewee/pull/700.patch",
"merged_at": "2015-09-04T01:36:56"
} |
https://api.github.com/repos/coleifer/peewee/issues/699 | https://api.github.com/repos/coleifer/peewee | https://api.github.com/repos/coleifer/peewee/issues/699/labels{/name} | https://api.github.com/repos/coleifer/peewee/issues/699/comments | https://api.github.com/repos/coleifer/peewee/issues/699/events | https://github.com/coleifer/peewee/pull/699 | 104,470,225 | MDExOlB1bGxSZXF1ZXN0NDM5ODU3Nzg= | 699 | djpeewee: Use `model_field.column` instead of `get_attname()` | {
"login": "simonpercivall",
"id": 153659,
"node_id": "MDQ6VXNlcjE1MzY1OQ==",
"avatar_url": "https://avatars.githubusercontent.com/u/153659?v=4",
"gravatar_id": "",
"url": "https://api.github.com/users/simonpercivall",
"html_url": "https://github.com/simonpercivall",
"followers_url": "https://api.github... | [] | closed | false | null | [] | null | [
"Nice, thanks!\n"
] | 2015-09-02T12:32:02 | 2015-09-06T17:30:58 | 2015-09-02T13:14:15 | CONTRIBUTOR | null | This bacame an issue when the column was named differently than the
standard "<thing>_id".
Fixes #698
| {
"url": "https://api.github.com/repos/coleifer/peewee/issues/699/reactions",
"total_count": 0,
"+1": 0,
"-1": 0,
"laugh": 0,
"hooray": 0,
"confused": 0,
"heart": 0,
"rocket": 0,
"eyes": 0
} | https://api.github.com/repos/coleifer/peewee/issues/699/timeline | null | null | false | {
"url": "https://api.github.com/repos/coleifer/peewee/pulls/699",
"html_url": "https://github.com/coleifer/peewee/pull/699",
"diff_url": "https://github.com/coleifer/peewee/pull/699.diff",
"patch_url": "https://github.com/coleifer/peewee/pull/699.patch",
"merged_at": "2015-09-02T13:14:15"
} |
https://api.github.com/repos/coleifer/peewee/issues/698 | https://api.github.com/repos/coleifer/peewee | https://api.github.com/repos/coleifer/peewee/issues/698/labels{/name} | https://api.github.com/repos/coleifer/peewee/issues/698/comments | https://api.github.com/repos/coleifer/peewee/issues/698/events | https://github.com/coleifer/peewee/issues/698 | 104,468,312 | MDU6SXNzdWUxMDQ0NjgzMTI= | 698 | djpeewee: ForeignKeys with non-standard column names doesn't work | {
"login": "simonpercivall",
"id": 153659,
"node_id": "MDQ6VXNlcjE1MzY1OQ==",
"avatar_url": "https://avatars.githubusercontent.com/u/153659?v=4",
"gravatar_id": "",
"url": "https://api.github.com/users/simonpercivall",
"html_url": "https://github.com/simonpercivall",
"followers_url": "https://api.github... | [] | closed | false | null | [] | null | [] | 2015-09-02T12:23:25 | 2015-09-02T13:14:15 | 2015-09-02T13:14:15 | CONTRIBUTOR | null | Having a ref that doesn't match the "<thing>_id" works badly when translating Django models to Peewee.
| {
"url": "https://api.github.com/repos/coleifer/peewee/issues/698/reactions",
"total_count": 0,
"+1": 0,
"-1": 0,
"laugh": 0,
"hooray": 0,
"confused": 0,
"heart": 0,
"rocket": 0,
"eyes": 0
} | https://api.github.com/repos/coleifer/peewee/issues/698/timeline | null | completed | null | null |
https://api.github.com/repos/coleifer/peewee/issues/697 | https://api.github.com/repos/coleifer/peewee | https://api.github.com/repos/coleifer/peewee/issues/697/labels{/name} | https://api.github.com/repos/coleifer/peewee/issues/697/comments | https://api.github.com/repos/coleifer/peewee/issues/697/events | https://github.com/coleifer/peewee/issues/697 | 104,463,078 | MDU6SXNzdWUxMDQ0NjMwNzg= | 697 | auto_increment differrent in create and create_or_get | {
"login": "tablecell",
"id": 6591466,
"node_id": "MDQ6VXNlcjY1OTE0NjY=",
"avatar_url": "https://avatars.githubusercontent.com/u/6591466?v=4",
"gravatar_id": "",
"url": "https://api.github.com/users/tablecell",
"html_url": "https://github.com/tablecell",
"followers_url": "https://api.github.com/users/ta... | [] | closed | false | null | [] | null | [
"You should be using `PrimaryKeyField` instead of `IntegerField`. The former is auto increment, while the latter is just an arbitrary int field.\n"
] | 2015-09-02T11:49:03 | 2015-09-02T12:34:48 | 2015-09-02T12:34:48 | NONE | null | ``` python
from peewee import *
from pprint import pprint
db = SqliteDatabase('people.db')
class User(Model):
uid = IntegerField(primary_key=True)
name = CharField()
password = FixedCharField()
class Meta:
database = db # This model uses the "people.db" database.
#db.create_tables([User]... | {
"url": "https://api.github.com/repos/coleifer/peewee/issues/697/reactions",
"total_count": 0,
"+1": 0,
"-1": 0,
"laugh": 0,
"hooray": 0,
"confused": 0,
"heart": 0,
"rocket": 0,
"eyes": 0
} | https://api.github.com/repos/coleifer/peewee/issues/697/timeline | null | completed | null | null |
https://api.github.com/repos/coleifer/peewee/issues/696 | https://api.github.com/repos/coleifer/peewee | https://api.github.com/repos/coleifer/peewee/issues/696/labels{/name} | https://api.github.com/repos/coleifer/peewee/issues/696/comments | https://api.github.com/repos/coleifer/peewee/issues/696/events | https://github.com/coleifer/peewee/issues/696 | 104,460,080 | MDU6SXNzdWUxMDQ0NjAwODA= | 696 | model_to_dict ForeignKeyField problem | {
"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 | [
"In the current master branch there is a new param for `model_to_dict` called `extra_attrs`. You can use that parameter to indicate you want to include the `updater_id`:\n\n``` python\nmodel_to_dict(User, exclude=[User.updater], extra_attrs=['updater_id'])\n```\n",
"@coleifer \nCould you add an argument for `mode... | 2015-09-02T11:33:59 | 2015-09-04T14:13:59 | 2015-09-02T13:11:41 | NONE | null | The Model
```
class User(BaseModel):
user_id = PrimaryKeyField( db_column="user_id")
inserter = ForeignKeyField("self",db_column="inserter_id",to_field="user_id")
updater = ForeignKeyField("self",db_column="updater_id",to_field="user_id", related_name="updated_users")
email = CharField()
passwo... | {
"url": "https://api.github.com/repos/coleifer/peewee/issues/696/reactions",
"total_count": 0,
"+1": 0,
"-1": 0,
"laugh": 0,
"hooray": 0,
"confused": 0,
"heart": 0,
"rocket": 0,
"eyes": 0
} | https://api.github.com/repos/coleifer/peewee/issues/696/timeline | null | completed | null | null |
https://api.github.com/repos/coleifer/peewee/issues/695 | https://api.github.com/repos/coleifer/peewee | https://api.github.com/repos/coleifer/peewee/issues/695/labels{/name} | https://api.github.com/repos/coleifer/peewee/issues/695/comments | https://api.github.com/repos/coleifer/peewee/issues/695/events | https://github.com/coleifer/peewee/issues/695 | 104,201,125 | MDU6SXNzdWUxMDQyMDExMjU= | 695 | Attribute Error during exception handling | {
"login": "conqp",
"id": 3766192,
"node_id": "MDQ6VXNlcjM3NjYxOTI=",
"avatar_url": "https://avatars.githubusercontent.com/u/3766192?v=4",
"gravatar_id": "",
"url": "https://api.github.com/users/conqp",
"html_url": "https://github.com/conqp",
"followers_url": "https://api.github.com/users/conqp/follower... | [] | closed | false | null | [] | null | [
"Thank you, this should be fixed.\n"
] | 2015-09-01T07:08:05 | 2015-09-01T18:31:27 | 2015-09-01T18:31:27 | CONTRIBUTOR | null | Hi, this is probably a bug:
```
Traceback (most recent call last):
File "/usr/local/lib/python3.4/dist-packages/PyMySQL-0.6.3-py3.4.egg/pymysql/connections.py", line 823, in _connect
(self.host, self.port), self.connect_timeout)
File "/usr/lib/python3.4/socket.py", line 491, in create_connection
for res in getaddrinfo... | {
"url": "https://api.github.com/repos/coleifer/peewee/issues/695/reactions",
"total_count": 0,
"+1": 0,
"-1": 0,
"laugh": 0,
"hooray": 0,
"confused": 0,
"heart": 0,
"rocket": 0,
"eyes": 0
} | https://api.github.com/repos/coleifer/peewee/issues/695/timeline | null | completed | null | null |
https://api.github.com/repos/coleifer/peewee/issues/694 | https://api.github.com/repos/coleifer/peewee | https://api.github.com/repos/coleifer/peewee/issues/694/labels{/name} | https://api.github.com/repos/coleifer/peewee/issues/694/comments | https://api.github.com/repos/coleifer/peewee/issues/694/events | https://github.com/coleifer/peewee/issues/694 | 103,874,720 | MDU6SXNzdWUxMDM4NzQ3MjA= | 694 | Discerning what fields "were dirty" in post_save signal | {
"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 | [
"Why not just add a `pre_save` signal handler that sets an additional attribute on the class:\n\n``` python\n@pre_save(sender=SomeModel)\ndef pre_save_handler(sender, instance, created):\n instance._dirty_field_cache = instance.dirty_fields\n\n@post_save(sender=SomeModel)\ndef post_save_handler(sender, instance,... | 2015-08-29T19:55:18 | 2015-09-01T18:33:56 | 2015-09-01T18:33:56 | CONTRIBUTOR | null | Hi! I'm trying to figure out what might be the cleanest way to know what model fields "were dirty" (or, more specifically, if a given field changed) in a signal-supporting model.
I'm thinking adding some kind of field on the signal base `Model` that gets set during the `save` method which is set to the contents of `in... | {
"url": "https://api.github.com/repos/coleifer/peewee/issues/694/reactions",
"total_count": 0,
"+1": 0,
"-1": 0,
"laugh": 0,
"hooray": 0,
"confused": 0,
"heart": 0,
"rocket": 0,
"eyes": 0
} | https://api.github.com/repos/coleifer/peewee/issues/694/timeline | null | completed | null | null |
https://api.github.com/repos/coleifer/peewee/issues/693 | https://api.github.com/repos/coleifer/peewee | https://api.github.com/repos/coleifer/peewee/issues/693/labels{/name} | https://api.github.com/repos/coleifer/peewee/issues/693/comments | https://api.github.com/repos/coleifer/peewee/issues/693/events | https://github.com/coleifer/peewee/issues/693 | 103,418,855 | MDU6SXNzdWUxMDM0MTg4NTU= | 693 | How can I control retry times when I use sql_error_handler to retry SQL execution? | {
"login": "messense",
"id": 1556054,
"node_id": "MDQ6VXNlcjE1NTYwNTQ=",
"avatar_url": "https://avatars.githubusercontent.com/u/1556054?v=4",
"gravatar_id": "",
"url": "https://api.github.com/users/messense",
"html_url": "https://github.com/messense",
"followers_url": "https://api.github.com/users/messe... | [] | closed | false | null | [] | null | [
"Figure out a way myself. Sample codes:\n\n``` python\nimport logging\n\nfrom playhouse.pool import PooledMySQLDatabase\nfrom peewee import OperationalError\n\n\nlogger = logging.getLogger(__name__)\n\n\nclass RetryPooledMySQLDatabase(PooledMySQLDatabase):\n\n def sql_error_handler(self, exception, sql, params, ... | 2015-08-27T03:27:39 | 2015-08-27T05:10:12 | 2015-08-27T05:10:12 | CONTRIBUTOR | null | I am using the RetryDatabase example code I found in peewee test cases.
https://github.com/coleifer/peewee/blob/db328731034e45fb4f8a1a2a4a562da1dc0d1f23/playhouse/tests/test_database.py#L183
The problem is that I want to control retry times manually. How can I do that in a nice way?
| {
"url": "https://api.github.com/repos/coleifer/peewee/issues/693/reactions",
"total_count": 0,
"+1": 0,
"-1": 0,
"laugh": 0,
"hooray": 0,
"confused": 0,
"heart": 0,
"rocket": 0,
"eyes": 0
} | https://api.github.com/repos/coleifer/peewee/issues/693/timeline | null | completed | null | null |
https://api.github.com/repos/coleifer/peewee/issues/692 | https://api.github.com/repos/coleifer/peewee | https://api.github.com/repos/coleifer/peewee/issues/692/labels{/name} | https://api.github.com/repos/coleifer/peewee/issues/692/comments | https://api.github.com/repos/coleifer/peewee/issues/692/events | https://github.com/coleifer/peewee/issues/692 | 103,171,169 | MDU6SXNzdWUxMDMxNzExNjk= | 692 | Multiple joins to same table | {
"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 | [
"If you add an alias to the second join specifying which attribute to use, peewee will do the right thing:\n\n``` python\nOpponent = User.alias()\nquery = (GameResult\n .select(GameResult, User, Opponent)\n .join(User, on=(GameResult.user == User.id))\n .switch(GameResult)\n .join(Op... | 2015-08-26T04:21:24 | 2016-02-24T07:18:31 | 2015-08-27T01:58:46 | OWNER | null | Hello,
Following the example you've given, I constructed a query for my models, which are like the models below:
``` python
class User(db.Model):
username = CharField()
class GameResult(db.Model):
user = ForeignKeyField(User)
opponent = ForeignKeyField(User, related_name='opponent_gameresult_set', null=Tr... | {
"url": "https://api.github.com/repos/coleifer/peewee/issues/692/reactions",
"total_count": 0,
"+1": 0,
"-1": 0,
"laugh": 0,
"hooray": 0,
"confused": 0,
"heart": 0,
"rocket": 0,
"eyes": 0
} | https://api.github.com/repos/coleifer/peewee/issues/692/timeline | null | completed | null | null |
https://api.github.com/repos/coleifer/peewee/issues/691 | https://api.github.com/repos/coleifer/peewee | https://api.github.com/repos/coleifer/peewee/issues/691/labels{/name} | https://api.github.com/repos/coleifer/peewee/issues/691/comments | https://api.github.com/repos/coleifer/peewee/issues/691/events | https://github.com/coleifer/peewee/issues/691 | 102,791,483 | MDU6SXNzdWUxMDI3OTE0ODM= | 691 | Allow arbitrary model attrs and methods to be serialized in model_to_dict() | {
"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 | [] | 2015-08-24T13:18:52 | 2015-08-24T16:08:12 | 2015-08-24T16:08:12 | OWNER | null | see subj.
| {
"url": "https://api.github.com/repos/coleifer/peewee/issues/691/reactions",
"total_count": 0,
"+1": 0,
"-1": 0,
"laugh": 0,
"hooray": 0,
"confused": 0,
"heart": 0,
"rocket": 0,
"eyes": 0
} | https://api.github.com/repos/coleifer/peewee/issues/691/timeline | null | completed | null | null |
https://api.github.com/repos/coleifer/peewee/issues/690 | https://api.github.com/repos/coleifer/peewee | https://api.github.com/repos/coleifer/peewee/issues/690/labels{/name} | https://api.github.com/repos/coleifer/peewee/issues/690/comments | https://api.github.com/repos/coleifer/peewee/issues/690/events | https://github.com/coleifer/peewee/issues/690 | 102,470,531 | MDU6SXNzdWUxMDI0NzA1MzE= | 690 | ascii codec error while running execute_sql | {
"login": "roozbehid",
"id": 7875383,
"node_id": "MDQ6VXNlcjc4NzUzODM=",
"avatar_url": "https://avatars.githubusercontent.com/u/7875383?v=4",
"gravatar_id": "",
"url": "https://api.github.com/users/roozbehid",
"html_url": "https://github.com/roozbehid",
"followers_url": "https://api.github.com/users/ro... | [] | closed | false | null | [] | null | [
"Using an interactive debugger, are you able to examine the message of the warning that is failing to be displayed? My feeling is that this is not an issue with Peewee, but I'd like to be sure before closing.\n",
"``` python\nfile.write(formatwarning(message, category, filename, lineno, line)\n```\n\nThat is the ... | 2015-08-21T22:00:35 | 2015-08-22T02:26:38 | 2015-08-22T02:26:38 | NONE | null | I have a simple execute_sql command like this
```
self.db.execute_sql("""
INSERT IGNORE INTO artists (name,alias_name)
select name,alias_name
from my_actors""")
```
The first time I run it (which I mean there are no duplicates...) it runs fine.
But second times it give me
... | {
"url": "https://api.github.com/repos/coleifer/peewee/issues/690/reactions",
"total_count": 0,
"+1": 0,
"-1": 0,
"laugh": 0,
"hooray": 0,
"confused": 0,
"heart": 0,
"rocket": 0,
"eyes": 0
} | https://api.github.com/repos/coleifer/peewee/issues/690/timeline | null | completed | null | null |
https://api.github.com/repos/coleifer/peewee/issues/689 | https://api.github.com/repos/coleifer/peewee | https://api.github.com/repos/coleifer/peewee/issues/689/labels{/name} | https://api.github.com/repos/coleifer/peewee/issues/689/comments | https://api.github.com/repos/coleifer/peewee/issues/689/events | https://github.com/coleifer/peewee/issues/689 | 101,439,740 | MDU6SXNzdWUxMDE0Mzk3NDA= | 689 | Read-only slave connections are not closed | {
"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 | [
"@stas -- what do you mean by read-only? You mean the `ReadSlaveModel` from `playhouse.read_slave`?\n\nCan you share some code so I can get a better idea of your configuration, as well as the problem you're experiencing?\n",
"> @stas -- what do you mean by read-only? You mean the ReadSlaveModel from playhouse.rea... | 2015-08-17T14:53:19 | 2015-08-21T23:19:28 | 2015-08-20T14:22:41 | NONE | null | Using a read-only pooled database as a slave won't close its connections.
I also found it is pretty hard to manually manage these as it is now suggested in case of connection pools. This is mainly because the read queries are randomly picking connections so it is really hard to track those. We're still exploring some ... | {
"url": "https://api.github.com/repos/coleifer/peewee/issues/689/reactions",
"total_count": 0,
"+1": 0,
"-1": 0,
"laugh": 0,
"hooray": 0,
"confused": 0,
"heart": 0,
"rocket": 0,
"eyes": 0
} | https://api.github.com/repos/coleifer/peewee/issues/689/timeline | null | completed | null | null |
https://api.github.com/repos/coleifer/peewee/issues/688 | https://api.github.com/repos/coleifer/peewee | https://api.github.com/repos/coleifer/peewee/issues/688/labels{/name} | https://api.github.com/repos/coleifer/peewee/issues/688/comments | https://api.github.com/repos/coleifer/peewee/issues/688/events | https://github.com/coleifer/peewee/issues/688 | 101,036,168 | MDU6SXNzdWUxMDEwMzYxNjg= | 688 | Behavior of << differs from .in_() method for 2+ item lists | {
"login": "chrisinmtown",
"id": 10234212,
"node_id": "MDQ6VXNlcjEwMjM0MjEy",
"avatar_url": "https://avatars.githubusercontent.com/u/10234212?v=4",
"gravatar_id": "",
"url": "https://api.github.com/users/chrisinmtown",
"html_url": "https://github.com/chrisinmtown",
"followers_url": "https://api.github.c... | [] | closed | false | null | [] | null | [
"Weird, thanks for reporting.\n",
"Are you using an older version of peewee? I think the issue was that in older versions there was a bug where `in_()` took `*args` rather than a single list.\n\nThe bug was fixed in fcfd914f, part of the 2.5.1 release.\n",
"Omitted the version in my initial report, sorry, I was... | 2015-08-14T15:31:41 | 2015-08-14T16:37:35 | 2015-08-14T16:37:34 | NONE | null | I have a query that checks whether a 1-character column value is a member of a 4-element list. If I write the query in Peewee using the << operator it works fine (I'm using constants):
```
& (Doc2.doctype << [Doc2.DOCTYPE_A, Doc2.DOCTYPE_B, Doc2.DOCTYPE_C, Doc2.DOCTYPE_D])
```
However if I write the query... | {
"url": "https://api.github.com/repos/coleifer/peewee/issues/688/reactions",
"total_count": 0,
"+1": 0,
"-1": 0,
"laugh": 0,
"hooray": 0,
"confused": 0,
"heart": 0,
"rocket": 0,
"eyes": 0
} | https://api.github.com/repos/coleifer/peewee/issues/688/timeline | null | completed | null | null |
https://api.github.com/repos/coleifer/peewee/issues/687 | https://api.github.com/repos/coleifer/peewee | https://api.github.com/repos/coleifer/peewee/issues/687/labels{/name} | https://api.github.com/repos/coleifer/peewee/issues/687/comments | https://api.github.com/repos/coleifer/peewee/issues/687/events | https://github.com/coleifer/peewee/pull/687 | 100,941,060 | MDExOlB1bGxSZXF1ZXN0NDI0MjYxOTY= | 687 | Make it possible to use ``upsert`` and ``on_conflict`` on MySQL | {
"login": "messense",
"id": 1556054,
"node_id": "MDQ6VXNlcjE1NTYwNTQ=",
"avatar_url": "https://avatars.githubusercontent.com/u/1556054?v=4",
"gravatar_id": "",
"url": "https://api.github.com/users/messense",
"html_url": "https://github.com/messense",
"followers_url": "https://api.github.com/users/messe... | [] | closed | false | null | [] | null | [
"Cool, this is a nice start.\n",
"This behavior was added in #753.\n"
] | 2015-08-14T05:56:05 | 2015-11-19T22:55:24 | 2015-11-19T22:55:24 | CONTRIBUTOR | null | Ref #684
I am not sure how to write a corresponding test case for now.
And I don't know if it is ok to use `isintance(meta.database, MySQLDatabase` here. What do you think?
| {
"url": "https://api.github.com/repos/coleifer/peewee/issues/687/reactions",
"total_count": 0,
"+1": 0,
"-1": 0,
"laugh": 0,
"hooray": 0,
"confused": 0,
"heart": 0,
"rocket": 0,
"eyes": 0
} | https://api.github.com/repos/coleifer/peewee/issues/687/timeline | null | null | false | {
"url": "https://api.github.com/repos/coleifer/peewee/pulls/687",
"html_url": "https://github.com/coleifer/peewee/pull/687",
"diff_url": "https://github.com/coleifer/peewee/pull/687.diff",
"patch_url": "https://github.com/coleifer/peewee/pull/687.patch",
"merged_at": null
} |
https://api.github.com/repos/coleifer/peewee/issues/686 | https://api.github.com/repos/coleifer/peewee | https://api.github.com/repos/coleifer/peewee/issues/686/labels{/name} | https://api.github.com/repos/coleifer/peewee/issues/686/comments | https://api.github.com/repos/coleifer/peewee/issues/686/events | https://github.com/coleifer/peewee/issues/686 | 100,578,334 | MDU6SXNzdWUxMDA1NzgzMzQ= | 686 | Curiosity: how would I go about implementing a refresh() method on 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 think what you have in your first snippet is good.\n\n``` python\ninstance = Model.get(...)\n\n...\n\ninstance = instance.refresh()\n```\n\nThe `refresh()` method could be:\n\n``` python\ndef refresh(self):\n return type(self).get(self._pk_expr())\n```\n",
"How about adding this to core? I too would find it... | 2015-08-12T16:04:53 | 2016-10-19T09:26:53 | 2015-08-13T05:57:43 | CONTRIBUTOR | null | Here's the scoop:
The project I'm working on creates the scenario where I have local variables holding instances of a variety of Models. Changes to some have side-effects on the others (intentional ones, via signals). Right now I'm using the following to "refresh" a model instance when I want to ensure the data is up-... | {
"url": "https://api.github.com/repos/coleifer/peewee/issues/686/reactions",
"total_count": 0,
"+1": 0,
"-1": 0,
"laugh": 0,
"hooray": 0,
"confused": 0,
"heart": 0,
"rocket": 0,
"eyes": 0
} | https://api.github.com/repos/coleifer/peewee/issues/686/timeline | null | completed | null | null |
https://api.github.com/repos/coleifer/peewee/issues/685 | https://api.github.com/repos/coleifer/peewee | https://api.github.com/repos/coleifer/peewee/issues/685/labels{/name} | https://api.github.com/repos/coleifer/peewee/issues/685/comments | https://api.github.com/repos/coleifer/peewee/issues/685/events | https://github.com/coleifer/peewee/issues/685 | 100,356,150 | MDU6SXNzdWUxMDAzNTYxNTA= | 685 | Examples of how to add request hooks in wheezy.web | {
"login": "thirashima",
"id": 12535,
"node_id": "MDQ6VXNlcjEyNTM1",
"avatar_url": "https://avatars.githubusercontent.com/u/12535?v=4",
"gravatar_id": "",
"url": "https://api.github.com/users/thirashima",
"html_url": "https://github.com/thirashima",
"followers_url": "https://api.github.com/users/thirash... | [] | closed | false | null | [] | null | [
"Don't know the framework, but you should probably use [middleware](https://pythonhosted.org/wheezy.http/userguide.html#middleware). Assuming `peewee_middleware` is never the last one:\n\n```\ndef peewee_middleware(request, following):\n db.connect()\n try:\n response = following(request)\n finally:... | 2015-08-11T16:45:23 | 2015-08-14T01:27:53 | 2015-08-13T06:20:36 | NONE | null | I'd like to see an example of how to add request hooks for db connection management to the wheezy.web framework. I've tried to figure it out myself, but it is non-obvious to me. Thanks!
| {
"url": "https://api.github.com/repos/coleifer/peewee/issues/685/reactions",
"total_count": 0,
"+1": 0,
"-1": 0,
"laugh": 0,
"hooray": 0,
"confused": 0,
"heart": 0,
"rocket": 0,
"eyes": 0
} | https://api.github.com/repos/coleifer/peewee/issues/685/timeline | null | completed | null | null |
https://api.github.com/repos/coleifer/peewee/issues/684 | https://api.github.com/repos/coleifer/peewee | https://api.github.com/repos/coleifer/peewee/issues/684/labels{/name} | https://api.github.com/repos/coleifer/peewee/issues/684/comments | https://api.github.com/repos/coleifer/peewee/issues/684/events | https://github.com/coleifer/peewee/issues/684 | 99,769,966 | MDU6SXNzdWU5OTc2OTk2Ng== | 684 | Does peewee support MySQL REPLACE INTO syntax? | {
"login": "messense",
"id": 1556054,
"node_id": "MDQ6VXNlcjE1NTYwNTQ=",
"avatar_url": "https://avatars.githubusercontent.com/u/1556054?v=4",
"gravatar_id": "",
"url": "https://api.github.com/users/messense",
"html_url": "https://github.com/messense",
"followers_url": "https://api.github.com/users/messe... | [] | closed | false | null | [] | null | [
"Not at present, but I would consider a pull request and would work with you on getting the code into good shape. For now I'd suggest using hand-written SQL queries if you want upserts with MySQL.\n"
] | 2015-08-08T04:23:26 | 2015-08-13T06:22:55 | 2015-08-13T06:22:55 | CONTRIBUTOR | null | I only see upsert support for SQLite in documentation.
And another question, does peewee support MySQL `INSERT IGNORE` or `INSERT...ON DUPLICATE KEY UPDATE` syntax?
| {
"url": "https://api.github.com/repos/coleifer/peewee/issues/684/reactions",
"total_count": 0,
"+1": 0,
"-1": 0,
"laugh": 0,
"hooray": 0,
"confused": 0,
"heart": 0,
"rocket": 0,
"eyes": 0
} | https://api.github.com/repos/coleifer/peewee/issues/684/timeline | null | completed | null | null |
https://api.github.com/repos/coleifer/peewee/issues/683 | https://api.github.com/repos/coleifer/peewee | https://api.github.com/repos/coleifer/peewee/issues/683/labels{/name} | https://api.github.com/repos/coleifer/peewee/issues/683/comments | https://api.github.com/repos/coleifer/peewee/issues/683/events | https://github.com/coleifer/peewee/issues/683 | 99,153,944 | MDU6SXNzdWU5OTE1Mzk0NA== | 683 | Support for the MySQL BIT data type | {
"login": "jmenglund",
"id": 6959349,
"node_id": "MDQ6VXNlcjY5NTkzNDk=",
"avatar_url": "https://avatars.githubusercontent.com/u/6959349?v=4",
"gravatar_id": "",
"url": "https://api.github.com/users/jmenglund",
"html_url": "https://github.com/jmenglund",
"followers_url": "https://api.github.com/users/jm... | [] | closed | false | null | [] | null | [
"At present Peewee uses the `bool` data-type, which is also what Django uses for BooleanField in Django.\n\nIf you want `Bit` specifically you can either create a custom field, or specify a field override:\n- http://docs.peewee-orm.com/en/latest/peewee/models.html#creating-a-custom-field\n- http://docs.peewee-orm.c... | 2015-08-05T08:45:31 | 2017-01-06T11:24:13 | 2015-08-05T15:44:27 | NONE | null | http://dev.mysql.com/doc/refman/5.7/en/bit-type.html
http://stackoverflow.com/questions/289727/which-mysql-datatype-to-use-for-storing-boolean-values
For my own databases I would probably not use the BIT data type at all (see for example http://www.xaprb.com/blog/2006/04/11/bit-values-in-mysql/) but I need it in orde... | {
"url": "https://api.github.com/repos/coleifer/peewee/issues/683/reactions",
"total_count": 0,
"+1": 0,
"-1": 0,
"laugh": 0,
"hooray": 0,
"confused": 0,
"heart": 0,
"rocket": 0,
"eyes": 0
} | https://api.github.com/repos/coleifer/peewee/issues/683/timeline | null | completed | null | null |
https://api.github.com/repos/coleifer/peewee/issues/682 | https://api.github.com/repos/coleifer/peewee | https://api.github.com/repos/coleifer/peewee/issues/682/labels{/name} | https://api.github.com/repos/coleifer/peewee/issues/682/comments | https://api.github.com/repos/coleifer/peewee/issues/682/events | https://github.com/coleifer/peewee/issues/682 | 99,020,232 | MDU6SXNzdWU5OTAyMDIzMg== | 682 | Unexpected behavior doing nested iteration on a SelectQuery | {
"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 | [
"Here is a description of the problem:\n\n``` python\n# create 5 users, named user0-user4\nquery = User.select()\nfor o in query:\n print 'o ->', o.username\n for i in query:\n print ' i ->', i.username\n```\n\nThis will print:\n\n```\no -> u0\n i -> u0\n i -> u1\n i -> u2\n i -> u3\n ... | 2015-08-04T17:36:50 | 2015-09-04T03:09:32 | 2015-09-04T03:08:44 | NONE | null | Hi, I wanted to bring an issue to your attention: nested iteration of SelectQuery results doesn't work as expected. You can see an example, and a workaround, on my StackOverflow question:
http://stackoverflow.com/questions/31815235/python-peewee-iterate-over-selectquery
Is there an iterator that needs to be reset some... | {
"url": "https://api.github.com/repos/coleifer/peewee/issues/682/reactions",
"total_count": 0,
"+1": 0,
"-1": 0,
"laugh": 0,
"hooray": 0,
"confused": 0,
"heart": 0,
"rocket": 0,
"eyes": 0
} | https://api.github.com/repos/coleifer/peewee/issues/682/timeline | null | completed | null | null |
https://api.github.com/repos/coleifer/peewee/issues/681 | https://api.github.com/repos/coleifer/peewee | https://api.github.com/repos/coleifer/peewee/issues/681/labels{/name} | https://api.github.com/repos/coleifer/peewee/issues/681/comments | https://api.github.com/repos/coleifer/peewee/issues/681/events | https://github.com/coleifer/peewee/pull/681 | 98,694,875 | MDExOlB1bGxSZXF1ZXN0NDE0NDM5MzU= | 681 | Add multi-column unique constraints support for Model.create_or_get | {
"login": "messense",
"id": 1556054,
"node_id": "MDQ6VXNlcjE1NTYwNTQ=",
"avatar_url": "https://avatars.githubusercontent.com/u/1556054?v=4",
"gravatar_id": "",
"url": "https://api.github.com/users/messense",
"html_url": "https://github.com/messense",
"followers_url": "https://api.github.com/users/messe... | [] | closed | false | null | [] | null | [
"Could probably tidy up the code a little, and we'll need sign off from @coleifer on the `query` conditional, but assuming those two things are signed off, then LGTM.\n",
"@messense Has this already been merged into master?",
"I don't know. I haven't used peewee for a long time and I think I won't be working on... | 2015-08-03T08:17:28 | 2017-07-05T16:08:49 | 2017-07-05T10:32:29 | CONTRIBUTOR | null | {
"url": "https://api.github.com/repos/coleifer/peewee/issues/681/reactions",
"total_count": 0,
"+1": 0,
"-1": 0,
"laugh": 0,
"hooray": 0,
"confused": 0,
"heart": 0,
"rocket": 0,
"eyes": 0
} | https://api.github.com/repos/coleifer/peewee/issues/681/timeline | null | null | false | {
"url": "https://api.github.com/repos/coleifer/peewee/pulls/681",
"html_url": "https://github.com/coleifer/peewee/pull/681",
"diff_url": "https://github.com/coleifer/peewee/pull/681.diff",
"patch_url": "https://github.com/coleifer/peewee/pull/681.patch",
"merged_at": null
} | |
https://api.github.com/repos/coleifer/peewee/issues/680 | https://api.github.com/repos/coleifer/peewee | https://api.github.com/repos/coleifer/peewee/issues/680/labels{/name} | https://api.github.com/repos/coleifer/peewee/issues/680/comments | https://api.github.com/repos/coleifer/peewee/issues/680/events | https://github.com/coleifer/peewee/issues/680 | 98,423,986 | MDU6SXNzdWU5ODQyMzk4Ng== | 680 | reflection module is using a not convenient import statement | {
"login": "aliubchenko",
"id": 3506595,
"node_id": "MDQ6VXNlcjM1MDY1OTU=",
"avatar_url": "https://avatars.githubusercontent.com/u/3506595?v=4",
"gravatar_id": "",
"url": "https://api.github.com/users/aliubchenko",
"html_url": "https://github.com/aliubchenko",
"followers_url": "https://api.github.com/us... | [] | closed | false | null | [] | null | [
"I don't really think this is a use-case I had intended to cover.\n"
] | 2015-07-31T16:26:05 | 2015-07-31T18:01:03 | 2015-07-31T18:01:03 | NONE | null | Reflection.py has this as the import statement:
from peewee import *
When you include peewee in your own package of libraries and use it, all classes from peewee become <your_package>.peewee.*
However, for models that were created using Introspection, peewee classes are still peewee.\* because of that import statement... | {
"url": "https://api.github.com/repos/coleifer/peewee/issues/680/reactions",
"total_count": 0,
"+1": 0,
"-1": 0,
"laugh": 0,
"hooray": 0,
"confused": 0,
"heart": 0,
"rocket": 0,
"eyes": 0
} | https://api.github.com/repos/coleifer/peewee/issues/680/timeline | null | completed | null | null |
https://api.github.com/repos/coleifer/peewee/issues/679 | https://api.github.com/repos/coleifer/peewee | https://api.github.com/repos/coleifer/peewee/issues/679/labels{/name} | https://api.github.com/repos/coleifer/peewee/issues/679/comments | https://api.github.com/repos/coleifer/peewee/issues/679/events | https://github.com/coleifer/peewee/issues/679 | 98,202,022 | MDU6SXNzdWU5ODIwMjAyMg== | 679 | [Question] Why can't I assign a new model instance to a model's foreign-key field | {
"login": "EPadronU",
"id": 829947,
"node_id": "MDQ6VXNlcjgyOTk0Nw==",
"avatar_url": "https://avatars.githubusercontent.com/u/829947?v=4",
"gravatar_id": "",
"url": "https://api.github.com/users/EPadronU",
"html_url": "https://github.com/EPadronU",
"followers_url": "https://api.github.com/users/EPadron... | [] | closed | false | null | [] | null | [
"That's an interesting point and has to do with the implementation of the descriptor. When the value is set (you assign the `File()` obj), the file has no primary key so peewee records `None` as the related object ID. The fact that the `File` later gets an ID is not caught by the field.\n\nI think this warrants som... | 2015-07-30T15:50:28 | 2015-09-02T16:56:06 | 2015-09-02T16:56:06 | NONE | null | ## Sample layout
``` python
class File(database.Model):
pass
class User(database.Model):
file = ForeignKeyField(File)
pass
```
## The code that reproduces the _odd_ behavior
``` python
>> user = User.get(id=1)
>> user.file = File()
>> user.file.save()
>> user.save()
>> user = User.get(id=1)
>> user.file
N... | {
"url": "https://api.github.com/repos/coleifer/peewee/issues/679/reactions",
"total_count": 0,
"+1": 0,
"-1": 0,
"laugh": 0,
"hooray": 0,
"confused": 0,
"heart": 0,
"rocket": 0,
"eyes": 0
} | https://api.github.com/repos/coleifer/peewee/issues/679/timeline | null | completed | null | null |
https://api.github.com/repos/coleifer/peewee/issues/678 | https://api.github.com/repos/coleifer/peewee | https://api.github.com/repos/coleifer/peewee/issues/678/labels{/name} | https://api.github.com/repos/coleifer/peewee/issues/678/comments | https://api.github.com/repos/coleifer/peewee/issues/678/events | https://github.com/coleifer/peewee/pull/678 | 98,196,302 | MDExOlB1bGxSZXF1ZXN0NDEyNDY1Njc= | 678 | Added default values of None to fix pylint complaining | {
"login": "danthedeckie",
"id": 1070206,
"node_id": "MDQ6VXNlcjEwNzAyMDY=",
"avatar_url": "https://avatars.githubusercontent.com/u/1070206?v=4",
"gravatar_id": "",
"url": "https://api.github.com/users/danthedeckie",
"html_url": "https://github.com/danthedeckie",
"followers_url": "https://api.github.com... | [] | closed | false | null | [] | null | [] | 2015-07-30T15:22:38 | 2015-07-30T15:52:41 | 2015-07-30T15:52:41 | NONE | null | Fixes #677, but not elegantly.
A better solution should somehow allow for parameters as well...
| {
"url": "https://api.github.com/repos/coleifer/peewee/issues/678/reactions",
"total_count": 0,
"+1": 0,
"-1": 0,
"laugh": 0,
"hooray": 0,
"confused": 0,
"heart": 0,
"rocket": 0,
"eyes": 0
} | https://api.github.com/repos/coleifer/peewee/issues/678/timeline | null | null | false | {
"url": "https://api.github.com/repos/coleifer/peewee/pulls/678",
"html_url": "https://github.com/coleifer/peewee/pull/678",
"diff_url": "https://github.com/coleifer/peewee/pull/678.diff",
"patch_url": "https://github.com/coleifer/peewee/pull/678.patch",
"merged_at": null
} |
https://api.github.com/repos/coleifer/peewee/issues/677 | https://api.github.com/repos/coleifer/peewee | https://api.github.com/repos/coleifer/peewee/issues/677/labels{/name} | https://api.github.com/repos/coleifer/peewee/issues/677/comments | https://api.github.com/repos/coleifer/peewee/issues/677/events | https://github.com/coleifer/peewee/issues/677 | 98,195,723 | MDU6SXNzdWU5ODE5NTcyMw== | 677 | pylint complains no-value-for-parameter on Object instatiation... | {
"login": "danthedeckie",
"id": 1070206,
"node_id": "MDQ6VXNlcjEwNzAyMDY=",
"avatar_url": "https://avatars.githubusercontent.com/u/1070206?v=4",
"gravatar_id": "",
"url": "https://api.github.com/users/danthedeckie",
"html_url": "https://github.com/danthedeckie",
"followers_url": "https://api.github.com... | [] | closed | false | null | [] | null | [
"wontfix\n"
] | 2015-07-30T15:19:34 | 2015-07-30T15:52:34 | 2015-07-30T15:52:34 | NONE | null | Python 2.7, creating objects e.g.:
``` python
mike = Person()
```
results in pylint complaining with `no-value-for-parameter`, missing `names`, `bases`, `attrs`.
| {
"url": "https://api.github.com/repos/coleifer/peewee/issues/677/reactions",
"total_count": 0,
"+1": 0,
"-1": 0,
"laugh": 0,
"hooray": 0,
"confused": 0,
"heart": 0,
"rocket": 0,
"eyes": 0
} | https://api.github.com/repos/coleifer/peewee/issues/677/timeline | null | completed | null | null |
https://api.github.com/repos/coleifer/peewee/issues/676 | https://api.github.com/repos/coleifer/peewee | https://api.github.com/repos/coleifer/peewee/issues/676/labels{/name} | https://api.github.com/repos/coleifer/peewee/issues/676/comments | https://api.github.com/repos/coleifer/peewee/issues/676/events | https://github.com/coleifer/peewee/issues/676 | 97,875,232 | MDU6SXNzdWU5Nzg3NTIzMg== | 676 | ArrayField does not accept tuples | {
"login": "bdoms",
"id": 126839,
"node_id": "MDQ6VXNlcjEyNjgzOQ==",
"avatar_url": "https://avatars.githubusercontent.com/u/126839?v=4",
"gravatar_id": "",
"url": "https://api.github.com/users/bdoms",
"html_url": "https://github.com/bdoms",
"followers_url": "https://api.github.com/users/bdoms/followers"... | [] | closed | false | null | [] | null | [] | 2015-07-29T07:02:18 | 2015-07-29T15:26:20 | 2015-07-29T15:26:20 | NONE | null | So I love peewee. It's great. No problems so far, but I did just run into this strange behavior. Using an ArrayField for postgres from the playhouse (which is an awesome extension) and I had a function that output several values and I tried to use those directly. Something like:
``` python
def foo():
return a, b, ... | {
"url": "https://api.github.com/repos/coleifer/peewee/issues/676/reactions",
"total_count": 0,
"+1": 0,
"-1": 0,
"laugh": 0,
"hooray": 0,
"confused": 0,
"heart": 0,
"rocket": 0,
"eyes": 0
} | https://api.github.com/repos/coleifer/peewee/issues/676/timeline | null | completed | null | null |
https://api.github.com/repos/coleifer/peewee/issues/675 | https://api.github.com/repos/coleifer/peewee | https://api.github.com/repos/coleifer/peewee/issues/675/labels{/name} | https://api.github.com/repos/coleifer/peewee/issues/675/comments | https://api.github.com/repos/coleifer/peewee/issues/675/events | https://github.com/coleifer/peewee/issues/675 | 97,850,572 | MDU6SXNzdWU5Nzg1MDU3Mg== | 675 | Prefetch syntax | {
"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 | [
"This is to differentiate pre-fetched \"static\" results from the descriptor that exposes related objects as a `SelectQuery`.\n\nI do not plan on changing this, but you can modify your code:\n\n``` python\ndef format_messages(user):\n messages = getattr(user, 'messages_prefetch', user.messages)\n return [mess... | 2015-07-29T03:25:15 | 2015-07-29T15:43:12 | 2015-07-29T15:43:11 | CONTRIBUTOR | null | Hey Charles,
I've been writing a few methods with prefetch and find it incredibly useful but I wondered why the syntax is different to the regular, non-prefetch solution and whether it's possible to merge the two approaches.
For example:
``` python
class User(Model):
name = CharField()
class Message(Model):
... | {
"url": "https://api.github.com/repos/coleifer/peewee/issues/675/reactions",
"total_count": 0,
"+1": 0,
"-1": 0,
"laugh": 0,
"hooray": 0,
"confused": 0,
"heart": 0,
"rocket": 0,
"eyes": 0
} | https://api.github.com/repos/coleifer/peewee/issues/675/timeline | null | completed | null | null |
https://api.github.com/repos/coleifer/peewee/issues/674 | https://api.github.com/repos/coleifer/peewee | https://api.github.com/repos/coleifer/peewee/issues/674/labels{/name} | https://api.github.com/repos/coleifer/peewee/issues/674/comments | https://api.github.com/repos/coleifer/peewee/issues/674/events | https://github.com/coleifer/peewee/issues/674 | 97,821,940 | MDU6SXNzdWU5NzgyMTk0MA== | 674 | [Bug?] Relationships involving a one-to-one relationship throw an exception | {
"login": "EPadronU",
"id": 829947,
"node_id": "MDQ6VXNlcjgyOTk0Nw==",
"avatar_url": "https://avatars.githubusercontent.com/u/829947?v=4",
"gravatar_id": "",
"url": "https://api.github.com/users/EPadronU",
"html_url": "https://github.com/EPadronU",
"followers_url": "https://api.github.com/users/EPadron... | [] | closed | false | null | [] | null | [
"Thanks for reporting, fixed in c1030f58c0df67b28fefa75182d6a93698921e01\n",
"Thanks for fixing it so quickly. Cheers.\n"
] | 2015-07-28T23:19:38 | 2015-07-29T18:40:08 | 2015-07-29T16:20:26 | NONE | null | ## Sample layout
```
class User(database.Model):
pass
class Patient(database.Model):
user = ForeignKeyField(User, primary_key=True)
class Disease(database.Model):
pass
class PatientDisease(database.Model):
patient = ForeignKeyField(Patient)
disease = ForeignKeyField(Disease)
```
## The code t... | {
"url": "https://api.github.com/repos/coleifer/peewee/issues/674/reactions",
"total_count": 0,
"+1": 0,
"-1": 0,
"laugh": 0,
"hooray": 0,
"confused": 0,
"heart": 0,
"rocket": 0,
"eyes": 0
} | https://api.github.com/repos/coleifer/peewee/issues/674/timeline | null | completed | null | null |
https://api.github.com/repos/coleifer/peewee/issues/673 | https://api.github.com/repos/coleifer/peewee | https://api.github.com/repos/coleifer/peewee/issues/673/labels{/name} | https://api.github.com/repos/coleifer/peewee/issues/673/comments | https://api.github.com/repos/coleifer/peewee/issues/673/events | https://github.com/coleifer/peewee/issues/673 | 97,793,429 | MDU6SXNzdWU5Nzc5MzQyOQ== | 673 | Allow specifying MySQL Index Sizes for large columns | {
"login": "jakedt",
"id": 2183986,
"node_id": "MDQ6VXNlcjIxODM5ODY=",
"avatar_url": "https://avatars.githubusercontent.com/u/2183986?v=4",
"gravatar_id": "",
"url": "https://api.github.com/users/jakedt",
"html_url": "https://github.com/jakedt",
"followers_url": "https://api.github.com/users/jakedt/foll... | [] | closed | false | null | [] | null | [
"IIRC, the newer versions are throwing this error, because they default to having `STRICT_TRANS_TABLES` on.\n",
"@jakedt -- I'm not quite sure I understand. What exactly is going on here?\n",
"When we define a large column that is to be indexed, e.g.:\n\n``` python\nbig_col = CharField(index=True, max_length=10... | 2015-07-28T20:20:23 | 2015-07-31T03:57:33 | 2015-07-30T14:58:44 | NONE | null | InternalError: (1071, u'Specified key was too long; max key length is 767 bytes')
We get this when we use peewee to `create_table`s, and we have an index constraint on a column larger than 767. Apparently in the past MySQL has just truncated these indices to 767 silently, but newer versions are throwing errors when at... | {
"url": "https://api.github.com/repos/coleifer/peewee/issues/673/reactions",
"total_count": 0,
"+1": 0,
"-1": 0,
"laugh": 0,
"hooray": 0,
"confused": 0,
"heart": 0,
"rocket": 0,
"eyes": 0
} | https://api.github.com/repos/coleifer/peewee/issues/673/timeline | null | completed | null | null |
https://api.github.com/repos/coleifer/peewee/issues/672 | https://api.github.com/repos/coleifer/peewee | https://api.github.com/repos/coleifer/peewee/issues/672/labels{/name} | https://api.github.com/repos/coleifer/peewee/issues/672/comments | https://api.github.com/repos/coleifer/peewee/issues/672/events | https://github.com/coleifer/peewee/pull/672 | 97,770,686 | MDExOlB1bGxSZXF1ZXN0NDEwNDQ1ODc= | 672 | PasswordField | {
"login": "ronyb29",
"id": 1606872,
"node_id": "MDQ6VXNlcjE2MDY4NzI=",
"avatar_url": "https://avatars.githubusercontent.com/u/1606872?v=4",
"gravatar_id": "",
"url": "https://api.github.com/users/ronyb29",
"html_url": "https://github.com/ronyb29",
"followers_url": "https://api.github.com/users/ronyb29/... | [] | closed | false | null | [] | null | [
"This looks good, I'm sorry for not responding sooner, completely fell off my radar.\n\nI'd like to merge. Looks like the only issue is the lack of the unicode literal in the earlier python 3 build. If that can be fixed, I'd be happy to merge this.\n",
"Nice! :)\n@coleifer any rough idea when this will be release... | 2015-07-28T18:33:25 | 2015-11-12T16:41:42 | 2015-11-06T18:50:23 | CONTRIBUTOR | null | I think i got something going on,
but please see comments on files
| {
"url": "https://api.github.com/repos/coleifer/peewee/issues/672/reactions",
"total_count": 0,
"+1": 0,
"-1": 0,
"laugh": 0,
"hooray": 0,
"confused": 0,
"heart": 0,
"rocket": 0,
"eyes": 0
} | https://api.github.com/repos/coleifer/peewee/issues/672/timeline | null | null | false | {
"url": "https://api.github.com/repos/coleifer/peewee/pulls/672",
"html_url": "https://github.com/coleifer/peewee/pull/672",
"diff_url": "https://github.com/coleifer/peewee/pull/672.diff",
"patch_url": "https://github.com/coleifer/peewee/pull/672.patch",
"merged_at": "2015-11-06T18:50:23"
} |
https://api.github.com/repos/coleifer/peewee/issues/671 | https://api.github.com/repos/coleifer/peewee | https://api.github.com/repos/coleifer/peewee/issues/671/labels{/name} | https://api.github.com/repos/coleifer/peewee/issues/671/comments | https://api.github.com/repos/coleifer/peewee/issues/671/events | https://github.com/coleifer/peewee/issues/671 | 97,305,991 | MDU6SXNzdWU5NzMwNTk5MQ== | 671 | Unable to make custom Field as inner class of an Enum | {
"login": "fluffy-critter",
"id": 347162,
"node_id": "MDQ6VXNlcjM0NzE2Mg==",
"avatar_url": "https://avatars.githubusercontent.com/u/347162?v=4",
"gravatar_id": "",
"url": "https://api.github.com/users/fluffy-critter",
"html_url": "https://github.com/fluffy-critter",
"followers_url": "https://api.github... | [] | closed | false | null | [] | null | [
"This has nothing to do with Peewee as far as I can tell, but is an implementation detail of the `Enum` class.\n",
"Okay, thanks.\n\nDo you have any suggestions for a more Pythonic solution than the (somewhat confusing) `@staticmethod` decorator, or am I just overthinking this? I'm still learning Python and want ... | 2015-07-26T10:35:14 | 2015-07-27T16:35:46 | 2015-07-27T16:10:15 | NONE | null | This might be a peculiar use case, but for better encapsulation I tried doing this:
```
from peewee import *
from enum import Enum
class Foo(Enum):
foobar = 0
qazquux = 1
bleck = 2
class Field(IntegerField):
def db_value(self,value):
return value.value
def python_value(self,... | {
"url": "https://api.github.com/repos/coleifer/peewee/issues/671/reactions",
"total_count": 0,
"+1": 0,
"-1": 0,
"laugh": 0,
"hooray": 0,
"confused": 0,
"heart": 0,
"rocket": 0,
"eyes": 0
} | https://api.github.com/repos/coleifer/peewee/issues/671/timeline | null | completed | null | null |
https://api.github.com/repos/coleifer/peewee/issues/670 | https://api.github.com/repos/coleifer/peewee | https://api.github.com/repos/coleifer/peewee/issues/670/labels{/name} | https://api.github.com/repos/coleifer/peewee/issues/670/comments | https://api.github.com/repos/coleifer/peewee/issues/670/events | https://github.com/coleifer/peewee/pull/670 | 97,229,468 | MDExOlB1bGxSZXF1ZXN0NDA4Mzc1MTg= | 670 | Minor docs fix regarding Django middleware | {
"login": "messense",
"id": 1556054,
"node_id": "MDQ6VXNlcjE1NTYwNTQ=",
"avatar_url": "https://avatars.githubusercontent.com/u/1556054?v=4",
"gravatar_id": "",
"url": "https://api.github.com/users/messense",
"html_url": "https://github.com/messense",
"followers_url": "https://api.github.com/users/messe... | [] | closed | false | null | [] | null | [
"Thanks!\n"
] | 2015-07-25T14:17:55 | 2015-07-26T01:51:26 | 2015-07-25T17:23:19 | CONTRIBUTOR | null | Django middleware `process_response` method must return an `HttpResponse` or `StreamingHttpResponse` object as its documentation denotes.
https://docs.djangoproject.com/en/1.8/topics/http/middleware/#process-response
| {
"url": "https://api.github.com/repos/coleifer/peewee/issues/670/reactions",
"total_count": 0,
"+1": 0,
"-1": 0,
"laugh": 0,
"hooray": 0,
"confused": 0,
"heart": 0,
"rocket": 0,
"eyes": 0
} | https://api.github.com/repos/coleifer/peewee/issues/670/timeline | null | null | false | {
"url": "https://api.github.com/repos/coleifer/peewee/pulls/670",
"html_url": "https://github.com/coleifer/peewee/pull/670",
"diff_url": "https://github.com/coleifer/peewee/pull/670.diff",
"patch_url": "https://github.com/coleifer/peewee/pull/670.patch",
"merged_at": "2015-07-25T17:23:19"
} |
https://api.github.com/repos/coleifer/peewee/issues/669 | https://api.github.com/repos/coleifer/peewee | https://api.github.com/repos/coleifer/peewee/issues/669/labels{/name} | https://api.github.com/repos/coleifer/peewee/issues/669/comments | https://api.github.com/repos/coleifer/peewee/issues/669/events | https://github.com/coleifer/peewee/issues/669 | 97,046,640 | MDU6SXNzdWU5NzA0NjY0MA== | 669 | create_or_get sqlite3.InterfaceError with cursor because of commit/rollback | {
"login": "bsuire",
"id": 5952888,
"node_id": "MDQ6VXNlcjU5NTI4ODg=",
"avatar_url": "https://avatars.githubusercontent.com/u/5952888?v=4",
"gravatar_id": "",
"url": "https://api.github.com/users/bsuire",
"html_url": "https://github.com/bsuire",
"followers_url": "https://api.github.com/users/bsuire/foll... | [] | closed | false | null | [] | null | [
"Here's my init code:\n\n```\nclass SqliteFKDatabase(SqliteDatabase): \n def initialize_connection(self, conn): ... | 2015-07-24T12:56:06 | 2015-07-24T18:34:47 | 2015-07-24T18:34:47 | NONE | null | The create_or_get method yields a pretty weird error for me:
```
File "./script.py", line 137, in load_data
for name,country in rows:
File "/Library/Frameworks/Python.framework/Versions/3.4/lib/python3.4/site-packages/peewee.py", line 1957, in next
obj = self.iterate()
File "/Library/Frameworks/Python.fra... | {
"url": "https://api.github.com/repos/coleifer/peewee/issues/669/reactions",
"total_count": 0,
"+1": 0,
"-1": 0,
"laugh": 0,
"hooray": 0,
"confused": 0,
"heart": 0,
"rocket": 0,
"eyes": 0
} | https://api.github.com/repos/coleifer/peewee/issues/669/timeline | null | completed | null | null |
https://api.github.com/repos/coleifer/peewee/issues/668 | https://api.github.com/repos/coleifer/peewee | https://api.github.com/repos/coleifer/peewee/issues/668/labels{/name} | https://api.github.com/repos/coleifer/peewee/issues/668/comments | https://api.github.com/repos/coleifer/peewee/issues/668/events | https://github.com/coleifer/peewee/issues/668 | 96,673,436 | MDU6SXNzdWU5NjY3MzQzNg== | 668 | Add support for citext columns in postgres | {
"login": "esafak",
"id": 3928300,
"node_id": "MDQ6VXNlcjM5MjgzMDA=",
"avatar_url": "https://avatars.githubusercontent.com/u/3928300?v=4",
"gravatar_id": "",
"url": "https://api.github.com/users/esafak",
"html_url": "https://github.com/esafak",
"followers_url": "https://api.github.com/users/esafak/foll... | [] | closed | false | null | [] | null | [
"I wouldn't say \"incorrectly\" -- Peewee does not have any field comparable to a case-insensitive text field. Pwiz is designed to cover the most common data-types but it cannot hope to cover them all. Hence, `UnknownField`. You can go through and replace them with `TextField` if you like.\n",
"Aren't `text` and ... | 2015-07-22T21:51:11 | 2018-10-11T18:24:48 | 2015-07-22T22:08:15 | NONE | null | `pwiz` incorrectly translates `citext` columns to `UnknownField`.
| {
"url": "https://api.github.com/repos/coleifer/peewee/issues/668/reactions",
"total_count": 0,
"+1": 0,
"-1": 0,
"laugh": 0,
"hooray": 0,
"confused": 0,
"heart": 0,
"rocket": 0,
"eyes": 0
} | https://api.github.com/repos/coleifer/peewee/issues/668/timeline | null | completed | null | null |
https://api.github.com/repos/coleifer/peewee/issues/667 | https://api.github.com/repos/coleifer/peewee | https://api.github.com/repos/coleifer/peewee/issues/667/labels{/name} | https://api.github.com/repos/coleifer/peewee/issues/667/comments | https://api.github.com/repos/coleifer/peewee/issues/667/events | https://github.com/coleifer/peewee/issues/667 | 96,635,597 | MDU6SXNzdWU5NjYzNTU5Nw== | 667 | peewee tries to hard to connect to a data store | {
"login": "dmead",
"id": 176946,
"node_id": "MDQ6VXNlcjE3Njk0Ng==",
"avatar_url": "https://avatars.githubusercontent.com/u/176946?v=4",
"gravatar_id": "",
"url": "https://api.github.com/users/dmead",
"html_url": "https://github.com/dmead",
"followers_url": "https://api.github.com/users/dmead/followers"... | [] | closed | false | null | [] | null | [
"Where are you using sqlite3 been mentioned in your code example?\nOn Jul 22, 2015 11:08 PM, \"Daniel Mead\" notifications@github.com wrote:\n\n> I've just had a problem were i didn't have MySQLdb installed, so peewee\n> failed over to sqlite3\n> \n> this was really annoying because it happened silently and without... | 2015-07-22T18:38:15 | 2015-07-22T21:01:42 | 2015-07-22T20:14:07 | NONE | null | I've just had a problem were i didn't have MySQLdb installed, so peewee failed over to sqlite3
this was really annoying because it happened silently and without warning.
im using a statement like this to connect
`db = MySQLDatabase('somedatabase', host='127.0.0.1', port=3306, user='user', passwd='pass')`
| {
"url": "https://api.github.com/repos/coleifer/peewee/issues/667/reactions",
"total_count": 0,
"+1": 0,
"-1": 0,
"laugh": 0,
"hooray": 0,
"confused": 0,
"heart": 0,
"rocket": 0,
"eyes": 0
} | https://api.github.com/repos/coleifer/peewee/issues/667/timeline | null | completed | null | null |
https://api.github.com/repos/coleifer/peewee/issues/666 | https://api.github.com/repos/coleifer/peewee | https://api.github.com/repos/coleifer/peewee/issues/666/labels{/name} | https://api.github.com/repos/coleifer/peewee/issues/666/comments | https://api.github.com/repos/coleifer/peewee/issues/666/events | https://github.com/coleifer/peewee/issues/666 | 96,592,623 | MDU6SXNzdWU5NjU5MjYyMw== | 666 | why does peewee default to it's own file? | {
"login": "dmead",
"id": 176946,
"node_id": "MDQ6VXNlcjE3Njk0Ng==",
"avatar_url": "https://avatars.githubusercontent.com/u/176946?v=4",
"gravatar_id": "",
"url": "https://api.github.com/users/dmead",
"html_url": "https://github.com/dmead",
"followers_url": "https://api.github.com/users/dmead/followers"... | [] | closed | false | null | [] | null | [
"That line of code is there to allow you to quickly create models that point to a SQLite database named `peewee.db`. So if you just imported `Model` and did not define your own database, it would use the `default_database`.\n\nMost everyone will define their own db, though, so this is not an issue in practice, e.g.... | 2015-07-22T15:18:15 | 2015-07-22T16:32:30 | 2015-07-22T16:32:30 | NONE | null | https://github.com/coleifer/peewee/blob/master/peewee.py#L3955
maybe i lack contact about sqlite? why is this hard coded to it's own filename?
| {
"url": "https://api.github.com/repos/coleifer/peewee/issues/666/reactions",
"total_count": 0,
"+1": 0,
"-1": 0,
"laugh": 0,
"hooray": 0,
"confused": 0,
"heart": 0,
"rocket": 0,
"eyes": 0
} | https://api.github.com/repos/coleifer/peewee/issues/666/timeline | null | completed | null | null |
https://api.github.com/repos/coleifer/peewee/issues/665 | https://api.github.com/repos/coleifer/peewee | https://api.github.com/repos/coleifer/peewee/issues/665/labels{/name} | https://api.github.com/repos/coleifer/peewee/issues/665/comments | https://api.github.com/repos/coleifer/peewee/issues/665/events | https://github.com/coleifer/peewee/issues/665 | 96,537,423 | MDU6SXNzdWU5NjUzNzQyMw== | 665 | Inner query problem | {
"login": "dneyirp",
"id": 13450224,
"node_id": "MDQ6VXNlcjEzNDUwMjI0",
"avatar_url": "https://avatars.githubusercontent.com/u/13450224?v=4",
"gravatar_id": "",
"url": "https://api.github.com/users/dneyirp",
"html_url": "https://github.com/dneyirp",
"followers_url": "https://api.github.com/users/dneyir... | [] | closed | false | null | [] | null | [
"Change:\n\n``` python\ninner_query = Log.select().order_by(Log.DateTimeUTC.desc()).limit(20)\n```\n\nTo:\n\n``` python\ninner_query = Log.select(Log).order_by(Log.DateTimeUTC.desc()).limit(20)\n```\n\nIf a subquery does not have an explicit selection, peewee assumes you just want the primary key, hence the missing... | 2015-07-22T11:03:07 | 2015-07-22T16:30:18 | 2015-07-22T16:30:17 | NONE | null | Hi. I need to execute the following SQL statement but use Peewee's library to do it and prefer not to use raw sql.
Table "Log" has has this structure:
``` sql
CREATE TABLE "Log" ("Id" INTEGER NOT NULL PRIMARY KEY, "DateTimeUTC" DATETIME NOT NULL, "Value" INTEGER NOT NULL)
```
SQL query needing translation:
``` sql
... | {
"url": "https://api.github.com/repos/coleifer/peewee/issues/665/reactions",
"total_count": 0,
"+1": 0,
"-1": 0,
"laugh": 0,
"hooray": 0,
"confused": 0,
"heart": 0,
"rocket": 0,
"eyes": 0
} | https://api.github.com/repos/coleifer/peewee/issues/665/timeline | null | completed | null | null |
https://api.github.com/repos/coleifer/peewee/issues/664 | https://api.github.com/repos/coleifer/peewee | https://api.github.com/repos/coleifer/peewee/issues/664/labels{/name} | https://api.github.com/repos/coleifer/peewee/issues/664/comments | https://api.github.com/repos/coleifer/peewee/issues/664/events | https://github.com/coleifer/peewee/issues/664 | 96,420,607 | MDU6SXNzdWU5NjQyMDYwNw== | 664 | Fractional DateTimeField values | {
"login": "ParthGandhi",
"id": 819237,
"node_id": "MDQ6VXNlcjgxOTIzNw==",
"avatar_url": "https://avatars.githubusercontent.com/u/819237?v=4",
"gravatar_id": "",
"url": "https://api.github.com/users/ParthGandhi",
"html_url": "https://github.com/ParthGandhi",
"followers_url": "https://api.github.com/user... | [] | closed | false | null | [] | null | [
"What database are you using? The code you've referenced is not relevant to your question as far as I understand what you're asking. The code you want is probably here:\n\nhttps://github.com/coleifer/peewee/blob/1b021602a222485d5f28857a363cd378dc874df0/peewee.py#L1050-L1068\n\nBasically, peewee will just pass the `... | 2015-07-21T21:29:06 | 2017-11-30T12:13:50 | 2015-07-21T21:38:50 | NONE | null | The fractional part of a `datetime` object seems to be always truncated. Looking through the code a bit, I also see that it doesn't expect there to be one: https://github.com/coleifer/peewee/blob/master/peewee.py#L204
I assume this is primarily cause not all databases support fractional seconds (older versions of MySQ... | {
"url": "https://api.github.com/repos/coleifer/peewee/issues/664/reactions",
"total_count": 0,
"+1": 0,
"-1": 0,
"laugh": 0,
"hooray": 0,
"confused": 0,
"heart": 0,
"rocket": 0,
"eyes": 0
} | https://api.github.com/repos/coleifer/peewee/issues/664/timeline | null | completed | null | null |
https://api.github.com/repos/coleifer/peewee/issues/663 | https://api.github.com/repos/coleifer/peewee | https://api.github.com/repos/coleifer/peewee/issues/663/labels{/name} | https://api.github.com/repos/coleifer/peewee/issues/663/comments | https://api.github.com/repos/coleifer/peewee/issues/663/events | https://github.com/coleifer/peewee/issues/663 | 96,238,708 | MDU6SXNzdWU5NjIzODcwOA== | 663 | How to select() the fields I need | {
"login": "AlexHeKa",
"id": 9191522,
"node_id": "MDQ6VXNlcjkxOTE1MjI=",
"avatar_url": "https://avatars.githubusercontent.com/u/9191522?v=4",
"gravatar_id": "",
"url": "https://api.github.com/users/AlexHeKa",
"html_url": "https://github.com/AlexHeKa",
"followers_url": "https://api.github.com/users/AlexH... | [] | closed | false | null | [] | null | [
"Cool models bro, what's your question?\n",
"Maybe `query.tuples()` or `query.dicts()` are exactly what you looking for?\n",
"You want something like:\n\n``` python\nPost.select(Post.post_title, Post.post_content, User.username).join(User)\n```\n\nThen you can iterate through the results of the query and access... | 2015-07-21T06:23:04 | 2015-07-22T11:38:14 | 2015-07-21T14:17:00 | NONE | null | I wanna get Post.post_title,Post.post_content...and also try to get User.user_name which its id == Post.user
I try
``` python
query = Post.select().join(Act).where(Act.id == actId).paginate(actPage, 10) or
query = Post.select(Post.post_title,Post.post_content).join(Act).where(Act.id == actId).paginate(actPage, 10)
... | {
"url": "https://api.github.com/repos/coleifer/peewee/issues/663/reactions",
"total_count": 0,
"+1": 0,
"-1": 0,
"laugh": 0,
"hooray": 0,
"confused": 0,
"heart": 0,
"rocket": 0,
"eyes": 0
} | https://api.github.com/repos/coleifer/peewee/issues/663/timeline | null | completed | null | null |
https://api.github.com/repos/coleifer/peewee/issues/662 | https://api.github.com/repos/coleifer/peewee | https://api.github.com/repos/coleifer/peewee/issues/662/labels{/name} | https://api.github.com/repos/coleifer/peewee/issues/662/comments | https://api.github.com/repos/coleifer/peewee/issues/662/events | https://github.com/coleifer/peewee/issues/662 | 96,236,825 | MDU6SXNzdWU5NjIzNjgyNQ== | 662 | How to select() | {
"login": "AlexHeKa",
"id": 9191522,
"node_id": "MDQ6VXNlcjkxOTE1MjI=",
"avatar_url": "https://avatars.githubusercontent.com/u/9191522?v=4",
"gravatar_id": "",
"url": "https://api.github.com/users/AlexHeKa",
"html_url": "https://github.com/AlexHeKa",
"followers_url": "https://api.github.com/users/AlexH... | [] | closed | false | null | [] | null | [] | 2015-07-21T06:07:07 | 2015-07-21T06:07:35 | 2015-07-21T06:07:35 | NONE | null | {
"url": "https://api.github.com/repos/coleifer/peewee/issues/662/reactions",
"total_count": 0,
"+1": 0,
"-1": 0,
"laugh": 0,
"hooray": 0,
"confused": 0,
"heart": 0,
"rocket": 0,
"eyes": 0
} | https://api.github.com/repos/coleifer/peewee/issues/662/timeline | null | completed | null | null | |
https://api.github.com/repos/coleifer/peewee/issues/661 | https://api.github.com/repos/coleifer/peewee | https://api.github.com/repos/coleifer/peewee/issues/661/labels{/name} | https://api.github.com/repos/coleifer/peewee/issues/661/comments | https://api.github.com/repos/coleifer/peewee/issues/661/events | https://github.com/coleifer/peewee/issues/661 | 95,970,470 | MDU6SXNzdWU5NTk3MDQ3MA== | 661 | Property getters/setters don't work with `get_or_create` | {
"login": "fluffy-critter",
"id": 347162,
"node_id": "MDQ6VXNlcjM0NzE2Mg==",
"avatar_url": "https://avatars.githubusercontent.com/u/347162?v=4",
"gravatar_id": "",
"url": "https://api.github.com/users/fluffy-critter",
"html_url": "https://github.com/fluffy-critter",
"followers_url": "https://api.github... | [] | closed | false | null | [] | null | [
"Closing, because I realized that the underlying problem is with `get` and that trying to do a `get` on a derived key like this makes no dang sense.\n"
] | 2015-07-20T02:26:08 | 2015-07-20T02:36:51 | 2015-07-20T02:36:24 | NONE | null | This is on version 2.6.3, as installed via OSX's `easy_install` function.
I have a project in which I'd like to automatically derive a human-readable sorting key from a title (or in this case, a band name). I have this code for it (simplified):
```
def to_key(name):
return re.sub(r'^(a|the) (.*)$', r'\2, \1', nam... | {
"url": "https://api.github.com/repos/coleifer/peewee/issues/661/reactions",
"total_count": 0,
"+1": 0,
"-1": 0,
"laugh": 0,
"hooray": 0,
"confused": 0,
"heart": 0,
"rocket": 0,
"eyes": 0
} | https://api.github.com/repos/coleifer/peewee/issues/661/timeline | null | completed | null | null |
https://api.github.com/repos/coleifer/peewee/issues/660 | https://api.github.com/repos/coleifer/peewee | https://api.github.com/repos/coleifer/peewee/issues/660/labels{/name} | https://api.github.com/repos/coleifer/peewee/issues/660/comments | https://api.github.com/repos/coleifer/peewee/issues/660/events | https://github.com/coleifer/peewee/issues/660 | 95,860,329 | MDU6SXNzdWU5NTg2MDMyOQ== | 660 | Simple question on multiple Model instances from single Join query | {
"login": "jessepeterson",
"id": 694298,
"node_id": "MDQ6VXNlcjY5NDI5OA==",
"avatar_url": "https://avatars.githubusercontent.com/u/694298?v=4",
"gravatar_id": "",
"url": "https://api.github.com/users/jessepeterson",
"html_url": "https://github.com/jessepeterson",
"followers_url": "https://api.github.co... | [] | closed | false | null | [] | null | [
"I should add that if I access the `related_name` references of my M:N table I can get to the associated data — but at the cost of multiple queries (hence the join is sort of useless). I _should_ be able to get two instances from a single query, no? `aggregate_rows()` and `prefetch()` don't seem to apply to this ve... | 2015-07-18T21:15:02 | 2015-07-20T16:29:37 | 2015-07-20T16:29:37 | NONE | null | First: thanks for Peewee: it's great! Sorry to litter the bug tracker with a simple question, but I'm not able to figure out how to get multiple model instances from a single joined row. For example:
``` python
q = Student.select(Student, Teacher).join(StudentTeacher).join(Teacher).where(Student.name == 'Bob')
for ro... | {
"url": "https://api.github.com/repos/coleifer/peewee/issues/660/reactions",
"total_count": 0,
"+1": 0,
"-1": 0,
"laugh": 0,
"hooray": 0,
"confused": 0,
"heart": 0,
"rocket": 0,
"eyes": 0
} | https://api.github.com/repos/coleifer/peewee/issues/660/timeline | null | completed | null | null |
https://api.github.com/repos/coleifer/peewee/issues/659 | https://api.github.com/repos/coleifer/peewee | https://api.github.com/repos/coleifer/peewee/issues/659/labels{/name} | https://api.github.com/repos/coleifer/peewee/issues/659/comments | https://api.github.com/repos/coleifer/peewee/issues/659/events | https://github.com/coleifer/peewee/issues/659 | 95,300,220 | MDU6SXNzdWU5NTMwMDIyMA== | 659 | Syntax Error whilst inserting model where model has only primary key or ManyToManyField column | {
"login": "MrJohz",
"id": 4059026,
"node_id": "MDQ6VXNlcjQwNTkwMjY=",
"avatar_url": "https://avatars.githubusercontent.com/u/4059026?v=4",
"gravatar_id": "",
"url": "https://api.github.com/users/MrJohz",
"html_url": "https://github.com/MrJohz",
"followers_url": "https://api.github.com/users/MrJohz/foll... | [] | closed | false | null | [] | null | [
"What benefit do you get from having a model that only many-to-many's to another model?\n",
"Not to say your issue isn't valid, but just curious as it seems strange.\n",
"Well, testing with SQLite, I'm not sure that there's a way to actually `INSERT` \"nothing\" into a table that has only an auto-incrementing p... | 2015-07-15T22:02:38 | 2015-07-27T20:47:08 | 2015-07-27T17:34:04 | NONE | null | Test script: https://gist.github.com/MrJohz/863042d7d9abb80a35f9
``` console
$ python --version
Python 3.4.3
$ pip freeze
peewee==2.6.3
$ python test.py
(F) FailureModel instantiation failed: OperationalError('near ""failuremodel"": syntax error',)
(F) ManyToManyFailureModel instantiation (via create) failed: Operatio... | {
"url": "https://api.github.com/repos/coleifer/peewee/issues/659/reactions",
"total_count": 0,
"+1": 0,
"-1": 0,
"laugh": 0,
"hooray": 0,
"confused": 0,
"heart": 0,
"rocket": 0,
"eyes": 0
} | https://api.github.com/repos/coleifer/peewee/issues/659/timeline | null | completed | null | null |
https://api.github.com/repos/coleifer/peewee/issues/658 | https://api.github.com/repos/coleifer/peewee | https://api.github.com/repos/coleifer/peewee/issues/658/labels{/name} | https://api.github.com/repos/coleifer/peewee/issues/658/comments | https://api.github.com/repos/coleifer/peewee/issues/658/events | https://github.com/coleifer/peewee/issues/658 | 95,127,572 | MDU6SXNzdWU5NTEyNzU3Mg== | 658 | Optimistic locking | {
"login": "tuukkamustonen",
"id": 94327,
"node_id": "MDQ6VXNlcjk0MzI3",
"avatar_url": "https://avatars.githubusercontent.com/u/94327?v=4",
"gravatar_id": "",
"url": "https://api.github.com/users/tuukkamustonen",
"html_url": "https://github.com/tuukkamustonen",
"followers_url": "https://api.github.com/u... | [] | closed | false | null | [] | null | [
"The typical way to handle this is to select the record you're modifying `FOR UPDATE` (see [docs](http://docs.peewee-orm.com/en/latest/peewee/api.html#SelectQuery.for_update)). Here's a [blog post](http://blog.2ndquadrant.com/postgresql-anti-patterns-read-modify-write-cycles/) you might also find useful. Note that ... | 2015-07-15T07:42:37 | 2016-03-07T20:43:10 | 2015-07-16T01:16:48 | NONE | null | I'm not sure what is the correct way to implement support [optimistic locking](http://martinfowler.com/eaaCatalog/optimisticOfflineLock.html). As usual, I want to hold a version column that I increment on updates, while also ensuring that I am updating the row with the current version.
I assume I could implement this ... | {
"url": "https://api.github.com/repos/coleifer/peewee/issues/658/reactions",
"total_count": 0,
"+1": 0,
"-1": 0,
"laugh": 0,
"hooray": 0,
"confused": 0,
"heart": 0,
"rocket": 0,
"eyes": 0
} | https://api.github.com/repos/coleifer/peewee/issues/658/timeline | null | completed | null | null |
https://api.github.com/repos/coleifer/peewee/issues/657 | https://api.github.com/repos/coleifer/peewee | https://api.github.com/repos/coleifer/peewee/issues/657/labels{/name} | https://api.github.com/repos/coleifer/peewee/issues/657/comments | https://api.github.com/repos/coleifer/peewee/issues/657/events | https://github.com/coleifer/peewee/issues/657 | 94,853,829 | MDU6SXNzdWU5NDg1MzgyOQ== | 657 | Is there a way to connect to a database not in the same folder? | {
"login": "jacobbieker",
"id": 7170359,
"node_id": "MDQ6VXNlcjcxNzAzNTk=",
"avatar_url": "https://avatars.githubusercontent.com/u/7170359?v=4",
"gravatar_id": "",
"url": "https://api.github.com/users/jacobbieker",
"html_url": "https://github.com/jacobbieker",
"followers_url": "https://api.github.com/us... | [] | closed | false | null | [] | null | [
"Are all of your models explicitly referencing your db?\n\n``` python\ndb = SqliteDatabase('mydb')\nclass SomeModel(Model):\n data = CharField()\n class Meta:\n database = db # do you have this?\n```\n",
"Yes, they are. I followed the examples and have a BaseModel that references the database, and th... | 2015-07-14T02:28:33 | 2015-07-14T17:43:13 | 2015-07-14T08:51:56 | NONE | null | I am tyring to connect to a local SQLite database to store output from multiple scripts in one place. The problem is that when I try to connect to the database from a different folder, it just creates a peewee.db in the current directory. Does Database URLs allow for me to connect to a local database correctly? From th... | {
"url": "https://api.github.com/repos/coleifer/peewee/issues/657/reactions",
"total_count": 0,
"+1": 0,
"-1": 0,
"laugh": 0,
"hooray": 0,
"confused": 0,
"heart": 0,
"rocket": 0,
"eyes": 0
} | https://api.github.com/repos/coleifer/peewee/issues/657/timeline | null | completed | null | null |
https://api.github.com/repos/coleifer/peewee/issues/656 | https://api.github.com/repos/coleifer/peewee | https://api.github.com/repos/coleifer/peewee/issues/656/labels{/name} | https://api.github.com/repos/coleifer/peewee/issues/656/comments | https://api.github.com/repos/coleifer/peewee/issues/656/events | https://github.com/coleifer/peewee/issues/656 | 94,690,386 | MDU6SXNzdWU5NDY5MDM4Ng== | 656 | Possible support for connection retry? | {
"login": "josephschorr",
"id": 4073002,
"node_id": "MDQ6VXNlcjQwNzMwMDI=",
"avatar_url": "https://avatars.githubusercontent.com/u/4073002?v=4",
"gravatar_id": "",
"url": "https://api.github.com/users/josephschorr",
"html_url": "https://github.com/josephschorr",
"followers_url": "https://api.github.com... | [] | closed | false | null | [] | null | [
"Rather than adding this to Peewee itself, I'd suggest you write your own wrapper that does what you want:\n\n``` python\nfrom peewee import *\nimport time\n\ndb = PostgresqlDatabase('whatever')\n\ndef connect_db(retries=3, delay=5):\n while True:\n retries -= 1\n try:\n db.connect()\n ... | 2015-07-13T10:26:20 | 2015-07-13T23:47:51 | 2015-07-13T23:47:29 | NONE | null | We occasionally have servers failing to connect to the database due to sporadic networking issues with our service provider. Our service provider is currently investigating these issues, but until solved this leaves us having a few DB connections here and there fail.
I'm curious on thoughts about adding the ability to... | {
"url": "https://api.github.com/repos/coleifer/peewee/issues/656/reactions",
"total_count": 0,
"+1": 0,
"-1": 0,
"laugh": 0,
"hooray": 0,
"confused": 0,
"heart": 0,
"rocket": 0,
"eyes": 0
} | https://api.github.com/repos/coleifer/peewee/issues/656/timeline | null | completed | null | null |
https://api.github.com/repos/coleifer/peewee/issues/655 | https://api.github.com/repos/coleifer/peewee | https://api.github.com/repos/coleifer/peewee/issues/655/labels{/name} | https://api.github.com/repos/coleifer/peewee/issues/655/comments | https://api.github.com/repos/coleifer/peewee/issues/655/events | https://github.com/coleifer/peewee/issues/655 | 94,323,828 | MDU6SXNzdWU5NDMyMzgyOA== | 655 | If custom primary_key is used, .save() with no PK doesn't work properly | {
"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 | [
"You need to save with `force_insert=True`.\n\nhttp://docs.peewee-orm.com/en/latest/peewee/models.html#id3\n",
"I can't believe I missed that in the docs, my bad :( Thanks for the reply!\n",
"Fwiw, do you think it's worth patching so that an exception is raised if this situation is ever encountered? Although it... | 2015-07-10T15:00:15 | 2020-01-20T16:46:55 | 2015-07-10T22:57:46 | CONTRIBUTOR | null | The following code does not raise any exceptions, but it doesn't save to the database either.
``` py
import peewee
import random
db = peewee.SqliteDatabase(':memory:')
class Message(peewee.Model):
class Meta:
database = db
content = peewee.TextField()
class MessageCustomPrimaryKey(peewee.Model):
... | {
"url": "https://api.github.com/repos/coleifer/peewee/issues/655/reactions",
"total_count": 0,
"+1": 0,
"-1": 0,
"laugh": 0,
"hooray": 0,
"confused": 0,
"heart": 0,
"rocket": 0,
"eyes": 0
} | https://api.github.com/repos/coleifer/peewee/issues/655/timeline | null | completed | null | null |
https://api.github.com/repos/coleifer/peewee/issues/654 | https://api.github.com/repos/coleifer/peewee | https://api.github.com/repos/coleifer/peewee/issues/654/labels{/name} | https://api.github.com/repos/coleifer/peewee/issues/654/comments | https://api.github.com/repos/coleifer/peewee/issues/654/events | https://github.com/coleifer/peewee/issues/654 | 94,169,272 | MDU6SXNzdWU5NDE2OTI3Mg== | 654 | Model with no primary key | {
"login": "ballan91",
"id": 1587844,
"node_id": "MDQ6VXNlcjE1ODc4NDQ=",
"avatar_url": "https://avatars.githubusercontent.com/u/1587844?v=4",
"gravatar_id": "",
"url": "https://api.github.com/users/ballan91",
"html_url": "https://github.com/ballan91",
"followers_url": "https://api.github.com/users/balla... | [] | closed | false | null | [] | null | [
"Bug confirmed, curiously I just came across this issue myself and was about to report it, weird coincidence? Or perhaps a recent change?\n\nAlso, specifying `primary_key = None` doesn't actually disable the PK, as seen here;\n\n``` py\nclass Audit(Model):\n class Meta:\n primary_key = False\n data = T... | 2015-07-09T22:45:25 | 2015-07-10T00:17:37 | 2015-07-10T00:12:25 | NONE | null | It looks like while this is supported the documentation might be incorrect, I believe what the documentation actual intends is:
``` python
class MyData(BaseModel):
timestamp = DateTimeField()
value = IntegerField()
class Meta:
primary_key = None
```
While:
``` python
primary_key = False
```
... | {
"url": "https://api.github.com/repos/coleifer/peewee/issues/654/reactions",
"total_count": 0,
"+1": 0,
"-1": 0,
"laugh": 0,
"hooray": 0,
"confused": 0,
"heart": 0,
"rocket": 0,
"eyes": 0
} | https://api.github.com/repos/coleifer/peewee/issues/654/timeline | null | completed | null | null |
https://api.github.com/repos/coleifer/peewee/issues/653 | https://api.github.com/repos/coleifer/peewee | https://api.github.com/repos/coleifer/peewee/issues/653/labels{/name} | https://api.github.com/repos/coleifer/peewee/issues/653/comments | https://api.github.com/repos/coleifer/peewee/issues/653/events | https://github.com/coleifer/peewee/issues/653 | 94,168,279 | MDU6SXNzdWU5NDE2ODI3OQ== | 653 | updating peewee on windows | {
"login": "ghost",
"id": 10137,
"node_id": "MDQ6VXNlcjEwMTM3",
"avatar_url": "https://avatars.githubusercontent.com/u/10137?v=4",
"gravatar_id": "",
"url": "https://api.github.com/users/ghost",
"html_url": "https://github.com/ghost",
"followers_url": "https://api.github.com/users/ghost/followers",
"f... | [] | closed | false | null | [] | null | [
"please close this issue found the solution in here\n\nhttps://msdn.microsoft.com/en-us/library/x4d2c09s.aspx\n\nI am using 64 bit python so I did\n\nvcvarsall amd64 then pip install --upgrade pewee using VS 12.0 worked\n",
"Thanks @hgabe !\n"
] | 2015-07-09T22:39:21 | 2015-07-10T00:00:48 | 2015-07-09T23:57:16 | NONE | null | running build_ext
building 'playhouse.speedups' extension
Traceback (most recent call last):
File "setup.py", line 38, in <module>
scripts = ['pwiz.py'],
File "C:\Python34\lib\distutils\core.py", line 148, in setup
dist.run_commands()
File "C:\Python34\lib\distutils\dist.py", line 955, in run_commands
... | {
"url": "https://api.github.com/repos/coleifer/peewee/issues/653/reactions",
"total_count": 0,
"+1": 0,
"-1": 0,
"laugh": 0,
"hooray": 0,
"confused": 0,
"heart": 0,
"rocket": 0,
"eyes": 0
} | https://api.github.com/repos/coleifer/peewee/issues/653/timeline | null | completed | null | null |
https://api.github.com/repos/coleifer/peewee/issues/652 | https://api.github.com/repos/coleifer/peewee | https://api.github.com/repos/coleifer/peewee/issues/652/labels{/name} | https://api.github.com/repos/coleifer/peewee/issues/652/comments | https://api.github.com/repos/coleifer/peewee/issues/652/events | https://github.com/coleifer/peewee/issues/652 | 93,947,420 | MDU6SXNzdWU5Mzk0NzQyMA== | 652 | Weird double exception while testing | {
"login": "brendanWeb",
"id": 11618748,
"node_id": "MDQ6VXNlcjExNjE4NzQ4",
"avatar_url": "https://avatars.githubusercontent.com/u/11618748?v=4",
"gravatar_id": "",
"url": "https://api.github.com/users/brendanWeb",
"html_url": "https://github.com/brendanWeb",
"followers_url": "https://api.github.com/use... | [] | closed | false | null | [] | null | [
"The problem is your call to `assertRaises`. It should be written:\n\n``` python\nself.assertRaises(IntegrityError, Post.create, description=\"hello world\")\n```\n\nOr\n\n``` python\nself.assertRaises(IntegrityError, lambda: Post.create(description=\"hello world\"))\n```\n",
"Thanks!\n"
] | 2015-07-09T03:57:17 | 2015-07-09T04:36:47 | 2015-07-09T04:26:21 | NONE | null | I am getting both a sqlite3.IntegrityError as well as the peewee.IntegrityError that I am asserting for in my tests. Is this normal? It's causing my tests to error out.
Gist of the issue:
https://gist.github.com/brendanWeb/584d62ba5e7fb9c7338f
| {
"url": "https://api.github.com/repos/coleifer/peewee/issues/652/reactions",
"total_count": 0,
"+1": 0,
"-1": 0,
"laugh": 0,
"hooray": 0,
"confused": 0,
"heart": 0,
"rocket": 0,
"eyes": 0
} | https://api.github.com/repos/coleifer/peewee/issues/652/timeline | null | completed | null | null |
https://api.github.com/repos/coleifer/peewee/issues/651 | https://api.github.com/repos/coleifer/peewee | https://api.github.com/repos/coleifer/peewee/issues/651/labels{/name} | https://api.github.com/repos/coleifer/peewee/issues/651/comments | https://api.github.com/repos/coleifer/peewee/issues/651/events | https://github.com/coleifer/peewee/issues/651 | 93,756,070 | MDU6SXNzdWU5Mzc1NjA3MA== | 651 | Model select() and save() behavior | {
"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 | [
"Adding @alexanderad to this discussion too.\n",
"I've prepared a script with steps to reproduce here: https://gist.github.com/alexanderad/c4cb1befe576fc987b67\n",
"This is not really an issue per-se. If you are explicitly selecting columns, then it's on you to explicitly select the primary key as well if you i... | 2015-07-08T10:23:16 | 2015-07-09T13:20:31 | 2015-07-08T16:04:44 | NONE | null | The model `select()` behavior acts strange on the results where specific columns were requested and afterwards the `save()` is called. This is concerning since it leads to the insertion of duplicated rows.
Here's an example:
``` bash
In [5]: from app.models import UserModel
In [6]: UserModel.select().count()
Out[6]:... | {
"url": "https://api.github.com/repos/coleifer/peewee/issues/651/reactions",
"total_count": 0,
"+1": 0,
"-1": 0,
"laugh": 0,
"hooray": 0,
"confused": 0,
"heart": 0,
"rocket": 0,
"eyes": 0
} | https://api.github.com/repos/coleifer/peewee/issues/651/timeline | null | completed | null | null |
https://api.github.com/repos/coleifer/peewee/issues/650 | https://api.github.com/repos/coleifer/peewee | https://api.github.com/repos/coleifer/peewee/issues/650/labels{/name} | https://api.github.com/repos/coleifer/peewee/issues/650/comments | https://api.github.com/repos/coleifer/peewee/issues/650/events | https://github.com/coleifer/peewee/pull/650 | 93,574,219 | MDExOlB1bGxSZXF1ZXN0MzkzOTAzMzQ= | 650 | Work in progress | {
"login": "IxDay",
"id": 2128384,
"node_id": "MDQ6VXNlcjIxMjgzODQ=",
"avatar_url": "https://avatars.githubusercontent.com/u/2128384?v=4",
"gravatar_id": "",
"url": "https://api.github.com/users/IxDay",
"html_url": "https://github.com/IxDay",
"followers_url": "https://api.github.com/users/IxDay/follower... | [] | closed | false | null | [] | null | [
"Just before continuing do you think that I should continue implementing a custom Model class or you have a better idea on how to implement this?\n\nI will also look at the implementation of the InsertQuery and avoid code duplication.\n",
"I'll take a look soon. One thing, you can probably just modify the existin... | 2015-07-07T16:36:01 | 2015-07-16T08:22:51 | 2015-07-13T19:51:06 | NONE | null | Here is a first implementation just showing part of the code.
I have to fix the ability to iter through results
I also have an issue with the model class, If you have a better idea than creating a dedicated model class...
It breaks the tests but this is a work in progress ;)
linked to #647
| {
"url": "https://api.github.com/repos/coleifer/peewee/issues/650/reactions",
"total_count": 0,
"+1": 0,
"-1": 0,
"laugh": 0,
"hooray": 0,
"confused": 0,
"heart": 0,
"rocket": 0,
"eyes": 0
} | https://api.github.com/repos/coleifer/peewee/issues/650/timeline | null | null | false | {
"url": "https://api.github.com/repos/coleifer/peewee/pulls/650",
"html_url": "https://github.com/coleifer/peewee/pull/650",
"diff_url": "https://github.com/coleifer/peewee/pull/650.diff",
"patch_url": "https://github.com/coleifer/peewee/pull/650.patch",
"merged_at": null
} |
https://api.github.com/repos/coleifer/peewee/issues/649 | https://api.github.com/repos/coleifer/peewee | https://api.github.com/repos/coleifer/peewee/issues/649/labels{/name} | https://api.github.com/repos/coleifer/peewee/issues/649/comments | https://api.github.com/repos/coleifer/peewee/issues/649/events | https://github.com/coleifer/peewee/pull/649 | 93,573,270 | MDExOlB1bGxSZXF1ZXN0MzkzODk4NDM= | 649 | Work in progress | {
"login": "IxDay",
"id": 2128384,
"node_id": "MDQ6VXNlcjIxMjgzODQ=",
"avatar_url": "https://avatars.githubusercontent.com/u/2128384?v=4",
"gravatar_id": "",
"url": "https://api.github.com/users/IxDay",
"html_url": "https://github.com/IxDay",
"followers_url": "https://api.github.com/users/IxDay/follower... | [] | closed | false | null | [] | null | [
"Wrong repository\n"
] | 2015-07-07T16:30:57 | 2015-07-07T16:35:07 | 2015-07-07T16:34:52 | NONE | null | Here is a first implementation just showing part of the code.
I have to fix the ability to **iter** through results
I also have an issue with the model class, If you have a better idea than creating a dedicated model class...
It breaks the tests but this is a work in progress ;)
linked to #647
| {
"url": "https://api.github.com/repos/coleifer/peewee/issues/649/reactions",
"total_count": 0,
"+1": 0,
"-1": 0,
"laugh": 0,
"hooray": 0,
"confused": 0,
"heart": 0,
"rocket": 0,
"eyes": 0
} | https://api.github.com/repos/coleifer/peewee/issues/649/timeline | null | null | false | {
"url": "https://api.github.com/repos/coleifer/peewee/pulls/649",
"html_url": "https://github.com/coleifer/peewee/pull/649",
"diff_url": "https://github.com/coleifer/peewee/pull/649.diff",
"patch_url": "https://github.com/coleifer/peewee/pull/649.patch",
"merged_at": null
} |
https://api.github.com/repos/coleifer/peewee/issues/648 | https://api.github.com/repos/coleifer/peewee | https://api.github.com/repos/coleifer/peewee/issues/648/labels{/name} | https://api.github.com/repos/coleifer/peewee/issues/648/comments | https://api.github.com/repos/coleifer/peewee/issues/648/events | https://github.com/coleifer/peewee/pull/648 | 93,559,382 | MDExOlB1bGxSZXF1ZXN0MzkzODM2NjM= | 648 | fixed encooding error on login and sign up | {
"login": "snitz70",
"id": 5569765,
"node_id": "MDQ6VXNlcjU1Njk3NjU=",
"avatar_url": "https://avatars.githubusercontent.com/u/5569765?v=4",
"gravatar_id": "",
"url": "https://api.github.com/users/snitz70",
"html_url": "https://github.com/snitz70",
"followers_url": "https://api.github.com/users/snitz70/... | [] | closed | false | null | [] | null | [
"Thanks!\n"
] | 2015-07-07T15:34:34 | 2015-07-07T15:37:48 | 2015-07-07T15:37:45 | CONTRIBUTOR | null | {
"url": "https://api.github.com/repos/coleifer/peewee/issues/648/reactions",
"total_count": 0,
"+1": 0,
"-1": 0,
"laugh": 0,
"hooray": 0,
"confused": 0,
"heart": 0,
"rocket": 0,
"eyes": 0
} | https://api.github.com/repos/coleifer/peewee/issues/648/timeline | null | null | false | {
"url": "https://api.github.com/repos/coleifer/peewee/pulls/648",
"html_url": "https://github.com/coleifer/peewee/pull/648",
"diff_url": "https://github.com/coleifer/peewee/pull/648.diff",
"patch_url": "https://github.com/coleifer/peewee/pull/648.patch",
"merged_at": "2015-07-07T15:37:45"
} | |
https://api.github.com/repos/coleifer/peewee/issues/647 | https://api.github.com/repos/coleifer/peewee | https://api.github.com/repos/coleifer/peewee/issues/647/labels{/name} | https://api.github.com/repos/coleifer/peewee/issues/647/comments | https://api.github.com/repos/coleifer/peewee/issues/647/events | https://github.com/coleifer/peewee/issues/647 | 93,480,107 | MDU6SXNzdWU5MzQ4MDEwNw== | 647 | Introducing returning for postgres | {
"login": "IxDay",
"id": 2128384,
"node_id": "MDQ6VXNlcjIxMjgzODQ=",
"avatar_url": "https://avatars.githubusercontent.com/u/2128384?v=4",
"gravatar_id": "",
"url": "https://api.github.com/users/IxDay",
"html_url": "https://github.com/IxDay",
"followers_url": "https://api.github.com/users/IxDay/follower... | [] | closed | false | null | [] | null | [
"Interesting, how is this implemented at the SQL level?\n",
"http://www.postgresql.org/docs/9.1/static/sql-update.html\n\n`If the UPDATE command contains a RETURNING clause, the result will be similar to that of a SELECT statement containing the columns and values defined in the RETURNING list, computed over the ... | 2015-07-07T09:09:33 | 2015-07-13T19:52:06 | 2015-07-13T19:52:06 | NONE | null | Hello, I am currently using peewee for managing a postgresql and I have started implementing a returning function on the update and select queries.
I am interested in contributing the results.
Here is an example:
``` python
user = User.update(active=False).where(User.registration_expired == True).returning()
```
Th... | {
"url": "https://api.github.com/repos/coleifer/peewee/issues/647/reactions",
"total_count": 0,
"+1": 0,
"-1": 0,
"laugh": 0,
"hooray": 0,
"confused": 0,
"heart": 0,
"rocket": 0,
"eyes": 0
} | https://api.github.com/repos/coleifer/peewee/issues/647/timeline | null | completed | null | null |
https://api.github.com/repos/coleifer/peewee/issues/646 | https://api.github.com/repos/coleifer/peewee | https://api.github.com/repos/coleifer/peewee/issues/646/labels{/name} | https://api.github.com/repos/coleifer/peewee/issues/646/comments | https://api.github.com/repos/coleifer/peewee/issues/646/events | https://github.com/coleifer/peewee/issues/646 | 93,405,484 | MDU6SXNzdWU5MzQwNTQ4NA== | 646 | 2.6.2 install error | {
"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 | [
"I just added that, maybe I needed to add it to `MANIFEST.in`... I pushed a new release, 2.6.3. Will you let me know if that fixes it?\n",
"2.6.3 builds fine, thank you.\n\nThe build also succeeded when I temporary uninstalled Cython. Since you did not modify the install instructions in the documentation, I assum... | 2015-07-07T00:11:41 | 2015-07-07T14:03:00 | 2015-07-07T14:03:00 | NONE | null | I do setup.py install because I am packaging the source code tarball into a personal package for the Linux distribution that I'm using (it's Slackware64-14.1 with Python 2.7.5) and I'm getting this traceback for peewee-2.6.2:
```
Traceback (most recent call last):
File "setup.py", line 14, in <module>
ext_module... | {
"url": "https://api.github.com/repos/coleifer/peewee/issues/646/reactions",
"total_count": 0,
"+1": 0,
"-1": 0,
"laugh": 0,
"hooray": 0,
"confused": 0,
"heart": 0,
"rocket": 0,
"eyes": 0
} | https://api.github.com/repos/coleifer/peewee/issues/646/timeline | null | completed | null | null |
https://api.github.com/repos/coleifer/peewee/issues/645 | https://api.github.com/repos/coleifer/peewee | https://api.github.com/repos/coleifer/peewee/issues/645/labels{/name} | https://api.github.com/repos/coleifer/peewee/issues/645/comments | https://api.github.com/repos/coleifer/peewee/issues/645/events | https://github.com/coleifer/peewee/pull/645 | 93,049,282 | MDExOlB1bGxSZXF1ZXN0MzkyMTMwMzk= | 645 | Make filter work when there are multiple joins to the same table | {
"login": "rammie",
"id": 554792,
"node_id": "MDQ6VXNlcjU1NDc5Mg==",
"avatar_url": "https://avatars.githubusercontent.com/u/554792?v=4",
"gravatar_id": "",
"url": "https://api.github.com/users/rammie",
"html_url": "https://github.com/rammie",
"followers_url": "https://api.github.com/users/rammie/follow... | [] | closed | false | null | [] | null | [
"This is some pretty dense code... Can you summarize the changes? I'm not sure I'm going to merge it in yet, but some test-cases would also be helpful for my understanding of these changes.\n",
"Actually...man, this code is very difficult to parse in my head. Might be the 3 hours of sleep I'm running on, but sinc... | 2015-07-04T21:14:31 | 2015-07-05T15:14:26 | 2015-07-05T15:14:25 | NONE | null | {
"url": "https://api.github.com/repos/coleifer/peewee/issues/645/reactions",
"total_count": 0,
"+1": 0,
"-1": 0,
"laugh": 0,
"hooray": 0,
"confused": 0,
"heart": 0,
"rocket": 0,
"eyes": 0
} | https://api.github.com/repos/coleifer/peewee/issues/645/timeline | null | null | false | {
"url": "https://api.github.com/repos/coleifer/peewee/pulls/645",
"html_url": "https://github.com/coleifer/peewee/pull/645",
"diff_url": "https://github.com/coleifer/peewee/pull/645.diff",
"patch_url": "https://github.com/coleifer/peewee/pull/645.patch",
"merged_at": null
} | |
https://api.github.com/repos/coleifer/peewee/issues/644 | https://api.github.com/repos/coleifer/peewee | https://api.github.com/repos/coleifer/peewee/issues/644/labels{/name} | https://api.github.com/repos/coleifer/peewee/issues/644/comments | https://api.github.com/repos/coleifer/peewee/issues/644/events | https://github.com/coleifer/peewee/issues/644 | 92,919,025 | MDU6SXNzdWU5MjkxOTAyNQ== | 644 | Query filtering does not work as expected with multiple foreign keys to the same table. | {
"login": "rammie",
"id": 554792,
"node_id": "MDQ6VXNlcjU1NDc5Mg==",
"avatar_url": "https://avatars.githubusercontent.com/u/554792?v=4",
"gravatar_id": "",
"url": "https://api.github.com/users/rammie",
"html_url": "https://github.com/rammie",
"followers_url": "https://api.github.com/users/rammie/follow... | [] | closed | false | null | [] | null | [
"This is a limitation of the `filter()` API. To get the correct semantics (and avoid extra queries when looking up associated usernames), you would need to write:\n\n``` python\nUA = User.alias()\nq = (Tweet\n .select(Tweet, User, UA)\n .join(User, on=(Tweet.user1 == User.id))\n .switch(Tweet)\n .jo... | 2015-07-03T18:20:47 | 2015-07-04T21:12:40 | 2015-07-04T03:32:42 | NONE | null | Thanks as always for this amazing package.
Here is a small example to recreate this issue. I'm really hoping that you don't decide to deprecate the the filter API as I frequently use the REST API's from the retired flask-peewee module that relies on it.
I think the issue is that ensure_join does not care about the on... | {
"url": "https://api.github.com/repos/coleifer/peewee/issues/644/reactions",
"total_count": 0,
"+1": 0,
"-1": 0,
"laugh": 0,
"hooray": 0,
"confused": 0,
"heart": 0,
"rocket": 0,
"eyes": 0
} | https://api.github.com/repos/coleifer/peewee/issues/644/timeline | null | completed | null | null |
https://api.github.com/repos/coleifer/peewee/issues/643 | https://api.github.com/repos/coleifer/peewee | https://api.github.com/repos/coleifer/peewee/issues/643/labels{/name} | https://api.github.com/repos/coleifer/peewee/issues/643/comments | https://api.github.com/repos/coleifer/peewee/issues/643/events | https://github.com/coleifer/peewee/issues/643 | 92,566,356 | MDU6SXNzdWU5MjU2NjM1Ng== | 643 | Curious on why model.save(only=model.dirty_fields) isn't default behavior | {
"login": "ibushong",
"id": 9298422,
"node_id": "MDQ6VXNlcjkyOTg0MjI=",
"avatar_url": "https://avatars.githubusercontent.com/u/9298422?v=4",
"gravatar_id": "",
"url": "https://api.github.com/users/ibushong",
"html_url": "https://github.com/ibushong",
"followers_url": "https://api.github.com/users/ibush... | [] | closed | false | null | [] | null | [
"Peewee is active record, the behavior is Django-like, so save() will save everything by default. Changing that now would probably break existing implementations anyways.\n\nYou can always subclass `Model` and add your own `save()` implementation that does what you want.\n\nBut to answer your question, mostly it is... | 2015-07-02T07:05:58 | 2015-10-16T04:24:18 | 2015-07-02T18:30:08 | NONE | null | This definitely isn't an issue, I was just curious on this design decision.
Why isn't the default behavior to only update modified fields? (i.e. the behavior we get when using `model.save(only=model.dirty_fields)`
When viewing SQL logs, it's much easier to see what's being updated. If I update a single field, then th... | {
"url": "https://api.github.com/repos/coleifer/peewee/issues/643/reactions",
"total_count": 0,
"+1": 0,
"-1": 0,
"laugh": 0,
"hooray": 0,
"confused": 0,
"heart": 0,
"rocket": 0,
"eyes": 0
} | https://api.github.com/repos/coleifer/peewee/issues/643/timeline | null | completed | null | null |
https://api.github.com/repos/coleifer/peewee/issues/642 | https://api.github.com/repos/coleifer/peewee | https://api.github.com/repos/coleifer/peewee/issues/642/labels{/name} | https://api.github.com/repos/coleifer/peewee/issues/642/comments | https://api.github.com/repos/coleifer/peewee/issues/642/events | https://github.com/coleifer/peewee/issues/642 | 92,319,140 | MDU6SXNzdWU5MjMxOTE0MA== | 642 | Using bitwise and / or in a query | {
"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, you can use `.bin_and`, `.bin_or`, `^` (xor).\n",
"If they are not mapped to the correct operator for your database please let me know.\n",
"It looks like I may need a bitwise `NOT`, though, now that I look at it.\n",
"Awesome, thanks. My usage is like this, am I doing it right? I'm trying to select any... | 2015-07-01T08:50:28 | 2015-07-01T18:20:35 | 2015-07-01T18:20:35 | CONTRIBUTOR | null | Is it possible to use bitwise operations (&, |, #, ~) in a query and have them translate to the (flavor)SQL keywords to _actually_ do the bitwise operation?
| {
"url": "https://api.github.com/repos/coleifer/peewee/issues/642/reactions",
"total_count": 0,
"+1": 0,
"-1": 0,
"laugh": 0,
"hooray": 0,
"confused": 0,
"heart": 0,
"rocket": 0,
"eyes": 0
} | https://api.github.com/repos/coleifer/peewee/issues/642/timeline | null | completed | null | null |
https://api.github.com/repos/coleifer/peewee/issues/641 | https://api.github.com/repos/coleifer/peewee | https://api.github.com/repos/coleifer/peewee/issues/641/labels{/name} | https://api.github.com/repos/coleifer/peewee/issues/641/comments | https://api.github.com/repos/coleifer/peewee/issues/641/events | https://github.com/coleifer/peewee/issues/641 | 92,024,708 | MDU6SXNzdWU5MjAyNDcwOA== | 641 | pwiz AttributeError: 'tuple' object has no attribute 'args' | {
"login": "shaotianchi",
"id": 2035693,
"node_id": "MDQ6VXNlcjIwMzU2OTM=",
"avatar_url": "https://avatars.githubusercontent.com/u/2035693?v=4",
"gravatar_id": "",
"url": "https://api.github.com/users/shaotianchi",
"html_url": "https://github.com/shaotianchi",
"followers_url": "https://api.github.com/us... | [] | closed | false | null | [] | null | [
"Can you paste the entire traceback?\n"
] | 2015-06-30T08:31:53 | 2015-07-02T22:25:10 | 2015-07-02T22:25:10 | NONE | null | I'm using python 2.6
when I use pwiz to generator my model, this error come
```
python -m pwiz -e mysql -H myhost -p 3306 -u user -P psw app_trends_food > mymodels.py
```
| {
"url": "https://api.github.com/repos/coleifer/peewee/issues/641/reactions",
"total_count": 0,
"+1": 0,
"-1": 0,
"laugh": 0,
"hooray": 0,
"confused": 0,
"heart": 0,
"rocket": 0,
"eyes": 0
} | https://api.github.com/repos/coleifer/peewee/issues/641/timeline | null | completed | null | null |
https://api.github.com/repos/coleifer/peewee/issues/640 | https://api.github.com/repos/coleifer/peewee | https://api.github.com/repos/coleifer/peewee/issues/640/labels{/name} | https://api.github.com/repos/coleifer/peewee/issues/640/comments | https://api.github.com/repos/coleifer/peewee/issues/640/events | https://github.com/coleifer/peewee/issues/640 | 91,011,453 | MDU6SXNzdWU5MTAxMTQ1Mw== | 640 | unsigned integer and auto_incresing | {
"login": "AlexHeKa",
"id": 9191522,
"node_id": "MDQ6VXNlcjkxOTE1MjI=",
"avatar_url": "https://avatars.githubusercontent.com/u/9191522?v=4",
"gravatar_id": "",
"url": "https://api.github.com/users/AlexHeKa",
"html_url": "https://github.com/AlexHeKa",
"followers_url": "https://api.github.com/users/AlexH... | [] | closed | false | null | [] | null | [
"I'm not sure I understand the question completely but yes, you can write custom fields. Check the docs:\n\nhttp://docs.peewee-orm.com/en/latest/peewee/models.html#creating-a-custom-field\n"
] | 2015-06-25T16:31:10 | 2015-06-25T22:47:47 | 2015-06-25T22:47:47 | NONE | null | It seems custom field only support Postgresql now,is't possible to custom an unsigned or auto_incresing field in mysql db? Thanks
| {
"url": "https://api.github.com/repos/coleifer/peewee/issues/640/reactions",
"total_count": 0,
"+1": 0,
"-1": 0,
"laugh": 0,
"hooray": 0,
"confused": 0,
"heart": 0,
"rocket": 0,
"eyes": 0
} | https://api.github.com/repos/coleifer/peewee/issues/640/timeline | null | completed | null | null |
https://api.github.com/repos/coleifer/peewee/issues/639 | https://api.github.com/repos/coleifer/peewee | https://api.github.com/repos/coleifer/peewee/issues/639/labels{/name} | https://api.github.com/repos/coleifer/peewee/issues/639/comments | https://api.github.com/repos/coleifer/peewee/issues/639/events | https://github.com/coleifer/peewee/issues/639 | 91,005,652 | MDU6SXNzdWU5MTAwNTY1Mg== | 639 | Proposal to extend IntegrityError | {
"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 | [
"Eeee, yeah, this seems like a can of worms I'd rather not open. I'm going to stick with the ones specified by the DB-API 2.0 spec.\n\nhttps://www.python.org/dev/peps/pep-0249/#exceptions\n",
"Agreed, makes sense to stick by DB-API 2.0. For all other engines/versions, we can just inspect `exc.args[0]` to get the ... | 2015-06-25T16:06:02 | 2015-06-25T23:06:24 | 2015-06-25T22:46:40 | CONTRIBUTOR | null | As a follow up to #443, I'm proposing that IntegrityError should expose some information about the error its representing. For example, if the error was related to a unique constraint failure, perhaps we could have a subclass representing this (`UniqueConstraintError`?).
It seems this is detectable inside `exc.args`, ... | {
"url": "https://api.github.com/repos/coleifer/peewee/issues/639/reactions",
"total_count": 0,
"+1": 0,
"-1": 0,
"laugh": 0,
"hooray": 0,
"confused": 0,
"heart": 0,
"rocket": 0,
"eyes": 0
} | https://api.github.com/repos/coleifer/peewee/issues/639/timeline | null | completed | null | null |
https://api.github.com/repos/coleifer/peewee/issues/638 | https://api.github.com/repos/coleifer/peewee | https://api.github.com/repos/coleifer/peewee/issues/638/labels{/name} | https://api.github.com/repos/coleifer/peewee/issues/638/comments | https://api.github.com/repos/coleifer/peewee/issues/638/events | https://github.com/coleifer/peewee/issues/638 | 90,994,540 | MDU6SXNzdWU5MDk5NDU0MA== | 638 | Proposal for Model.refetch() | {
"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 think I will leave this as an application-type API. Re-fetching seems to me to be complex (do you just go bby primary key, or as you have, by values)?\n",
"So far I've only tried this by using the primary or compound key, which has worked well so far, but will fall over when used with a model that doesn't have... | 2015-06-25T15:23:40 | 2015-06-26T01:38:41 | 2015-06-25T22:45:28 | CONTRIBUTOR | null | One common pattern is to "refetch" a model instance, returning a new instance of the model with updated database values. It's also possible to use `refresh()`, but this could result in surprising behaviour when overwriting class attributes etc. This pattern is applicable to any model with a primary or compound key.
I'... | {
"url": "https://api.github.com/repos/coleifer/peewee/issues/638/reactions",
"total_count": 0,
"+1": 0,
"-1": 0,
"laugh": 0,
"hooray": 0,
"confused": 0,
"heart": 0,
"rocket": 0,
"eyes": 0
} | https://api.github.com/repos/coleifer/peewee/issues/638/timeline | null | completed | null | null |
https://api.github.com/repos/coleifer/peewee/issues/637 | https://api.github.com/repos/coleifer/peewee | https://api.github.com/repos/coleifer/peewee/issues/637/labels{/name} | https://api.github.com/repos/coleifer/peewee/issues/637/comments | https://api.github.com/repos/coleifer/peewee/issues/637/events | https://github.com/coleifer/peewee/pull/637 | 90,776,072 | MDExOlB1bGxSZXF1ZXN0Mzg0ODU0NjE= | 637 | Added small bit in documentation about ForeignKeyField's related_name | {
"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 | [
"Sick, I'll take the gitignore too!\n"
] | 2015-06-24T20:44:40 | 2015-06-25T22:40:32 | 2015-06-25T22:40:32 | CONTRIBUTOR | null | I had a lengthy argument with a co-worker about the implicit `related_name` backreference created by peewee when declaring a `ForeignKeyField`. He was convinced it didn't exist, since it wasn't in the documentation. Only after walking him through the source code and demonstrating it did he believe me. So, for the futur... | {
"url": "https://api.github.com/repos/coleifer/peewee/issues/637/reactions",
"total_count": 0,
"+1": 0,
"-1": 0,
"laugh": 0,
"hooray": 0,
"confused": 0,
"heart": 0,
"rocket": 0,
"eyes": 0
} | https://api.github.com/repos/coleifer/peewee/issues/637/timeline | null | null | false | {
"url": "https://api.github.com/repos/coleifer/peewee/pulls/637",
"html_url": "https://github.com/coleifer/peewee/pull/637",
"diff_url": "https://github.com/coleifer/peewee/pull/637.diff",
"patch_url": "https://github.com/coleifer/peewee/pull/637.patch",
"merged_at": "2015-06-25T22:40:32"
} |
https://api.github.com/repos/coleifer/peewee/issues/636 | https://api.github.com/repos/coleifer/peewee | https://api.github.com/repos/coleifer/peewee/issues/636/labels{/name} | https://api.github.com/repos/coleifer/peewee/issues/636/comments | https://api.github.com/repos/coleifer/peewee/issues/636/events | https://github.com/coleifer/peewee/issues/636 | 90,563,675 | MDU6SXNzdWU5MDU2MzY3NQ== | 636 | get next value for pk | {
"login": "ak4nv",
"id": 73960,
"node_id": "MDQ6VXNlcjczOTYw",
"avatar_url": "https://avatars.githubusercontent.com/u/73960?v=4",
"gravatar_id": "",
"url": "https://api.github.com/users/ak4nv",
"html_url": "https://github.com/ak4nv",
"followers_url": "https://api.github.com/users/ak4nv/followers",
"f... | [] | closed | false | null | [] | null | [
"Not coleifer, but I would have to say probably not. To prevent race conditions, the only reliable way to know the next id is to have it assigned to you by the DBMS, and each DBMS handles passing that information back in a different way after an ID is assigned.\n\nhttps://github.com/coleifer/peewee/blob/master/peew... | 2015-06-24T04:45:21 | 2015-06-25T22:42:19 | 2015-06-25T22:42:19 | NONE | null | Is there an easy way to get the next value for the primary key (ID) of a sequence?
Needs to use id in one field of model.
I have to save the object twice now.
``` python
def save(self, *args, **kwargs):
rows = super().save(*args, **kwargs)
self.code = '.'.join((self.branch.code, self.type, str(sel... | {
"url": "https://api.github.com/repos/coleifer/peewee/issues/636/reactions",
"total_count": 0,
"+1": 0,
"-1": 0,
"laugh": 0,
"hooray": 0,
"confused": 0,
"heart": 0,
"rocket": 0,
"eyes": 0
} | https://api.github.com/repos/coleifer/peewee/issues/636/timeline | null | completed | null | null |
https://api.github.com/repos/coleifer/peewee/issues/635 | https://api.github.com/repos/coleifer/peewee | https://api.github.com/repos/coleifer/peewee/issues/635/labels{/name} | https://api.github.com/repos/coleifer/peewee/issues/635/comments | https://api.github.com/repos/coleifer/peewee/issues/635/events | https://github.com/coleifer/peewee/issues/635 | 90,469,024 | MDU6SXNzdWU5MDQ2OTAyNA== | 635 | Regression: using a column alias breaks ModelQueryResultWrapper for nested joined objects | {
"login": "jakedt",
"id": 2183986,
"node_id": "MDQ6VXNlcjIxODM5ODY=",
"avatar_url": "https://avatars.githubusercontent.com/u/2183986?v=4",
"gravatar_id": "",
"url": "https://api.github.com/users/jakedt",
"html_url": "https://github.com/jakedt",
"followers_url": "https://api.github.com/users/jakedt/foll... | [] | closed | false | null | [] | null | [
"Actually the behavior in master is now correct:\n\n``` python\nIn [2]: generate_data()\n\nIn [3]: found = (Tweet.select(Tweet.message, User.username.alias('uname'))\n ...: .join(User).where(Tweet.id == 1).get())\n\nIn [4]: found.user\nOut[4]: <__main__.User at 0x7f35f01a54d0>\n\nIn [5]: found.user.u... | 2015-06-23T19:18:25 | 2015-06-25T22:37:33 | 2015-06-25T22:37:33 | NONE | null | Repro:
``` python
import logging
import datetime
from peewee import *
logger = logging.getLogger(__name__)
database = SqliteDatabase(':memory:')
class User(Model):
username = CharField(unique=True)
class Meta:
database = database
class Tweet(Model):
user = ForeignKeyField(User, related_name=... | {
"url": "https://api.github.com/repos/coleifer/peewee/issues/635/reactions",
"total_count": 0,
"+1": 0,
"-1": 0,
"laugh": 0,
"hooray": 0,
"confused": 0,
"heart": 0,
"rocket": 0,
"eyes": 0
} | https://api.github.com/repos/coleifer/peewee/issues/635/timeline | null | completed | null | null |
https://api.github.com/repos/coleifer/peewee/issues/634 | https://api.github.com/repos/coleifer/peewee | https://api.github.com/repos/coleifer/peewee/issues/634/labels{/name} | https://api.github.com/repos/coleifer/peewee/issues/634/comments | https://api.github.com/repos/coleifer/peewee/issues/634/events | https://github.com/coleifer/peewee/issues/634 | 90,422,540 | MDU6SXNzdWU5MDQyMjU0MA== | 634 | UNION query breaks table mapping for selected joined objects | {
"login": "jakedt",
"id": 2183986,
"node_id": "MDQ6VXNlcjIxODM5ODY=",
"avatar_url": "https://avatars.githubusercontent.com/u/2183986?v=4",
"gravatar_id": "",
"url": "https://api.github.com/users/jakedt",
"html_url": "https://github.com/jakedt",
"followers_url": "https://api.github.com/users/jakedt/foll... | [] | closed | false | null | [] | null | [
"Possible solution? I can't think through the edge cases the way you can.\n\n``` python\ndiff --git i/peewee.py w/peewee.py\nindex c3e2a5f..192e177 100644\n--- i/peewee.py\n+++ w/peewee.py\n@@ -2756,11 +2756,16 @@ class SelectQuery(Query):\n if self._dirty or not self._qr:\n model_class = self.m... | 2015-06-23T15:41:06 | 2015-06-29T17:30:18 | 2015-06-28T01:07:49 | NONE | null | I am finding that even though the parameters come out in the same order, and the aliases are the same, union queries break the creating of children objects from multi-table selects.
repro:
``` python
import logging
import datetime
from peewee import *
logger = logging.getLogger(__name__)
database = SqliteDatabase('... | {
"url": "https://api.github.com/repos/coleifer/peewee/issues/634/reactions",
"total_count": 0,
"+1": 0,
"-1": 0,
"laugh": 0,
"hooray": 0,
"confused": 0,
"heart": 0,
"rocket": 0,
"eyes": 0
} | https://api.github.com/repos/coleifer/peewee/issues/634/timeline | null | completed | null | null |
https://api.github.com/repos/coleifer/peewee/issues/633 | https://api.github.com/repos/coleifer/peewee | https://api.github.com/repos/coleifer/peewee/issues/633/labels{/name} | https://api.github.com/repos/coleifer/peewee/issues/633/comments | https://api.github.com/repos/coleifer/peewee/issues/633/events | https://github.com/coleifer/peewee/issues/633 | 90,384,895 | MDU6SXNzdWU5MDM4NDg5NQ== | 633 | int field with max length set to 1 | {
"login": "emamirazavi",
"id": 3804866,
"node_id": "MDQ6VXNlcjM4MDQ4NjY=",
"avatar_url": "https://avatars.githubusercontent.com/u/3804866?v=4",
"gravatar_id": "",
"url": "https://api.github.com/users/emamirazavi",
"html_url": "https://github.com/emamirazavi",
"followers_url": "https://api.github.com/us... | [] | closed | false | null | [] | null | [
"Unfortunately peewee doesn't support int with max length natively. You can write a custom field class though if you want to. Check the docs on adding a custom field.\n"
] | 2015-06-23T13:09:30 | 2015-06-25T22:33:22 | 2015-06-25T22:33:22 | NONE | null | As i knew i could not set max length of integer field to 1 for MySQL. We can not have this feature yet?!
| {
"url": "https://api.github.com/repos/coleifer/peewee/issues/633/reactions",
"total_count": 0,
"+1": 0,
"-1": 0,
"laugh": 0,
"hooray": 0,
"confused": 0,
"heart": 0,
"rocket": 0,
"eyes": 0
} | https://api.github.com/repos/coleifer/peewee/issues/633/timeline | null | completed | null | null |
https://api.github.com/repos/coleifer/peewee/issues/632 | https://api.github.com/repos/coleifer/peewee | https://api.github.com/repos/coleifer/peewee/issues/632/labels{/name} | https://api.github.com/repos/coleifer/peewee/issues/632/comments | https://api.github.com/repos/coleifer/peewee/issues/632/events | https://github.com/coleifer/peewee/issues/632 | 90,192,417 | MDU6SXNzdWU5MDE5MjQxNw== | 632 | Playhouse proposal for optimised MySQL 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 | [
"This is quite neat! I will pass but hopefully Google will help anyone else find this who may be interested.\n"
] | 2015-06-22T19:44:13 | 2015-06-25T22:32:39 | 2015-06-25T22:32:39 | CONTRIBUTOR | null | I spent the day putting together the most optimised method of storing UUIDs in MySQL/MariaDB, and ended up implementing some research by Percona in which bits are shifted around to give better index performance.
I've since decided to switch over to ObjectIDs instead, but thought I'd share this code. If it doesn't get ... | {
"url": "https://api.github.com/repos/coleifer/peewee/issues/632/reactions",
"total_count": 0,
"+1": 0,
"-1": 0,
"laugh": 0,
"hooray": 0,
"confused": 0,
"heart": 0,
"rocket": 0,
"eyes": 0
} | https://api.github.com/repos/coleifer/peewee/issues/632/timeline | null | completed | null | null |
https://api.github.com/repos/coleifer/peewee/issues/631 | https://api.github.com/repos/coleifer/peewee | https://api.github.com/repos/coleifer/peewee/issues/631/labels{/name} | https://api.github.com/repos/coleifer/peewee/issues/631/comments | https://api.github.com/repos/coleifer/peewee/issues/631/events | https://github.com/coleifer/peewee/issues/631 | 90,119,409 | MDU6SXNzdWU5MDExOTQwOQ== | 631 | Proposal for FixedCharField? | {
"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 think I will leave this alone, but if you wanted to add it to `playhouse` you could create a new `fields` module I suppose? (and maybe move the `AESEncryptedField` and `CompressedField` from `shortcuts` I believe).\n",
"That's a neat idea, it would be a good place for other common fields too. I have some spare... | 2015-06-22T14:39:14 | 2015-07-06T11:35:36 | 2015-07-05T18:08:35 | CONTRIBUTOR | null | Although Postgres apparently does not experience any performance difference between `char/varchar` [[1]](http://www.postgresql.org/message-id/C11A06F4.4B7B8%pgsql@007Marketing.com), other databases such as MySQL do have a noticeable impact [[2]](http://dba.stackexchange.com/questions/424/performance-implications-of-mys... | {
"url": "https://api.github.com/repos/coleifer/peewee/issues/631/reactions",
"total_count": 0,
"+1": 0,
"-1": 0,
"laugh": 0,
"hooray": 0,
"confused": 0,
"heart": 0,
"rocket": 0,
"eyes": 0
} | https://api.github.com/repos/coleifer/peewee/issues/631/timeline | null | completed | null | null |
https://api.github.com/repos/coleifer/peewee/issues/630 | https://api.github.com/repos/coleifer/peewee | https://api.github.com/repos/coleifer/peewee/issues/630/labels{/name} | https://api.github.com/repos/coleifer/peewee/issues/630/comments | https://api.github.com/repos/coleifer/peewee/issues/630/events | https://github.com/coleifer/peewee/issues/630 | 89,304,698 | MDU6SXNzdWU4OTMwNDY5OA== | 630 | Enum field 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 | [
"I have not added enums because I personally have always used an `IntegerField` with a set of defined values. My blog, for instance, stores an entry's status as an integer such that 1=published, 2=draft, 9=deleted.\n\nPython does not natively support an enum data-type until 3.4, either, so there is another reason a... | 2015-06-18T14:12:43 | 2022-02-18T14:20:36 | 2015-06-19T10:27:14 | CONTRIBUTOR | null | I've had a look around but can't seem to find any reference to Peewee supporting `enum` fields, other than a short mailing list [thread](https://groups.google.com/forum/#!topic/peewee-orm/jev6II7sN4Q) with no outcome, and a user contributed [recipe](https://gist.github.com/b1naryth1ef/607e92dc8c1748a06b5d) for Postgres... | {
"url": "https://api.github.com/repos/coleifer/peewee/issues/630/reactions",
"total_count": 0,
"+1": 0,
"-1": 0,
"laugh": 0,
"hooray": 0,
"confused": 0,
"heart": 0,
"rocket": 0,
"eyes": 0
} | https://api.github.com/repos/coleifer/peewee/issues/630/timeline | null | completed | null | null |
https://api.github.com/repos/coleifer/peewee/issues/629 | https://api.github.com/repos/coleifer/peewee | https://api.github.com/repos/coleifer/peewee/issues/629/labels{/name} | https://api.github.com/repos/coleifer/peewee/issues/629/comments | https://api.github.com/repos/coleifer/peewee/issues/629/events | https://github.com/coleifer/peewee/issues/629 | 89,191,236 | MDU6SXNzdWU4OTE5MTIzNg== | 629 | Support modification tracking by supply an event api? | {
"login": "galeo",
"id": 1025559,
"node_id": "MDQ6VXNlcjEwMjU1NTk=",
"avatar_url": "https://avatars.githubusercontent.com/u/1025559?v=4",
"gravatar_id": "",
"url": "https://api.github.com/users/galeo",
"html_url": "https://github.com/galeo",
"followers_url": "https://api.github.com/users/galeo/follower... | [] | closed | false | null | [] | null | [
"The limitations in Peewee are really the maximum possible. Anything more should be implemented in the database as triggers.\n",
"I'm trying to integrate Whoosh with Peewee just as the way [Flask-WhooshAlchemy](https://github.com/gyllstromk/Flask-WhooshAlchemy) uses [Flask-SQLAlchemy](https://github.com/mitsuhiko... | 2015-06-18T03:59:22 | 2015-06-28T02:54:09 | 2015-06-18T04:03:38 | NONE | null | Peewee has very limited signal support in `playhouse.signals` currently. Does it have any plan to supply a variety of hooks or an event api that could support modification tracking in the future?
| {
"url": "https://api.github.com/repos/coleifer/peewee/issues/629/reactions",
"total_count": 0,
"+1": 0,
"-1": 0,
"laugh": 0,
"hooray": 0,
"confused": 0,
"heart": 0,
"rocket": 0,
"eyes": 0
} | https://api.github.com/repos/coleifer/peewee/issues/629/timeline | null | completed | null | null |
https://api.github.com/repos/coleifer/peewee/issues/628 | https://api.github.com/repos/coleifer/peewee | https://api.github.com/repos/coleifer/peewee/issues/628/labels{/name} | https://api.github.com/repos/coleifer/peewee/issues/628/comments | https://api.github.com/repos/coleifer/peewee/issues/628/events | https://github.com/coleifer/peewee/issues/628 | 88,672,103 | MDU6SXNzdWU4ODY3MjEwMw== | 628 | Adding Request Hooks with tornado | {
"login": "AlexHeKa",
"id": 9191522,
"node_id": "MDQ6VXNlcjkxOTE1MjI=",
"avatar_url": "https://avatars.githubusercontent.com/u/9191522?v=4",
"gravatar_id": "",
"url": "https://api.github.com/users/AlexHeKa",
"html_url": "https://github.com/AlexHeKa",
"followers_url": "https://api.github.com/users/AlexH... | [] | closed | false | null | [] | null | [
"Fixed in c9785a21359b4c0b4bd3e76a326b9a7f240ddc86\n",
"http://docs.peewee-orm.com/en/latest/peewee/database.html#tornado\n"
] | 2015-06-16T09:23:30 | 2015-06-17T20:09:06 | 2015-06-17T20:08:45 | NONE | null | Thanks for help!
| {
"url": "https://api.github.com/repos/coleifer/peewee/issues/628/reactions",
"total_count": 0,
"+1": 0,
"-1": 0,
"laugh": 0,
"hooray": 0,
"confused": 0,
"heart": 0,
"rocket": 0,
"eyes": 0
} | https://api.github.com/repos/coleifer/peewee/issues/628/timeline | null | completed | null | null |
https://api.github.com/repos/coleifer/peewee/issues/627 | https://api.github.com/repos/coleifer/peewee | https://api.github.com/repos/coleifer/peewee/issues/627/labels{/name} | https://api.github.com/repos/coleifer/peewee/issues/627/comments | https://api.github.com/repos/coleifer/peewee/issues/627/events | https://github.com/coleifer/peewee/pull/627 | 88,422,614 | MDExOlB1bGxSZXF1ZXN0Mzc2ODkxOTM= | 627 | Migrations: change column | {
"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 | [
"I think I will pass on this, but thank you.\n",
"What wrong?\n",
"Well, I think `ALTER TABLE / ALTER COLUMN` is just complicated enough that I'm not sure this implementation will suffice. Additionally, the MySQL syntax is quite a bit different IIRC, and is not added as part of this PR.\n",
"That the reason w... | 2015-06-15T13:08:03 | 2015-06-15T15:25:23 | 2015-06-15T14:42:49 | CONTRIBUTOR | null | I've used the functionality in my project with Postgres and it works for me. So I thought it could be useful for other people. The request provides beta support for `change_column` functionality in migrator. I've tested this with Postgres and SQLite.
| {
"url": "https://api.github.com/repos/coleifer/peewee/issues/627/reactions",
"total_count": 0,
"+1": 0,
"-1": 0,
"laugh": 0,
"hooray": 0,
"confused": 0,
"heart": 0,
"rocket": 0,
"eyes": 0
} | https://api.github.com/repos/coleifer/peewee/issues/627/timeline | null | null | false | {
"url": "https://api.github.com/repos/coleifer/peewee/pulls/627",
"html_url": "https://github.com/coleifer/peewee/pull/627",
"diff_url": "https://github.com/coleifer/peewee/pull/627.diff",
"patch_url": "https://github.com/coleifer/peewee/pull/627.patch",
"merged_at": null
} |
https://api.github.com/repos/coleifer/peewee/issues/626 | https://api.github.com/repos/coleifer/peewee | https://api.github.com/repos/coleifer/peewee/issues/626/labels{/name} | https://api.github.com/repos/coleifer/peewee/issues/626/comments | https://api.github.com/repos/coleifer/peewee/issues/626/events | https://github.com/coleifer/peewee/issues/626 | 88,295,364 | MDU6SXNzdWU4ODI5NTM2NA== | 626 | [Support request] No primary key for a model | {
"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 | [
"For models with no primary key, simply specify `primary_key=False` in the inner `Meta` class:\n\n``` python\nclass Keyword(Model):\n name = CharField(null=False)\n created = DateTimeField(null=False, default=datetime.utcnow)\n\n class Meta:\n primary_key = False\n```\n\nIf you want a multi-column p... | 2015-06-15T02:42:10 | 2018-09-25T07:02:38 | 2015-06-15T03:11:43 | CONTRIBUTOR | null | Hi Charles,
I've got a table which logs keywords, schema is:
```
class Keyword(Model):
name = CharField(null=False)
created = DateTimeField(null=False, default=datetime.utcnow)
class Meta:
indexes = (
(('created', 'name'), False)
)
```
In short, I want to drop the auto-genera... | {
"url": "https://api.github.com/repos/coleifer/peewee/issues/626/reactions",
"total_count": 0,
"+1": 0,
"-1": 0,
"laugh": 0,
"hooray": 0,
"confused": 0,
"heart": 0,
"rocket": 0,
"eyes": 0
} | https://api.github.com/repos/coleifer/peewee/issues/626/timeline | null | completed | null | null |
https://api.github.com/repos/coleifer/peewee/issues/625 | https://api.github.com/repos/coleifer/peewee | https://api.github.com/repos/coleifer/peewee/issues/625/labels{/name} | https://api.github.com/repos/coleifer/peewee/issues/625/comments | https://api.github.com/repos/coleifer/peewee/issues/625/events | https://github.com/coleifer/peewee/issues/625 | 88,032,515 | MDU6SXNzdWU4ODAzMjUxNQ== | 625 | Small issue with get_object_list() method | {
"login": "PiJoules",
"id": 6019989,
"node_id": "MDQ6VXNlcjYwMTk5ODk=",
"avatar_url": "https://avatars.githubusercontent.com/u/6019989?v=4",
"gravatar_id": "",
"url": "https://api.github.com/users/PiJoules",
"html_url": "https://github.com/PiJoules",
"followers_url": "https://api.github.com/users/PiJou... | [] | closed | false | null | [] | null | [] | 2015-06-13T16:50:00 | 2015-06-13T21:59:48 | 2015-06-13T21:59:48 | NONE | null | I was trying out the blog example and whenever I went on the dev server (127.0.0.1:5000), the 404 page would always get displayed. I was able to get around this by creating and publishing a post, but whenever I went to the drafts page (127.0.0.1:5000/drafts/), I would also get redirected to the same 404 page. I was abl... | {
"url": "https://api.github.com/repos/coleifer/peewee/issues/625/reactions",
"total_count": 0,
"+1": 0,
"-1": 0,
"laugh": 0,
"hooray": 0,
"confused": 0,
"heart": 0,
"rocket": 0,
"eyes": 0
} | https://api.github.com/repos/coleifer/peewee/issues/625/timeline | null | completed | null | null |
https://api.github.com/repos/coleifer/peewee/issues/624 | https://api.github.com/repos/coleifer/peewee | https://api.github.com/repos/coleifer/peewee/issues/624/labels{/name} | https://api.github.com/repos/coleifer/peewee/issues/624/comments | https://api.github.com/repos/coleifer/peewee/issues/624/events | https://github.com/coleifer/peewee/issues/624 | 87,621,777 | MDU6SXNzdWU4NzYyMTc3Nw== | 624 | A problem with connection pool | {
"login": "emamirazavi",
"id": 3804866,
"node_id": "MDQ6VXNlcjM4MDQ4NjY=",
"avatar_url": "https://avatars.githubusercontent.com/u/3804866?v=4",
"gravatar_id": "",
"url": "https://api.github.com/users/emamirazavi",
"html_url": "https://github.com/emamirazavi",
"followers_url": "https://api.github.com/us... | [] | closed | false | null | [] | null | [
"I'm confused, what is the error and why is it an error in the connection pool? Seems to me to be an error in gunicorn/gevent.\n",
"Peewee is using pymysql and it's connection pooling(playhouse.pool) wants\nto create new connection. Python socket and threading replaced by gevent\nmonkey because of workers of guni... | 2015-06-12T06:10:56 | 2015-06-13T22:02:22 | 2015-06-13T22:01:59 | NONE | null | ```
Jun 12 10:23:52 www.example.com gunicorn[4763]: [2015-06-12 10:23:52 +0000] [4763] [DEBUG] 3 workers
Jun 12 10:23:53 www.example.com gunicorn[4763]: [2015-06-12 10:23:53 +0000] [4763] [DEBUG] 3 workers
Jun 12 10:23:54 www.example.com gunicorn[4763]: [2015-06-12 10:23:53 +0000] [2876] [DEBUG] GET /inbound
Jun 12 10:... | {
"url": "https://api.github.com/repos/coleifer/peewee/issues/624/reactions",
"total_count": 0,
"+1": 0,
"-1": 0,
"laugh": 0,
"hooray": 0,
"confused": 0,
"heart": 0,
"rocket": 0,
"eyes": 0
} | https://api.github.com/repos/coleifer/peewee/issues/624/timeline | null | completed | null | null |
https://api.github.com/repos/coleifer/peewee/issues/623 | https://api.github.com/repos/coleifer/peewee | https://api.github.com/repos/coleifer/peewee/issues/623/labels{/name} | https://api.github.com/repos/coleifer/peewee/issues/623/comments | https://api.github.com/repos/coleifer/peewee/issues/623/events | https://github.com/coleifer/peewee/issues/623 | 87,224,424 | MDU6SXNzdWU4NzIyNDQyNA== | 623 | Debian package | {
"login": "fliiiix",
"id": 1682954,
"node_id": "MDQ6VXNlcjE2ODI5NTQ=",
"avatar_url": "https://avatars.githubusercontent.com/u/1682954?v=4",
"gravatar_id": "",
"url": "https://api.github.com/users/fliiiix",
"html_url": "https://github.com/fliiiix",
"followers_url": "https://api.github.com/users/fliiiix/... | [] | closed | false | null | [] | null | [
"I've started something https://github.com/fliiiix/python-peewee but like most times I have not really a clue if I'm doing this the right way. \n",
"I do not have plans to make a debian package, nor make that part of the peewee source code. `pip` is seen as the primary way for managing python packages these days,... | 2015-06-11T06:04:47 | 2015-06-11T17:49:11 | 2015-06-11T15:56:10 | NONE | null | Are there any plans to pack peewee for Debian?
Or are there any reasons this is not gonna happen?
| {
"url": "https://api.github.com/repos/coleifer/peewee/issues/623/reactions",
"total_count": 0,
"+1": 0,
"-1": 0,
"laugh": 0,
"hooray": 0,
"confused": 0,
"heart": 0,
"rocket": 0,
"eyes": 0
} | https://api.github.com/repos/coleifer/peewee/issues/623/timeline | null | completed | null | null |
https://api.github.com/repos/coleifer/peewee/issues/622 | https://api.github.com/repos/coleifer/peewee | https://api.github.com/repos/coleifer/peewee/issues/622/labels{/name} | https://api.github.com/repos/coleifer/peewee/issues/622/comments | https://api.github.com/repos/coleifer/peewee/issues/622/events | https://github.com/coleifer/peewee/pull/622 | 86,569,454 | MDExOlB1bGxSZXF1ZXN0MzcyNDQ2NDY= | 622 | Support connect params in db_url | {
"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 | [
"Beautiful!\n"
] | 2015-06-09T11:46:26 | 2015-06-09T13:10:36 | 2015-06-09T13:10:36 | CONTRIBUTOR | null | Hello!
The PR provides a way to set additional connection params when db_url.connect is used. Such as `encoding` for postgresql and etc.
| {
"url": "https://api.github.com/repos/coleifer/peewee/issues/622/reactions",
"total_count": 0,
"+1": 0,
"-1": 0,
"laugh": 0,
"hooray": 0,
"confused": 0,
"heart": 0,
"rocket": 0,
"eyes": 0
} | https://api.github.com/repos/coleifer/peewee/issues/622/timeline | null | null | false | {
"url": "https://api.github.com/repos/coleifer/peewee/pulls/622",
"html_url": "https://github.com/coleifer/peewee/pull/622",
"diff_url": "https://github.com/coleifer/peewee/pull/622.diff",
"patch_url": "https://github.com/coleifer/peewee/pull/622.patch",
"merged_at": "2015-06-09T13:10:36"
} |
https://api.github.com/repos/coleifer/peewee/issues/621 | https://api.github.com/repos/coleifer/peewee | https://api.github.com/repos/coleifer/peewee/issues/621/labels{/name} | https://api.github.com/repos/coleifer/peewee/issues/621/comments | https://api.github.com/repos/coleifer/peewee/issues/621/events | https://github.com/coleifer/peewee/issues/621 | 86,468,396 | MDU6SXNzdWU4NjQ2ODM5Ng== | 621 | Tornado | {
"login": "AlexHeKa",
"id": 9191522,
"node_id": "MDQ6VXNlcjkxOTE1MjI=",
"avatar_url": "https://avatars.githubusercontent.com/u/9191522?v=4",
"gravatar_id": "",
"url": "https://api.github.com/users/AlexHeKa",
"html_url": "https://github.com/AlexHeKa",
"followers_url": "https://api.github.com/users/AlexH... | [] | closed | false | null | [] | null | [] | 2015-06-09T06:15:09 | 2015-06-09T13:10:49 | 2015-06-09T13:10:49 | NONE | null | Please help make tornado handle the connections correctly by using peewee
| {
"url": "https://api.github.com/repos/coleifer/peewee/issues/621/reactions",
"total_count": 0,
"+1": 0,
"-1": 0,
"laugh": 0,
"hooray": 0,
"confused": 0,
"heart": 0,
"rocket": 0,
"eyes": 0
} | https://api.github.com/repos/coleifer/peewee/issues/621/timeline | null | completed | null | null |
https://api.github.com/repos/coleifer/peewee/issues/620 | https://api.github.com/repos/coleifer/peewee | https://api.github.com/repos/coleifer/peewee/issues/620/labels{/name} | https://api.github.com/repos/coleifer/peewee/issues/620/comments | https://api.github.com/repos/coleifer/peewee/issues/620/events | https://github.com/coleifer/peewee/issues/620 | 86,233,299 | MDU6SXNzdWU4NjIzMzI5OQ== | 620 | issue when field name is _data | {
"login": "xinming90",
"id": 5674271,
"node_id": "MDQ6VXNlcjU2NzQyNzE=",
"avatar_url": "https://avatars.githubusercontent.com/u/5674271?v=4",
"gravatar_id": "",
"url": "https://api.github.com/users/xinming90",
"html_url": "https://github.com/xinming90",
"followers_url": "https://api.github.com/users/xi... | [] | closed | false | null | [] | null | [
"Unfortunately I do not plan on merging your fix, as it changes some major underlying assumptions about peewee models. For now this is just a limitation of peewee. If your column is named `_data`, you can do this instead:\n\n``` python\nclass User(Model):\n data = CharField(db_column='_data')\n```\n"
] | 2015-06-08T15:58:32 | 2015-06-08T16:22:32 | 2015-06-08T16:22:32 | NONE | null | For example
``` python
from peewee import *
class User(Model):
id = IntegerField()
_data = CharField()
u = User(id=1, _data='eleme')
print u.id, u._data
```
got error
```
(virtualenv)➜ peewee git:(master) ✗ python t.py
Traceback (most recent call last):
File "t.py", line 7, in <module>
u = User(id... | {
"url": "https://api.github.com/repos/coleifer/peewee/issues/620/reactions",
"total_count": 0,
"+1": 0,
"-1": 0,
"laugh": 0,
"hooray": 0,
"confused": 0,
"heart": 0,
"rocket": 0,
"eyes": 0
} | https://api.github.com/repos/coleifer/peewee/issues/620/timeline | null | completed | null | null |
https://api.github.com/repos/coleifer/peewee/issues/619 | https://api.github.com/repos/coleifer/peewee | https://api.github.com/repos/coleifer/peewee/issues/619/labels{/name} | https://api.github.com/repos/coleifer/peewee/issues/619/comments | https://api.github.com/repos/coleifer/peewee/issues/619/events | https://github.com/coleifer/peewee/pull/619 | 86,231,805 | MDExOlB1bGxSZXF1ZXN0MzcxNjc5MDY= | 619 | fix field named '_data' | {
"login": "xinming90",
"id": 5674271,
"node_id": "MDQ6VXNlcjU2NzQyNzE=",
"avatar_url": "https://avatars.githubusercontent.com/u/5674271?v=4",
"gravatar_id": "",
"url": "https://api.github.com/users/xinming90",
"html_url": "https://github.com/xinming90",
"followers_url": "https://api.github.com/users/xi... | [] | closed | false | null | [] | null | [] | 2015-06-08T15:53:16 | 2015-06-08T16:23:24 | 2015-06-08T16:23:24 | NONE | null | {
"url": "https://api.github.com/repos/coleifer/peewee/issues/619/reactions",
"total_count": 0,
"+1": 0,
"-1": 0,
"laugh": 0,
"hooray": 0,
"confused": 0,
"heart": 0,
"rocket": 0,
"eyes": 0
} | https://api.github.com/repos/coleifer/peewee/issues/619/timeline | null | null | false | {
"url": "https://api.github.com/repos/coleifer/peewee/pulls/619",
"html_url": "https://github.com/coleifer/peewee/pull/619",
"diff_url": "https://github.com/coleifer/peewee/pull/619.diff",
"patch_url": "https://github.com/coleifer/peewee/pull/619.patch",
"merged_at": null
} | |
https://api.github.com/repos/coleifer/peewee/issues/618 | https://api.github.com/repos/coleifer/peewee | https://api.github.com/repos/coleifer/peewee/issues/618/labels{/name} | https://api.github.com/repos/coleifer/peewee/issues/618/comments | https://api.github.com/repos/coleifer/peewee/issues/618/events | https://github.com/coleifer/peewee/issues/618 | 85,804,363 | MDU6SXNzdWU4NTgwNDM2Mw== | 618 | Implicit add Primary Key for id field | {
"login": "horpto",
"id": 7109350,
"node_id": "MDQ6VXNlcjcxMDkzNTA=",
"avatar_url": "https://avatars.githubusercontent.com/u/7109350?v=4",
"gravatar_id": "",
"url": "https://api.github.com/users/horpto",
"html_url": "https://github.com/horpto",
"followers_url": "https://api.github.com/users/horpto/foll... | [] | closed | false | null | [] | null | [
"This is just the standard peewee behavior. If you want a different field to be primary key, declare a different one.\n"
] | 2015-06-06T19:26:07 | 2015-06-06T23:53:45 | 2015-06-06T23:53:45 | NONE | null | ```
class Model(BaseModel):
id = TextField()
field = TextField()
```
Field id implicitly is primary key now. TextField, for example, is not really suitable to be a primary key, but unexpectedly it is. Maybe this situation need report warning or even error.
| {
"url": "https://api.github.com/repos/coleifer/peewee/issues/618/reactions",
"total_count": 0,
"+1": 0,
"-1": 0,
"laugh": 0,
"hooray": 0,
"confused": 0,
"heart": 0,
"rocket": 0,
"eyes": 0
} | https://api.github.com/repos/coleifer/peewee/issues/618/timeline | null | completed | null | null |
https://api.github.com/repos/coleifer/peewee/issues/617 | https://api.github.com/repos/coleifer/peewee | https://api.github.com/repos/coleifer/peewee/issues/617/labels{/name} | https://api.github.com/repos/coleifer/peewee/issues/617/comments | https://api.github.com/repos/coleifer/peewee/issues/617/events | https://github.com/coleifer/peewee/issues/617 | 85,471,753 | MDU6SXNzdWU4NTQ3MTc1Mw== | 617 | How to create bigint field? | {
"login": "emamirazavi",
"id": 3804866,
"node_id": "MDQ6VXNlcjM4MDQ4NjY=",
"avatar_url": "https://avatars.githubusercontent.com/u/3804866?v=4",
"gravatar_id": "",
"url": "https://api.github.com/users/emamirazavi",
"html_url": "https://github.com/emamirazavi",
"followers_url": "https://api.github.com/us... | [] | closed | false | null | [] | null | [
"use BigIntegerField\n"
] | 2015-06-05T08:30:08 | 2015-06-05T08:51:09 | 2015-06-05T08:51:09 | NONE | null | Can i create bigint field in integer type of fields?
| {
"url": "https://api.github.com/repos/coleifer/peewee/issues/617/reactions",
"total_count": 0,
"+1": 0,
"-1": 0,
"laugh": 0,
"hooray": 0,
"confused": 0,
"heart": 0,
"rocket": 0,
"eyes": 0
} | https://api.github.com/repos/coleifer/peewee/issues/617/timeline | null | completed | null | null |
https://api.github.com/repos/coleifer/peewee/issues/616 | https://api.github.com/repos/coleifer/peewee | https://api.github.com/repos/coleifer/peewee/issues/616/labels{/name} | https://api.github.com/repos/coleifer/peewee/issues/616/comments | https://api.github.com/repos/coleifer/peewee/issues/616/events | https://github.com/coleifer/peewee/issues/616 | 85,331,742 | MDU6SXNzdWU4NTMzMTc0Mg== | 616 | Support PostgreSql table inheritance | {
"login": "horpto",
"id": 7109350,
"node_id": "MDQ6VXNlcjcxMDkzNTA=",
"avatar_url": "https://avatars.githubusercontent.com/u/7109350?v=4",
"gravatar_id": "",
"url": "https://api.github.com/users/horpto",
"html_url": "https://github.com/horpto",
"followers_url": "https://api.github.com/users/horpto/foll... | [] | closed | false | null | [] | null | [
"I don't know very much about that particular feature, so I can't really say that I have any plans on implementing it. I think I will defer on this one, but if you'd like to discuss making a pull-request let me know.\n"
] | 2015-06-04T23:44:26 | 2015-06-05T00:59:20 | 2015-06-05T00:59:20 | NONE | null | PostgreSql has cool feature like [Table inheritance](http://www.postgresql.org/docs/9.0/static/ddl-inherit.html). It'd be good to implement this feature using inheritance field in Meta class of model.
| {
"url": "https://api.github.com/repos/coleifer/peewee/issues/616/reactions",
"total_count": 0,
"+1": 0,
"-1": 0,
"laugh": 0,
"hooray": 0,
"confused": 0,
"heart": 0,
"rocket": 0,
"eyes": 0
} | https://api.github.com/repos/coleifer/peewee/issues/616/timeline | null | completed | null | null |
https://api.github.com/repos/coleifer/peewee/issues/615 | https://api.github.com/repos/coleifer/peewee | https://api.github.com/repos/coleifer/peewee/issues/615/labels{/name} | https://api.github.com/repos/coleifer/peewee/issues/615/comments | https://api.github.com/repos/coleifer/peewee/issues/615/events | https://github.com/coleifer/peewee/issues/615 | 84,918,815 | MDU6SXNzdWU4NDkxODgxNQ== | 615 | Support set timezone | {
"login": "rodumani",
"id": 4019016,
"node_id": "MDQ6VXNlcjQwMTkwMTY=",
"avatar_url": "https://avatars.githubusercontent.com/u/4019016?v=4",
"gravatar_id": "",
"url": "https://api.github.com/users/rodumani",
"html_url": "https://github.com/rodumani",
"followers_url": "https://api.github.com/users/rodum... | [] | closed | false | null | [] | null | [
"Just call `db.execute_sql('set timezone=\"+09:00\"')`. You can also check your mysql driver's docs to see if it accepts a `time_zone` parameter. If not, you can subclass `MySQLDatabase`, override the `_connect` method, and run `set time_zone` on the newly-created connection.\n"
] | 2015-06-04T05:15:29 | 2015-06-04T23:22:20 | 2015-06-04T23:22:06 | NONE | null | Hello!
I'm making query like following which filter TIMESTAMP field between two dates.
However, the problem is that our MySQL's default timezone is UTC and I want to query in KST timezone.
``` python
Log
.select(fn.Sum(Log.cnt))
.where(Log.insert_dt.between(start_date, end_date))
.scalar()
```
When using SQL, ... | {
"url": "https://api.github.com/repos/coleifer/peewee/issues/615/reactions",
"total_count": 0,
"+1": 0,
"-1": 0,
"laugh": 0,
"hooray": 0,
"confused": 0,
"heart": 0,
"rocket": 0,
"eyes": 0
} | https://api.github.com/repos/coleifer/peewee/issues/615/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.