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/1318 | https://api.github.com/repos/coleifer/peewee | https://api.github.com/repos/coleifer/peewee/issues/1318/labels{/name} | https://api.github.com/repos/coleifer/peewee/issues/1318/comments | https://api.github.com/repos/coleifer/peewee/issues/1318/events | https://github.com/coleifer/peewee/issues/1318 | 242,947,517 | MDU6SXNzdWUyNDI5NDc1MTc= | 1,318 | CompositeKey as primary_key raises AttributeError | {
"login": "celestialorb",
"id": 321475,
"node_id": "MDQ6VXNlcjMyMTQ3NQ==",
"avatar_url": "https://avatars.githubusercontent.com/u/321475?v=4",
"gravatar_id": "",
"url": "https://api.github.com/users/celestialorb",
"html_url": "https://github.com/celestialorb",
"followers_url": "https://api.github.com/u... | [] | closed | false | null | [] | null | [
"I do not encounter any such error running peewee 2.10.1.\r\n\r\nCode:\r\n\r\n```python\r\nimport datetime\r\nfrom peewee import *\r\n\r\n\r\nclass Base(Model):\r\n class Meta:\r\n database = SqliteDatabase(':memory:')\r\n\r\n\r\nclass UpdateBatch(Base):\r\n timestamp = DateTimeField(default=datetime.d... | 2017-07-14T09:40:45 | 2017-07-15T23:03:17 | 2017-07-14T16:51:09 | NONE | null | I have a very basic model that peewee fails to create the model for (the table is created, but peewee raises an AttributeError.
My model is as shown:
```python
import datetime as dt
import peewee as pew
class BaseModel(pew.Model):
class Meta:
database = <DATABASE>
class UpdateBatch(BaseModel... | {
"url": "https://api.github.com/repos/coleifer/peewee/issues/1318/reactions",
"total_count": 0,
"+1": 0,
"-1": 0,
"laugh": 0,
"hooray": 0,
"confused": 0,
"heart": 0,
"rocket": 0,
"eyes": 0
} | https://api.github.com/repos/coleifer/peewee/issues/1318/timeline | null | completed | null | null |
https://api.github.com/repos/coleifer/peewee/issues/1317 | https://api.github.com/repos/coleifer/peewee | https://api.github.com/repos/coleifer/peewee/issues/1317/labels{/name} | https://api.github.com/repos/coleifer/peewee/issues/1317/comments | https://api.github.com/repos/coleifer/peewee/issues/1317/events | https://github.com/coleifer/peewee/issues/1317 | 242,893,940 | MDU6SXNzdWUyNDI4OTM5NDA= | 1,317 | db_table does not work | {
"login": "guangbaowan",
"id": 25094780,
"node_id": "MDQ6VXNlcjI1MDk0Nzgw",
"avatar_url": "https://avatars.githubusercontent.com/u/25094780?v=4",
"gravatar_id": "",
"url": "https://api.github.com/users/guangbaowan",
"html_url": "https://github.com/guangbaowan",
"followers_url": "https://api.github.com/... | [] | closed | false | null | [] | null | [] | 2017-07-14T04:24:32 | 2017-07-14T04:42:07 | 2017-07-14T04:42:07 | NONE | null | Hi, guys, I used peewee to build models .
```
class BaseModel(Model):
class Meta:
# Mysql connection
database = DB
class PromotionUser(BaseModel):
created_at = DateTimeField(default=datetime.datetime.utcnow, index=True)
# seq_id = PrimaryKeyField(null=False)
source_uid = CharF... | {
"url": "https://api.github.com/repos/coleifer/peewee/issues/1317/reactions",
"total_count": 0,
"+1": 0,
"-1": 0,
"laugh": 0,
"hooray": 0,
"confused": 0,
"heart": 0,
"rocket": 0,
"eyes": 0
} | https://api.github.com/repos/coleifer/peewee/issues/1317/timeline | null | completed | null | null |
https://api.github.com/repos/coleifer/peewee/issues/1316 | https://api.github.com/repos/coleifer/peewee | https://api.github.com/repos/coleifer/peewee/issues/1316/labels{/name} | https://api.github.com/repos/coleifer/peewee/issues/1316/comments | https://api.github.com/repos/coleifer/peewee/issues/1316/events | https://github.com/coleifer/peewee/issues/1316 | 242,652,559 | MDU6SXNzdWUyNDI2NTI1NTk= | 1,316 | peewee.OperationalError: (1060, "Duplicate column name ) | {
"login": "iwwxiong",
"id": 12078753,
"node_id": "MDQ6VXNlcjEyMDc4NzUz",
"avatar_url": "https://avatars.githubusercontent.com/u/12078753?v=4",
"gravatar_id": "",
"url": "https://api.github.com/users/iwwxiong",
"html_url": "https://github.com/iwwxiong",
"followers_url": "https://api.github.com/users/iww... | [] | closed | false | null | [] | null | [
"Try aliasing one of the columns, Book.id.alias('book_id') or Author.id.alias('author_id')."
] | 2017-07-13T10:14:30 | 2017-07-13T14:57:40 | 2017-07-13T14:57:40 | NONE | null | Consider the following models:
```python
class Author(Model):
id = PrimaryKeyField()
name = CharField(max_length=50)
class Meta:
db_table = 'Author'
class Book(Model):
id = PrimaryKeyField()
name = CharField(max_length=255)
author = ForeignKeyField(Author)
class Me... | {
"url": "https://api.github.com/repos/coleifer/peewee/issues/1316/reactions",
"total_count": 1,
"+1": 1,
"-1": 0,
"laugh": 0,
"hooray": 0,
"confused": 0,
"heart": 0,
"rocket": 0,
"eyes": 0
} | https://api.github.com/repos/coleifer/peewee/issues/1316/timeline | null | completed | null | null |
https://api.github.com/repos/coleifer/peewee/issues/1315 | https://api.github.com/repos/coleifer/peewee | https://api.github.com/repos/coleifer/peewee/issues/1315/labels{/name} | https://api.github.com/repos/coleifer/peewee/issues/1315/comments | https://api.github.com/repos/coleifer/peewee/issues/1315/events | https://github.com/coleifer/peewee/issues/1315 | 242,523,082 | MDU6SXNzdWUyNDI1MjMwODI= | 1,315 | N+1 avoidance not working? | {
"login": "c17r",
"id": 148640,
"node_id": "MDQ6VXNlcjE0ODY0MA==",
"avatar_url": "https://avatars.githubusercontent.com/u/148640?v=4",
"gravatar_id": "",
"url": "https://api.github.com/users/c17r",
"html_url": "https://github.com/c17r",
"followers_url": "https://api.github.com/users/c17r/followers",
... | [] | closed | false | null | [] | null | [
"You're going the \"wrong way\" when following that query. You'll need to use `prefetch()` instead.\r\n\r\nhttp://docs.peewee-orm.com/en/latest/peewee/querying.html#list-users-and-all-their-tweets\r\n\r\nI'd suggest giving the docs on N+1 a close read. The approach you're using works fine for getting an object and ... | 2017-07-12T21:35:55 | 2017-07-12T21:58:23 | 2017-07-12T21:58:23 | NONE | null | My models are
```
class BaseModel(peewee.Model):
class Meta:
database = database
class Group(BaseModel):
name = peewee.CharField(max_length=255)
reddit_name = peewee.CharField(max_length=30)
added = peewee.DateTimeField(default=_now)
member_count = peewee.IntegerField(default=0)... | {
"url": "https://api.github.com/repos/coleifer/peewee/issues/1315/reactions",
"total_count": 0,
"+1": 0,
"-1": 0,
"laugh": 0,
"hooray": 0,
"confused": 0,
"heart": 0,
"rocket": 0,
"eyes": 0
} | https://api.github.com/repos/coleifer/peewee/issues/1315/timeline | null | completed | null | null |
https://api.github.com/repos/coleifer/peewee/issues/1314 | https://api.github.com/repos/coleifer/peewee | https://api.github.com/repos/coleifer/peewee/issues/1314/labels{/name} | https://api.github.com/repos/coleifer/peewee/issues/1314/comments | https://api.github.com/repos/coleifer/peewee/issues/1314/events | https://github.com/coleifer/peewee/issues/1314 | 242,451,647 | MDU6SXNzdWUyNDI0NTE2NDc= | 1,314 | Relation already exists error when using Model's create_table with fail silently option | {
"login": "Tumetsu",
"id": 3398165,
"node_id": "MDQ6VXNlcjMzOTgxNjU=",
"avatar_url": "https://avatars.githubusercontent.com/u/3398165?v=4",
"gravatar_id": "",
"url": "https://api.github.com/users/Tumetsu",
"html_url": "https://github.com/Tumetsu",
"followers_url": "https://api.github.com/users/Tumetsu/... | [] | closed | false | null | [] | null | [
"Found the problem which was in peewee_migrate. So nothing to see here. More information for curious: https://github.com/klen/peewee_migrate/issues/51"
] | 2017-07-12T17:08:35 | 2017-07-12T17:38:35 | 2017-07-12T17:38:34 | NONE | null | Hello, I'm using peewee with peewee_migrate library and encountered a problem today.
When I try to run my migrations, I get error
```
peewee.ProgrammingError: relation "migratehistory" already exists
```
More info in issue I posted to peewee_migrate's repo: https://github.com/klen/peewee_migrate/issues/51
I inve... | {
"url": "https://api.github.com/repos/coleifer/peewee/issues/1314/reactions",
"total_count": 0,
"+1": 0,
"-1": 0,
"laugh": 0,
"hooray": 0,
"confused": 0,
"heart": 0,
"rocket": 0,
"eyes": 0
} | https://api.github.com/repos/coleifer/peewee/issues/1314/timeline | null | completed | null | null |
https://api.github.com/repos/coleifer/peewee/issues/1313 | https://api.github.com/repos/coleifer/peewee | https://api.github.com/repos/coleifer/peewee/issues/1313/labels{/name} | https://api.github.com/repos/coleifer/peewee/issues/1313/comments | https://api.github.com/repos/coleifer/peewee/issues/1313/events | https://github.com/coleifer/peewee/issues/1313 | 241,259,663 | MDU6SXNzdWUyNDEyNTk2NjM= | 1,313 | Peewee ignoring db_table on create_tables() | {
"login": "timlehr",
"id": 5310859,
"node_id": "MDQ6VXNlcjUzMTA4NTk=",
"avatar_url": "https://avatars.githubusercontent.com/u/5310859?v=4",
"gravatar_id": "",
"url": "https://api.github.com/users/timlehr",
"html_url": "https://github.com/timlehr",
"followers_url": "https://api.github.com/users/timlehr/... | [] | closed | false | null | [] | null | [
"It appears to be working as I'd expect. In the example below the database is reporting a table named \"Foo\" and the SELECT query is querying the \"Foo\" table (successfully).\r\n\r\n```python\r\nIn [1]: from peewee import *\r\n\r\nIn [2]: db = SqliteDatabase('/tmp/foo.db')\r\n\r\nIn [3]: class Foo(Model):\r\n .... | 2017-07-07T13:12:17 | 2017-07-13T14:27:52 | 2017-07-12T21:58:34 | NONE | null | Hi Charles,
first: thanks for your hard work on peewee. It's a lovely package that already saved us a lot of time. :+1:
However, we have an issue similiar to #201 where our uppercase db names are converted to lowercase, even though we specify an explicit uppercase name in the `db_table` attribute of the `meta` c... | {
"url": "https://api.github.com/repos/coleifer/peewee/issues/1313/reactions",
"total_count": 0,
"+1": 0,
"-1": 0,
"laugh": 0,
"hooray": 0,
"confused": 0,
"heart": 0,
"rocket": 0,
"eyes": 0
} | https://api.github.com/repos/coleifer/peewee/issues/1313/timeline | null | completed | null | null |
https://api.github.com/repos/coleifer/peewee/issues/1312 | https://api.github.com/repos/coleifer/peewee | https://api.github.com/repos/coleifer/peewee/issues/1312/labels{/name} | https://api.github.com/repos/coleifer/peewee/issues/1312/comments | https://api.github.com/repos/coleifer/peewee/issues/1312/events | https://github.com/coleifer/peewee/issues/1312 | 241,242,841 | MDU6SXNzdWUyNDEyNDI4NDE= | 1,312 | raw sql execute quote bug | {
"login": "fy0",
"id": 1579850,
"node_id": "MDQ6VXNlcjE1Nzk4NTA=",
"avatar_url": "https://avatars.githubusercontent.com/u/1579850?v=4",
"gravatar_id": "",
"url": "https://api.github.com/users/fy0",
"html_url": "https://github.com/fy0",
"followers_url": "https://api.github.com/users/fy0/followers",
"f... | [] | closed | false | null | [] | null | [
"It works fine for me:\r\n\r\n```python\r\nIn [1]: from peewee import *\r\n\r\nIn [2]: db = PostgresqlDatabase('peewee_test')\r\n\r\nIn [3]: db.execute_sql('select %s', ('asd',)).fetchone()\r\nOut[3]: ('asd',)\r\n```",
"@coleifer select is ok, but it's just a example. Table aaa is not exists so exception raised.... | 2017-07-07T11:59:05 | 2018-01-18T22:53:54 | 2017-07-07T12:34:30 | NONE | null | Example:
```python
from playhouse.db_url import connect
db = connect('postgres://postgres@localhost:5432/')
print(db.quote_char)
# result is "
db.execute_sql('select %s from aaa', ('asd', ))
# Exception: LINE 1: select 'asd' from aaa
db.execute_sql('select "asd" from aaa')
# Exception: LINE 1: select "as... | {
"url": "https://api.github.com/repos/coleifer/peewee/issues/1312/reactions",
"total_count": 0,
"+1": 0,
"-1": 0,
"laugh": 0,
"hooray": 0,
"confused": 0,
"heart": 0,
"rocket": 0,
"eyes": 0
} | https://api.github.com/repos/coleifer/peewee/issues/1312/timeline | null | completed | null | null |
https://api.github.com/repos/coleifer/peewee/issues/1311 | https://api.github.com/repos/coleifer/peewee | https://api.github.com/repos/coleifer/peewee/issues/1311/labels{/name} | https://api.github.com/repos/coleifer/peewee/issues/1311/comments | https://api.github.com/repos/coleifer/peewee/issues/1311/events | https://github.com/coleifer/peewee/issues/1311 | 241,197,127 | MDU6SXNzdWUyNDExOTcxMjc= | 1,311 | Certain operations not respecting the db_value() | {
"login": "TheLarsinator",
"id": 6304557,
"node_id": "MDQ6VXNlcjYzMDQ1NTc=",
"avatar_url": "https://avatars.githubusercontent.com/u/6304557?v=4",
"gravatar_id": "",
"url": "https://api.github.com/users/TheLarsinator",
"html_url": "https://github.com/TheLarsinator",
"followers_url": "https://api.github.... | [] | closed | false | null | [] | null | [
"It seems to be working OK for me:\r\n\r\n```python\r\nfrom peewee import *\r\n\r\nclass ListField(Field):\r\n def db_value(self, value):\r\n return ','.join(value)\r\n def python_value(self, value):\r\n return value.split(',')\r\n\r\ndb = SqliteDatabase(':memory:')\r\n\r\nclass Register(Model):... | 2017-07-07T08:42:58 | 2017-07-07T10:51:48 | 2017-07-07T10:33:34 | NONE | null | I saw that this was an issue before, #150
But I experience the same problem, so perhaps this fix has been undone in a later release:
I have made a ListField, which is pretty much the same as here:
```
class ListField(Field):
def db_value(self, list):
return str(list)
def python_val... | {
"url": "https://api.github.com/repos/coleifer/peewee/issues/1311/reactions",
"total_count": 0,
"+1": 0,
"-1": 0,
"laugh": 0,
"hooray": 0,
"confused": 0,
"heart": 0,
"rocket": 0,
"eyes": 0
} | https://api.github.com/repos/coleifer/peewee/issues/1311/timeline | null | completed | null | null |
https://api.github.com/repos/coleifer/peewee/issues/1310 | https://api.github.com/repos/coleifer/peewee | https://api.github.com/repos/coleifer/peewee/issues/1310/labels{/name} | https://api.github.com/repos/coleifer/peewee/issues/1310/comments | https://api.github.com/repos/coleifer/peewee/issues/1310/events | https://github.com/coleifer/peewee/pull/1310 | 241,072,825 | MDExOlB1bGxSZXF1ZXN0MTI5MjcxNDc0 | 1,310 | Copied example code on 'Using' from database.rst to api.rst. | {
"login": "jbremson",
"id": 2423578,
"node_id": "MDQ6VXNlcjI0MjM1Nzg=",
"avatar_url": "https://avatars.githubusercontent.com/u/2423578?v=4",
"gravatar_id": "",
"url": "https://api.github.com/users/jbremson",
"html_url": "https://github.com/jbremson",
"followers_url": "https://api.github.com/users/jbrem... | [] | closed | false | null | [] | null | [
"Replaced with a similar patch. Thnx."
] | 2017-07-06T20:15:15 | 2017-07-07T02:23:51 | 2017-07-07T02:23:51 | NONE | null | Simple doc change to clarify the use of 'Using' with example code. | {
"url": "https://api.github.com/repos/coleifer/peewee/issues/1310/reactions",
"total_count": 0,
"+1": 0,
"-1": 0,
"laugh": 0,
"hooray": 0,
"confused": 0,
"heart": 0,
"rocket": 0,
"eyes": 0
} | https://api.github.com/repos/coleifer/peewee/issues/1310/timeline | null | null | false | {
"url": "https://api.github.com/repos/coleifer/peewee/pulls/1310",
"html_url": "https://github.com/coleifer/peewee/pull/1310",
"diff_url": "https://github.com/coleifer/peewee/pull/1310.diff",
"patch_url": "https://github.com/coleifer/peewee/pull/1310.patch",
"merged_at": null
} |
https://api.github.com/repos/coleifer/peewee/issues/1309 | https://api.github.com/repos/coleifer/peewee | https://api.github.com/repos/coleifer/peewee/issues/1309/labels{/name} | https://api.github.com/repos/coleifer/peewee/issues/1309/comments | https://api.github.com/repos/coleifer/peewee/issues/1309/events | https://github.com/coleifer/peewee/issues/1309 | 241,059,299 | MDU6SXNzdWUyNDEwNTkyOTk= | 1,309 | Swap databases to models | {
"login": "jbremson",
"id": 2423578,
"node_id": "MDQ6VXNlcjI0MjM1Nzg=",
"avatar_url": "https://avatars.githubusercontent.com/u/2423578?v=4",
"gravatar_id": "",
"url": "https://api.github.com/users/jbremson",
"html_url": "https://github.com/jbremson",
"followers_url": "https://api.github.com/users/jbrem... | [] | closed | false | null | [] | null | [
"I figured this out after some digging in the code. See my PR for a small change to the docs. ",
"It would be nice if there was a way to change the db handle on an application wide basis. The Using context manager loses scope when calling outside functions. \r\n\r\nI will take a stab at trying to implement this.... | 2017-07-06T19:21:58 | 2017-07-07T03:49:44 | 2017-07-07T03:49:44 | NONE | null | I would like to test my models against a test db, but I'm not seeing an easy way to swap the db handle in the models.
How do I do this? | {
"url": "https://api.github.com/repos/coleifer/peewee/issues/1309/reactions",
"total_count": 0,
"+1": 0,
"-1": 0,
"laugh": 0,
"hooray": 0,
"confused": 0,
"heart": 0,
"rocket": 0,
"eyes": 0
} | https://api.github.com/repos/coleifer/peewee/issues/1309/timeline | null | completed | null | null |
https://api.github.com/repos/coleifer/peewee/issues/1308 | https://api.github.com/repos/coleifer/peewee | https://api.github.com/repos/coleifer/peewee/issues/1308/labels{/name} | https://api.github.com/repos/coleifer/peewee/issues/1308/comments | https://api.github.com/repos/coleifer/peewee/issues/1308/events | https://github.com/coleifer/peewee/issues/1308 | 240,587,962 | MDU6SXNzdWUyNDA1ODc5NjI= | 1,308 | peewee support tornado coroutine ? | {
"login": "rfyiamcool",
"id": 3785409,
"node_id": "MDQ6VXNlcjM3ODU0MDk=",
"avatar_url": "https://avatars.githubusercontent.com/u/3785409?v=4",
"gravatar_id": "",
"url": "https://api.github.com/users/rfyiamcool",
"html_url": "https://github.com/rfyiamcool",
"followers_url": "https://api.github.com/users... | [] | closed | false | null | [] | null | [] | 2017-07-05T09:17:59 | 2017-07-05T10:51:12 | 2017-07-05T10:51:12 | NONE | null | peewee support tornado coroutine mode? | {
"url": "https://api.github.com/repos/coleifer/peewee/issues/1308/reactions",
"total_count": 0,
"+1": 0,
"-1": 0,
"laugh": 0,
"hooray": 0,
"confused": 0,
"heart": 0,
"rocket": 0,
"eyes": 0
} | https://api.github.com/repos/coleifer/peewee/issues/1308/timeline | null | completed | null | null |
https://api.github.com/repos/coleifer/peewee/issues/1307 | https://api.github.com/repos/coleifer/peewee | https://api.github.com/repos/coleifer/peewee/issues/1307/labels{/name} | https://api.github.com/repos/coleifer/peewee/issues/1307/comments | https://api.github.com/repos/coleifer/peewee/issues/1307/events | https://github.com/coleifer/peewee/issues/1307 | 240,533,143 | MDU6SXNzdWUyNDA1MzMxNDM= | 1,307 | Upsert support | {
"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 | [
"Implementing `INSERT/IGNORE` for all databases should be straightforward.\r\n\r\nFor SQLite and for MySQL, in the simple case of a `REPLACE` query, the semantics are the same just slightly different SQL syntax.\r\n\r\nFor MySQL and Postgresql, in the not-so-simple case, it seems like the following things will need... | 2017-07-05T04:06:35 | 2018-07-26T13:06:48 | 2018-01-08T10:28:10 | OWNER | null | I'd like to consolidate the discussions in #942 and #1067 as they both concern extensions to basic INSERT and UPDATE queries. In this ticket I'll describe the various features and syntaxes Peewee will need to support -- please let me know if I've missed something!
---------------------------
### SQLite
[Docs](... | {
"url": "https://api.github.com/repos/coleifer/peewee/issues/1307/reactions",
"total_count": 6,
"+1": 6,
"-1": 0,
"laugh": 0,
"hooray": 0,
"confused": 0,
"heart": 0,
"rocket": 0,
"eyes": 0
} | https://api.github.com/repos/coleifer/peewee/issues/1307/timeline | null | completed | null | null |
https://api.github.com/repos/coleifer/peewee/issues/1306 | https://api.github.com/repos/coleifer/peewee | https://api.github.com/repos/coleifer/peewee/issues/1306/labels{/name} | https://api.github.com/repos/coleifer/peewee/issues/1306/comments | https://api.github.com/repos/coleifer/peewee/issues/1306/events | https://github.com/coleifer/peewee/issues/1306 | 240,437,838 | MDU6SXNzdWUyNDA0Mzc4Mzg= | 1,306 | No such module: FTS4 | {
"login": "Billmike",
"id": 24798364,
"node_id": "MDQ6VXNlcjI0Nzk4MzY0",
"avatar_url": "https://avatars.githubusercontent.com/u/24798364?v=4",
"gravatar_id": "",
"url": "https://api.github.com/users/Billmike",
"html_url": "https://github.com/Billmike",
"followers_url": "https://api.github.com/users/Bil... | [] | closed | false | null | [] | null | [
"You don't have the SQLite FTS4 extension. You'll need to either compile it as a standalone and load it at run-time, or recompile SQLite with full-text search feature enabled. https://sqlite.org/fts3.html",
"Hello, I am using Anaconda with Python 3.7, how can I install FTS4 extension?",
"I'd suggest asking anac... | 2017-07-04T14:32:44 | 2019-02-27T21:13:50 | 2017-07-05T05:02:32 | NONE | null | Traceback (most recent call last):
File "app.py", line 88, in <module>
main()
File "app.py", line 84, in main
database.create_tables([Entry, FTSEntry], safe=True)
File "C:\Users\Billmike\Documents\charlesblog\blog\lib\site-packages\peewee.py", line 3855, in create_tables
create_model_tables(mode... | {
"url": "https://api.github.com/repos/coleifer/peewee/issues/1306/reactions",
"total_count": 0,
"+1": 0,
"-1": 0,
"laugh": 0,
"hooray": 0,
"confused": 0,
"heart": 0,
"rocket": 0,
"eyes": 0
} | https://api.github.com/repos/coleifer/peewee/issues/1306/timeline | null | completed | null | null |
https://api.github.com/repos/coleifer/peewee/issues/1305 | https://api.github.com/repos/coleifer/peewee | https://api.github.com/repos/coleifer/peewee/issues/1305/labels{/name} | https://api.github.com/repos/coleifer/peewee/issues/1305/comments | https://api.github.com/repos/coleifer/peewee/issues/1305/events | https://github.com/coleifer/peewee/issues/1305 | 240,375,012 | MDU6SXNzdWUyNDAzNzUwMTI= | 1,305 | support on duplicate key update and insert ignore | {
"login": "huangzhw",
"id": 3366133,
"node_id": "MDQ6VXNlcjMzNjYxMzM=",
"avatar_url": "https://avatars.githubusercontent.com/u/3366133?v=4",
"gravatar_id": "",
"url": "https://api.github.com/users/huangzhw",
"html_url": "https://github.com/huangzhw",
"followers_url": "https://api.github.com/users/huang... | [] | closed | false | null | [] | null | [
"duplicate of #1067"
] | 2017-07-04T10:09:00 | 2017-07-05T03:41:49 | 2017-07-05T03:41:49 | NONE | null | Can peewee support on duplicate key update and insert ignore in MySQL, it is really useful. | {
"url": "https://api.github.com/repos/coleifer/peewee/issues/1305/reactions",
"total_count": 0,
"+1": 0,
"-1": 0,
"laugh": 0,
"hooray": 0,
"confused": 0,
"heart": 0,
"rocket": 0,
"eyes": 0
} | https://api.github.com/repos/coleifer/peewee/issues/1305/timeline | null | completed | null | null |
https://api.github.com/repos/coleifer/peewee/issues/1304 | https://api.github.com/repos/coleifer/peewee | https://api.github.com/repos/coleifer/peewee/issues/1304/labels{/name} | https://api.github.com/repos/coleifer/peewee/issues/1304/comments | https://api.github.com/repos/coleifer/peewee/issues/1304/events | https://github.com/coleifer/peewee/issues/1304 | 240,058,992 | MDU6SXNzdWUyNDAwNTg5OTI= | 1,304 | [idea] New <SelectQuery> method: namedtuples() | {
"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 | [
"Added here: 13c15c3a8e086939184c3b885f3dbb4d057b68a5\r\n\r\nThis functionality is provided in the 3.0 branch (not yet public) as well."
] | 2017-07-03T03:26:33 | 2017-07-05T03:40:14 | 2017-07-05T03:40:14 | NONE | null | Like `dicts()` or `tuples()`, this method returns a result as tuple of `collection.namedtuple` objects. | {
"url": "https://api.github.com/repos/coleifer/peewee/issues/1304/reactions",
"total_count": 0,
"+1": 0,
"-1": 0,
"laugh": 0,
"hooray": 0,
"confused": 0,
"heart": 0,
"rocket": 0,
"eyes": 0
} | https://api.github.com/repos/coleifer/peewee/issues/1304/timeline | null | completed | null | null |
https://api.github.com/repos/coleifer/peewee/issues/1303 | https://api.github.com/repos/coleifer/peewee | https://api.github.com/repos/coleifer/peewee/issues/1303/labels{/name} | https://api.github.com/repos/coleifer/peewee/issues/1303/comments | https://api.github.com/repos/coleifer/peewee/issues/1303/events | https://github.com/coleifer/peewee/pull/1303 | 239,988,658 | MDExOlB1bGxSZXF1ZXN0MTI4NTA5MjUy | 1,303 | Modify add foreign key constraint. | {
"login": "EenTang",
"id": 16539902,
"node_id": "MDQ6VXNlcjE2NTM5OTAy",
"avatar_url": "https://avatars.githubusercontent.com/u/16539902?v=4",
"gravatar_id": "",
"url": "https://api.github.com/users/EenTang",
"html_url": "https://github.com/EenTang",
"followers_url": "https://api.github.com/users/EenTan... | [] | closed | false | null | [] | null | [
"0137c5eb12172b1c127239f58ccbc98fbbbda982"
] | 2017-07-02T04:47:40 | 2018-01-31T12:36:14 | 2018-01-31T12:36:14 | NONE | null | Modify add foreign key constraint: support constraint type restrict and cascade | {
"url": "https://api.github.com/repos/coleifer/peewee/issues/1303/reactions",
"total_count": 0,
"+1": 0,
"-1": 0,
"laugh": 0,
"hooray": 0,
"confused": 0,
"heart": 0,
"rocket": 0,
"eyes": 0
} | https://api.github.com/repos/coleifer/peewee/issues/1303/timeline | null | null | false | {
"url": "https://api.github.com/repos/coleifer/peewee/pulls/1303",
"html_url": "https://github.com/coleifer/peewee/pull/1303",
"diff_url": "https://github.com/coleifer/peewee/pull/1303.diff",
"patch_url": "https://github.com/coleifer/peewee/pull/1303.patch",
"merged_at": null
} |
https://api.github.com/repos/coleifer/peewee/issues/1302 | https://api.github.com/repos/coleifer/peewee | https://api.github.com/repos/coleifer/peewee/issues/1302/labels{/name} | https://api.github.com/repos/coleifer/peewee/issues/1302/comments | https://api.github.com/repos/coleifer/peewee/issues/1302/events | https://github.com/coleifer/peewee/issues/1302 | 239,630,990 | MDU6SXNzdWUyMzk2MzA5OTA= | 1,302 | Foreign Key "ID descriptor" name incorrect when using `db_column` | {
"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 | [
"I definitely understand your confusion, and likely the docs aren't clear on this point.\r\n\r\nInside `ForeignKeyField.add_to_class()` you can see that the \"id descriptor\" gets its attribute from the db_column (if set) and otherwise will be the field's name + \"_id\":\r\n\r\n```python\r\n self.db_column =... | 2017-06-29T22:40:05 | 2017-07-05T23:46:39 | 2017-07-05T05:00:53 | NONE | null | ```python
class Event(BaseModel):
venue = ForeignKeyField(Venue, db_column='place_id')
...
Event.select().where(Event.venue == 5) # this works fine
Event.select().where(Event.venue_id == 5) # --> AttributeError: type object 'Event' has no attribute 'venue_id'
Event.select().where(Event.place_id == 5) #... | {
"url": "https://api.github.com/repos/coleifer/peewee/issues/1302/reactions",
"total_count": 0,
"+1": 0,
"-1": 0,
"laugh": 0,
"hooray": 0,
"confused": 0,
"heart": 0,
"rocket": 0,
"eyes": 0
} | https://api.github.com/repos/coleifer/peewee/issues/1302/timeline | null | completed | null | null |
https://api.github.com/repos/coleifer/peewee/issues/1301 | https://api.github.com/repos/coleifer/peewee | https://api.github.com/repos/coleifer/peewee/issues/1301/labels{/name} | https://api.github.com/repos/coleifer/peewee/issues/1301/comments | https://api.github.com/repos/coleifer/peewee/issues/1301/events | https://github.com/coleifer/peewee/issues/1301 | 238,601,474 | MDU6SXNzdWUyMzg2MDE0NzQ= | 1,301 | can not use ArrayField when I imort PostgresqlExtDatabase? | {
"login": "wdrich",
"id": 358416,
"node_id": "MDQ6VXNlcjM1ODQxNg==",
"avatar_url": "https://avatars.githubusercontent.com/u/358416?v=4",
"gravatar_id": "",
"url": "https://api.github.com/users/wdrich",
"html_url": "https://github.com/wdrich",
"followers_url": "https://api.github.com/users/wdrich/follow... | [] | closed | false | null | [] | null | [
"Um...are you referencing `ArrayField` somewhere in your module? `ArrayField` is defined in `playhouse.postgres_ext` so to use it you'll need to import it along with `PostgresqlExtDatabase`.",
"after that, I import ArrayField with:\r\nfrom playhouse.postgres_ext import ArrayField\r\n\r\nthat say:\"peewee.Programm... | 2017-06-26T16:40:40 | 2017-06-27T07:51:02 | 2017-06-27T07:51:02 | NONE | null | when I import PostgresqlExtDatabase like this:
from playhouse.postgres_ext import PostgresqlExtDatabase
that say:"NameError: name 'ArrayField' is not defined"
thanks | {
"url": "https://api.github.com/repos/coleifer/peewee/issues/1301/reactions",
"total_count": 0,
"+1": 0,
"-1": 0,
"laugh": 0,
"hooray": 0,
"confused": 0,
"heart": 0,
"rocket": 0,
"eyes": 0
} | https://api.github.com/repos/coleifer/peewee/issues/1301/timeline | null | completed | null | null |
https://api.github.com/repos/coleifer/peewee/issues/1300 | https://api.github.com/repos/coleifer/peewee | https://api.github.com/repos/coleifer/peewee/issues/1300/labels{/name} | https://api.github.com/repos/coleifer/peewee/issues/1300/comments | https://api.github.com/repos/coleifer/peewee/issues/1300/events | https://github.com/coleifer/peewee/issues/1300 | 238,387,898 | MDU6SXNzdWUyMzgzODc4OTg= | 1,300 | Idea: Table prefixing | {
"login": "tomvlk",
"id": 3877688,
"node_id": "MDQ6VXNlcjM4Nzc2ODg=",
"avatar_url": "https://avatars.githubusercontent.com/u/3877688?v=4",
"gravatar_id": "",
"url": "https://api.github.com/users/tomvlk",
"html_url": "https://github.com/tomvlk",
"followers_url": "https://api.github.com/users/tomvlk/foll... | [] | closed | false | null | [] | null | [
"To customize the table name on a one-off basis, you set the `db_table` option on the model's inner `Meta` class.\r\n\r\nTo set the table name dynamically, you can actually specify a different `Meta` attribute `db_table_func`. This should be a callable that receives the newly-created `Model` class, and returns a st... | 2017-06-25T15:38:01 | 2017-06-26T00:22:26 | 2017-06-26T00:22:26 | NONE | null | Hello there,
First of all thanks for the simple and yet so powerful ORM!
I got one of our users that is asking if I can provide database table prefix configuration for my application. The application I'm talking about is PyPlanet, (issue from the user: https://github.com/PyPlanet/PyPlanet/issues/378).
I can most p... | {
"url": "https://api.github.com/repos/coleifer/peewee/issues/1300/reactions",
"total_count": 0,
"+1": 0,
"-1": 0,
"laugh": 0,
"hooray": 0,
"confused": 0,
"heart": 0,
"rocket": 0,
"eyes": 0
} | https://api.github.com/repos/coleifer/peewee/issues/1300/timeline | null | completed | null | null |
https://api.github.com/repos/coleifer/peewee/issues/1299 | https://api.github.com/repos/coleifer/peewee | https://api.github.com/repos/coleifer/peewee/issues/1299/labels{/name} | https://api.github.com/repos/coleifer/peewee/issues/1299/comments | https://api.github.com/repos/coleifer/peewee/issues/1299/events | https://github.com/coleifer/peewee/issues/1299 | 238,382,512 | MDU6SXNzdWUyMzgzODI1MTI= | 1,299 | utf8 stored inside BlobField errors | {
"login": "maugch",
"id": 6808345,
"node_id": "MDQ6VXNlcjY4MDgzNDU=",
"avatar_url": "https://avatars.githubusercontent.com/u/6808345?v=4",
"gravatar_id": "",
"url": "https://api.github.com/users/maugch",
"html_url": "https://github.com/maugch",
"followers_url": "https://api.github.com/users/maugch/foll... | [] | closed | false | null | [] | null | [
"I'm not quite following...if you're just looking to store text (encoded as UTF-8), the proper field to use is the `TextField`.\r\n\r\nCan you try modifying your code to use `TextField` instead of `BlobField` and see if that resolves the issue?",
"Yes TextField works indeed. I think pwiz generated it as BlobField... | 2017-06-25T14:06:25 | 2017-06-26T18:10:12 | 2017-06-26T18:10:12 | NONE | null | I have a database TEXT field stored as utf8mb4 on mysql which is translated to
`description = BlobField(db_column='description', null=True)`
I tried to use the model and store data interactively without any problem. When I use the model in my program, I get :
```
Traceback (most recent call last):
File "getSqll... | {
"url": "https://api.github.com/repos/coleifer/peewee/issues/1299/reactions",
"total_count": 0,
"+1": 0,
"-1": 0,
"laugh": 0,
"hooray": 0,
"confused": 0,
"heart": 0,
"rocket": 0,
"eyes": 0
} | https://api.github.com/repos/coleifer/peewee/issues/1299/timeline | null | completed | null | null |
https://api.github.com/repos/coleifer/peewee/issues/1298 | https://api.github.com/repos/coleifer/peewee | https://api.github.com/repos/coleifer/peewee/issues/1298/labels{/name} | https://api.github.com/repos/coleifer/peewee/issues/1298/comments | https://api.github.com/repos/coleifer/peewee/issues/1298/events | https://github.com/coleifer/peewee/issues/1298 | 237,547,233 | MDU6SXNzdWUyMzc1NDcyMzM= | 1,298 | mypy type hints | {
"login": "mkurnikov",
"id": 2341827,
"node_id": "MDQ6VXNlcjIzNDE4Mjc=",
"avatar_url": "https://avatars.githubusercontent.com/u/2341827?v=4",
"gravatar_id": "",
"url": "https://api.github.com/users/mkurnikov",
"html_url": "https://github.com/mkurnikov",
"followers_url": "https://api.github.com/users/mk... | [] | closed | true | null | [] | null | [
"No, type hints are, in my opinion, an abomination that has no business being part of the Python language :)",
"May I at least add peewee's .pyi stubs to python/typeshed repository? ",
"Anything you would like to do is totally fine by me, as the license for the software is permissive. I just do not want to merg... | 2017-06-21T14:08:34 | 2022-02-21T13:51:46 | 2017-06-21T16:19:25 | NONE | too heated | Will you accept inline type hints for the peewee like
```
# type: () -> None
```
as PR? | {
"url": "https://api.github.com/repos/coleifer/peewee/issues/1298/reactions",
"total_count": 6,
"+1": 6,
"-1": 0,
"laugh": 0,
"hooray": 0,
"confused": 0,
"heart": 0,
"rocket": 0,
"eyes": 0
} | https://api.github.com/repos/coleifer/peewee/issues/1298/timeline | null | completed | null | null |
https://api.github.com/repos/coleifer/peewee/issues/1297 | https://api.github.com/repos/coleifer/peewee | https://api.github.com/repos/coleifer/peewee/issues/1297/labels{/name} | https://api.github.com/repos/coleifer/peewee/issues/1297/comments | https://api.github.com/repos/coleifer/peewee/issues/1297/events | https://github.com/coleifer/peewee/issues/1297 | 236,902,903 | MDU6SXNzdWUyMzY5MDI5MDM= | 1,297 | flask note-taking app FTSModel classes must use the default `docid` primary key.' | {
"login": "quah6o",
"id": 29545530,
"node_id": "MDQ6VXNlcjI5NTQ1NTMw",
"avatar_url": "https://avatars.githubusercontent.com/u/29545530?v=4",
"gravatar_id": "",
"url": "https://api.github.com/users/quah6o",
"html_url": "https://github.com/quah6o",
"followers_url": "https://api.github.com/users/quah6o/fo... | [] | closed | false | null | [] | null | [
"Ahh yeah, the code is probably a bit out-dated and does not reflect what I've since learned about some best practices for the full-text search extension. Let me see about updating things.",
"Ahh shit, I see I already left a note on code compatibility at the top of the post. I'm going to leave this alone for now,... | 2017-06-19T14:07:17 | 2017-06-19T18:05:45 | 2017-06-19T17:09:43 | NONE | null | Hello together,
I'm new to python and only have a few basic programming skills.
I found this tutorial which creates a [flask note-taking app](http://charlesleifer.com/blog/saturday-morning-hacks-adding-full-text-search-to-the-flask-note-taking-app/). It is seperated in three steps. The first two steps work without ... | {
"url": "https://api.github.com/repos/coleifer/peewee/issues/1297/reactions",
"total_count": 0,
"+1": 0,
"-1": 0,
"laugh": 0,
"hooray": 0,
"confused": 0,
"heart": 0,
"rocket": 0,
"eyes": 0
} | https://api.github.com/repos/coleifer/peewee/issues/1297/timeline | null | completed | null | null |
https://api.github.com/repos/coleifer/peewee/issues/1296 | https://api.github.com/repos/coleifer/peewee | https://api.github.com/repos/coleifer/peewee/issues/1296/labels{/name} | https://api.github.com/repos/coleifer/peewee/issues/1296/comments | https://api.github.com/repos/coleifer/peewee/issues/1296/events | https://github.com/coleifer/peewee/issues/1296 | 236,796,341 | MDU6SXNzdWUyMzY3OTYzNDE= | 1,296 | Packet sequence number wrong - got 2 expected 1 to due to PyMySQL | {
"login": "kadnan",
"id": 273196,
"node_id": "MDQ6VXNlcjI3MzE5Ng==",
"avatar_url": "https://avatars.githubusercontent.com/u/273196?v=4",
"gravatar_id": "",
"url": "https://api.github.com/users/kadnan",
"html_url": "https://github.com/kadnan",
"followers_url": "https://api.github.com/users/kadnan/follow... | [] | closed | false | null | [] | null | [
"If you're trying to pass arguments into the pymysql constructor, just pass them in as keyword arguments to the `MySQLDatabase` initialization method. They'll get passed back to the database driver.",
"e.g. `MySQLDatabase(..., threadsafety=1)`",
"@coleifer \r\n\r\nGot exception:\r\n\r\n```\r\nFile \"/anaconda3/... | 2017-06-19T06:58:32 | 2020-06-01T07:31:12 | 2017-06-19T17:07:17 | NONE | null | I am using `PyMySQL` and they have discussed this problem [here](https://github.com/PyMySQL/PyMySQL/issues/422). They asked to set `threadsafety`. How to change value of `threadsafety`, if that is the issue? How do I do it in `peewee` as my app is multi-process and having a pool of two processes like this:
```
with... | {
"url": "https://api.github.com/repos/coleifer/peewee/issues/1296/reactions",
"total_count": 0,
"+1": 0,
"-1": 0,
"laugh": 0,
"hooray": 0,
"confused": 0,
"heart": 0,
"rocket": 0,
"eyes": 0
} | https://api.github.com/repos/coleifer/peewee/issues/1296/timeline | null | completed | null | null |
https://api.github.com/repos/coleifer/peewee/issues/1295 | https://api.github.com/repos/coleifer/peewee | https://api.github.com/repos/coleifer/peewee/issues/1295/labels{/name} | https://api.github.com/repos/coleifer/peewee/issues/1295/comments | https://api.github.com/repos/coleifer/peewee/issues/1295/events | https://github.com/coleifer/peewee/issues/1295 | 236,765,603 | MDU6SXNzdWUyMzY3NjU2MDM= | 1,295 | pwiz fails with cross-schema foreign keys | {
"login": "albireox",
"id": 568775,
"node_id": "MDQ6VXNlcjU2ODc3NQ==",
"avatar_url": "https://avatars.githubusercontent.com/u/568775?v=4",
"gravatar_id": "",
"url": "https://api.github.com/users/albireox",
"html_url": "https://github.com/albireox",
"followers_url": "https://api.github.com/users/albireo... | [] | closed | false | null | [] | null | [
"Sorry, no plans to support that.",
"Is this supported now?"
] | 2017-06-19T02:30:21 | 2022-08-24T03:33:10 | 2017-06-19T17:04:30 | NONE | null | Not sure if there is a solution for this, but I'm trying to run pwiz on a schema that as foreign keys referencing other schema in the same DB. pwiz fails with
```
Traceback (most recent call last):
File "/Users/albireo/.pyenv/versions/3.6.1/bin/pwiz.py", line 201, in <module>
print_models(introspector, tabl... | {
"url": "https://api.github.com/repos/coleifer/peewee/issues/1295/reactions",
"total_count": 0,
"+1": 0,
"-1": 0,
"laugh": 0,
"hooray": 0,
"confused": 0,
"heart": 0,
"rocket": 0,
"eyes": 0
} | https://api.github.com/repos/coleifer/peewee/issues/1295/timeline | null | completed | null | null |
https://api.github.com/repos/coleifer/peewee/issues/1294 | https://api.github.com/repos/coleifer/peewee | https://api.github.com/repos/coleifer/peewee/issues/1294/labels{/name} | https://api.github.com/repos/coleifer/peewee/issues/1294/comments | https://api.github.com/repos/coleifer/peewee/issues/1294/events | https://github.com/coleifer/peewee/issues/1294 | 236,345,089 | MDU6SXNzdWUyMzYzNDUwODk= | 1,294 | Checking record exist | {
"login": "kadnan",
"id": 273196,
"node_id": "MDQ6VXNlcjI3MzE5Ng==",
"avatar_url": "https://avatars.githubusercontent.com/u/273196?v=4",
"gravatar_id": "",
"url": "https://api.github.com/users/kadnan",
"html_url": "https://github.com/kadnan",
"followers_url": "https://api.github.com/users/kadnan/follow... | [] | closed | false | null | [] | null | [
"ffs man documentation\r\n\r\n* http://docs.peewee-orm.com/en/latest/peewee/api.html#SelectQuery.exists\r\n* http://docs.peewee-orm.com/en/latest/peewee/api.html#SelectQuery.count",
"I was searching for the same thing (I don't usually RTFM right away either). Just to let you know that your links don't take you to... | 2017-06-15T23:56:58 | 2021-02-14T14:10:48 | 2017-06-16T03:26:24 | NONE | null | I know about exception thrown in this regard, just want to know whether there's some `count` or `exists()` method to check whether some record returned or not? | {
"url": "https://api.github.com/repos/coleifer/peewee/issues/1294/reactions",
"total_count": 0,
"+1": 0,
"-1": 0,
"laugh": 0,
"hooray": 0,
"confused": 0,
"heart": 0,
"rocket": 0,
"eyes": 0
} | https://api.github.com/repos/coleifer/peewee/issues/1294/timeline | null | completed | null | null |
https://api.github.com/repos/coleifer/peewee/issues/1293 | https://api.github.com/repos/coleifer/peewee | https://api.github.com/repos/coleifer/peewee/issues/1293/labels{/name} | https://api.github.com/repos/coleifer/peewee/issues/1293/comments | https://api.github.com/repos/coleifer/peewee/issues/1293/events | https://github.com/coleifer/peewee/issues/1293 | 236,132,798 | MDU6SXNzdWUyMzYxMzI3OTg= | 1,293 | get() raising exception | {
"login": "rrzaripov",
"id": 6154870,
"node_id": "MDQ6VXNlcjYxNTQ4NzA=",
"avatar_url": "https://avatars.githubusercontent.com/u/6154870?v=4",
"gravatar_id": "",
"url": "https://api.github.com/users/rrzaripov",
"html_url": "https://github.com/rrzaripov",
"followers_url": "https://api.github.com/users/rr... | [] | closed | false | null | [] | null | [
"You're working with an instance but the `get()` method is a class-method. So:\r\n\r\n```python\r\nwith database.transaction():\r\n TestDB.create(k='key1', v='value1')\r\ntdb = TestDB.get(TestDB.k == 'key1')\r\n```"
] | 2017-06-15T09:39:37 | 2017-06-15T15:44:04 | 2017-06-15T15:44:04 | NONE | null | This is my code:
```python
# -*- coding: utf-8 -*-
from peewee import *
from playhouse.sqlite_ext import SqliteExtDatabase
__database_file__ = 'test.db'
database = SqliteExtDatabase(__database_file__)
class TestModelDB(Model):
class Meta:
database = database
class TestDB(TestModelDB):
... | {
"url": "https://api.github.com/repos/coleifer/peewee/issues/1293/reactions",
"total_count": 0,
"+1": 0,
"-1": 0,
"laugh": 0,
"hooray": 0,
"confused": 0,
"heart": 0,
"rocket": 0,
"eyes": 0
} | https://api.github.com/repos/coleifer/peewee/issues/1293/timeline | null | completed | null | null |
https://api.github.com/repos/coleifer/peewee/issues/1292 | https://api.github.com/repos/coleifer/peewee | https://api.github.com/repos/coleifer/peewee/issues/1292/labels{/name} | https://api.github.com/repos/coleifer/peewee/issues/1292/comments | https://api.github.com/repos/coleifer/peewee/issues/1292/events | https://github.com/coleifer/peewee/issues/1292 | 236,113,683 | MDU6SXNzdWUyMzYxMTM2ODM= | 1,292 | there is two foreign keys in table A related to table B,how can I get table B's columns within one query? | {
"login": "linxi-1214",
"id": 20988026,
"node_id": "MDQ6VXNlcjIwOTg4MDI2",
"avatar_url": "https://avatars.githubusercontent.com/u/20988026?v=4",
"gravatar_id": "",
"url": "https://api.github.com/users/linxi-1214",
"html_url": "https://github.com/linxi-1214",
"followers_url": "https://api.github.com/use... | [] | closed | false | null | [] | null | [
"Yeah actually that looks good! You can verify by turning query logging on:\r\n\r\n```python\r\nimport logging\r\nlogger = logging.getLogger('peewee')\r\nlogger.addHandler(logging.StreamHandler())\r\nlogger.setLevel(logging.DEBUG)\r\n```",
"I got the query log as the way you told me, and the log are as below\r\n_... | 2017-06-15T08:26:57 | 2017-06-16T14:00:34 | 2017-06-15T15:45:25 | NONE | null | TABLE contract:
column | type | constraint
------- | -----| ------
id | int | primary key
contract_no | int | unique
customer| int | Foreign key to Table User
salesman | int | Foreign key to Table User
Table User:
column | type | constraint
------- | ---- | ------
id | int | Primary key
name| varchar... | {
"url": "https://api.github.com/repos/coleifer/peewee/issues/1292/reactions",
"total_count": 0,
"+1": 0,
"-1": 0,
"laugh": 0,
"hooray": 0,
"confused": 0,
"heart": 0,
"rocket": 0,
"eyes": 0
} | https://api.github.com/repos/coleifer/peewee/issues/1292/timeline | null | completed | null | null |
https://api.github.com/repos/coleifer/peewee/issues/1291 | https://api.github.com/repos/coleifer/peewee | https://api.github.com/repos/coleifer/peewee/issues/1291/labels{/name} | https://api.github.com/repos/coleifer/peewee/issues/1291/comments | https://api.github.com/repos/coleifer/peewee/issues/1291/events | https://github.com/coleifer/peewee/issues/1291 | 235,304,957 | MDU6SXNzdWUyMzUzMDQ5NTc= | 1,291 | Inspecting query column names | {
"login": "josePhoenix",
"id": 172886,
"node_id": "MDQ6VXNlcjE3Mjg4Ng==",
"avatar_url": "https://avatars.githubusercontent.com/u/172886?v=4",
"gravatar_id": "",
"url": "https://api.github.com/users/josePhoenix",
"html_url": "https://github.com/josePhoenix",
"followers_url": "https://api.github.com/user... | [] | closed | false | null | [] | null | [
"This type of question is more appropriate to stackoverflow.\r\n\r\nHowever...when you create a query, you necessarily know what columns are being selected. So how can there be a problem?",
"Because you may want to write your code in such a way that it can be reused without passing the names of columns explicitly... | 2017-06-12T17:29:07 | 2017-06-16T21:37:50 | 2017-06-12T20:40:27 | NONE | null | I have some code that spits out an HTML table from some query results:
```python
<table>
<tr>{% for column in columns %}<th>{{ column }}</th>{% endfor %}<th>
{% for result in results %}
<tr>{% for column in columns %}<td>{{ result[column] }}</td>{% endfor %}</tr>
{% endfor %}
</tabl... | {
"url": "https://api.github.com/repos/coleifer/peewee/issues/1291/reactions",
"total_count": 0,
"+1": 0,
"-1": 0,
"laugh": 0,
"hooray": 0,
"confused": 0,
"heart": 0,
"rocket": 0,
"eyes": 0
} | https://api.github.com/repos/coleifer/peewee/issues/1291/timeline | null | completed | null | null |
https://api.github.com/repos/coleifer/peewee/issues/1290 | https://api.github.com/repos/coleifer/peewee | https://api.github.com/repos/coleifer/peewee/issues/1290/labels{/name} | https://api.github.com/repos/coleifer/peewee/issues/1290/comments | https://api.github.com/repos/coleifer/peewee/issues/1290/events | https://github.com/coleifer/peewee/issues/1290 | 235,225,661 | MDU6SXNzdWUyMzUyMjU2NjE= | 1,290 | peewee and multiprocess | {
"login": "pw717",
"id": 29229407,
"node_id": "MDQ6VXNlcjI5MjI5NDA3",
"avatar_url": "https://avatars.githubusercontent.com/u/29229407?v=4",
"gravatar_id": "",
"url": "https://api.github.com/users/pw717",
"html_url": "https://github.com/pw717",
"followers_url": "https://api.github.com/users/pw717/follow... | [] | closed | false | null | [] | null | [
"I apologize but I don't have the time to read all that code.\r\n\r\nDepending on where you are fork-ing the process, you could definitely run into some problems. It looks from a quick read that you may be forking after you've initialized the connection, etc. This is probably what's causing the problems. You'll nee... | 2017-06-12T13:04:41 | 2017-06-12T14:17:11 | 2017-06-12T14:17:11 | NONE | null | Hi,
I'm trying to use a mysql+pool connexion within a multiprocess treatment.
I have always the errors below :
ERROR : (2013, 'Lost connection to MySQL server during query')
ERROR : (2006, 'MySQL server has gone away')
I understand that the processes tries to use the same connection already in use.
I though... | {
"url": "https://api.github.com/repos/coleifer/peewee/issues/1290/reactions",
"total_count": 0,
"+1": 0,
"-1": 0,
"laugh": 0,
"hooray": 0,
"confused": 0,
"heart": 0,
"rocket": 0,
"eyes": 0
} | https://api.github.com/repos/coleifer/peewee/issues/1290/timeline | null | completed | null | null |
https://api.github.com/repos/coleifer/peewee/issues/1289 | https://api.github.com/repos/coleifer/peewee | https://api.github.com/repos/coleifer/peewee/issues/1289/labels{/name} | https://api.github.com/repos/coleifer/peewee/issues/1289/comments | https://api.github.com/repos/coleifer/peewee/issues/1289/events | https://github.com/coleifer/peewee/issues/1289 | 234,013,275 | MDU6SXNzdWUyMzQwMTMyNzU= | 1,289 | Mysql "USE INDEX" clause? | {
"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 | [
"I actually found a better way to do it:\r\n\r\n```python\r\nquery = query.from_(SQL(f'`<table_name>` as `t1` USE INDEX(`<index_name>`)'))\r\n```\r\n\r\nIs this the expected way?",
"Unfortunately, doing something like this is not really well-supported by Peewee. Your solutions look acceptable but I agree that hav... | 2017-06-06T20:24:05 | 2017-06-12T13:49:58 | 2017-06-12T13:49:58 | NONE | null | Is there a way to use this option? Or in general, to add arbitrary clauses to the query?
Currently i've hacked the internal `QueryCompiler` to allow adding the required clause, but thats dirty as hell cause it forces me to copy the entire method into the app code and add only 3 lines to it.
Here it is:
```pyth... | {
"url": "https://api.github.com/repos/coleifer/peewee/issues/1289/reactions",
"total_count": 0,
"+1": 0,
"-1": 0,
"laugh": 0,
"hooray": 0,
"confused": 0,
"heart": 0,
"rocket": 0,
"eyes": 0
} | https://api.github.com/repos/coleifer/peewee/issues/1289/timeline | null | completed | null | null |
https://api.github.com/repos/coleifer/peewee/issues/1288 | https://api.github.com/repos/coleifer/peewee | https://api.github.com/repos/coleifer/peewee/issues/1288/labels{/name} | https://api.github.com/repos/coleifer/peewee/issues/1288/comments | https://api.github.com/repos/coleifer/peewee/issues/1288/events | https://github.com/coleifer/peewee/pull/1288 | 232,949,732 | MDExOlB1bGxSZXF1ZXN0MTIzNTUwMjg3 | 1,288 | #1287 - Support ManyToManyField in model_to_dict | {
"login": "gcscaglia",
"id": 12768288,
"node_id": "MDQ6VXNlcjEyNzY4Mjg4",
"avatar_url": "https://avatars.githubusercontent.com/u/12768288?v=4",
"gravatar_id": "",
"url": "https://api.github.com/users/gcscaglia",
"html_url": "https://github.com/gcscaglia",
"followers_url": "https://api.github.com/users/... | [] | closed | false | null | [] | null | [
"I've merged a patch that adds support manytomany in model_to_dict. Available in Peewee 3.x.\r\n\r\nhttp://docs.peewee-orm.com/en/latest/peewee/playhouse.html#model_to_dict"
] | 2017-06-01T17:16:29 | 2018-01-31T12:40:29 | 2018-01-31T12:40:29 | NONE | null | Adds `dereference_many_to_many_fields` parameter to `model_to_dict` function.
This parameter controls whether to hide the junction table for `ManyToManyFields`.
See the related issue for details.
The default value is False, which preserves the old behavior for compatibility.
I've also added some simple tests ... | {
"url": "https://api.github.com/repos/coleifer/peewee/issues/1288/reactions",
"total_count": 0,
"+1": 0,
"-1": 0,
"laugh": 0,
"hooray": 0,
"confused": 0,
"heart": 0,
"rocket": 0,
"eyes": 0
} | https://api.github.com/repos/coleifer/peewee/issues/1288/timeline | null | null | false | {
"url": "https://api.github.com/repos/coleifer/peewee/pulls/1288",
"html_url": "https://github.com/coleifer/peewee/pull/1288",
"diff_url": "https://github.com/coleifer/peewee/pull/1288.diff",
"patch_url": "https://github.com/coleifer/peewee/pull/1288.patch",
"merged_at": null
} |
https://api.github.com/repos/coleifer/peewee/issues/1287 | https://api.github.com/repos/coleifer/peewee | https://api.github.com/repos/coleifer/peewee/issues/1287/labels{/name} | https://api.github.com/repos/coleifer/peewee/issues/1287/comments | https://api.github.com/repos/coleifer/peewee/issues/1287/events | https://github.com/coleifer/peewee/issues/1287 | 232,699,565 | MDU6SXNzdWUyMzI2OTk1NjU= | 1,287 | model_to_dict - Support ManyToManyField | {
"login": "gcscaglia",
"id": 12768288,
"node_id": "MDQ6VXNlcjEyNzY4Mjg4",
"avatar_url": "https://avatars.githubusercontent.com/u/12768288?v=4",
"gravatar_id": "",
"url": "https://api.github.com/users/gcscaglia",
"html_url": "https://github.com/gcscaglia",
"followers_url": "https://api.github.com/users/... | [] | closed | false | null | [] | null | [
"+1 for this",
"This is fixed in 3.0a by 0914cee. Example from test-case:\r\n\r\n```python\r\nclass Owner(TestModel):\r\n name = TextField()\r\n\r\nclass Label(TestModel):\r\n label = TextField()\r\n\r\nclass Gallery(TestModel):\r\n name = TextField()\r\n labels = ManyToManyField(Label, backref='galle... | 2017-05-31T21:19:20 | 2018-01-22T22:50:50 | 2018-01-22T22:50:50 | NONE | null | Consider the following models:
```python
class Tag(Model):
name = TextField(unique=True)
class Gallery(BaseModel):
title = TextField(null=True)
tags = ManyToManyField(Tag, related_name='galleries')
```
When calling `model_to_dict` in a `Gallery` instance, one would expect the result dict to be... | {
"url": "https://api.github.com/repos/coleifer/peewee/issues/1287/reactions",
"total_count": 1,
"+1": 1,
"-1": 0,
"laugh": 0,
"hooray": 0,
"confused": 0,
"heart": 0,
"rocket": 0,
"eyes": 0
} | https://api.github.com/repos/coleifer/peewee/issues/1287/timeline | null | completed | null | null |
https://api.github.com/repos/coleifer/peewee/issues/1286 | https://api.github.com/repos/coleifer/peewee | https://api.github.com/repos/coleifer/peewee/issues/1286/labels{/name} | https://api.github.com/repos/coleifer/peewee/issues/1286/comments | https://api.github.com/repos/coleifer/peewee/issues/1286/events | https://github.com/coleifer/peewee/issues/1286 | 232,381,463 | MDU6SXNzdWUyMzIzODE0NjM= | 1,286 | attrdict causing issues with doctests | {
"login": "kennethlove",
"id": 11908,
"node_id": "MDQ6VXNlcjExOTA4",
"avatar_url": "https://avatars.githubusercontent.com/u/11908?v=4",
"gravatar_id": "",
"url": "https://api.github.com/users/kennethlove",
"html_url": "https://github.com/kennethlove",
"followers_url": "https://api.github.com/users/kenn... | [] | closed | false | null | [] | null | [] | 2017-05-30T21:04:02 | 2017-05-30T21:49:03 | 2017-05-30T21:49:03 | NONE | null | Using the suggested method of `from peewee import *` brings in `JOIN` and friends, which are all instances of `attrdict`.
If you want to write and run doctests in your code, then, running `python -m doctest your_script.py` will throw a `KeyError` as it attempts to look up the `__wrapped__` attribute as `doctest` che... | {
"url": "https://api.github.com/repos/coleifer/peewee/issues/1286/reactions",
"total_count": 0,
"+1": 0,
"-1": 0,
"laugh": 0,
"hooray": 0,
"confused": 0,
"heart": 0,
"rocket": 0,
"eyes": 0
} | https://api.github.com/repos/coleifer/peewee/issues/1286/timeline | null | completed | null | null |
https://api.github.com/repos/coleifer/peewee/issues/1285 | https://api.github.com/repos/coleifer/peewee | https://api.github.com/repos/coleifer/peewee/issues/1285/labels{/name} | https://api.github.com/repos/coleifer/peewee/issues/1285/comments | https://api.github.com/repos/coleifer/peewee/issues/1285/events | https://github.com/coleifer/peewee/issues/1285 | 232,179,504 | MDU6SXNzdWUyMzIxNzk1MDQ= | 1,285 | Very strange error with data update (MySQL) | {
"login": "MarcSky",
"id": 4164003,
"node_id": "MDQ6VXNlcjQxNjQwMDM=",
"avatar_url": "https://avatars.githubusercontent.com/u/4164003?v=4",
"gravatar_id": "",
"url": "https://api.github.com/users/MarcSky",
"html_url": "https://github.com/MarcSky",
"followers_url": "https://api.github.com/users/MarcSky/... | [] | closed | false | null | [] | null | [
"I'm not sure, if you could put this into a failing test-case that demonstrated a bug in Peewee then I would be happy to look into it. As it is, this type of question is more appropriate for stackoverflow or the peewee mailing list. http://docs.peewee-orm.com/en/latest/peewee/contributing.html#questions"
] | 2017-05-30T08:35:21 | 2017-05-30T13:54:54 | 2017-05-30T13:54:54 | NONE | null | Good afternoon, I encountered a very strange mistake. I need to add bonuses to my users every day. To do this, I get a list of users who have the opportunity to receive a bonus and in the cycle update their bonus fields in the database. I do it atomically. And it happens, so some fields are updated from one user and ot... | {
"url": "https://api.github.com/repos/coleifer/peewee/issues/1285/reactions",
"total_count": 0,
"+1": 0,
"-1": 0,
"laugh": 0,
"hooray": 0,
"confused": 0,
"heart": 0,
"rocket": 0,
"eyes": 0
} | https://api.github.com/repos/coleifer/peewee/issues/1285/timeline | null | completed | null | null |
https://api.github.com/repos/coleifer/peewee/issues/1284 | https://api.github.com/repos/coleifer/peewee | https://api.github.com/repos/coleifer/peewee/issues/1284/labels{/name} | https://api.github.com/repos/coleifer/peewee/issues/1284/comments | https://api.github.com/repos/coleifer/peewee/issues/1284/events | https://github.com/coleifer/peewee/issues/1284 | 231,424,375 | MDU6SXNzdWUyMzE0MjQzNzU= | 1,284 | Facilitate case insensitive searches | {
"login": "Naatan",
"id": 278649,
"node_id": "MDQ6VXNlcjI3ODY0OQ==",
"avatar_url": "https://avatars.githubusercontent.com/u/278649?v=4",
"gravatar_id": "",
"url": "https://api.github.com/users/Naatan",
"html_url": "https://github.com/Naatan",
"followers_url": "https://api.github.com/users/Naatan/follow... | [] | closed | false | null | [] | null | [
"For case-insensitive LIKE you would just use ILIKE.",
"You should make that clearer in the docs, this currently isn't evident.",
"ILIKE is called ILIKE because it's case-insensitive.",
"I get that now, but that's not self-evident. And it's not something you can search the docs for because nowhere does it say... | 2017-05-25T18:44:59 | 2017-05-25T21:38:44 | 2017-05-25T21:28:15 | NONE | null | The docs state:
> LIKE and ILIKE with SQLite
> Because SQLite’s LIKE operation is case-insensitive by default, peewee will use the SQLite GLOB operation for case-sensitive searches. The glob operation uses asterisks for wildcards as opposed to the usual percent-sign. If you are using SQLite and want case-sensitive ... | {
"url": "https://api.github.com/repos/coleifer/peewee/issues/1284/reactions",
"total_count": 0,
"+1": 0,
"-1": 0,
"laugh": 0,
"hooray": 0,
"confused": 0,
"heart": 0,
"rocket": 0,
"eyes": 0
} | https://api.github.com/repos/coleifer/peewee/issues/1284/timeline | null | completed | null | null |
https://api.github.com/repos/coleifer/peewee/issues/1283 | https://api.github.com/repos/coleifer/peewee | https://api.github.com/repos/coleifer/peewee/issues/1283/labels{/name} | https://api.github.com/repos/coleifer/peewee/issues/1283/comments | https://api.github.com/repos/coleifer/peewee/issues/1283/events | https://github.com/coleifer/peewee/issues/1283 | 230,973,344 | MDU6SXNzdWUyMzA5NzMzNDQ= | 1,283 | HStoreField from playhouse.postgres_ext | {
"login": "bmlis",
"id": 6079729,
"node_id": "MDQ6VXNlcjYwNzk3Mjk=",
"avatar_url": "https://avatars.githubusercontent.com/u/6079729?v=4",
"gravatar_id": "",
"url": "https://api.github.com/users/bmlis",
"html_url": "https://github.com/bmlis",
"followers_url": "https://api.github.com/users/bmlis/follower... | [] | closed | false | null | [] | null | [
"My bad, I was using wrong db connection"
] | 2017-05-24T09:20:02 | 2017-05-24T12:45:05 | 2017-05-24T12:44:33 | NONE | null | `HStoryField.db_field` value seems to be incorrect. When creating model with HStoreField and trying to migrate it I get:
```
peewee.ProgrammingError: type "hash" does not exist
```
even though the hstore extension is installed. When I changed db_field to `'hstore'` value migration was applied without any problems. | {
"url": "https://api.github.com/repos/coleifer/peewee/issues/1283/reactions",
"total_count": 0,
"+1": 0,
"-1": 0,
"laugh": 0,
"hooray": 0,
"confused": 0,
"heart": 0,
"rocket": 0,
"eyes": 0
} | https://api.github.com/repos/coleifer/peewee/issues/1283/timeline | null | completed | null | null |
https://api.github.com/repos/coleifer/peewee/issues/1282 | https://api.github.com/repos/coleifer/peewee | https://api.github.com/repos/coleifer/peewee/issues/1282/labels{/name} | https://api.github.com/repos/coleifer/peewee/issues/1282/comments | https://api.github.com/repos/coleifer/peewee/issues/1282/events | https://github.com/coleifer/peewee/issues/1282 | 230,359,501 | MDU6SXNzdWUyMzAzNTk1MDE= | 1,282 | migrations - field is not null but has no default | {
"login": "binrush",
"id": 3984423,
"node_id": "MDQ6VXNlcjM5ODQ0MjM=",
"avatar_url": "https://avatars.githubusercontent.com/u/3984423?v=4",
"gravatar_id": "",
"url": "https://api.github.com/users/binrush",
"html_url": "https://github.com/binrush",
"followers_url": "https://api.github.com/users/binrush/... | [] | closed | false | null | [] | null | [
"That's odd. Thanks for the report, I'll check it out.",
"Thank you @coleifer . Just ping me if you need any additional information.",
"What database engine are you using, out of curiosity?",
"We are using Sqlite",
"Are you using an extension? I'm not familiar with some of the APIs being used:\r\n\r\n```pyt... | 2017-05-22T11:00:34 | 2018-07-19T14:27:59 | 2017-05-22T16:42:26 | NONE | null | I have a migration with the following code:
```
def migrate(migrator, database, fake=False, **kwargs):
"""Write your migrations here."""
MyModel = migrator.orm['my_table']
type_new = pw.CharField(null=True, constraints=[pw.Check(
"type_new in ('type1', 'type2', 'type3')")])
migrator.add... | {
"url": "https://api.github.com/repos/coleifer/peewee/issues/1282/reactions",
"total_count": 0,
"+1": 0,
"-1": 0,
"laugh": 0,
"hooray": 0,
"confused": 0,
"heart": 0,
"rocket": 0,
"eyes": 0
} | https://api.github.com/repos/coleifer/peewee/issues/1282/timeline | null | completed | null | null |
https://api.github.com/repos/coleifer/peewee/issues/1281 | https://api.github.com/repos/coleifer/peewee | https://api.github.com/repos/coleifer/peewee/issues/1281/labels{/name} | https://api.github.com/repos/coleifer/peewee/issues/1281/comments | https://api.github.com/repos/coleifer/peewee/issues/1281/events | https://github.com/coleifer/peewee/issues/1281 | 230,287,627 | MDU6SXNzdWUyMzAyODc2Mjc= | 1,281 | CompositeKey primary key not inheritable | {
"login": "rhkubiak",
"id": 8471676,
"node_id": "MDQ6VXNlcjg0NzE2NzY=",
"avatar_url": "https://avatars.githubusercontent.com/u/8471676?v=4",
"gravatar_id": "",
"url": "https://api.github.com/users/rhkubiak",
"html_url": "https://github.com/rhkubiak",
"followers_url": "https://api.github.com/users/rhkub... | [] | closed | false | null | [] | null | [
"Thanks for reporting this. I've pushed your suggested fix along with a test-case."
] | 2017-05-22T05:24:23 | 2017-05-23T03:53:16 | 2017-05-23T03:52:24 | NONE | null | I have a model A in which the primary key is defined via CompositeKey. Model B inherits from model A. A database table generated from B does not have a primary key.
The things get better if the 'elif' in the code below (peewee version 2.10.1) is replaced with just an 'if':
composite_key = False
if... | {
"url": "https://api.github.com/repos/coleifer/peewee/issues/1281/reactions",
"total_count": 0,
"+1": 0,
"-1": 0,
"laugh": 0,
"hooray": 0,
"confused": 0,
"heart": 0,
"rocket": 0,
"eyes": 0
} | https://api.github.com/repos/coleifer/peewee/issues/1281/timeline | null | completed | null | null |
https://api.github.com/repos/coleifer/peewee/issues/1280 | https://api.github.com/repos/coleifer/peewee | https://api.github.com/repos/coleifer/peewee/issues/1280/labels{/name} | https://api.github.com/repos/coleifer/peewee/issues/1280/comments | https://api.github.com/repos/coleifer/peewee/issues/1280/events | https://github.com/coleifer/peewee/issues/1280 | 229,847,128 | MDU6SXNzdWUyMjk4NDcxMjg= | 1,280 | [Feature request] pg8000 support | {
"login": "vaygr",
"id": 8810597,
"node_id": "MDQ6VXNlcjg4MTA1OTc=",
"avatar_url": "https://avatars.githubusercontent.com/u/8810597?v=4",
"gravatar_id": "",
"url": "https://api.github.com/users/vaygr",
"html_url": "https://github.com/vaygr",
"followers_url": "https://api.github.com/users/vaygr/follower... | [] | closed | false | null | [] | null | [
"Is it something not considered as a high priority at the moment?\r\n\r\nI've also seen people trying to implement this, e.g. [here](https://www.quora.com/Is-it-possible-to-swap-in-a-pg8000-backend-for-psycopg2-when-using-Peewee).",
"You can implement it by doing something like the above code snippet.\r\n\r\n```p... | 2017-05-19T01:32:04 | 2017-06-09T18:17:43 | 2017-05-22T16:21:17 | NONE | null | It'd be nice to have one pure-Python PostgreSQL driver supported to minimize amount of dependencies installed on the system.
I think [pg8000](https://github.com/mfenniak/pg8000) is a great candidate. | {
"url": "https://api.github.com/repos/coleifer/peewee/issues/1280/reactions",
"total_count": 1,
"+1": 1,
"-1": 0,
"laugh": 0,
"hooray": 0,
"confused": 0,
"heart": 0,
"rocket": 0,
"eyes": 0
} | https://api.github.com/repos/coleifer/peewee/issues/1280/timeline | null | completed | null | null |
https://api.github.com/repos/coleifer/peewee/issues/1279 | https://api.github.com/repos/coleifer/peewee | https://api.github.com/repos/coleifer/peewee/issues/1279/labels{/name} | https://api.github.com/repos/coleifer/peewee/issues/1279/comments | https://api.github.com/repos/coleifer/peewee/issues/1279/events | https://github.com/coleifer/peewee/issues/1279 | 229,803,446 | MDU6SXNzdWUyMjk4MDM0NDY= | 1,279 | TimestampField reads `0` as `null` | {
"login": "avivey",
"id": 1530242,
"node_id": "MDQ6VXNlcjE1MzAyNDI=",
"avatar_url": "https://avatars.githubusercontent.com/u/1530242?v=4",
"gravatar_id": "",
"url": "https://api.github.com/users/avivey",
"html_url": "https://github.com/avivey",
"followers_url": "https://api.github.com/users/avivey/foll... | [] | closed | false | null | [] | null | [
"This is confusing to me -- why use `0` instead of `null`? A zero timestamp corresponds to midnight Jan 1st, 1970.",
"Not sure what you're asking. `0` is not the same as `null`, but the `TimestampField` thinks they are. I think it's a bug.",
"I guess what I'm asking is why you're using `0` instead of `NULL`, wh... | 2017-05-18T21:00:36 | 2017-05-22T19:37:36 | 2017-05-22T19:33:09 | CONTRIBUTOR | null | I guess this is the relevant line https://github.com/coleifer/peewee/blob/master/peewee.py#L1346
At least for mysql, if we have a TimestampField that's defined like this:
```
not_before = TimestampField(default=0, utc=True, null=False)
```
the DB type is `int(11) NOT NULL`.
If the DB gets a value of `0` (For ... | {
"url": "https://api.github.com/repos/coleifer/peewee/issues/1279/reactions",
"total_count": 0,
"+1": 0,
"-1": 0,
"laugh": 0,
"hooray": 0,
"confused": 0,
"heart": 0,
"rocket": 0,
"eyes": 0
} | https://api.github.com/repos/coleifer/peewee/issues/1279/timeline | null | completed | null | null |
https://api.github.com/repos/coleifer/peewee/issues/1278 | https://api.github.com/repos/coleifer/peewee | https://api.github.com/repos/coleifer/peewee/issues/1278/labels{/name} | https://api.github.com/repos/coleifer/peewee/issues/1278/comments | https://api.github.com/repos/coleifer/peewee/issues/1278/events | https://github.com/coleifer/peewee/issues/1278 | 228,971,782 | MDU6SXNzdWUyMjg5NzE3ODI= | 1,278 | question: InternalError: current transaction is aborted | {
"login": "nskalis",
"id": 8971544,
"node_id": "MDQ6VXNlcjg5NzE1NDQ=",
"avatar_url": "https://avatars.githubusercontent.com/u/8971544?v=4",
"gravatar_id": "",
"url": "https://api.github.com/users/nskalis",
"html_url": "https://github.com/nskalis",
"followers_url": "https://api.github.com/users/nskalis/... | [] | closed | false | null | [] | null | [
"You'll want to be in a transaction in order to rollback, so:\r\n\r\n```python\r\nwith database.atomic():\r\n try:\r\n BgpCommunities.create(...)\r\n except IntegrityError:\r\n # handle exception however.\r\n```",
"thanks @coleifer but could you advise bit more, still the connections is locked... | 2017-05-16T09:39:29 | 2021-08-01T18:15:23 | 2017-05-16T13:42:47 | NONE | null | Hi,
I was wondering if you could advise on the following: when i make a wrong insert, I am getting `InternalError: current transaction is aborted, commands ignored until end of transaction block`
For example, the database connector is initialised like this:
`database = PostgresqlDatabase('ip_spotlight', autoco... | {
"url": "https://api.github.com/repos/coleifer/peewee/issues/1278/reactions",
"total_count": 0,
"+1": 0,
"-1": 0,
"laugh": 0,
"hooray": 0,
"confused": 0,
"heart": 0,
"rocket": 0,
"eyes": 0
} | https://api.github.com/repos/coleifer/peewee/issues/1278/timeline | null | completed | null | null |
https://api.github.com/repos/coleifer/peewee/issues/1277 | https://api.github.com/repos/coleifer/peewee | https://api.github.com/repos/coleifer/peewee/issues/1277/labels{/name} | https://api.github.com/repos/coleifer/peewee/issues/1277/comments | https://api.github.com/repos/coleifer/peewee/issues/1277/events | https://github.com/coleifer/peewee/issues/1277 | 228,664,519 | MDU6SXNzdWUyMjg2NjQ1MTk= | 1,277 | Peewee >= 2.4.3 is required. Found version ... | {
"login": "thebalthasar",
"id": 6739166,
"node_id": "MDQ6VXNlcjY3MzkxNjY=",
"avatar_url": "https://avatars.githubusercontent.com/u/6739166?v=4",
"gravatar_id": "",
"url": "https://api.github.com/users/thebalthasar",
"html_url": "https://github.com/thebalthasar",
"followers_url": "https://api.github.com... | [] | closed | false | null | [] | null | [
"Yes, this is fixed in sqlite-web. See the issue there: https://github.com/coleifer/sqlite-web/issues/30",
"sqlite-web 0.1.8 was released as well, fixing the issue if you try again."
] | 2017-05-15T10:00:06 | 2017-05-15T21:35:41 | 2017-05-15T21:34:30 | NONE | null |
The instruction which is reported while doing the version check is misleading. This is the runtime error and its message:
RuntimeError: Peewee >= 2.4.3 is required. Found version 2.10.1. Please update by running pip install --update peewee
Should be instead:
**pip install peewee --upgrade**
The error comes ... | {
"url": "https://api.github.com/repos/coleifer/peewee/issues/1277/reactions",
"total_count": 0,
"+1": 0,
"-1": 0,
"laugh": 0,
"hooray": 0,
"confused": 0,
"heart": 0,
"rocket": 0,
"eyes": 0
} | https://api.github.com/repos/coleifer/peewee/issues/1277/timeline | null | completed | null | null |
https://api.github.com/repos/coleifer/peewee/issues/1276 | https://api.github.com/repos/coleifer/peewee | https://api.github.com/repos/coleifer/peewee/issues/1276/labels{/name} | https://api.github.com/repos/coleifer/peewee/issues/1276/comments | https://api.github.com/repos/coleifer/peewee/issues/1276/events | https://github.com/coleifer/peewee/issues/1276 | 228,510,821 | MDU6SXNzdWUyMjg1MTA4MjE= | 1,276 | [playhouse.dataset] Cannot process column name contain upper case char | {
"login": "renweibo",
"id": 6316209,
"node_id": "MDQ6VXNlcjYzMTYyMDk=",
"avatar_url": "https://avatars.githubusercontent.com/u/6316209?v=4",
"gravatar_id": "",
"url": "https://api.github.com/users/renweibo",
"html_url": "https://github.com/renweibo",
"followers_url": "https://api.github.com/users/renwe... | [] | closed | false | null | [] | null | [
"Version:\r\n- Python: 3.6.1\r\n- peewee: 2.10.1 ",
"d68ae11501face8f4eb6adfde82d8eda79728dc7"
] | 2017-05-14T01:16:51 | 2017-05-16T13:59:33 | 2017-05-16T13:59:33 | NONE | null | Here is the test case.
```python
def test_case_2(self):
db = DataSet('sqlite:///:memory:')
books = db["books"]
books.insert(bookId="ISBN1234567")
```
It should work but report following error:
```python
Traceback (most recent call last):
... ...
File "/Users/renweibo/PycharmPr... | {
"url": "https://api.github.com/repos/coleifer/peewee/issues/1276/reactions",
"total_count": 0,
"+1": 0,
"-1": 0,
"laugh": 0,
"hooray": 0,
"confused": 0,
"heart": 0,
"rocket": 0,
"eyes": 0
} | https://api.github.com/repos/coleifer/peewee/issues/1276/timeline | null | completed | null | null |
https://api.github.com/repos/coleifer/peewee/issues/1275 | https://api.github.com/repos/coleifer/peewee | https://api.github.com/repos/coleifer/peewee/issues/1275/labels{/name} | https://api.github.com/repos/coleifer/peewee/issues/1275/comments | https://api.github.com/repos/coleifer/peewee/issues/1275/events | https://github.com/coleifer/peewee/issues/1275 | 228,510,657 | MDU6SXNzdWUyMjg1MTA2NTc= | 1,275 | [playhouse.dataset.DataSet] Cannot process column name contain "_" | {
"login": "renweibo",
"id": 6316209,
"node_id": "MDQ6VXNlcjYzMTYyMDk=",
"avatar_url": "https://avatars.githubusercontent.com/u/6316209?v=4",
"gravatar_id": "",
"url": "https://api.github.com/users/renweibo",
"html_url": "https://github.com/renweibo",
"followers_url": "https://api.github.com/users/renwe... | [] | closed | false | null | [] | null | [
"Version:\r\n- Python: 3.6.1\r\n- peewee: 2.10.1 ",
"The problem is the \"_id\" suffix. DataSet relies on the introspection tools in the `playhouse.reflection` module. These tools are used to read the database and generate peewee Model definitions. There's a convention in peewee, borrowed from Django, to append \... | 2017-05-14T01:12:41 | 2017-05-17T02:11:38 | 2017-05-16T13:59:30 | NONE | null | Here is the test case.
```python
def test_case_1(self):
db = DataSet('sqlite:///:memory:')
books = db["books"]
books.insert(book_id="ISBN1234567")
```
It should work but report following error:
```python
Traceback (most recent call last):
... ...
File "/Users/renweibo/PycharmP... | {
"url": "https://api.github.com/repos/coleifer/peewee/issues/1275/reactions",
"total_count": 0,
"+1": 0,
"-1": 0,
"laugh": 0,
"hooray": 0,
"confused": 0,
"heart": 0,
"rocket": 0,
"eyes": 0
} | https://api.github.com/repos/coleifer/peewee/issues/1275/timeline | null | completed | null | null |
https://api.github.com/repos/coleifer/peewee/issues/1274 | https://api.github.com/repos/coleifer/peewee | https://api.github.com/repos/coleifer/peewee/issues/1274/labels{/name} | https://api.github.com/repos/coleifer/peewee/issues/1274/comments | https://api.github.com/repos/coleifer/peewee/issues/1274/events | https://github.com/coleifer/peewee/issues/1274 | 228,482,307 | MDU6SXNzdWUyMjg0ODIzMDc= | 1,274 | Preserve model structure when get dicts from SelectQuery | {
"login": "gugadev",
"id": 22750424,
"node_id": "MDQ6VXNlcjIyNzUwNDI0",
"avatar_url": "https://avatars.githubusercontent.com/u/22750424?v=4",
"gravatar_id": "",
"url": "https://api.github.com/users/gugadev",
"html_url": "https://github.com/gugadev",
"followers_url": "https://api.github.com/users/gugade... | [] | closed | false | null | [] | null | [
"Just one hint: you need to call `switch()` here:\r\n\r\n```python\r\nquery = (Campaign\r\n .select(Campaign, User, Channel)\r\n .join(User, on=(Campaign.user == User.id))\r\n .switch(Campaign) # ADD THIS.\r\n .join(Channel, on=(Campaign.channel == Channel.id)... | 2017-05-13T15:59:44 | 2017-05-16T19:27:35 | 2017-05-14T01:14:01 | NONE | null | I have three models:
```python
class User(Base):
name = CharField(null=False)
photo = BlobField()
email = CharField(unique=True, null=False)
password = CharField(null=False)
website = CharField(unique=True, null=False)
role = CharField(null=False, default="user")
reason = TextFiel... | {
"url": "https://api.github.com/repos/coleifer/peewee/issues/1274/reactions",
"total_count": 1,
"+1": 1,
"-1": 0,
"laugh": 0,
"hooray": 0,
"confused": 0,
"heart": 0,
"rocket": 0,
"eyes": 0
} | https://api.github.com/repos/coleifer/peewee/issues/1274/timeline | null | completed | null | null |
https://api.github.com/repos/coleifer/peewee/issues/1273 | https://api.github.com/repos/coleifer/peewee | https://api.github.com/repos/coleifer/peewee/issues/1273/labels{/name} | https://api.github.com/repos/coleifer/peewee/issues/1273/comments | https://api.github.com/repos/coleifer/peewee/issues/1273/events | https://github.com/coleifer/peewee/issues/1273 | 228,454,107 | MDU6SXNzdWUyMjg0NTQxMDc= | 1,273 | Update method dont work | {
"login": "pandbsoftware",
"id": 21987868,
"node_id": "MDQ6VXNlcjIxOTg3ODY4",
"avatar_url": "https://avatars.githubusercontent.com/u/21987868?v=4",
"gravatar_id": "",
"url": "https://api.github.com/users/pandbsoftware",
"html_url": "https://github.com/pandbsoftware",
"followers_url": "https://api.githu... | [] | closed | false | null | [] | null | [
"Try property indenting and surrounding your code in code blocks.",
"Please take the extra minute to ensure your code is properly formatted. I've done it for you this time as a courtesy.",
"There is something wrong in your code or in the state of your database, because I get an error (as expected):\r\n\r\n```py... | 2017-05-13T06:51:26 | 2017-05-14T00:56:37 | 2017-05-14T00:56:37 | NONE | null | ```python
from peewee import *
from playhouse.sqlite_ext import SqliteExtDatabase
import datetime
db = SqliteExtDatabase('lis22.db')
class BaseModel(Model):
class Meta:
database = db
class Lista(BaseModel):
cuenta = CharField(unique=True)
tiempo = CharField()
try:
db.connect(... | {
"url": "https://api.github.com/repos/coleifer/peewee/issues/1273/reactions",
"total_count": 0,
"+1": 0,
"-1": 0,
"laugh": 0,
"hooray": 0,
"confused": 0,
"heart": 0,
"rocket": 0,
"eyes": 0
} | https://api.github.com/repos/coleifer/peewee/issues/1273/timeline | null | completed | null | null |
https://api.github.com/repos/coleifer/peewee/issues/1272 | https://api.github.com/repos/coleifer/peewee | https://api.github.com/repos/coleifer/peewee/issues/1272/labels{/name} | https://api.github.com/repos/coleifer/peewee/issues/1272/comments | https://api.github.com/repos/coleifer/peewee/issues/1272/events | https://github.com/coleifer/peewee/pull/1272 | 228,416,230 | MDExOlB1bGxSZXF1ZXN0MTIwNDEyNDg5 | 1,272 | Added note to quickstart regarding separate modules importing the db … | {
"login": "ardeaf",
"id": 20672831,
"node_id": "MDQ6VXNlcjIwNjcyODMx",
"avatar_url": "https://avatars.githubusercontent.com/u/20672831?v=4",
"gravatar_id": "",
"url": "https://api.github.com/users/ardeaf",
"html_url": "https://github.com/ardeaf",
"followers_url": "https://api.github.com/users/ardeaf/fo... | [] | closed | false | null | [] | null | [
"I don't think that this makes sense. What does it mean to \"call\" a db variable anyways? I think it's clear enough."
] | 2017-05-12T21:47:56 | 2017-05-14T00:59:12 | 2017-05-14T00:59:12 | NONE | null | Just a sample of what I was thinking of adding to the quickstart.
This commit fixes #1271. | {
"url": "https://api.github.com/repos/coleifer/peewee/issues/1272/reactions",
"total_count": 0,
"+1": 0,
"-1": 0,
"laugh": 0,
"hooray": 0,
"confused": 0,
"heart": 0,
"rocket": 0,
"eyes": 0
} | https://api.github.com/repos/coleifer/peewee/issues/1272/timeline | null | null | false | {
"url": "https://api.github.com/repos/coleifer/peewee/pulls/1272",
"html_url": "https://github.com/coleifer/peewee/pull/1272",
"diff_url": "https://github.com/coleifer/peewee/pull/1272.diff",
"patch_url": "https://github.com/coleifer/peewee/pull/1272.patch",
"merged_at": null
} |
https://api.github.com/repos/coleifer/peewee/issues/1271 | https://api.github.com/repos/coleifer/peewee | https://api.github.com/repos/coleifer/peewee/issues/1271/labels{/name} | https://api.github.com/repos/coleifer/peewee/issues/1271/comments | https://api.github.com/repos/coleifer/peewee/issues/1271/events | https://github.com/coleifer/peewee/issues/1271 | 228,409,951 | MDU6SXNzdWUyMjg0MDk5NTE= | 1,271 | Tests in separate modules | {
"login": "ardeaf",
"id": 20672831,
"node_id": "MDQ6VXNlcjIwNjcyODMx",
"avatar_url": "https://avatars.githubusercontent.com/u/20672831?v=4",
"gravatar_id": "",
"url": "https://api.github.com/users/ardeaf",
"html_url": "https://github.com/ardeaf",
"followers_url": "https://api.github.com/users/ardeaf/fo... | [] | closed | false | null | [] | null | [
"This is not Peewee, this is Python. The database attribute of the Model's `Meta` class holds a reference to the `db` object a module scope... This is resolved at module-load time. So no magic.",
"@ardeaf That's an easy mistake to make. If you want to be absolutely sure to use the right connection, I think you co... | 2017-05-12T21:14:21 | 2017-05-15T06:27:39 | 2017-05-14T01:01:01 | NONE | null | I followed the quickstart guide and wasn't as thorough as I should have been with the docs, eventually locating the "extra" section which solved my problem. However, I think adding to the docs a best practices note in the quickstart on how to do tests with peewee would be beneficial.
My tests were in separate module... | {
"url": "https://api.github.com/repos/coleifer/peewee/issues/1271/reactions",
"total_count": 0,
"+1": 0,
"-1": 0,
"laugh": 0,
"hooray": 0,
"confused": 0,
"heart": 0,
"rocket": 0,
"eyes": 0
} | https://api.github.com/repos/coleifer/peewee/issues/1271/timeline | null | completed | null | null |
https://api.github.com/repos/coleifer/peewee/issues/1270 | https://api.github.com/repos/coleifer/peewee | https://api.github.com/repos/coleifer/peewee/issues/1270/labels{/name} | https://api.github.com/repos/coleifer/peewee/issues/1270/comments | https://api.github.com/repos/coleifer/peewee/issues/1270/events | https://github.com/coleifer/peewee/issues/1270 | 227,933,639 | MDU6SXNzdWUyMjc5MzM2Mzk= | 1,270 | FTSModels for sqlite - weights in search() and search_bm25() don't work. | {
"login": "eugeniominissale",
"id": 24990712,
"node_id": "MDQ6VXNlcjI0OTkwNzEy",
"avatar_url": "https://avatars.githubusercontent.com/u/24990712?v=4",
"gravatar_id": "",
"url": "https://api.github.com/users/eugeniominissale",
"html_url": "https://github.com/eugeniominissale",
"followers_url": "https://... | [] | closed | false | null | [] | null | [
"I found a bug in the Python implementation of the default rank() function...the Cython version worked fine, but the Python version wasn't respecting the weights parameter due to some careless variable naming on my part. When I run it locally, I now get the following output:\r\n\r\n```python\r\n(u'mario', -2.0)\r\n... | 2017-05-11T09:38:27 | 2017-05-17T03:15:08 | 2017-05-17T03:15:08 | NONE | null | I'm having an issue using the sqlite_ext FTS extension.
That's the example of the documentation:
```from playhouse.signals import Model
from playhouse.sqlite_ext import SqliteExtDatabase, FTSModel, SearchField
from peewee import TextField
db = SqliteExtDatabase(':memory:', threadlocals=True)
class Documen... | {
"url": "https://api.github.com/repos/coleifer/peewee/issues/1270/reactions",
"total_count": 0,
"+1": 0,
"-1": 0,
"laugh": 0,
"hooray": 0,
"confused": 0,
"heart": 0,
"rocket": 0,
"eyes": 0
} | https://api.github.com/repos/coleifer/peewee/issues/1270/timeline | null | completed | null | null |
https://api.github.com/repos/coleifer/peewee/issues/1269 | https://api.github.com/repos/coleifer/peewee | https://api.github.com/repos/coleifer/peewee/issues/1269/labels{/name} | https://api.github.com/repos/coleifer/peewee/issues/1269/comments | https://api.github.com/repos/coleifer/peewee/issues/1269/events | https://github.com/coleifer/peewee/issues/1269 | 227,554,374 | MDU6SXNzdWUyMjc1NTQzNzQ= | 1,269 | db.create_table() and db.create_tables([,]) have different behavior? | {
"login": "piperck",
"id": 8776176,
"node_id": "MDQ6VXNlcjg3NzYxNzY=",
"avatar_url": "https://avatars.githubusercontent.com/u/8776176?v=4",
"gravatar_id": "",
"url": "https://api.github.com/users/piperck",
"html_url": "https://github.com/piperck",
"followers_url": "https://api.github.com/users/piperck/... | [] | closed | false | null | [] | null | [
"These methods are very confusingly named -- apologies for that.\r\n\r\nHistory:\r\n\r\nOriginally, you would use `Model.create_table()` which would create the table along with the indexes and other constraints. The `Database.create_table()` method was used behind-the-scenes and it **only** creates the table -- not... | 2017-05-10T03:00:13 | 2017-05-10T03:20:45 | 2017-05-10T03:20:45 | CONTRIBUTOR | null | ```python
class Account(BaseModel):
class Meta:
db_table = 'account'
indexes = (
(('app_id', 'user_id'), True),
)
app_id = IntegerField()
user_id = IntegerField()
amount = DecimalField(15, 2)
create_time = DateTimeField(default=datetime.datetime.now)... | {
"url": "https://api.github.com/repos/coleifer/peewee/issues/1269/reactions",
"total_count": 0,
"+1": 0,
"-1": 0,
"laugh": 0,
"hooray": 0,
"confused": 0,
"heart": 0,
"rocket": 0,
"eyes": 0
} | https://api.github.com/repos/coleifer/peewee/issues/1269/timeline | null | completed | null | null |
https://api.github.com/repos/coleifer/peewee/issues/1268 | https://api.github.com/repos/coleifer/peewee | https://api.github.com/repos/coleifer/peewee/issues/1268/labels{/name} | https://api.github.com/repos/coleifer/peewee/issues/1268/comments | https://api.github.com/repos/coleifer/peewee/issues/1268/events | https://github.com/coleifer/peewee/issues/1268 | 227,548,246 | MDU6SXNzdWUyMjc1NDgyNDY= | 1,268 | Pwiz requires workaround for columns beginning with numbers | {
"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 | [] | 2017-05-10T02:11:30 | 2017-05-10T02:39:44 | 2017-05-10T02:39:44 | OWNER | null | I'm trying out peewee on one of our existing development mysql databases. I've run pwiz and generated a database model. I've noticed a python/db problem with class variables starting with numbers. Does peewee have a solution for dealing with this issue? I couldn't find anything addressing this problem in the documentat... | {
"url": "https://api.github.com/repos/coleifer/peewee/issues/1268/reactions",
"total_count": 0,
"+1": 0,
"-1": 0,
"laugh": 0,
"hooray": 0,
"confused": 0,
"heart": 0,
"rocket": 0,
"eyes": 0
} | https://api.github.com/repos/coleifer/peewee/issues/1268/timeline | null | completed | null | null |
https://api.github.com/repos/coleifer/peewee/issues/1267 | https://api.github.com/repos/coleifer/peewee | https://api.github.com/repos/coleifer/peewee/issues/1267/labels{/name} | https://api.github.com/repos/coleifer/peewee/issues/1267/comments | https://api.github.com/repos/coleifer/peewee/issues/1267/events | https://github.com/coleifer/peewee/issues/1267 | 227,263,508 | MDU6SXNzdWUyMjcyNjM1MDg= | 1,267 | Child table referencing a mother table | {
"login": "martinjoubert",
"id": 1816885,
"node_id": "MDQ6VXNlcjE4MTY4ODU=",
"avatar_url": "https://avatars.githubusercontent.com/u/1816885?v=4",
"gravatar_id": "",
"url": "https://api.github.com/users/martinjoubert",
"html_url": "https://github.com/martinjoubert",
"followers_url": "https://api.github.... | [] | closed | false | null | [] | null | [
"That works perfectly in the end. My mistake was elsewhere.\r\n\r\nHave a nice day!"
] | 2017-05-09T06:30:09 | 2017-05-09T06:43:12 | 2017-05-09T06:43:12 | NONE | null | Hi!
I can't figure out how to get a table referencing itself. My goal is to get a child table referencing a mother table with same types.
This code seems to be not working:
DeferredMyTable = DeferredRelation()
class MyTable(BaseModel):
name = TextField()
image = TextField()
root_my_table_id =... | {
"url": "https://api.github.com/repos/coleifer/peewee/issues/1267/reactions",
"total_count": 0,
"+1": 0,
"-1": 0,
"laugh": 0,
"hooray": 0,
"confused": 0,
"heart": 0,
"rocket": 0,
"eyes": 0
} | https://api.github.com/repos/coleifer/peewee/issues/1267/timeline | null | completed | null | null |
https://api.github.com/repos/coleifer/peewee/issues/1266 | https://api.github.com/repos/coleifer/peewee | https://api.github.com/repos/coleifer/peewee/issues/1266/labels{/name} | https://api.github.com/repos/coleifer/peewee/issues/1266/comments | https://api.github.com/repos/coleifer/peewee/issues/1266/events | https://github.com/coleifer/peewee/issues/1266 | 227,259,056 | MDU6SXNzdWUyMjcyNTkwNTY= | 1,266 | Bad Magic Number | {
"login": "ahopkins",
"id": 166269,
"node_id": "MDQ6VXNlcjE2NjI2OQ==",
"avatar_url": "https://avatars.githubusercontent.com/u/166269?v=4",
"gravatar_id": "",
"url": "https://api.github.com/users/ahopkins",
"html_url": "https://github.com/ahopkins",
"followers_url": "https://api.github.com/users/ahopkin... | [] | closed | false | null | [] | null | [
"It seems maybe someone should look into the pypi package. I installed via git, and that seemed fine.",
"Thanks for bringing this to my attention. Pushed a new minor release and verified it is working correctly for me using 2.7 and 3.6 + PyPI."
] | 2017-05-09T06:02:10 | 2017-05-09T09:15:40 | 2017-05-09T09:15:40 | NONE | null | I created a new virtualenv to test out peewee. I was simply trying to follow the [Quick Start](http://docs.peewee-orm.com/en/latest/peewee/quickstart.html).
mkvirtualenv peweetest -p python3
python
>>> import peewee
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
... | {
"url": "https://api.github.com/repos/coleifer/peewee/issues/1266/reactions",
"total_count": 0,
"+1": 0,
"-1": 0,
"laugh": 0,
"hooray": 0,
"confused": 0,
"heart": 0,
"rocket": 0,
"eyes": 0
} | https://api.github.com/repos/coleifer/peewee/issues/1266/timeline | null | completed | null | null |
https://api.github.com/repos/coleifer/peewee/issues/1265 | https://api.github.com/repos/coleifer/peewee | https://api.github.com/repos/coleifer/peewee/issues/1265/labels{/name} | https://api.github.com/repos/coleifer/peewee/issues/1265/comments | https://api.github.com/repos/coleifer/peewee/issues/1265/events | https://github.com/coleifer/peewee/issues/1265 | 227,241,853 | MDU6SXNzdWUyMjcyNDE4NTM= | 1,265 | Done | {
"login": "congaductq",
"id": 19276305,
"node_id": "MDQ6VXNlcjE5Mjc2MzA1",
"avatar_url": "https://avatars.githubusercontent.com/u/19276305?v=4",
"gravatar_id": "",
"url": "https://api.github.com/users/congaductq",
"html_url": "https://github.com/congaductq",
"followers_url": "https://api.github.com/use... | [] | closed | false | null | [] | null | [
"Uhhhh",
"@coleifer Sorry about that, I just don't want to make trash here."
] | 2017-05-09T03:47:32 | 2017-05-09T05:16:51 | 2017-05-09T04:24:32 | NONE | null | Done | {
"url": "https://api.github.com/repos/coleifer/peewee/issues/1265/reactions",
"total_count": 0,
"+1": 0,
"-1": 0,
"laugh": 0,
"hooray": 0,
"confused": 0,
"heart": 0,
"rocket": 0,
"eyes": 0
} | https://api.github.com/repos/coleifer/peewee/issues/1265/timeline | null | completed | null | null |
https://api.github.com/repos/coleifer/peewee/issues/1264 | https://api.github.com/repos/coleifer/peewee | https://api.github.com/repos/coleifer/peewee/issues/1264/labels{/name} | https://api.github.com/repos/coleifer/peewee/issues/1264/comments | https://api.github.com/repos/coleifer/peewee/issues/1264/events | https://github.com/coleifer/peewee/issues/1264 | 226,693,174 | MDU6SXNzdWUyMjY2OTMxNzQ= | 1,264 | Potential for security issues with AESEncryptedField | {
"login": "cym13",
"id": 4958985,
"node_id": "MDQ6VXNlcjQ5NTg5ODU=",
"avatar_url": "https://avatars.githubusercontent.com/u/4958985?v=4",
"gravatar_id": "",
"url": "https://api.github.com/users/cym13",
"html_url": "https://github.com/cym13",
"followers_url": "https://api.github.com/users/cym13/follower... | [] | closed | false | null | [] | null | [
"@cym13 -- may I ask what you intend to use the `AESEncryptedField` for? Is this for an application you're working on?",
"Sorry, I should've added -- I definitely intend to address the issues you've raised. Thanks. I also edited the title of the comment to be a little more representative of the situation.\r\n\r\n... | 2017-05-05T21:11:58 | 2017-05-08T21:11:41 | 2017-05-08T21:11:41 | NONE | null | Hi,
The AESEncryptField's encryption is initialized as such:
def get_cipher(self, key, iv):
if len(key) > 32:
raise ValueError('Key length cannot exceed 32 bytes.')
key = key + bytes(' ') * (32 - len(key))
return AES.new(key, AES.MODE_CFB, iv)
It ... | {
"url": "https://api.github.com/repos/coleifer/peewee/issues/1264/reactions",
"total_count": 0,
"+1": 0,
"-1": 0,
"laugh": 0,
"hooray": 0,
"confused": 0,
"heart": 0,
"rocket": 0,
"eyes": 0
} | https://api.github.com/repos/coleifer/peewee/issues/1264/timeline | null | completed | null | null |
https://api.github.com/repos/coleifer/peewee/issues/1263 | https://api.github.com/repos/coleifer/peewee | https://api.github.com/repos/coleifer/peewee/issues/1263/labels{/name} | https://api.github.com/repos/coleifer/peewee/issues/1263/comments | https://api.github.com/repos/coleifer/peewee/issues/1263/events | https://github.com/coleifer/peewee/pull/1263 | 226,692,111 | MDExOlB1bGxSZXF1ZXN0MTE5MjU4NzU4 | 1,263 | Fix AESEncryptField for python3 | {
"login": "Moutix",
"id": 7975575,
"node_id": "MDQ6VXNlcjc5NzU1NzU=",
"avatar_url": "https://avatars.githubusercontent.com/u/7975575?v=4",
"gravatar_id": "",
"url": "https://api.github.com/users/Moutix",
"html_url": "https://github.com/Moutix",
"followers_url": "https://api.github.com/users/Moutix/foll... | [] | closed | false | null | [] | null | [
"Related to: https://github.com/coleifer/peewee/issues/1262",
"The tests for the playhouse extra_fields are not run automatically. Is there a particular reason?",
"Will all those byte literals be compatible with Python 2.6?",
"See comments on #1262 and #1264 "
] | 2017-05-05T21:07:00 | 2017-05-08T21:12:39 | 2017-05-08T21:12:39 | NONE | null | In python3 you can't create a bytes string with bytes(' ') because you need to specify an encoding.
```
2017-05-05 22:34:43,025 ERROR File "/home/moutix/.virtualenvs/stepmania-server/lib/python3.5/site-packages/playhouse/fields.py", line 320, in get_cipher
key = key + bytes(' ') * (32 - len(key))
2017-... | {
"url": "https://api.github.com/repos/coleifer/peewee/issues/1263/reactions",
"total_count": 0,
"+1": 0,
"-1": 0,
"laugh": 0,
"hooray": 0,
"confused": 0,
"heart": 0,
"rocket": 0,
"eyes": 0
} | https://api.github.com/repos/coleifer/peewee/issues/1263/timeline | null | null | false | {
"url": "https://api.github.com/repos/coleifer/peewee/pulls/1263",
"html_url": "https://github.com/coleifer/peewee/pull/1263",
"diff_url": "https://github.com/coleifer/peewee/pull/1263.diff",
"patch_url": "https://github.com/coleifer/peewee/pull/1263.patch",
"merged_at": null
} |
https://api.github.com/repos/coleifer/peewee/issues/1262 | https://api.github.com/repos/coleifer/peewee | https://api.github.com/repos/coleifer/peewee/issues/1262/labels{/name} | https://api.github.com/repos/coleifer/peewee/issues/1262/comments | https://api.github.com/repos/coleifer/peewee/issues/1262/events | https://github.com/coleifer/peewee/issues/1262 | 226,691,112 | MDU6SXNzdWUyMjY2OTExMTI= | 1,262 | Encryption with python3 throws TypeError | {
"login": "cym13",
"id": 4958985,
"node_id": "MDQ6VXNlcjQ5NTg5ODU=",
"avatar_url": "https://avatars.githubusercontent.com/u/4958985?v=4",
"gravatar_id": "",
"url": "https://api.github.com/users/cym13",
"html_url": "https://github.com/cym13",
"followers_url": "https://api.github.com/users/cym13/follower... | [] | closed | false | null | [] | null | [
"This field has been removed in the latest release, 2.10.0. For details and explanation of why, see https://github.com/coleifer/peewee/releases/tag/2.10.0"
] | 2017-05-05T21:02:41 | 2017-05-08T21:12:08 | 2017-05-08T21:12:08 | NONE | null | Hi,
the AESEncryptedField in playhouse/fields.py is broken in python3.
Line 320 we see:
key = key + bytes(' ') * (32 - len(key))
but bytes(' ') isn't valid python3 and will throw a TypeError. | {
"url": "https://api.github.com/repos/coleifer/peewee/issues/1262/reactions",
"total_count": 0,
"+1": 0,
"-1": 0,
"laugh": 0,
"hooray": 0,
"confused": 0,
"heart": 0,
"rocket": 0,
"eyes": 0
} | https://api.github.com/repos/coleifer/peewee/issues/1262/timeline | null | completed | null | null |
https://api.github.com/repos/coleifer/peewee/issues/1261 | https://api.github.com/repos/coleifer/peewee | https://api.github.com/repos/coleifer/peewee/issues/1261/labels{/name} | https://api.github.com/repos/coleifer/peewee/issues/1261/comments | https://api.github.com/repos/coleifer/peewee/issues/1261/events | https://github.com/coleifer/peewee/pull/1261 | 226,631,919 | MDExOlB1bGxSZXF1ZXN0MTE5MjE2NjQz | 1,261 | README: Use the svg Travis badge | {
"login": "kevinji",
"id": 1146876,
"node_id": "MDQ6VXNlcjExNDY4NzY=",
"avatar_url": "https://avatars.githubusercontent.com/u/1146876?v=4",
"gravatar_id": "",
"url": "https://api.github.com/users/kevinji",
"html_url": "https://github.com/kevinji",
"followers_url": "https://api.github.com/users/kevinji/... | [] | closed | false | null | [] | null | [
"Cool thankee"
] | 2017-05-05T16:55:02 | 2017-05-08T16:27:26 | 2017-05-08T13:44:51 | CONTRIBUTOR | null | {
"url": "https://api.github.com/repos/coleifer/peewee/issues/1261/reactions",
"total_count": 0,
"+1": 0,
"-1": 0,
"laugh": 0,
"hooray": 0,
"confused": 0,
"heart": 0,
"rocket": 0,
"eyes": 0
} | https://api.github.com/repos/coleifer/peewee/issues/1261/timeline | null | null | false | {
"url": "https://api.github.com/repos/coleifer/peewee/pulls/1261",
"html_url": "https://github.com/coleifer/peewee/pull/1261",
"diff_url": "https://github.com/coleifer/peewee/pull/1261.diff",
"patch_url": "https://github.com/coleifer/peewee/pull/1261.patch",
"merged_at": "2017-05-08T13:44:51"
} | |
https://api.github.com/repos/coleifer/peewee/issues/1260 | https://api.github.com/repos/coleifer/peewee | https://api.github.com/repos/coleifer/peewee/issues/1260/labels{/name} | https://api.github.com/repos/coleifer/peewee/issues/1260/comments | https://api.github.com/repos/coleifer/peewee/issues/1260/events | https://github.com/coleifer/peewee/issues/1260 | 226,515,064 | MDU6SXNzdWUyMjY1MTUwNjQ= | 1,260 | Aiopeewee | {
"login": "kszucs",
"id": 961747,
"node_id": "MDQ6VXNlcjk2MTc0Nw==",
"avatar_url": "https://avatars.githubusercontent.com/u/961747?v=4",
"gravatar_id": "",
"url": "https://api.github.com/users/kszucs",
"html_url": "https://github.com/kszucs",
"followers_url": "https://api.github.com/users/kszucs/follow... | [] | closed | false | null | [] | null | [
"@kszucs Have you seen https://github.com/05bit/peewee-async ?",
"Sure. Peewee-async uses another approach, with a centralized manager object.",
"@kszucs Neat. Does aiopeewee only support Postgres right now?",
"Only Mysql, but postgres support is easy to implement - need to port only a couple of methods. "
] | 2017-05-05T09:12:07 | 2017-05-08T19:46:07 | 2017-05-08T19:46:07 | NONE | null | I've created an asyncio wrapper for peewee, adapted ideas from torpeewee.
It isn't feature complete yet, but I'm working on it.
@coleifer Could You give me a general feedback?
I need to duplicate a lot of code (due to asyncio nature), but I'm wondering how could I reduce it.
Could You give some advice?
| {
"url": "https://api.github.com/repos/coleifer/peewee/issues/1260/reactions",
"total_count": 0,
"+1": 0,
"-1": 0,
"laugh": 0,
"hooray": 0,
"confused": 0,
"heart": 0,
"rocket": 0,
"eyes": 0
} | https://api.github.com/repos/coleifer/peewee/issues/1260/timeline | null | completed | null | null |
https://api.github.com/repos/coleifer/peewee/issues/1259 | https://api.github.com/repos/coleifer/peewee | https://api.github.com/repos/coleifer/peewee/issues/1259/labels{/name} | https://api.github.com/repos/coleifer/peewee/issues/1259/comments | https://api.github.com/repos/coleifer/peewee/issues/1259/events | https://github.com/coleifer/peewee/issues/1259 | 226,485,471 | MDU6SXNzdWUyMjY0ODU0NzE= | 1,259 | Add `RetryOperationalError` support for `playhouse.db_url.connect`. | {
"login": "futursolo",
"id": 11693215,
"node_id": "MDQ6VXNlcjExNjkzMjE1",
"avatar_url": "https://avatars.githubusercontent.com/u/11693215?v=4",
"gravatar_id": "",
"url": "https://api.github.com/users/futursolo",
"html_url": "https://github.com/futursolo",
"followers_url": "https://api.github.com/users/... | [] | closed | false | null | [] | null | [
"You can do this yourself. I assume you have a MySQLDatabase subclass that you intend to use.... You can, then:\r\n\r\n```python\r\n\r\nfrom playhouse.db_url import connect, register_database\r\n\r\nregister_database(MySQLDatabaseSubClass, 'mysqlretry')\r\ndb = connect('mysqlretry://....')\r\n```"
] | 2017-05-05T06:32:47 | 2017-05-08T21:14:33 | 2017-05-08T21:14:33 | NONE | null | Currently, I am working on a project using peewee object model built against both MariaDB(for production) and SQLite(for testing). Using `playhouse.db_url.connect` seems like to be the best solution.
However, when using the MariaDB backend, after a certain amount of time, the service starts to constantly output `Err... | {
"url": "https://api.github.com/repos/coleifer/peewee/issues/1259/reactions",
"total_count": 0,
"+1": 0,
"-1": 0,
"laugh": 0,
"hooray": 0,
"confused": 0,
"heart": 0,
"rocket": 0,
"eyes": 0
} | https://api.github.com/repos/coleifer/peewee/issues/1259/timeline | null | completed | null | null |
https://api.github.com/repos/coleifer/peewee/issues/1258 | https://api.github.com/repos/coleifer/peewee | https://api.github.com/repos/coleifer/peewee/issues/1258/labels{/name} | https://api.github.com/repos/coleifer/peewee/issues/1258/comments | https://api.github.com/repos/coleifer/peewee/issues/1258/events | https://github.com/coleifer/peewee/issues/1258 | 226,397,245 | MDU6SXNzdWUyMjYzOTcyNDU= | 1,258 | Better Error message | {
"login": "MinchinWeb",
"id": 1548809,
"node_id": "MDQ6VXNlcjE1NDg4MDk=",
"avatar_url": "https://avatars.githubusercontent.com/u/1548809?v=4",
"gravatar_id": "",
"url": "https://api.github.com/users/MinchinWeb",
"html_url": "https://github.com/MinchinWeb",
"followers_url": "https://api.github.com/users... | [] | closed | false | null | [] | null | [
"Unfortunately I don't think so in this case. The error is coming from the fact that the `property` has no setter. The property you've defined overrides the other class attribute, so I'm not even sure how to detect it."
] | 2017-05-04T20:21:35 | 2017-05-05T08:13:23 | 2017-05-05T08:13:23 | NONE | null | I managed to break peewee, but the error message turnout to be be very unhelpful. Ultimately, the issue was I had model with a field and a property of the same name.
Simplified model:
```python
from peewee import CharField, Model
class BaseCustomer(Model):
city = CharField(null=True)
# a bunch of ot... | {
"url": "https://api.github.com/repos/coleifer/peewee/issues/1258/reactions",
"total_count": 0,
"+1": 0,
"-1": 0,
"laugh": 0,
"hooray": 0,
"confused": 0,
"heart": 0,
"rocket": 0,
"eyes": 0
} | https://api.github.com/repos/coleifer/peewee/issues/1258/timeline | null | completed | null | null |
https://api.github.com/repos/coleifer/peewee/issues/1257 | https://api.github.com/repos/coleifer/peewee | https://api.github.com/repos/coleifer/peewee/issues/1257/labels{/name} | https://api.github.com/repos/coleifer/peewee/issues/1257/comments | https://api.github.com/repos/coleifer/peewee/issues/1257/events | https://github.com/coleifer/peewee/issues/1257 | 225,603,230 | MDU6SXNzdWUyMjU2MDMyMzA= | 1,257 | Huge bug - needs high priority | {
"login": "Chemmic",
"id": 8461326,
"node_id": "MDQ6VXNlcjg0NjEzMjY=",
"avatar_url": "https://avatars.githubusercontent.com/u/8461326?v=4",
"gravatar_id": "",
"url": "https://api.github.com/users/Chemmic",
"html_url": "https://github.com/Chemmic",
"followers_url": "https://api.github.com/users/Chemmic/... | [] | closed | false | null | [] | null | [
"LOL. I'm sorry your shit got fucked so hard. Peewee doesn't fuck very much but when it does it fucks **hard**.\r\n\r\nCan you tell me about the bug?",
"Please comment with some details and I'll re-open for discussion."
] | 2017-05-02T06:40:27 | 2017-05-04T11:54:55 | 2017-05-04T11:54:41 | NONE | null | Hello,
Im using ur program since 2 years now, I figured out that there exists a huge bug wich fucks the whole programe over.
You really Need to work on it and fix it asap.
The program is really unusable without Fixing it so please get your lazy ass off and fix it.
- Chemmic | {
"url": "https://api.github.com/repos/coleifer/peewee/issues/1257/reactions",
"total_count": 2,
"+1": 0,
"-1": 1,
"laugh": 1,
"hooray": 0,
"confused": 0,
"heart": 0,
"rocket": 0,
"eyes": 0
} | https://api.github.com/repos/coleifer/peewee/issues/1257/timeline | null | completed | null | null |
https://api.github.com/repos/coleifer/peewee/issues/1256 | https://api.github.com/repos/coleifer/peewee | https://api.github.com/repos/coleifer/peewee/issues/1256/labels{/name} | https://api.github.com/repos/coleifer/peewee/issues/1256/comments | https://api.github.com/repos/coleifer/peewee/issues/1256/events | https://github.com/coleifer/peewee/issues/1256 | 224,786,899 | MDU6SXNzdWUyMjQ3ODY4OTk= | 1,256 | StopIteration thrown using load_csv | {
"login": "horkko",
"id": 9282917,
"node_id": "MDQ6VXNlcjkyODI5MTc=",
"avatar_url": "https://avatars.githubusercontent.com/u/9282917?v=4",
"gravatar_id": "",
"url": "https://api.github.com/users/horkko",
"html_url": "https://github.com/horkko",
"followers_url": "https://api.github.com/users/horkko/foll... | [] | closed | false | null | [] | null | [
"It looks like the CSV reader is expecting more lines in the file than there are. The CSV code is tested and should be working, so I doubt a bug as serious as \"loading a CSV file is broken\"... Guessing the issue is with the file.",
"How many lines are needed at least for expecting CSV reader to work as expected... | 2017-04-27T13:40:06 | 2017-04-27T19:08:56 | 2017-04-27T15:48:41 | NONE | null | Hi,
I try to load a csv file in sqlite db using `peewee 2.8.1`.
To do so, I've been using `playhouse.csv_utils`.
However, when I try to load CSV file, I've got a `StopIteration` thrown:
```
File "/home/tuco/src/workspace/taxadb/lib/python3.5/site-packages/playhouse/csv_utils.py", line 309, in load_csv
ret... | {
"url": "https://api.github.com/repos/coleifer/peewee/issues/1256/reactions",
"total_count": 0,
"+1": 0,
"-1": 0,
"laugh": 0,
"hooray": 0,
"confused": 0,
"heart": 0,
"rocket": 0,
"eyes": 0
} | https://api.github.com/repos/coleifer/peewee/issues/1256/timeline | null | completed | null | null |
https://api.github.com/repos/coleifer/peewee/issues/1255 | https://api.github.com/repos/coleifer/peewee | https://api.github.com/repos/coleifer/peewee/issues/1255/labels{/name} | https://api.github.com/repos/coleifer/peewee/issues/1255/comments | https://api.github.com/repos/coleifer/peewee/issues/1255/events | https://github.com/coleifer/peewee/issues/1255 | 224,164,370 | MDU6SXNzdWUyMjQxNjQzNzA= | 1,255 | playhouse dburl if password contains '@' , the parse will failed | {
"login": "ygsun",
"id": 2366231,
"node_id": "MDQ6VXNlcjIzNjYyMzE=",
"avatar_url": "https://avatars.githubusercontent.com/u/2366231?v=4",
"gravatar_id": "",
"url": "https://api.github.com/users/ygsun",
"html_url": "https://github.com/ygsun",
"followers_url": "https://api.github.com/users/ygsun/follower... | [] | closed | false | null | [] | null | [
"IDK, it seems like it works to me:\r\n\r\n```python\r\nIn [3]: parse('postgresql://postgres:my_p@ssword@localhost:5432/my_database')\r\nOut[3]: \r\n{'database': 'my_database',\r\n 'host': 'localhost',\r\n 'password': 'my_p@ssword',\r\n 'port': 5432,\r\n 'user': 'postgres'}\r\n```"
] | 2017-04-25T14:47:00 | 2017-04-25T14:55:54 | 2017-04-25T14:55:53 | NONE | null | {
"url": "https://api.github.com/repos/coleifer/peewee/issues/1255/reactions",
"total_count": 0,
"+1": 0,
"-1": 0,
"laugh": 0,
"hooray": 0,
"confused": 0,
"heart": 0,
"rocket": 0,
"eyes": 0
} | https://api.github.com/repos/coleifer/peewee/issues/1255/timeline | null | completed | null | null | |
https://api.github.com/repos/coleifer/peewee/issues/1254 | https://api.github.com/repos/coleifer/peewee | https://api.github.com/repos/coleifer/peewee/issues/1254/labels{/name} | https://api.github.com/repos/coleifer/peewee/issues/1254/comments | https://api.github.com/repos/coleifer/peewee/issues/1254/events | https://github.com/coleifer/peewee/issues/1254 | 223,083,772 | MDU6SXNzdWUyMjMwODM3NzI= | 1,254 | Decorator for test_database | {
"login": "jonathan-s",
"id": 2124818,
"node_id": "MDQ6VXNlcjIxMjQ4MTg=",
"avatar_url": "https://avatars.githubusercontent.com/u/2124818?v=4",
"gravatar_id": "",
"url": "https://api.github.com/users/jonathan-s",
"html_url": "https://github.com/jonathan-s",
"followers_url": "https://api.github.com/users... | [] | closed | false | null | [] | null | [
"It won't work as a class decorator, I don't think -- not without dynamically modifying the setup/teardown methods."
] | 2017-04-20T14:20:16 | 2017-05-14T01:30:38 | 2017-05-14T01:30:38 | NONE | null | Using the the context manager test_database is very useful while testing. But I found myself writing that a lot in the tests which amounted to quite some boilerplate. Perhaps it would be worthwhile to make that usable as class decorator?
Let me know what you think. | {
"url": "https://api.github.com/repos/coleifer/peewee/issues/1254/reactions",
"total_count": 0,
"+1": 0,
"-1": 0,
"laugh": 0,
"hooray": 0,
"confused": 0,
"heart": 0,
"rocket": 0,
"eyes": 0
} | https://api.github.com/repos/coleifer/peewee/issues/1254/timeline | null | completed | null | null |
https://api.github.com/repos/coleifer/peewee/issues/1253 | https://api.github.com/repos/coleifer/peewee | https://api.github.com/repos/coleifer/peewee/issues/1253/labels{/name} | https://api.github.com/repos/coleifer/peewee/issues/1253/comments | https://api.github.com/repos/coleifer/peewee/issues/1253/events | https://github.com/coleifer/peewee/issues/1253 | 222,872,189 | MDU6SXNzdWUyMjI4NzIxODk= | 1,253 | How should I structure my peewee postgres database for hosting on heroku | {
"login": "rahul3103",
"id": 10813252,
"node_id": "MDQ6VXNlcjEwODEzMjUy",
"avatar_url": "https://avatars.githubusercontent.com/u/10813252?v=4",
"gravatar_id": "",
"url": "https://api.github.com/users/rahul3103",
"html_url": "https://github.com/rahul3103",
"followers_url": "https://api.github.com/users/... | [] | closed | false | null | [] | null | [
"Responded on SO. Issue had nothing to do w/your peewee setup."
] | 2017-04-19T21:08:03 | 2017-04-19T22:32:40 | 2017-04-19T22:32:40 | NONE | null | http://stackoverflow.com/questions/43505529/peewee-and-postgres-on-heroku-not-able-to-create-table
I tried a lot but I was not able to run a simple code with peewee and postgres on heroku. Without database my app is running on heroku but with peewee and database its not running. If you can help me a little bit it wi... | {
"url": "https://api.github.com/repos/coleifer/peewee/issues/1253/reactions",
"total_count": 0,
"+1": 0,
"-1": 0,
"laugh": 0,
"hooray": 0,
"confused": 0,
"heart": 0,
"rocket": 0,
"eyes": 0
} | https://api.github.com/repos/coleifer/peewee/issues/1253/timeline | null | completed | null | null |
https://api.github.com/repos/coleifer/peewee/issues/1252 | https://api.github.com/repos/coleifer/peewee | https://api.github.com/repos/coleifer/peewee/issues/1252/labels{/name} | https://api.github.com/repos/coleifer/peewee/issues/1252/comments | https://api.github.com/repos/coleifer/peewee/issues/1252/events | https://github.com/coleifer/peewee/issues/1252 | 222,687,969 | MDU6SXNzdWUyMjI2ODc5Njk= | 1,252 | Automatically creating all tables, in right order. | {
"login": "tomvlk",
"id": 3877688,
"node_id": "MDQ6VXNlcjM4Nzc2ODg=",
"avatar_url": "https://avatars.githubusercontent.com/u/3877688?v=4",
"gravatar_id": "",
"url": "https://api.github.com/users/tomvlk",
"html_url": "https://github.com/tomvlk",
"followers_url": "https://api.github.com/users/tomvlk/foll... | [] | closed | false | null | [] | null | [
"`db.create_tables()` does just that.",
"I'm very sorry, thanks :+1: "
] | 2017-04-19T10:14:01 | 2017-04-19T20:24:27 | 2017-04-19T19:39:10 | NONE | null | I don't know if this was suggested before, but it would be great to have a function to create all tables, that automatically orders them in dependencies (like foreign keys etc.) so you would be able to have a dynamic application with dynamic models easily running without having to struggle with foreign keys while creat... | {
"url": "https://api.github.com/repos/coleifer/peewee/issues/1252/reactions",
"total_count": 0,
"+1": 0,
"-1": 0,
"laugh": 0,
"hooray": 0,
"confused": 0,
"heart": 0,
"rocket": 0,
"eyes": 0
} | https://api.github.com/repos/coleifer/peewee/issues/1252/timeline | null | completed | null | null |
https://api.github.com/repos/coleifer/peewee/issues/1251 | https://api.github.com/repos/coleifer/peewee | https://api.github.com/repos/coleifer/peewee/issues/1251/labels{/name} | https://api.github.com/repos/coleifer/peewee/issues/1251/comments | https://api.github.com/repos/coleifer/peewee/issues/1251/events | https://github.com/coleifer/peewee/issues/1251 | 222,113,090 | MDU6SXNzdWUyMjIxMTMwOTA= | 1,251 | Return back LTreeField support | {
"login": "spumer",
"id": 735150,
"node_id": "MDQ6VXNlcjczNTE1MA==",
"avatar_url": "https://avatars.githubusercontent.com/u/735150?v=4",
"gravatar_id": "",
"url": "https://api.github.com/users/spumer",
"html_url": "https://github.com/spumer",
"followers_url": "https://api.github.com/users/spumer/follow... | [] | closed | false | null | [] | null | [
"I wasn't interested in supporting it. 1.0 was also released back in 2012, a relative eternity ago."
] | 2017-04-17T11:11:53 | 2017-04-17T21:18:26 | 2017-04-17T21:17:32 | NONE | null | I saw in 1.0.0 version peewee have LTreeField support, but now we have only HSTORE and JSON.
Why this feature dropped?
Previous inital support of ltree extension for PG
https://github.com/coleifer/peewee/commit/9959cd8142ecece6704fd82e9c6274de2794d8c4 | {
"url": "https://api.github.com/repos/coleifer/peewee/issues/1251/reactions",
"total_count": 0,
"+1": 0,
"-1": 0,
"laugh": 0,
"hooray": 0,
"confused": 0,
"heart": 0,
"rocket": 0,
"eyes": 0
} | https://api.github.com/repos/coleifer/peewee/issues/1251/timeline | null | completed | null | null |
https://api.github.com/repos/coleifer/peewee/issues/1250 | https://api.github.com/repos/coleifer/peewee | https://api.github.com/repos/coleifer/peewee/issues/1250/labels{/name} | https://api.github.com/repos/coleifer/peewee/issues/1250/comments | https://api.github.com/repos/coleifer/peewee/issues/1250/events | https://github.com/coleifer/peewee/pull/1250 | 221,948,656 | MDExOlB1bGxSZXF1ZXN0MTE2MDI1NjAx | 1,250 | Implement __ne__ for CompositeKey. | {
"login": "timster",
"id": 173666,
"node_id": "MDQ6VXNlcjE3MzY2Ng==",
"avatar_url": "https://avatars.githubusercontent.com/u/173666?v=4",
"gravatar_id": "",
"url": "https://api.github.com/users/timster",
"html_url": "https://github.com/timster",
"followers_url": "https://api.github.com/users/timster/fo... | [] | closed | false | null | [] | null | [
"Wouldn't it just be:\r\n\r\n```python\r\ndef __ne__(self, other):\r\n return ~(self == other)\r\n```",
"Yeah, that works too. Forgot about `~` when I wrote it."
] | 2017-04-15T13:34:30 | 2017-04-18T19:31:51 | 2017-04-18T19:31:51 | NONE | null | For a model with a single primary key, you can do both of these:
```python
(obj._meta.primary_key == obj._get_pk_value())
(obj._meta.primary_key != obj._get_pk_value())
```
And both return a `peewee.Expression` object.
However if the primary key happens to be CompositeKey, the `!=` compare returns `False`.
... | {
"url": "https://api.github.com/repos/coleifer/peewee/issues/1250/reactions",
"total_count": 0,
"+1": 0,
"-1": 0,
"laugh": 0,
"hooray": 0,
"confused": 0,
"heart": 0,
"rocket": 0,
"eyes": 0
} | https://api.github.com/repos/coleifer/peewee/issues/1250/timeline | null | null | false | {
"url": "https://api.github.com/repos/coleifer/peewee/pulls/1250",
"html_url": "https://github.com/coleifer/peewee/pull/1250",
"diff_url": "https://github.com/coleifer/peewee/pull/1250.diff",
"patch_url": "https://github.com/coleifer/peewee/pull/1250.patch",
"merged_at": null
} |
https://api.github.com/repos/coleifer/peewee/issues/1249 | https://api.github.com/repos/coleifer/peewee | https://api.github.com/repos/coleifer/peewee/issues/1249/labels{/name} | https://api.github.com/repos/coleifer/peewee/issues/1249/comments | https://api.github.com/repos/coleifer/peewee/issues/1249/events | https://github.com/coleifer/peewee/issues/1249 | 221,293,901 | MDU6SXNzdWUyMjEyOTM5MDE= | 1,249 | How about make a transparent cache layer? | {
"login": "aiportal",
"id": 878799,
"node_id": "MDQ6VXNlcjg3ODc5OQ==",
"avatar_url": "https://avatars.githubusercontent.com/u/878799?v=4",
"gravatar_id": "",
"url": "https://api.github.com/users/aiportal",
"html_url": "https://github.com/aiportal",
"followers_url": "https://api.github.com/users/aiporta... | [] | closed | false | null | [] | null | [] | 2017-04-12T15:06:21 | 2017-04-12T18:57:48 | 2017-04-12T18:57:48 | NONE | null | If small table, cache all data in memory or redis or memcached like this:
```
class MyModel(Cache.Model):
Meta:
cache_db = ':memory:' # or 'redis' or 'memcached'
...
```
If big table, cache a part of data by a range define.
```
class MyModel(Cache.Model):
Meta:
cache_db =... | {
"url": "https://api.github.com/repos/coleifer/peewee/issues/1249/reactions",
"total_count": 0,
"+1": 0,
"-1": 0,
"laugh": 0,
"hooray": 0,
"confused": 0,
"heart": 0,
"rocket": 0,
"eyes": 0
} | https://api.github.com/repos/coleifer/peewee/issues/1249/timeline | null | completed | null | null |
https://api.github.com/repos/coleifer/peewee/issues/1248 | https://api.github.com/repos/coleifer/peewee | https://api.github.com/repos/coleifer/peewee/issues/1248/labels{/name} | https://api.github.com/repos/coleifer/peewee/issues/1248/comments | https://api.github.com/repos/coleifer/peewee/issues/1248/events | https://github.com/coleifer/peewee/issues/1248 | 220,857,352 | MDU6SXNzdWUyMjA4NTczNTI= | 1,248 | Allow disabling lazy loading | {
"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 | [
"Here are a couple ideas:\r\n\r\n* Use the `<fk field>_id` accessor -- this will return the value of the foreign key column w/o triggering a lookup on the related table.\r\n* Subclass `ForeignKeyField` and override the `_get_descriptor()` method to return a descriptor w/the desired behavior",
"Thanks, I'll try th... | 2017-04-11T07:01:02 | 2017-04-13T07:44:28 | 2017-04-11T09:27:35 | NONE | null | Is it possible to disable lazy loading of foreign keys somehow? I assume the magic happens in some `__getattr__` or proxy class but not sure where.
You probably don't want to add this as a built-in option, but if you have any pointers to what I should stab, that would be nice.
Use case: I am tuning my code for pe... | {
"url": "https://api.github.com/repos/coleifer/peewee/issues/1248/reactions",
"total_count": 0,
"+1": 0,
"-1": 0,
"laugh": 0,
"hooray": 0,
"confused": 0,
"heart": 0,
"rocket": 0,
"eyes": 0
} | https://api.github.com/repos/coleifer/peewee/issues/1248/timeline | null | completed | null | null |
https://api.github.com/repos/coleifer/peewee/issues/1247 | https://api.github.com/repos/coleifer/peewee | https://api.github.com/repos/coleifer/peewee/issues/1247/labels{/name} | https://api.github.com/repos/coleifer/peewee/issues/1247/comments | https://api.github.com/repos/coleifer/peewee/issues/1247/events | https://github.com/coleifer/peewee/issues/1247 | 220,624,113 | MDU6SXNzdWUyMjA2MjQxMTM= | 1,247 | The select loop is processed twice | {
"login": "MarcSky",
"id": 4164003,
"node_id": "MDQ6VXNlcjQxNjQwMDM=",
"avatar_url": "https://avatars.githubusercontent.com/u/4164003?v=4",
"gravatar_id": "",
"url": "https://api.github.com/users/MarcSky",
"html_url": "https://github.com/MarcSky",
"followers_url": "https://api.github.com/users/MarcSky/... | [] | closed | false | null | [] | null | [
"Are you using SQLite, and in the body of the for loop are you issuing any INSERT/UPDATE/DELETE queries?",
"#450 touches on this, but essentially you should do one of the following:\r\n\r\n* wrap the for loop in a transaction using `with db.atomic():`\r\n* coerce the select query to a list before iterating over i... | 2017-04-10T12:08:54 | 2017-04-10T19:25:08 | 2017-04-10T19:25:07 | NONE | null | I have a strange problem, the select loop is processed twice. Ie I receive from the database 2 objects, and the cycle passes 4 times.
for enter in Enter.select().join(PaySystem).where(
(Enter.en_status == 1) &
(Enter.en_date >= startdate) &
(PaySyste... | {
"url": "https://api.github.com/repos/coleifer/peewee/issues/1247/reactions",
"total_count": 0,
"+1": 0,
"-1": 0,
"laugh": 0,
"hooray": 0,
"confused": 0,
"heart": 0,
"rocket": 0,
"eyes": 0
} | https://api.github.com/repos/coleifer/peewee/issues/1247/timeline | null | completed | null | null |
https://api.github.com/repos/coleifer/peewee/issues/1246 | https://api.github.com/repos/coleifer/peewee | https://api.github.com/repos/coleifer/peewee/issues/1246/labels{/name} | https://api.github.com/repos/coleifer/peewee/issues/1246/comments | https://api.github.com/repos/coleifer/peewee/issues/1246/events | https://github.com/coleifer/peewee/pull/1246 | 220,515,683 | MDExOlB1bGxSZXF1ZXN0MTE1MDExMjk4 | 1,246 | #1245 Implemented _Array.__repr__(). | {
"login": "maaaks",
"id": 3010238,
"node_id": "MDQ6VXNlcjMwMTAyMzg=",
"avatar_url": "https://avatars.githubusercontent.com/u/3010238?v=4",
"gravatar_id": "",
"url": "https://api.github.com/users/maaaks",
"html_url": "https://github.com/maaaks",
"followers_url": "https://api.github.com/users/maaaks/foll... | [] | closed | false | null | [] | null | [] | 2017-04-10T01:17:29 | 2017-04-10T19:22:22 | 2017-04-10T19:22:22 | CONTRIBUTOR | null | {
"url": "https://api.github.com/repos/coleifer/peewee/issues/1246/reactions",
"total_count": 0,
"+1": 0,
"-1": 0,
"laugh": 0,
"hooray": 0,
"confused": 0,
"heart": 0,
"rocket": 0,
"eyes": 0
} | https://api.github.com/repos/coleifer/peewee/issues/1246/timeline | null | null | false | {
"url": "https://api.github.com/repos/coleifer/peewee/pulls/1246",
"html_url": "https://github.com/coleifer/peewee/pull/1246",
"diff_url": "https://github.com/coleifer/peewee/pull/1246.diff",
"patch_url": "https://github.com/coleifer/peewee/pull/1246.patch",
"merged_at": null
} | |
https://api.github.com/repos/coleifer/peewee/issues/1245 | https://api.github.com/repos/coleifer/peewee | https://api.github.com/repos/coleifer/peewee/issues/1245/labels{/name} | https://api.github.com/repos/coleifer/peewee/issues/1245/comments | https://api.github.com/repos/coleifer/peewee/issues/1245/events | https://github.com/coleifer/peewee/issues/1245 | 220,515,322 | MDU6SXNzdWUyMjA1MTUzMjI= | 1,245 | Implement _Array.__repr__() | {
"login": "maaaks",
"id": 3010238,
"node_id": "MDQ6VXNlcjMwMTAyMzg=",
"avatar_url": "https://avatars.githubusercontent.com/u/3010238?v=4",
"gravatar_id": "",
"url": "https://api.github.com/users/maaaks",
"html_url": "https://github.com/maaaks",
"followers_url": "https://api.github.com/users/maaaks/foll... | [] | closed | false | null | [] | null | [
"I think I will pass on this, but thank you.",
"Are there maybe some other plans to make the messages containing Arrays more readable?"
] | 2017-04-10T01:12:39 | 2017-04-10T20:21:13 | 2017-04-10T19:22:07 | CONTRIBUTOR | null | For convenient display in lists of params in stderr. | {
"url": "https://api.github.com/repos/coleifer/peewee/issues/1245/reactions",
"total_count": 0,
"+1": 0,
"-1": 0,
"laugh": 0,
"hooray": 0,
"confused": 0,
"heart": 0,
"rocket": 0,
"eyes": 0
} | https://api.github.com/repos/coleifer/peewee/issues/1245/timeline | null | completed | null | null |
https://api.github.com/repos/coleifer/peewee/issues/1244 | https://api.github.com/repos/coleifer/peewee | https://api.github.com/repos/coleifer/peewee/issues/1244/labels{/name} | https://api.github.com/repos/coleifer/peewee/issues/1244/comments | https://api.github.com/repos/coleifer/peewee/issues/1244/events | https://github.com/coleifer/peewee/pull/1244 | 220,514,665 | MDExOlB1bGxSZXF1ZXN0MTE1MDEwNzAy | 1,244 | Fixed sort_models_topologically() | {
"login": "maaaks",
"id": 3010238,
"node_id": "MDQ6VXNlcjMwMTAyMzg=",
"avatar_url": "https://avatars.githubusercontent.com/u/3010238?v=4",
"gravatar_id": "",
"url": "https://api.github.com/users/maaaks",
"html_url": "https://github.com/maaaks",
"followers_url": "https://api.github.com/users/maaaks/foll... | [] | closed | false | null | [] | null | [
"Nice!"
] | 2017-04-10T01:04:45 | 2017-04-10T19:43:07 | 2017-04-10T19:43:07 | CONTRIBUTOR | null | #1076 | {
"url": "https://api.github.com/repos/coleifer/peewee/issues/1244/reactions",
"total_count": 0,
"+1": 0,
"-1": 0,
"laugh": 0,
"hooray": 0,
"confused": 0,
"heart": 0,
"rocket": 0,
"eyes": 0
} | https://api.github.com/repos/coleifer/peewee/issues/1244/timeline | null | null | false | {
"url": "https://api.github.com/repos/coleifer/peewee/pulls/1244",
"html_url": "https://github.com/coleifer/peewee/pull/1244",
"diff_url": "https://github.com/coleifer/peewee/pull/1244.diff",
"patch_url": "https://github.com/coleifer/peewee/pull/1244.patch",
"merged_at": "2017-04-10T19:43:07"
} |
https://api.github.com/repos/coleifer/peewee/issues/1243 | https://api.github.com/repos/coleifer/peewee | https://api.github.com/repos/coleifer/peewee/issues/1243/labels{/name} | https://api.github.com/repos/coleifer/peewee/issues/1243/comments | https://api.github.com/repos/coleifer/peewee/issues/1243/events | https://github.com/coleifer/peewee/issues/1243 | 220,363,755 | MDU6SXNzdWUyMjAzNjM3NTU= | 1,243 | Using attached databases with sqlite? | {
"login": "kdart",
"id": 33999,
"node_id": "MDQ6VXNlcjMzOTk5",
"avatar_url": "https://avatars.githubusercontent.com/u/33999?v=4",
"gravatar_id": "",
"url": "https://api.github.com/users/kdart",
"html_url": "https://github.com/kdart",
"followers_url": "https://api.github.com/users/kdart/followers",
"f... | [] | closed | false | null | [] | null | [
"It should work -- you'll need to run the \"ATTACH\" query at some point by calling database.execute_sql(). As for your model classes -- you may find it easiest to work with two sets of model classes, each of which defines a \"schema\" Meta option of \"main\" and whatever your attached db is. This will prefix all t... | 2017-04-08T00:58:46 | 2019-02-27T16:39:38 | 2017-04-10T20:00:17 | NONE | null | Greetings,
This is more of a feature request or request for comment.
SQlite has a feature to attach multiple database files: [ATTACH DATABASE](https://sqlite.org/lang_attach.html) that seems to enable queries across multiple database files. So I was wondering is there support for this in peewee already, or, if n... | {
"url": "https://api.github.com/repos/coleifer/peewee/issues/1243/reactions",
"total_count": 0,
"+1": 0,
"-1": 0,
"laugh": 0,
"hooray": 0,
"confused": 0,
"heart": 0,
"rocket": 0,
"eyes": 0
} | https://api.github.com/repos/coleifer/peewee/issues/1243/timeline | null | completed | null | null |
https://api.github.com/repos/coleifer/peewee/issues/1242 | https://api.github.com/repos/coleifer/peewee | https://api.github.com/repos/coleifer/peewee/issues/1242/labels{/name} | https://api.github.com/repos/coleifer/peewee/issues/1242/comments | https://api.github.com/repos/coleifer/peewee/issues/1242/events | https://github.com/coleifer/peewee/pull/1242 | 220,253,160 | MDExOlB1bGxSZXF1ZXN0MTE0ODQ0Njk1 | 1,242 | Model generator support tables with no primary key | {
"login": "onlyice",
"id": 1173899,
"node_id": "MDQ6VXNlcjExNzM4OTk=",
"avatar_url": "https://avatars.githubusercontent.com/u/1173899?v=4",
"gravatar_id": "",
"url": "https://api.github.com/users/onlyice",
"html_url": "https://github.com/onlyice",
"followers_url": "https://api.github.com/users/onlyice/... | [] | closed | false | null | [] | null | [
"Merged equivalent patch."
] | 2017-04-07T15:47:01 | 2017-04-10T19:47:16 | 2017-04-10T19:47:16 | NONE | null | Currently for tables with no primary key, pwiz would generate model files without `primary_key = False`. Thus peewee assumes that there is a `id` column as primary key in the table, and the query failed.
Add `primary_key = False` in the `Meta` definition would prevent this error. | {
"url": "https://api.github.com/repos/coleifer/peewee/issues/1242/reactions",
"total_count": 0,
"+1": 0,
"-1": 0,
"laugh": 0,
"hooray": 0,
"confused": 0,
"heart": 0,
"rocket": 0,
"eyes": 0
} | https://api.github.com/repos/coleifer/peewee/issues/1242/timeline | null | null | false | {
"url": "https://api.github.com/repos/coleifer/peewee/pulls/1242",
"html_url": "https://github.com/coleifer/peewee/pull/1242",
"diff_url": "https://github.com/coleifer/peewee/pull/1242.diff",
"patch_url": "https://github.com/coleifer/peewee/pull/1242.patch",
"merged_at": null
} |
https://api.github.com/repos/coleifer/peewee/issues/1241 | https://api.github.com/repos/coleifer/peewee | https://api.github.com/repos/coleifer/peewee/issues/1241/labels{/name} | https://api.github.com/repos/coleifer/peewee/issues/1241/comments | https://api.github.com/repos/coleifer/peewee/issues/1241/events | https://github.com/coleifer/peewee/issues/1241 | 220,031,775 | MDU6SXNzdWUyMjAwMzE3NzU= | 1,241 | Hybrid Attributes and TextFields don't properly form an expression (SQLite) | {
"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 | [
"Cool -- I think I need to modify the string based fields to use concatenation for the `+` operator overload. Nice catch.",
"1740cc1132ca01d3964f543eca00f1dc9532bc24",
"Thanks for such a swift reply! Release schedule wise, there appear to be a number of fixes since the last release, do you expect to issue a new... | 2017-04-06T21:00:55 | 2017-04-07T23:46:58 | 2017-04-07T03:26:19 | NONE | null | Basic repro below, but just as the description says, I cannot seem to get the two to play nicely, I was going off some examples in SQLAlchemy which I believe was the basis for hybrid attributes.
Using SQLite and tested with the latest release version of peewee 2.9.1
```python
from peewee import TextField, Model
... | {
"url": "https://api.github.com/repos/coleifer/peewee/issues/1241/reactions",
"total_count": 0,
"+1": 0,
"-1": 0,
"laugh": 0,
"hooray": 0,
"confused": 0,
"heart": 0,
"rocket": 0,
"eyes": 0
} | https://api.github.com/repos/coleifer/peewee/issues/1241/timeline | null | completed | null | null |
https://api.github.com/repos/coleifer/peewee/issues/1240 | https://api.github.com/repos/coleifer/peewee | https://api.github.com/repos/coleifer/peewee/issues/1240/labels{/name} | https://api.github.com/repos/coleifer/peewee/issues/1240/comments | https://api.github.com/repos/coleifer/peewee/issues/1240/events | https://github.com/coleifer/peewee/issues/1240 | 219,971,424 | MDU6SXNzdWUyMTk5NzE0MjQ= | 1,240 | Question: Can I use FlaskDB.Model in non-Flask process? | {
"login": "devkhan",
"id": 8049092,
"node_id": "MDQ6VXNlcjgwNDkwOTI=",
"avatar_url": "https://avatars.githubusercontent.com/u/8049092?v=4",
"gravatar_id": "",
"url": "https://api.github.com/users/devkhan",
"html_url": "https://github.com/devkhan",
"followers_url": "https://api.github.com/users/devkhan/... | [] | closed | false | null | [] | null | [
"This is do-able. You'll need to initialize the Flask application, though. Something like this:\r\n\r\n```\r\nwith app.app_context():\r\n # Try using the database here.\r\n```\r\n\r\nThis definitely isn't a bug, so I'm closing as this type of question belongs on Stackoverflow."
] | 2017-04-06T17:24:33 | 2017-04-07T03:13:07 | 2017-04-07T03:13:07 | NONE | null | I have defined a model `X` by subclassing `FlaskDB.Model`, and then I want to access one of the instances in a celery worker process. Is it possible, and if so, how should I go about that?
I've already tried that, and receiving an `AttributeError: Cannot use uninitialized Proxy.`. But I guess that is because of not ... | {
"url": "https://api.github.com/repos/coleifer/peewee/issues/1240/reactions",
"total_count": 0,
"+1": 0,
"-1": 0,
"laugh": 0,
"hooray": 0,
"confused": 0,
"heart": 0,
"rocket": 0,
"eyes": 0
} | https://api.github.com/repos/coleifer/peewee/issues/1240/timeline | null | completed | null | null |
https://api.github.com/repos/coleifer/peewee/issues/1239 | https://api.github.com/repos/coleifer/peewee | https://api.github.com/repos/coleifer/peewee/issues/1239/labels{/name} | https://api.github.com/repos/coleifer/peewee/issues/1239/comments | https://api.github.com/repos/coleifer/peewee/issues/1239/events | https://github.com/coleifer/peewee/issues/1239 | 219,873,343 | MDU6SXNzdWUyMTk4NzMzNDM= | 1,239 | order_by with subqueries and UNION fails to fill model | {
"login": "Karel-van-de-Plassche",
"id": 6404167,
"node_id": "MDQ6VXNlcjY0MDQxNjc=",
"avatar_url": "https://avatars.githubusercontent.com/u/6404167?v=4",
"gravatar_id": "",
"url": "https://api.github.com/users/Karel-van-de-Plassche",
"html_url": "https://github.com/Karel-van-de-Plassche",
"followers_ur... | [] | closed | false | null | [] | null | [
"As always, found a solution in #1178 right after posting. Replacing\r\n```\r\n.select(SQL('*'))\r\n```\r\nby\r\n```\r\n.select(getattr(join_clause.c, column.name))\r\n```\r\nfixes this problem\r\n",
"For future dwellers, this works for tables with `ForeignKeyField` or `CompositeKey` as `PrimaryKeyField` too:\r\n... | 2017-04-06T11:51:13 | 2017-04-06T13:19:49 | 2017-04-06T12:08:37 | NONE | null | I'm trying to find the closest point to a specific value. As per [stackoverflow](http://stackoverflow.com/questions/6102824/is-there-a-postgres-closest-operator) suggestion, I'm using subqueries and a UNION ALL to efficiently find the point. The following SQL works on my setup (PostgreSQL 3.6, adminer 4.2.5):
``` SQ... | {
"url": "https://api.github.com/repos/coleifer/peewee/issues/1239/reactions",
"total_count": 0,
"+1": 0,
"-1": 0,
"laugh": 0,
"hooray": 0,
"confused": 0,
"heart": 0,
"rocket": 0,
"eyes": 0
} | https://api.github.com/repos/coleifer/peewee/issues/1239/timeline | null | completed | null | null |
https://api.github.com/repos/coleifer/peewee/issues/1238 | https://api.github.com/repos/coleifer/peewee | https://api.github.com/repos/coleifer/peewee/issues/1238/labels{/name} | https://api.github.com/repos/coleifer/peewee/issues/1238/comments | https://api.github.com/repos/coleifer/peewee/issues/1238/events | https://github.com/coleifer/peewee/issues/1238 | 219,578,364 | MDU6SXNzdWUyMTk1NzgzNjQ= | 1,238 | ValueError: too many values to unpack (expected 3) | {
"login": "lqsgd123",
"id": 24636251,
"node_id": "MDQ6VXNlcjI0NjM2MjUx",
"avatar_url": "https://avatars.githubusercontent.com/u/24636251?v=4",
"gravatar_id": "",
"url": "https://api.github.com/users/lqsgd123",
"html_url": "https://github.com/lqsgd123",
"followers_url": "https://api.github.com/users/lqs... | [] | closed | false | null | [] | null | [] | 2017-04-05T13:14:52 | 2017-04-06T05:17:54 | 2017-04-06T05:17:54 | NONE | null | I want to calculate the days between two dates.
```
def isLeapYear(year):
if year%400 == 0:
return True
elif year%100!=0 and year%4==0:
return True
else:
return False
def nextDay(year,month,day):
if isLeapYear(year):
daysOfMonths1 = [ 31, 29, 31, 30, 31... | {
"url": "https://api.github.com/repos/coleifer/peewee/issues/1238/reactions",
"total_count": 0,
"+1": 0,
"-1": 0,
"laugh": 0,
"hooray": 0,
"confused": 0,
"heart": 0,
"rocket": 0,
"eyes": 0
} | https://api.github.com/repos/coleifer/peewee/issues/1238/timeline | null | completed | null | null |
https://api.github.com/repos/coleifer/peewee/issues/1237 | https://api.github.com/repos/coleifer/peewee | https://api.github.com/repos/coleifer/peewee/issues/1237/labels{/name} | https://api.github.com/repos/coleifer/peewee/issues/1237/comments | https://api.github.com/repos/coleifer/peewee/issues/1237/events | https://github.com/coleifer/peewee/issues/1237 | 218,919,054 | MDU6SXNzdWUyMTg5MTkwNTQ= | 1,237 | any documentation that doesn't require flask. | {
"login": "faststare",
"id": 20119279,
"node_id": "MDQ6VXNlcjIwMTE5Mjc5",
"avatar_url": "https://avatars.githubusercontent.com/u/20119279?v=4",
"gravatar_id": "",
"url": "https://api.github.com/users/faststare",
"html_url": "https://github.com/faststare",
"followers_url": "https://api.github.com/users/... | [] | closed | false | null | [] | null | [
"What are you talking about? Hardly anything is Flask-specific!",
"Maybe you're talking about the example application, which is a flask application?\r\n\r\nAt any rate, the documentation is intentionally designed to be framework- or implementation-agnostic. It doesn't matter if you're doing batch processing, ETL,... | 2017-04-03T12:34:40 | 2017-04-03T23:21:56 | 2017-04-03T14:47:47 | NONE | null | it gets complicated that you mix peewee and flask. not all developer develop web app nor flask.
documentation should be simple like ponyorm docs.
it seems that you didn't the import this mantra with your package that you develop.
peewee have potential but too much quirks in the docs therefore new developer who try ... | {
"url": "https://api.github.com/repos/coleifer/peewee/issues/1237/reactions",
"total_count": 0,
"+1": 0,
"-1": 0,
"laugh": 0,
"hooray": 0,
"confused": 0,
"heart": 0,
"rocket": 0,
"eyes": 0
} | https://api.github.com/repos/coleifer/peewee/issues/1237/timeline | null | completed | null | null |
https://api.github.com/repos/coleifer/peewee/issues/1236 | https://api.github.com/repos/coleifer/peewee | https://api.github.com/repos/coleifer/peewee/issues/1236/labels{/name} | https://api.github.com/repos/coleifer/peewee/issues/1236/comments | https://api.github.com/repos/coleifer/peewee/issues/1236/events | https://github.com/coleifer/peewee/issues/1236 | 218,751,253 | MDU6SXNzdWUyMTg3NTEyNTM= | 1,236 | pymysql.err.OperationalError: (2014, 'Command Out of Sync') | {
"login": "aiportal",
"id": 878799,
"node_id": "MDQ6VXNlcjg3ODc5OQ==",
"avatar_url": "https://avatars.githubusercontent.com/u/878799?v=4",
"gravatar_id": "",
"url": "https://api.github.com/users/aiportal",
"html_url": "https://github.com/aiportal",
"followers_url": "https://api.github.com/users/aiporta... | [] | closed | false | null | [] | null | [
"Not sure looks like an issue in pymysql, the database driver, as opposed to peewee.",
"I have a same problem.\r\nwith the same env:\r\npeewee + pymysql + uwsgi(multi processes. every process have only 1 thread running)\r\n\r\nat the beginning, errors comes about 8 hours since uwsgi starts(about 10k queries). Wit... | 2017-04-02T08:54:24 | 2018-12-05T12:35:58 | 2017-04-03T15:22:05 | NONE | null | My code in flask is like this:
```
db_connections = [db_fetch, db_zb123]
class Database:
@staticmethod
def connect():
for conn in db_connections:
if conn.is_closed():
conn.connect()
@staticmethod
def close():
for conn in db_connections:
... | {
"url": "https://api.github.com/repos/coleifer/peewee/issues/1236/reactions",
"total_count": 0,
"+1": 0,
"-1": 0,
"laugh": 0,
"hooray": 0,
"confused": 0,
"heart": 0,
"rocket": 0,
"eyes": 0
} | https://api.github.com/repos/coleifer/peewee/issues/1236/timeline | null | completed | null | null |
https://api.github.com/repos/coleifer/peewee/issues/1235 | https://api.github.com/repos/coleifer/peewee | https://api.github.com/repos/coleifer/peewee/issues/1235/labels{/name} | https://api.github.com/repos/coleifer/peewee/issues/1235/comments | https://api.github.com/repos/coleifer/peewee/issues/1235/events | https://github.com/coleifer/peewee/issues/1235 | 218,737,243 | MDU6SXNzdWUyMTg3MzcyNDM= | 1,235 | Python3: AESEncryptedField attempts to combine strings and bytes | {
"login": "jlowin",
"id": 153965,
"node_id": "MDQ6VXNlcjE1Mzk2NQ==",
"avatar_url": "https://avatars.githubusercontent.com/u/153965?v=4",
"gravatar_id": "",
"url": "https://api.github.com/users/jlowin",
"html_url": "https://github.com/jlowin",
"followers_url": "https://api.github.com/users/jlowin/follow... | [] | closed | false | null | [] | null | [] | 2017-04-02T02:40:52 | 2017-04-07T03:06:31 | 2017-04-07T03:06:31 | NONE | null | This is only an error in Python 3.
In [this line](https://github.com/coleifer/peewee/blame/master/playhouse/fields.py#L320), the AESEncryptedField attempts to concatenate the `key` (a `bytes` object) with `' '` (a `str`). This raises an error since the operation is not allowed. | {
"url": "https://api.github.com/repos/coleifer/peewee/issues/1235/reactions",
"total_count": 0,
"+1": 0,
"-1": 0,
"laugh": 0,
"hooray": 0,
"confused": 0,
"heart": 0,
"rocket": 0,
"eyes": 0
} | https://api.github.com/repos/coleifer/peewee/issues/1235/timeline | null | completed | null | null |
https://api.github.com/repos/coleifer/peewee/issues/1234 | https://api.github.com/repos/coleifer/peewee | https://api.github.com/repos/coleifer/peewee/issues/1234/labels{/name} | https://api.github.com/repos/coleifer/peewee/issues/1234/comments | https://api.github.com/repos/coleifer/peewee/issues/1234/events | https://github.com/coleifer/peewee/issues/1234 | 218,688,266 | MDU6SXNzdWUyMTg2ODgyNjY= | 1,234 | Add a way to copy over where clause between queries | {
"login": "tasn",
"id": 108670,
"node_id": "MDQ6VXNlcjEwODY3MA==",
"avatar_url": "https://avatars.githubusercontent.com/u/108670?v=4",
"gravatar_id": "",
"url": "https://api.github.com/users/tasn",
"html_url": "https://github.com/tasn",
"followers_url": "https://api.github.com/users/tasn/followers",
... | [] | closed | false | null | [] | null | [
"Well, for one, INSERT queries don't take a WHERE clause.\r\n\r\nBut to your point, just put the expressions together and assign them to a variable...\r\n\r\n```python\r\nCOND = (MyModel.foo == 'bar') & (MyModel.baz < 4)\r\nq1 = MyModel.select().where(COND)\r\nMyModel.delete().where(COND).execute()\r\n\r\n# or\r\nM... | 2017-04-01T10:56:17 | 2017-04-01T16:44:01 | 2017-04-01T16:44:01 | NONE | null | Hi,
I want to be able to do:
```
a = Model.select().where(COMPLEX_CONDITION_HERE)
Model.insert(a=1).inherit(a)
```
Not sure if this is the best API, but this is a start.
There are two main places where this is useful:
1. When you want to do two manipulations on the same consecutively. For example, run a s... | {
"url": "https://api.github.com/repos/coleifer/peewee/issues/1234/reactions",
"total_count": 0,
"+1": 0,
"-1": 0,
"laugh": 0,
"hooray": 0,
"confused": 0,
"heart": 0,
"rocket": 0,
"eyes": 0
} | https://api.github.com/repos/coleifer/peewee/issues/1234/timeline | null | completed | null | null |
https://api.github.com/repos/coleifer/peewee/issues/1233 | https://api.github.com/repos/coleifer/peewee | https://api.github.com/repos/coleifer/peewee/issues/1233/labels{/name} | https://api.github.com/repos/coleifer/peewee/issues/1233/comments | https://api.github.com/repos/coleifer/peewee/issues/1233/events | https://github.com/coleifer/peewee/issues/1233 | 218,648,675 | MDU6SXNzdWUyMTg2NDg2NzU= | 1,233 | Can not pull data for joined models | {
"login": "kalpesh99",
"id": 543100,
"node_id": "MDQ6VXNlcjU0MzEwMA==",
"avatar_url": "https://avatars.githubusercontent.com/u/543100?v=4",
"gravatar_id": "",
"url": "https://api.github.com/users/kalpesh99",
"html_url": "https://github.com/kalpesh99",
"followers_url": "https://api.github.com/users/kalp... | [] | closed | false | null | [] | null | [
"Could you please take the time to format your code?",
"```python\r\nclass User(Model):\r\n id = PrimaryKeyField()\r\n username = CharField(max_length=32, null=False)\r\n password = TextField(null=False)\r\n first_name = CharField(max_length=32, null=True)\r\n last_name = CharField(max_length=32, n... | 2017-04-01T00:14:33 | 2017-04-07T03:03:39 | 2017-04-07T03:03:39 | NONE | null | UserLesson.select(UserLesson, Lesson, User).join(Lesson).switch(UserLesson).join(User).first() query works as expected (returning data for all three classes) but Lesson.select(Lesson, UserLesson, User).join(UserLesson).join(User).first() returns only Lesson class/model for models shown below. Why does it behave like it... | {
"url": "https://api.github.com/repos/coleifer/peewee/issues/1233/reactions",
"total_count": 0,
"+1": 0,
"-1": 0,
"laugh": 0,
"hooray": 0,
"confused": 0,
"heart": 0,
"rocket": 0,
"eyes": 0
} | https://api.github.com/repos/coleifer/peewee/issues/1233/timeline | null | completed | null | null |
https://api.github.com/repos/coleifer/peewee/issues/1232 | https://api.github.com/repos/coleifer/peewee | https://api.github.com/repos/coleifer/peewee/issues/1232/labels{/name} | https://api.github.com/repos/coleifer/peewee/issues/1232/comments | https://api.github.com/repos/coleifer/peewee/issues/1232/events | https://github.com/coleifer/peewee/issues/1232 | 218,195,331 | MDU6SXNzdWUyMTgxOTUzMzE= | 1,232 | Why "from peewee import *" doesn't import InsertQuery? | {
"login": "TwoAnts",
"id": 5968383,
"node_id": "MDQ6VXNlcjU5NjgzODM=",
"avatar_url": "https://avatars.githubusercontent.com/u/5968383?v=4",
"gravatar_id": "",
"url": "https://api.github.com/users/TwoAnts",
"html_url": "https://github.com/TwoAnts",
"followers_url": "https://api.github.com/users/TwoAnts/... | [] | closed | false | null | [] | null | [
"Typically you would not import an InsertQuery directly, but use the `insert()` model method.",
"Please read the docs.",
"I think I have found my answer from http://stackoverflow.com/questions/44834/can-someone-explain-all-in-python.\r\nMaybe I'm a little stupid here, now I'm clear. I see `__all__` is used in ... | 2017-03-30T13:22:31 | 2017-04-03T02:23:36 | 2017-03-31T00:16:37 | NONE | null | ```
Python 2.7.6 (default, Oct 26 2016, 20:30:19)
[GCC 4.8.4] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> from peewee import *
>>> InsertQuery()
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
NameError: name 'InsertQuery' is not defined
>>> fr... | {
"url": "https://api.github.com/repos/coleifer/peewee/issues/1232/reactions",
"total_count": 0,
"+1": 0,
"-1": 0,
"laugh": 0,
"hooray": 0,
"confused": 0,
"heart": 0,
"rocket": 0,
"eyes": 0
} | https://api.github.com/repos/coleifer/peewee/issues/1232/timeline | null | completed | null | null |
https://api.github.com/repos/coleifer/peewee/issues/1231 | https://api.github.com/repos/coleifer/peewee | https://api.github.com/repos/coleifer/peewee/issues/1231/labels{/name} | https://api.github.com/repos/coleifer/peewee/issues/1231/comments | https://api.github.com/repos/coleifer/peewee/issues/1231/events | https://github.com/coleifer/peewee/issues/1231 | 217,431,948 | MDU6SXNzdWUyMTc0MzE5NDg= | 1,231 | how to make peewee work with MysqlProxy | {
"login": "knightliao",
"id": 3657476,
"node_id": "MDQ6VXNlcjM2NTc0NzY=",
"avatar_url": "https://avatars.githubusercontent.com/u/3657476?v=4",
"gravatar_id": "",
"url": "https://api.github.com/users/knightliao",
"html_url": "https://github.com/knightliao",
"followers_url": "https://api.github.com/users... | [] | closed | false | null | [] | null | [
"my solution is:\r\n\r\n1. make mysql connection with autocommit = true\r\n \r\n `connect_kwargs.update({'autocommit': True})`\r\n\r\n2. no transaction sql without commit \r\n```\r\n\r\ndef execute_sql(self, sql, params=None, require_commit=True):\r\n logger.debug((sql, params))\r\n with self.... | 2017-03-28T02:42:21 | 2017-04-01T19:44:35 | 2017-04-01T19:44:35 | NONE | null | hello, peewee recommend 'read-slave module' ( http://docs.peewee-orm.com/en/latest/peewee/database.html?highlight=slave#read-slaves ) to do with master/slave mysql.
atlas(https://github.com/Qihoo360/Atlas) is a mysql proxy, user write less code when use it.
and my question is 'how peewee can do with mysql proxy?... | {
"url": "https://api.github.com/repos/coleifer/peewee/issues/1231/reactions",
"total_count": 0,
"+1": 0,
"-1": 0,
"laugh": 0,
"hooray": 0,
"confused": 0,
"heart": 0,
"rocket": 0,
"eyes": 0
} | https://api.github.com/repos/coleifer/peewee/issues/1231/timeline | null | completed | null | null |
https://api.github.com/repos/coleifer/peewee/issues/1230 | https://api.github.com/repos/coleifer/peewee | https://api.github.com/repos/coleifer/peewee/issues/1230/labels{/name} | https://api.github.com/repos/coleifer/peewee/issues/1230/comments | https://api.github.com/repos/coleifer/peewee/issues/1230/events | https://github.com/coleifer/peewee/issues/1230 | 217,232,553 | MDU6SXNzdWUyMTcyMzI1NTM= | 1,230 | Where clause cannot handle dict_values (dict view - python3) | {
"login": "dhiana",
"id": 34568,
"node_id": "MDQ6VXNlcjM0NTY4",
"avatar_url": "https://avatars.githubusercontent.com/u/34568?v=4",
"gravatar_id": "",
"url": "https://api.github.com/users/dhiana",
"html_url": "https://github.com/dhiana",
"followers_url": "https://api.github.com/users/dhiana/followers",
... | [] | closed | false | null | [] | null | [
"Convert it to a list explicitly:\r\n\r\n```python\r\n.where(SomeModel.field << list(some_dict.values()))\r\n```"
] | 2017-03-27T12:40:32 | 2017-03-27T16:33:52 | 2017-03-27T16:33:52 | NONE | null | When trying to use a where clause comparing a field to a dict_value, I get this error.
peewee.ProgrammingError: syntax error at or near "'dict_values([‘’foo’’, “bar’’])’”
LINE 1: …baz = ‘quz’)) AND ("t1”.”qux” IN 'dict_valu...
https://docs.python.org/3.0/library/stdtypes.html#dict.values
My code was working o... | {
"url": "https://api.github.com/repos/coleifer/peewee/issues/1230/reactions",
"total_count": 0,
"+1": 0,
"-1": 0,
"laugh": 0,
"hooray": 0,
"confused": 0,
"heart": 0,
"rocket": 0,
"eyes": 0
} | https://api.github.com/repos/coleifer/peewee/issues/1230/timeline | null | completed | null | null |
https://api.github.com/repos/coleifer/peewee/issues/1229 | https://api.github.com/repos/coleifer/peewee | https://api.github.com/repos/coleifer/peewee/issues/1229/labels{/name} | https://api.github.com/repos/coleifer/peewee/issues/1229/comments | https://api.github.com/repos/coleifer/peewee/issues/1229/events | https://github.com/coleifer/peewee/issues/1229 | 216,619,293 | MDU6SXNzdWUyMTY2MTkyOTM= | 1,229 | Model.drop_table disregards Database.drop_cascade | {
"login": "nad2000",
"id": 177266,
"node_id": "MDQ6VXNlcjE3NzI2Ng==",
"avatar_url": "https://avatars.githubusercontent.com/u/177266?v=4",
"gravatar_id": "",
"url": "https://api.github.com/users/nad2000",
"html_url": "https://github.com/nad2000",
"followers_url": "https://api.github.com/users/nad2000/fo... | [] | closed | false | null | [] | null | [] | 2017-03-24T01:26:04 | 2017-04-01T19:47:31 | 2017-04-01T19:47:31 | NONE | null | Attempting to drop a table in Sqlite DB with **cascade=True** fails even if `Database.drop_cascade=False` with:
> Traceback (most recent call last):
> File "<stdin>", line 1, in <module>
> File ".../peewee.py", line 5000, in drop_table
> cls._meta.database.drop_table(cls, fail_silently, cascade)
> File... | {
"url": "https://api.github.com/repos/coleifer/peewee/issues/1229/reactions",
"total_count": 0,
"+1": 0,
"-1": 0,
"laugh": 0,
"hooray": 0,
"confused": 0,
"heart": 0,
"rocket": 0,
"eyes": 0
} | https://api.github.com/repos/coleifer/peewee/issues/1229/timeline | null | completed | null | null |
https://api.github.com/repos/coleifer/peewee/issues/1228 | https://api.github.com/repos/coleifer/peewee | https://api.github.com/repos/coleifer/peewee/issues/1228/labels{/name} | https://api.github.com/repos/coleifer/peewee/issues/1228/comments | https://api.github.com/repos/coleifer/peewee/issues/1228/events | https://github.com/coleifer/peewee/issues/1228 | 216,239,504 | MDU6SXNzdWUyMTYyMzk1MDQ= | 1,228 | Default Snake Case Table Names | {
"login": "joshuamcginnis",
"id": 391074,
"node_id": "MDQ6VXNlcjM5MTA3NA==",
"avatar_url": "https://avatars.githubusercontent.com/u/391074?v=4",
"gravatar_id": "",
"url": "https://api.github.com/users/joshuamcginnis",
"html_url": "https://github.com/joshuamcginnis",
"followers_url": "https://api.github... | [] | closed | false | null | [] | null | [
"Sorry for the inconvenience, but you'll need to specify the `db_table` attribute.\r\n\r\nAlternatively, you can pass in a function using `db_table_func` that does the conversion the way you'd prefer. Something like:\r\n\r\n```python\r\ndef make_table_name(model_cls):\r\n name = model_cls.__name__\r\n # chang... | 2017-03-22T23:32:15 | 2017-03-23T20:30:06 | 2017-03-23T17:56:12 | NONE | null | I have several tables that have camelcased names (`FooType`, `FooScoreAttributes`, etc) and on table creation, the table names are: `footype` and `fooscoreattributes`.
Is there a way to have all table names snake cased like: `foo_type` without having to specify the `db_table` in each model? | {
"url": "https://api.github.com/repos/coleifer/peewee/issues/1228/reactions",
"total_count": 0,
"+1": 0,
"-1": 0,
"laugh": 0,
"hooray": 0,
"confused": 0,
"heart": 0,
"rocket": 0,
"eyes": 0
} | https://api.github.com/repos/coleifer/peewee/issues/1228/timeline | null | completed | null | null |
https://api.github.com/repos/coleifer/peewee/issues/1227 | https://api.github.com/repos/coleifer/peewee | https://api.github.com/repos/coleifer/peewee/issues/1227/labels{/name} | https://api.github.com/repos/coleifer/peewee/issues/1227/comments | https://api.github.com/repos/coleifer/peewee/issues/1227/events | https://github.com/coleifer/peewee/issues/1227 | 216,037,550 | MDU6SXNzdWUyMTYwMzc1NTA= | 1,227 | PostgreSQL - range types | {
"login": "Phibedy",
"id": 1841954,
"node_id": "MDQ6VXNlcjE4NDE5NTQ=",
"avatar_url": "https://avatars.githubusercontent.com/u/1841954?v=4",
"gravatar_id": "",
"url": "https://api.github.com/users/Phibedy",
"html_url": "https://github.com/Phibedy",
"followers_url": "https://api.github.com/users/Phibedy/... | [] | closed | false | null | [] | null | [
"I'm going to pass on implementing these right now, though I may revisit this feature in the future. If you're looking for ideas on implementation, I'd suggest checking out the other custom field types in `playhouse.postgres_ext`."
] | 2017-03-22T11:56:22 | 2017-04-07T23:48:15 | 2017-04-07T23:48:15 | NONE | null | Hi,
would like to use [range types](https://www.postgresql.org/docs/9.3/static/rangetypes.html) (in my case datetime with time zone), but I am not sure how to implement it for all types.
Any help appreciated :) | {
"url": "https://api.github.com/repos/coleifer/peewee/issues/1227/reactions",
"total_count": 0,
"+1": 0,
"-1": 0,
"laugh": 0,
"hooray": 0,
"confused": 0,
"heart": 0,
"rocket": 0,
"eyes": 0
} | https://api.github.com/repos/coleifer/peewee/issues/1227/timeline | null | completed | null | null |
https://api.github.com/repos/coleifer/peewee/issues/1226 | https://api.github.com/repos/coleifer/peewee | https://api.github.com/repos/coleifer/peewee/issues/1226/labels{/name} | https://api.github.com/repos/coleifer/peewee/issues/1226/comments | https://api.github.com/repos/coleifer/peewee/issues/1226/events | https://github.com/coleifer/peewee/pull/1226 | 215,957,360 | MDExOlB1bGxSZXF1ZXN0MTExOTM1Mjc2 | 1,226 | Explicitly document that `default` may be callable | {
"login": "avivey",
"id": 1530242,
"node_id": "MDQ6VXNlcjE1MzAyNDI=",
"avatar_url": "https://avatars.githubusercontent.com/u/1530242?v=4",
"gravatar_id": "",
"url": "https://api.github.com/users/avivey",
"html_url": "https://github.com/avivey",
"followers_url": "https://api.github.com/users/avivey/foll... | [] | closed | false | null | [] | null | [] | 2017-03-22T05:30:55 | 2017-03-23T14:40:03 | 2017-03-23T14:40:02 | CONTRIBUTOR | null | {
"url": "https://api.github.com/repos/coleifer/peewee/issues/1226/reactions",
"total_count": 0,
"+1": 0,
"-1": 0,
"laugh": 0,
"hooray": 0,
"confused": 0,
"heart": 0,
"rocket": 0,
"eyes": 0
} | https://api.github.com/repos/coleifer/peewee/issues/1226/timeline | null | null | false | {
"url": "https://api.github.com/repos/coleifer/peewee/pulls/1226",
"html_url": "https://github.com/coleifer/peewee/pull/1226",
"diff_url": "https://github.com/coleifer/peewee/pull/1226.diff",
"patch_url": "https://github.com/coleifer/peewee/pull/1226.patch",
"merged_at": "2017-03-23T14:40:02"
} | |
https://api.github.com/repos/coleifer/peewee/issues/1225 | https://api.github.com/repos/coleifer/peewee | https://api.github.com/repos/coleifer/peewee/issues/1225/labels{/name} | https://api.github.com/repos/coleifer/peewee/issues/1225/comments | https://api.github.com/repos/coleifer/peewee/issues/1225/events | https://github.com/coleifer/peewee/issues/1225 | 215,881,157 | MDU6SXNzdWUyMTU4ODExNTc= | 1,225 | Inconsistent behaviour from commit() in nested db.atomic() (PostgreSQL) | {
"login": "Syeberman",
"id": 4551516,
"node_id": "MDQ6VXNlcjQ1NTE1MTY=",
"avatar_url": "https://avatars.githubusercontent.com/u/4551516?v=4",
"gravatar_id": "",
"url": "https://api.github.com/users/Syeberman",
"html_url": "https://github.com/Syeberman",
"followers_url": "https://api.github.com/users/Sy... | [] | closed | false | null | [] | null | [
"Thanks, fixed."
] | 2017-03-21T21:18:09 | 2017-03-23T18:06:32 | 2017-03-23T18:06:26 | NONE | null | `db.atomic()` returns either a transaction or a savepoint, depending on the nesting level. Manually committing or rolling back a transaction starts a new transaction, but *not* for savepoints. In PostgreSQL, it is valid to [roll back](https://www.postgresql.org/docs/current/static/sql-rollback-to.html) a savepoint mu... | {
"url": "https://api.github.com/repos/coleifer/peewee/issues/1225/reactions",
"total_count": 0,
"+1": 0,
"-1": 0,
"laugh": 0,
"hooray": 0,
"confused": 0,
"heart": 0,
"rocket": 0,
"eyes": 0
} | https://api.github.com/repos/coleifer/peewee/issues/1225/timeline | null | completed | null | null |
https://api.github.com/repos/coleifer/peewee/issues/1224 | https://api.github.com/repos/coleifer/peewee | https://api.github.com/repos/coleifer/peewee/issues/1224/labels{/name} | https://api.github.com/repos/coleifer/peewee/issues/1224/comments | https://api.github.com/repos/coleifer/peewee/issues/1224/events | https://github.com/coleifer/peewee/issues/1224 | 215,167,581 | MDU6SXNzdWUyMTUxNjc1ODE= | 1,224 | pip3 install peewee error m wrong cython version | {
"login": "stanta",
"id": 6910492,
"node_id": "MDQ6VXNlcjY5MTA0OTI=",
"avatar_url": "https://avatars.githubusercontent.com/u/6910492?v=4",
"gravatar_id": "",
"url": "https://api.github.com/users/stanta",
"html_url": "https://github.com/stanta",
"followers_url": "https://api.github.com/users/stanta/foll... | [] | closed | false | null | [] | null | [
"That does indeed look like an invalid version number. Plus it's too old at any rate.",
"yeah, I downloaded cython sources from repo and go through \"python setup install\" - all became OK "
] | 2017-03-18T05:18:01 | 2017-03-19T05:39:53 | 2017-03-18T21:44:59 | NONE | null | Hi, when I install peewee from pip, have an issue: ValueError: invalid version number '0.20.1post0'
on vagrant/ Ubuntu Trusty 14.04.5 LTS, says:
**elif StrictVersion(cython_version) < StrictVersion(cython_min_version):**
look:
root@lists:~/.pip# sudo pip3 install peewee
Downloading/unpacking peewee
Dow... | {
"url": "https://api.github.com/repos/coleifer/peewee/issues/1224/reactions",
"total_count": 0,
"+1": 0,
"-1": 0,
"laugh": 0,
"hooray": 0,
"confused": 0,
"heart": 0,
"rocket": 0,
"eyes": 0
} | https://api.github.com/repos/coleifer/peewee/issues/1224/timeline | null | completed | null | null |
https://api.github.com/repos/coleifer/peewee/issues/1223 | https://api.github.com/repos/coleifer/peewee | https://api.github.com/repos/coleifer/peewee/issues/1223/labels{/name} | https://api.github.com/repos/coleifer/peewee/issues/1223/comments | https://api.github.com/repos/coleifer/peewee/issues/1223/events | https://github.com/coleifer/peewee/issues/1223 | 215,089,975 | MDU6SXNzdWUyMTUwODk5NzU= | 1,223 | Peewee writing to peewee.db not my.db | {
"login": "mtairu",
"id": 4996264,
"node_id": "MDQ6VXNlcjQ5OTYyNjQ=",
"avatar_url": "https://avatars.githubusercontent.com/u/4996264?v=4",
"gravatar_id": "",
"url": "https://api.github.com/users/mtairu",
"html_url": "https://github.com/mtairu",
"followers_url": "https://api.github.com/users/mtairu/foll... | [] | closed | false | null | [] | null | [
"Check that your model is specifying the database as a meta option:\r\n\r\n```python\r\nmy_db = SqliteDatabase('my.db')\r\n\r\nclass MyModel(Model):\r\n class Meta:\r\n database = my_db\r\n```",
"For what it's worth (I can't believe I'm even taking the time to type this), don't you imagine if something ... | 2017-03-17T18:43:28 | 2017-04-10T20:01:35 | 2017-03-17T19:41:20 | NONE | null | When I insert items to db, it writes to peewee.db not my.db | {
"url": "https://api.github.com/repos/coleifer/peewee/issues/1223/reactions",
"total_count": 0,
"+1": 0,
"-1": 0,
"laugh": 0,
"hooray": 0,
"confused": 0,
"heart": 0,
"rocket": 0,
"eyes": 0
} | https://api.github.com/repos/coleifer/peewee/issues/1223/timeline | null | completed | null | null |
https://api.github.com/repos/coleifer/peewee/issues/1222 | https://api.github.com/repos/coleifer/peewee | https://api.github.com/repos/coleifer/peewee/issues/1222/labels{/name} | https://api.github.com/repos/coleifer/peewee/issues/1222/comments | https://api.github.com/repos/coleifer/peewee/issues/1222/events | https://github.com/coleifer/peewee/issues/1222 | 214,267,662 | MDU6SXNzdWUyMTQyNjc2NjI= | 1,222 | not support multiple union query ! | {
"login": "b0123456789",
"id": 21169660,
"node_id": "MDQ6VXNlcjIxMTY5NjYw",
"avatar_url": "https://avatars.githubusercontent.com/u/21169660?v=4",
"gravatar_id": "",
"url": "https://api.github.com/users/b0123456789",
"html_url": "https://github.com/b0123456789",
"followers_url": "https://api.github.com/... | [] | closed | false | null | [] | null | [
"Can you please provide a small example so I can reproduce the issue? Can you be more clear where the obvious errors / issues are?",
"OK, so I guess in the second query you are wanting `AccountBilibili` to be aliased to `t1` instead of `t3`? In the third query (`c`) the same issue? Would that even work, though?"... | 2017-03-15T02:54:42 | 2017-03-22T01:30:14 | 2017-03-18T21:53:27 | NONE | null | <pre>
a = AccountBilibili.select(AccountBilibili.am_id.alias('id'), AccountBilibili.am_name.alias('name'), SQL("(select 'bilibili')").alias('type'))
b = AccountMeipai. select(AccountMeipai.am_id.alias('id'), AccountBilibili.am_name.alias('name'), SQL("(select 'meipai')").alias('type'))
c = AccountMiaopai.... | {
"url": "https://api.github.com/repos/coleifer/peewee/issues/1222/reactions",
"total_count": 0,
"+1": 0,
"-1": 0,
"laugh": 0,
"hooray": 0,
"confused": 0,
"heart": 0,
"rocket": 0,
"eyes": 0
} | https://api.github.com/repos/coleifer/peewee/issues/1222/timeline | null | completed | null | null |
https://api.github.com/repos/coleifer/peewee/issues/1221 | https://api.github.com/repos/coleifer/peewee | https://api.github.com/repos/coleifer/peewee/issues/1221/labels{/name} | https://api.github.com/repos/coleifer/peewee/issues/1221/comments | https://api.github.com/repos/coleifer/peewee/issues/1221/events | https://github.com/coleifer/peewee/issues/1221 | 213,961,400 | MDU6SXNzdWUyMTM5NjE0MDA= | 1,221 | Regular Expressions for SQLite always case-insensitive | {
"login": "phryk",
"id": 1021513,
"node_id": "MDQ6VXNlcjEwMjE1MTM=",
"avatar_url": "https://avatars.githubusercontent.com/u/1021513?v=4",
"gravatar_id": "",
"url": "https://api.github.com/users/phryk",
"html_url": "https://github.com/phryk",
"followers_url": "https://api.github.com/users/phryk/follower... | [] | closed | false | null | [] | null | [
"This is a backwards-incompatible change, as you noted, but I think a sensible one. In the meantime, why not just register your own regexp function?\r\n\r\n```python\r\ndb = SqliteExtDatabase(...)\r\n\r\n@db.func('regex')\r\ndef regex(rgx, s):\r\n return re.search(rgx, s) is not None\r\n```",
"9be3341940616b78... | 2017-03-14T03:49:43 | 2017-03-19T01:16:42 | 2017-03-16T03:27:06 | NONE | null | https://github.com/coleifer/peewee/blob/master/peewee.py#L306
You're statically passing the `IGNORECASE` (`re.I`) flag for regexps in SQLite.
This makes it impossible to match only lower-case letters, which is kind of a
big deal for `CHECK` constraints using regular expressions.
I'd like to ask for this flag to... | {
"url": "https://api.github.com/repos/coleifer/peewee/issues/1221/reactions",
"total_count": 0,
"+1": 0,
"-1": 0,
"laugh": 0,
"hooray": 0,
"confused": 0,
"heart": 0,
"rocket": 0,
"eyes": 0
} | https://api.github.com/repos/coleifer/peewee/issues/1221/timeline | null | completed | null | null |
https://api.github.com/repos/coleifer/peewee/issues/1220 | https://api.github.com/repos/coleifer/peewee | https://api.github.com/repos/coleifer/peewee/issues/1220/labels{/name} | https://api.github.com/repos/coleifer/peewee/issues/1220/comments | https://api.github.com/repos/coleifer/peewee/issues/1220/events | https://github.com/coleifer/peewee/pull/1220 | 213,592,737 | MDExOlB1bGxSZXF1ZXN0MTEwMjkxOTcz | 1,220 | Use `get_primary_key_fields()` instead of `primary_key`, because the former knows how to handle composite keys | {
"login": "Necoro",
"id": 68708,
"node_id": "MDQ6VXNlcjY4NzA4",
"avatar_url": "https://avatars.githubusercontent.com/u/68708?v=4",
"gravatar_id": "",
"url": "https://api.github.com/users/Necoro",
"html_url": "https://github.com/Necoro",
"followers_url": "https://api.github.com/users/Necoro/followers",
... | [] | closed | false | null | [] | null | [
"Nice, thanks!",
"I also merged another fix that should also take care of any other instances of the issue."
] | 2017-03-12T09:14:08 | 2017-03-12T14:57:06 | 2017-03-12T14:56:38 | CONTRIBUTOR | null | There is already a method `get_primary_key_fields()` which does just what is expected: return the list of all primary key fields, also handling CompositeKeys just right.
There are probably some more instances throughout the code, where using that method instead of `primary_key` would be advisable.
This should fix... | {
"url": "https://api.github.com/repos/coleifer/peewee/issues/1220/reactions",
"total_count": 0,
"+1": 0,
"-1": 0,
"laugh": 0,
"hooray": 0,
"confused": 0,
"heart": 0,
"rocket": 0,
"eyes": 0
} | https://api.github.com/repos/coleifer/peewee/issues/1220/timeline | null | null | false | {
"url": "https://api.github.com/repos/coleifer/peewee/pulls/1220",
"html_url": "https://github.com/coleifer/peewee/pull/1220",
"diff_url": "https://github.com/coleifer/peewee/pull/1220.diff",
"patch_url": "https://github.com/coleifer/peewee/pull/1220.patch",
"merged_at": "2017-03-12T14:56:38"
} |
https://api.github.com/repos/coleifer/peewee/issues/1219 | https://api.github.com/repos/coleifer/peewee | https://api.github.com/repos/coleifer/peewee/issues/1219/labels{/name} | https://api.github.com/repos/coleifer/peewee/issues/1219/comments | https://api.github.com/repos/coleifer/peewee/issues/1219/events | https://github.com/coleifer/peewee/issues/1219 | 213,591,075 | MDU6SXNzdWUyMTM1OTEwNzU= | 1,219 | CompositeKey in subquery not resolved | {
"login": "Necoro",
"id": 68708,
"node_id": "MDQ6VXNlcjY4NzA4",
"avatar_url": "https://avatars.githubusercontent.com/u/68708?v=4",
"gravatar_id": "",
"url": "https://api.github.com/users/Necoro",
"html_url": "https://github.com/Necoro",
"followers_url": "https://api.github.com/users/Necoro/followers",
... | [] | closed | false | null | [] | null | [] | 2017-03-12T08:36:14 | 2017-03-12T14:55:21 | 2017-03-12T14:55:21 | CONTRIBUTOR | null | Given the following simple model with a composite PK:
```python
class DocumentTag(BaseModel):
document = ForeignKeyField(Document, related_name = 'tags')
tag = ForeignKeyField(Tag)
class Meta:
primary_key = CompositeKey('document', 'tag')
```
`DocumentTag.select()` works as expected, yi... | {
"url": "https://api.github.com/repos/coleifer/peewee/issues/1219/reactions",
"total_count": 0,
"+1": 0,
"-1": 0,
"laugh": 0,
"hooray": 0,
"confused": 0,
"heart": 0,
"rocket": 0,
"eyes": 0
} | https://api.github.com/repos/coleifer/peewee/issues/1219/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.