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/1518 | https://api.github.com/repos/coleifer/peewee | https://api.github.com/repos/coleifer/peewee/issues/1518/labels{/name} | https://api.github.com/repos/coleifer/peewee/issues/1518/comments | https://api.github.com/repos/coleifer/peewee/issues/1518/events | https://github.com/coleifer/peewee/issues/1518 | 300,175,206 | MDU6SXNzdWUzMDAxNzUyMDY= | 1,518 | Alias does not preserve schema | {
"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 | [
"Maybe related `netAlias.select().get()` fails too with the same error, although `netAlias.get()` works.",
"Fixed in d7f0350, thanks so much for reporting."
] | 2018-02-26T10:03:17 | 2018-02-26T16:19:54 | 2018-02-26T16:19:39 | NONE | null | Using peewee 3.1.0. I'm trying to use an alias in a self-join to create a common table expression. However, I get an error that the aliased table name does not exists. I think this is because alias does not preserve the schema. Minimal example:
``` Python
netAlias = Network.alias('net')
cte = Network.select(Netw... | {
"url": "https://api.github.com/repos/coleifer/peewee/issues/1518/reactions",
"total_count": 0,
"+1": 0,
"-1": 0,
"laugh": 0,
"hooray": 0,
"confused": 0,
"heart": 0,
"rocket": 0,
"eyes": 0
} | https://api.github.com/repos/coleifer/peewee/issues/1518/timeline | null | completed | null | null |
https://api.github.com/repos/coleifer/peewee/issues/1517 | https://api.github.com/repos/coleifer/peewee | https://api.github.com/repos/coleifer/peewee/issues/1517/labels{/name} | https://api.github.com/repos/coleifer/peewee/issues/1517/comments | https://api.github.com/repos/coleifer/peewee/issues/1517/events | https://github.com/coleifer/peewee/issues/1517 | 300,122,871 | MDU6SXNzdWUzMDAxMjI4NzE= | 1,517 | why does rawquery not support iterator | {
"login": "m358807551",
"id": 14256423,
"node_id": "MDQ6VXNlcjE0MjU2NDIz",
"avatar_url": "https://avatars.githubusercontent.com/u/14256423?v=4",
"gravatar_id": "",
"url": "https://api.github.com/users/m358807551",
"html_url": "https://github.com/m358807551",
"followers_url": "https://api.github.com/use... | [] | closed | false | null | [] | null | [
"Is there a very compelling reason for using `raw()` in your case? The above could simply be written as `Article.select()`.\r\n\r\nRaw queries *do* support iterator in 3.x:\r\n\r\n```python\r\n\r\nquery = Article.raw('select * from article')\r\nfor article in query.iterator():\r\n # do something with article.\r\... | 2018-02-26T06:25:22 | 2018-02-27T03:20:37 | 2018-02-26T16:04:39 | NONE | null | I want to execute some codes like:
`Article.raw("select * from article").iterator()`.
However, I got:
`{AttributeError}'RawQuery' object has no attribute 'iterator'` | {
"url": "https://api.github.com/repos/coleifer/peewee/issues/1517/reactions",
"total_count": 0,
"+1": 0,
"-1": 0,
"laugh": 0,
"hooray": 0,
"confused": 0,
"heart": 0,
"rocket": 0,
"eyes": 0
} | https://api.github.com/repos/coleifer/peewee/issues/1517/timeline | null | completed | null | null |
https://api.github.com/repos/coleifer/peewee/issues/1516 | https://api.github.com/repos/coleifer/peewee | https://api.github.com/repos/coleifer/peewee/issues/1516/labels{/name} | https://api.github.com/repos/coleifer/peewee/issues/1516/comments | https://api.github.com/repos/coleifer/peewee/issues/1516/events | https://github.com/coleifer/peewee/issues/1516 | 300,074,860 | MDU6SXNzdWUzMDAwNzQ4NjA= | 1,516 | Peewee+PSQL: create_tables for complex object relationships broken when DeferredRelations in play | {
"login": "josefdlange",
"id": 1062835,
"node_id": "MDQ6VXNlcjEwNjI4MzU=",
"avatar_url": "https://avatars.githubusercontent.com/u/1062835?v=4",
"gravatar_id": "",
"url": "https://api.github.com/users/josefdlange",
"html_url": "https://github.com/josefdlange",
"followers_url": "https://api.github.com/us... | [] | closed | false | null | [] | null | [
"I'm not sure about the answer to 1, but I'm pretty sure that before the only approach that worked was to substitute the circular instance of the `ForeignKeyField` with an `IntegerField` (or whatever), e.g.:\r\n\r\n```python\r\n\r\nclass User(Model):\r\n favorite_tweet_id = IntegerField()\r\n\r\nclass Tweet(Mode... | 2018-02-25T23:58:34 | 2018-02-27T17:57:25 | 2018-02-27T17:56:09 | CONTRIBUTOR | null | As in the docs, circular FK dependencies are a code smell, and I agree, but here we are. I've got a big object domain with some of these objects having circular foreign keys.
In `peewee` versions in the 2.8 line, `create_tables` seemed to be able to resolve any `DeferredRelation`s used for circular FK relationships ... | {
"url": "https://api.github.com/repos/coleifer/peewee/issues/1516/reactions",
"total_count": 0,
"+1": 0,
"-1": 0,
"laugh": 0,
"hooray": 0,
"confused": 0,
"heart": 0,
"rocket": 0,
"eyes": 0
} | https://api.github.com/repos/coleifer/peewee/issues/1516/timeline | null | completed | null | null |
https://api.github.com/repos/coleifer/peewee/issues/1515 | https://api.github.com/repos/coleifer/peewee | https://api.github.com/repos/coleifer/peewee/issues/1515/labels{/name} | https://api.github.com/repos/coleifer/peewee/issues/1515/comments | https://api.github.com/repos/coleifer/peewee/issues/1515/events | https://github.com/coleifer/peewee/issues/1515 | 300,039,510 | MDU6SXNzdWUzMDAwMzk1MTA= | 1,515 | Add `column_exists` method to `Database` class | {
"login": "stanislavkozlovski",
"id": 13639618,
"node_id": "MDQ6VXNlcjEzNjM5NjE4",
"avatar_url": "https://avatars.githubusercontent.com/u/13639618?v=4",
"gravatar_id": "",
"url": "https://api.github.com/users/stanislavkozlovski",
"html_url": "https://github.com/stanislavkozlovski",
"followers_url": "ht... | [] | closed | false | null | [] | null | [
"I don't plan on adding that API, you can very easily use the `get_columns()`, as you've indicated, to achieve equivalent results."
] | 2018-02-25T16:28:23 | 2018-02-26T15:01:54 | 2018-02-26T15:01:54 | NONE | null | Currently, when running migrations, I'd like to check if a column exists. My current solution is the following:
```python3
column_name = 'name'
table_name = 'users'
if any(column_data.name == column_name for column_data in db.get_columns(table_name)):
pass
```
This also produces the following query (PostgreSQL... | {
"url": "https://api.github.com/repos/coleifer/peewee/issues/1515/reactions",
"total_count": 0,
"+1": 0,
"-1": 0,
"laugh": 0,
"hooray": 0,
"confused": 0,
"heart": 0,
"rocket": 0,
"eyes": 0
} | https://api.github.com/repos/coleifer/peewee/issues/1515/timeline | null | completed | null | null |
https://api.github.com/repos/coleifer/peewee/issues/1514 | https://api.github.com/repos/coleifer/peewee | https://api.github.com/repos/coleifer/peewee/issues/1514/labels{/name} | https://api.github.com/repos/coleifer/peewee/issues/1514/comments | https://api.github.com/repos/coleifer/peewee/issues/1514/events | https://github.com/coleifer/peewee/issues/1514 | 299,984,978 | MDU6SXNzdWUyOTk5ODQ5Nzg= | 1,514 | Default order in 3.x | {
"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 | [
"The feature was dropped due to it's perceived smelliness... If you want to achieve something similar in 3.x, you can always:\r\n\r\n```python\r\nclass User(Model):\r\n username = TextField()\r\n\r\n @classmethod\r\n def ordered(cls, *args):\r\n return cls.select(*args).order_by(cls.username)\r\n\r\... | 2018-02-25T00:23:26 | 2019-08-09T16:39:23 | 2018-02-26T16:24:49 | NONE | null | The "Changes in 3.0" documentation page states that `_meta.order_by` has been removed,
but it doesn't state anything on how to set a default ordering in 3.x and I haven't found anything on this in the code either.
Is there now a better way of doing this or was this feature just dropped without a substitute?
If t... | {
"url": "https://api.github.com/repos/coleifer/peewee/issues/1514/reactions",
"total_count": 0,
"+1": 0,
"-1": 0,
"laugh": 0,
"hooray": 0,
"confused": 0,
"heart": 0,
"rocket": 0,
"eyes": 0
} | https://api.github.com/repos/coleifer/peewee/issues/1514/timeline | null | completed | null | null |
https://api.github.com/repos/coleifer/peewee/issues/1513 | https://api.github.com/repos/coleifer/peewee | https://api.github.com/repos/coleifer/peewee/issues/1513/labels{/name} | https://api.github.com/repos/coleifer/peewee/issues/1513/comments | https://api.github.com/repos/coleifer/peewee/issues/1513/events | https://github.com/coleifer/peewee/issues/1513 | 299,949,956 | MDU6SXNzdWUyOTk5NDk5NTY= | 1,513 | pip install peewee fails on Windows | {
"login": "Mastergalen",
"id": 1261152,
"node_id": "MDQ6VXNlcjEyNjExNTI=",
"avatar_url": "https://avatars.githubusercontent.com/u/1261152?v=4",
"gravatar_id": "",
"url": "https://api.github.com/users/Mastergalen",
"html_url": "https://github.com/Mastergalen",
"followers_url": "https://api.github.com/us... | [] | closed | false | null | [] | null | [
"+1 This error is often due to dependency of GCC, however for me it still fails on WSL (GCC installed via `sudo apt-get install build-essentials`)",
"I don't understand that traceback. What file is missing? Is this a recent regression or common to all 3.x?",
"Do you have a C compiler and Cython installed? Have ... | 2018-02-24T15:45:31 | 2018-07-15T09:28:20 | 2018-02-27T00:22:28 | NONE | null | `pip install peewee` in an administrator PowerShell fails due to `error: [WinError 2] The system cannot find the file specified`
* OS: Windows 10
* Python: 3.6.4 Anaconda 64 bit
* Cython v0.27.3
The same error occurs when installing via git:
```
git clone https://github.com/coleifer/peewee.git
cd peewee
p... | {
"url": "https://api.github.com/repos/coleifer/peewee/issues/1513/reactions",
"total_count": 0,
"+1": 0,
"-1": 0,
"laugh": 0,
"hooray": 0,
"confused": 0,
"heart": 0,
"rocket": 0,
"eyes": 0
} | https://api.github.com/repos/coleifer/peewee/issues/1513/timeline | null | completed | null | null |
https://api.github.com/repos/coleifer/peewee/issues/1512 | https://api.github.com/repos/coleifer/peewee | https://api.github.com/repos/coleifer/peewee/issues/1512/labels{/name} | https://api.github.com/repos/coleifer/peewee/issues/1512/comments | https://api.github.com/repos/coleifer/peewee/issues/1512/events | https://github.com/coleifer/peewee/issues/1512 | 299,445,102 | MDU6SXNzdWUyOTk0NDUxMDI= | 1,512 | Postgres on_conflict quirks | {
"login": "rammie",
"id": 554792,
"node_id": "MDQ6VXNlcjU1NDc5Mg==",
"avatar_url": "https://avatars.githubusercontent.com/u/554792?v=4",
"gravatar_id": "",
"url": "https://api.github.com/users/rammie",
"html_url": "https://github.com/rammie",
"followers_url": "https://api.github.com/users/rammie/follow... | [] | closed | false | null | [] | null | [
"Thanks for reporting. Fucking stupid-ass postgres with it's janky raggedy-ass overly-complicated upsert and rules for using aliases in insert queries...grumble grumble.\r\n\r\nWorking on a fix.",
"Thanks again for the very helpful report -- added tests and have it working: e642ab9e35603a565d89240b62e0e93c532e569... | 2018-02-22T17:41:16 | 2018-11-19T04:12:15 | 2018-02-22T20:06:03 | NONE | null | First off, many thanks for supporting upsert functionality in peewee 3.0! I'm using postgres as the db engine and ran into a quirk:
```python
class Model(Model):
a = CharField(index=True)
c = IntegerField(default=0)
cls = Model
# Does not work
# Produces error:
# ProgrammingError: column reference... | {
"url": "https://api.github.com/repos/coleifer/peewee/issues/1512/reactions",
"total_count": 0,
"+1": 0,
"-1": 0,
"laugh": 0,
"hooray": 0,
"confused": 0,
"heart": 0,
"rocket": 0,
"eyes": 0
} | https://api.github.com/repos/coleifer/peewee/issues/1512/timeline | null | completed | null | null |
https://api.github.com/repos/coleifer/peewee/issues/1511 | https://api.github.com/repos/coleifer/peewee | https://api.github.com/repos/coleifer/peewee/issues/1511/labels{/name} | https://api.github.com/repos/coleifer/peewee/issues/1511/comments | https://api.github.com/repos/coleifer/peewee/issues/1511/events | https://github.com/coleifer/peewee/issues/1511 | 299,401,156 | MDU6SXNzdWUyOTk0MDExNTY= | 1,511 | Undefined symbol ReverseRelationDescriptor in peewee.py | {
"login": "rammie",
"id": 554792,
"node_id": "MDQ6VXNlcjU1NDc5Mg==",
"avatar_url": "https://avatars.githubusercontent.com/u/554792?v=4",
"gravatar_id": "",
"url": "https://api.github.com/users/rammie",
"html_url": "https://github.com/rammie",
"followers_url": "https://api.github.com/users/rammie/follow... | [] | closed | false | null | [] | null | [
"Thanks for reporting, I must've missed this during the rewrite. Fixed in master now.",
"Looks like there are still issues with the `filter()` API...looking into it."
] | 2018-02-22T15:40:33 | 2018-02-22T16:20:27 | 2018-02-22T16:20:27 | NONE | null | The symbol `ReverseRelationDescriptor` does not seem to appear anywhere in peewee.py except here:
https://github.com/coleifer/peewee/blob/94aee08a1fee79622148cb1fcd3d2af81a834e04/peewee.py#L5724
Just thought I'd point it out as it seems to have been left behind in error (or I'm missing something). | {
"url": "https://api.github.com/repos/coleifer/peewee/issues/1511/reactions",
"total_count": 0,
"+1": 0,
"-1": 0,
"laugh": 0,
"hooray": 0,
"confused": 0,
"heart": 0,
"rocket": 0,
"eyes": 0
} | https://api.github.com/repos/coleifer/peewee/issues/1511/timeline | null | completed | null | null |
https://api.github.com/repos/coleifer/peewee/issues/1510 | https://api.github.com/repos/coleifer/peewee | https://api.github.com/repos/coleifer/peewee/issues/1510/labels{/name} | https://api.github.com/repos/coleifer/peewee/issues/1510/comments | https://api.github.com/repos/coleifer/peewee/issues/1510/events | https://github.com/coleifer/peewee/issues/1510 | 299,399,677 | MDU6SXNzdWUyOTkzOTk2Nzc= | 1,510 | Error if user closes database inside transaction. | {
"login": "vikt0rs",
"id": 5230490,
"node_id": "MDQ6VXNlcjUyMzA0OTA=",
"avatar_url": "https://avatars.githubusercontent.com/u/5230490?v=4",
"gravatar_id": "",
"url": "https://api.github.com/users/vikt0rs",
"html_url": "https://github.com/vikt0rs",
"followers_url": "https://api.github.com/users/vikt0rs/... | [] | closed | false | null | [] | null | [
"Out of curiosity, why are you closing the database inside a transaction? That seems incorrect.\r\n\r\nFYI: you ought to change that `db_column=\"document_uuid\"` to `column_name=\"document_uuid\"`.",
"> Out of curiosity, why are you closing the database inside a transaction? That seems incorrect.\r\n\r\nWell, th... | 2018-02-22T15:36:51 | 2021-09-23T18:35:26 | 2018-02-22T19:15:41 | NONE | null | If a user tries to close database inside a transaction it gets an `IndexError: pop from empty list` in 3X version, not in 2X Please, check console output below and suggest if I do something wrong. Thanks!
```
(postman) macmini987:docs-api vserhei$ pip freeze | grep peewee
peewee==2.10.2
peewee-async==0.5.10
(... | {
"url": "https://api.github.com/repos/coleifer/peewee/issues/1510/reactions",
"total_count": 0,
"+1": 0,
"-1": 0,
"laugh": 0,
"hooray": 0,
"confused": 0,
"heart": 0,
"rocket": 0,
"eyes": 0
} | https://api.github.com/repos/coleifer/peewee/issues/1510/timeline | null | completed | null | null |
https://api.github.com/repos/coleifer/peewee/issues/1509 | https://api.github.com/repos/coleifer/peewee | https://api.github.com/repos/coleifer/peewee/issues/1509/labels{/name} | https://api.github.com/repos/coleifer/peewee/issues/1509/comments | https://api.github.com/repos/coleifer/peewee/issues/1509/events | https://github.com/coleifer/peewee/issues/1509 | 299,300,867 | MDU6SXNzdWUyOTkzMDA4Njc= | 1,509 | Using 'limit' with 'count' throws ProgrammingError | {
"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 | [
"The resulting query looks like this, which doesn't quite make sense:\r\n\r\n```sql\r\nSELECT COUNT(1) FROM (\r\n SELECT \"t1\".\"id\" FROM \"whatever\" AS \"t1\"\r\n INTERSECT \r\n SELECT \"t2\".\"id\" FROM \"whatever\" AS \"t2\"\r\n) LIMIT 3 AS \"_wrapped\"\r\n```\r\n\r\nWhy are you applying a LIMIT and also... | 2018-02-22T10:35:17 | 2018-02-22T15:53:10 | 2018-02-22T15:53:02 | NONE | null | I have a long SQL query that throws a `ProgrammingError`. I've isolated it to the following query:
``` Python
(Network.select() & Network.select()).limit(10).count()
```
Throws:
``` Python
---------------------------------------------------------------------------
ProgrammingError Trac... | {
"url": "https://api.github.com/repos/coleifer/peewee/issues/1509/reactions",
"total_count": 0,
"+1": 0,
"-1": 0,
"laugh": 0,
"hooray": 0,
"confused": 0,
"heart": 0,
"rocket": 0,
"eyes": 0
} | https://api.github.com/repos/coleifer/peewee/issues/1509/timeline | null | completed | null | null |
https://api.github.com/repos/coleifer/peewee/issues/1508 | https://api.github.com/repos/coleifer/peewee | https://api.github.com/repos/coleifer/peewee/issues/1508/labels{/name} | https://api.github.com/repos/coleifer/peewee/issues/1508/comments | https://api.github.com/repos/coleifer/peewee/issues/1508/events | https://github.com/coleifer/peewee/issues/1508 | 299,278,355 | MDU6SXNzdWUyOTkyNzgzNTU= | 1,508 | Field class no more supports add_to_class(class, name) method | {
"login": "skyhound",
"id": 3735102,
"node_id": "MDQ6VXNlcjM3MzUxMDI=",
"avatar_url": "https://avatars.githubusercontent.com/u/3735102?v=4",
"gravatar_id": "",
"url": "https://api.github.com/users/skyhound",
"html_url": "https://github.com/skyhound",
"followers_url": "https://api.github.com/users/skyho... | [] | closed | false | null | [] | null | [
"You can use `Model._meta.add_field(field_name, field)`.",
"> You can use `Model._meta.add_field(field_name, field)`.\r\n\r\nNot able to add field in database using this. How can I do it??",
"> Not able to add field in database using this. How can I do it??\r\n\r\nProbably you need to use a schema migration? ht... | 2018-02-22T09:30:20 | 2019-04-24T11:45:25 | 2018-02-22T15:38:58 | NONE | null | In peewee 2.x it was possible to dynamically define fileds in model using this method, like it's described here:
https://stackoverflow.com/questions/22358489/dynamically-define-fields-in-a-peewee-model
However, in 3.x this method doesn't work. Is there some alternative? | {
"url": "https://api.github.com/repos/coleifer/peewee/issues/1508/reactions",
"total_count": 0,
"+1": 0,
"-1": 0,
"laugh": 0,
"hooray": 0,
"confused": 0,
"heart": 0,
"rocket": 0,
"eyes": 0
} | https://api.github.com/repos/coleifer/peewee/issues/1508/timeline | null | completed | null | null |
https://api.github.com/repos/coleifer/peewee/issues/1507 | https://api.github.com/repos/coleifer/peewee | https://api.github.com/repos/coleifer/peewee/issues/1507/labels{/name} | https://api.github.com/repos/coleifer/peewee/issues/1507/comments | https://api.github.com/repos/coleifer/peewee/issues/1507/events | https://github.com/coleifer/peewee/issues/1507 | 299,070,024 | MDU6SXNzdWUyOTkwNzAwMjQ= | 1,507 | Documentation issues for 3.0 | {
"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 | [
"The APIs you're referring to were not ever public APIs, hence the changes to them are not documented. I'll update the \"Hacks\" page to correct the reference to `Clause` (which is now `NodeList`).\r\n\r\n`Model.prepared` has been removed -- depends on what you're trying to do. You can always override the `__init__... | 2018-02-21T18:01:07 | 2018-02-21T18:13:14 | 2018-02-21T18:04:22 | NONE | null | I'm currently porting my project over from peewee 2 to 3 and stumbled upon a few things already.
A few renames not listed on the "Changes in 3.0" page that affected me:
* `Field.add_to_class` has apparently been reworked to `Field.bind`?
* `Model._[get|set]_pk_value` has been replaced with the dynamic `Model._pk` ... | {
"url": "https://api.github.com/repos/coleifer/peewee/issues/1507/reactions",
"total_count": 0,
"+1": 0,
"-1": 0,
"laugh": 0,
"hooray": 0,
"confused": 0,
"heart": 0,
"rocket": 0,
"eyes": 0
} | https://api.github.com/repos/coleifer/peewee/issues/1507/timeline | null | completed | null | null |
https://api.github.com/repos/coleifer/peewee/issues/1506 | https://api.github.com/repos/coleifer/peewee | https://api.github.com/repos/coleifer/peewee/issues/1506/labels{/name} | https://api.github.com/repos/coleifer/peewee/issues/1506/comments | https://api.github.com/repos/coleifer/peewee/issues/1506/events | https://github.com/coleifer/peewee/pull/1506 | 299,014,068 | MDExOlB1bGxSZXF1ZXN0MTcwNTAyNjgx | 1,506 | Model.table_exists() now checks whether table exists in its schema | {
"login": "skyhound",
"id": 3735102,
"node_id": "MDQ6VXNlcjM3MzUxMDI=",
"avatar_url": "https://avatars.githubusercontent.com/u/3735102?v=4",
"gravatar_id": "",
"url": "https://api.github.com/users/skyhound",
"html_url": "https://github.com/skyhound",
"followers_url": "https://api.github.com/users/skyho... | [] | closed | false | null | [] | null | [
"Thank you!",
"You're welcome. Great ORM, btw."
] | 2018-02-21T15:28:14 | 2018-02-21T16:09:24 | 2018-02-21T15:55:56 | NONE | null | Model.table_exists() with safe=True was checking whether table exists in default schema('public') instead of Model schema. | {
"url": "https://api.github.com/repos/coleifer/peewee/issues/1506/reactions",
"total_count": 0,
"+1": 0,
"-1": 0,
"laugh": 0,
"hooray": 0,
"confused": 0,
"heart": 0,
"rocket": 0,
"eyes": 0
} | https://api.github.com/repos/coleifer/peewee/issues/1506/timeline | null | null | false | {
"url": "https://api.github.com/repos/coleifer/peewee/pulls/1506",
"html_url": "https://github.com/coleifer/peewee/pull/1506",
"diff_url": "https://github.com/coleifer/peewee/pull/1506.diff",
"patch_url": "https://github.com/coleifer/peewee/pull/1506.patch",
"merged_at": "2018-02-21T15:55:56"
} |
https://api.github.com/repos/coleifer/peewee/issues/1505 | https://api.github.com/repos/coleifer/peewee | https://api.github.com/repos/coleifer/peewee/issues/1505/labels{/name} | https://api.github.com/repos/coleifer/peewee/issues/1505/comments | https://api.github.com/repos/coleifer/peewee/issues/1505/events | https://github.com/coleifer/peewee/issues/1505 | 298,686,425 | MDU6SXNzdWUyOTg2ODY0MjU= | 1,505 | Create DB Transaction manually (without a context manager) | {
"login": "stanislavkozlovski",
"id": 13639618,
"node_id": "MDQ6VXNlcjEzNjM5NjE4",
"avatar_url": "https://avatars.githubusercontent.com/u/13639618?v=4",
"gravatar_id": "",
"url": "https://api.github.com/users/stanislavkozlovski",
"html_url": "https://github.com/stanislavkozlovski",
"followers_url": "ht... | [] | closed | false | null | [] | null | [
"Peewee provides such nice facilities for transaction management (and rollback) ... It's a shame you're not using them.\r\n\r\nIf you want to open a \"manual\" block without using the context manager, just:\r\n\r\n```python\r\nmanual = db.manual_commit()\r\nmanual.__enter__()\r\n```\r\n\r\nTo close:\r\n\r\n```pytho... | 2018-02-20T17:44:02 | 2018-02-21T15:56:54 | 2018-02-20T17:52:29 | NONE | null | Hey-o. I've been trying to wrap all my pytest unit tests in a transaction and then roll them back but have failed in doing so.
The guide I've been trying to follow has been this one: http://techblog.thescore.com/2015/06/25/database-transactions-with-pytest/
The problem here is that I write my transaction creating... | {
"url": "https://api.github.com/repos/coleifer/peewee/issues/1505/reactions",
"total_count": 0,
"+1": 0,
"-1": 0,
"laugh": 0,
"hooray": 0,
"confused": 0,
"heart": 0,
"rocket": 0,
"eyes": 0
} | https://api.github.com/repos/coleifer/peewee/issues/1505/timeline | null | completed | null | null |
https://api.github.com/repos/coleifer/peewee/issues/1504 | https://api.github.com/repos/coleifer/peewee | https://api.github.com/repos/coleifer/peewee/issues/1504/labels{/name} | https://api.github.com/repos/coleifer/peewee/issues/1504/comments | https://api.github.com/repos/coleifer/peewee/issues/1504/events | https://github.com/coleifer/peewee/issues/1504 | 298,673,655 | MDU6SXNzdWUyOTg2NzM2NTU= | 1,504 | Postgres HStore column type "can't adapt type 'dict'" in peewee 3.0.18 | {
"login": "dtpxl",
"id": 600983,
"node_id": "MDQ6VXNlcjYwMDk4Mw==",
"avatar_url": "https://avatars.githubusercontent.com/u/600983?v=4",
"gravatar_id": "",
"url": "https://api.github.com/users/dtpxl",
"html_url": "https://github.com/dtpxl",
"followers_url": "https://api.github.com/users/dtpxl/followers"... | [] | closed | false | null | [] | null | [
"You need to pass `register_hstore=True` when instantiating your `PostgresqlExtDatabase`.\r\n\r\nhttp://docs.peewee-orm.com/en/latest/peewee/playhouse.html#postgres-ext-api-notes"
] | 2018-02-20T17:06:26 | 2018-02-20T17:48:21 | 2018-02-20T17:48:21 | NONE | null | Steps to reproduce:
Install Docker and Python 3.6, run the following:
`docker run --name some-postgres -p 5432:5432 -e POSTGRES_PASSWORD=mysecretpassword -d postgres`
(Alternatively, use a local postgres install matching the spec)
`pip3.6 install peewee==2.8.2`
```python
from playhouse.postgres_ext import... | {
"url": "https://api.github.com/repos/coleifer/peewee/issues/1504/reactions",
"total_count": 0,
"+1": 0,
"-1": 0,
"laugh": 0,
"hooray": 0,
"confused": 0,
"heart": 0,
"rocket": 0,
"eyes": 0
} | https://api.github.com/repos/coleifer/peewee/issues/1504/timeline | null | completed | null | null |
https://api.github.com/repos/coleifer/peewee/issues/1503 | https://api.github.com/repos/coleifer/peewee | https://api.github.com/repos/coleifer/peewee/issues/1503/labels{/name} | https://api.github.com/repos/coleifer/peewee/issues/1503/comments | https://api.github.com/repos/coleifer/peewee/issues/1503/events | https://github.com/coleifer/peewee/issues/1503 | 298,223,077 | MDU6SXNzdWUyOTgyMjMwNzc= | 1,503 | Document gevent at one place | {
"login": "slavkoja",
"id": 5506544,
"node_id": "MDQ6VXNlcjU1MDY1NDQ=",
"avatar_url": "https://avatars.githubusercontent.com/u/5506544?v=4",
"gravatar_id": "",
"url": "https://api.github.com/users/slavkoja",
"html_url": "https://github.com/slavkoja",
"followers_url": "https://api.github.com/users/slavk... | [] | closed | false | null | [] | null | [
"I'm not sure I understand what your question is. gevent+flask+peewee is my preferred setup for all my projects...the thing I like about gevent is that you don't really need to change your code.\r\n\r\nIf you're using gevent and Postgresql, you can register a wait callback. Here is the code from the [psycogreen](ht... | 2018-02-19T10:19:49 | 2018-02-19T16:15:53 | 2018-02-19T14:33:35 | NONE | null | I search your docs and found here and there some `gevent` related information. The most one is from retired `flask-peewee` project (i am mostly interested in `peewee` + `flask`). I did heavy search on internet, but i was no able to find any reliable information and most of the found are Django related, where the reliab... | {
"url": "https://api.github.com/repos/coleifer/peewee/issues/1503/reactions",
"total_count": 0,
"+1": 0,
"-1": 0,
"laugh": 0,
"hooray": 0,
"confused": 0,
"heart": 0,
"rocket": 0,
"eyes": 0
} | https://api.github.com/repos/coleifer/peewee/issues/1503/timeline | null | completed | null | null |
https://api.github.com/repos/coleifer/peewee/issues/1502 | https://api.github.com/repos/coleifer/peewee | https://api.github.com/repos/coleifer/peewee/issues/1502/labels{/name} | https://api.github.com/repos/coleifer/peewee/issues/1502/comments | https://api.github.com/repos/coleifer/peewee/issues/1502/events | https://github.com/coleifer/peewee/issues/1502 | 298,129,248 | MDU6SXNzdWUyOTgxMjkyNDg= | 1,502 | Not failing silently when creating tables on attached SQLite databases | {
"login": "maurosilber",
"id": 9124827,
"node_id": "MDQ6VXNlcjkxMjQ4Mjc=",
"avatar_url": "https://avatars.githubusercontent.com/u/9124827?v=4",
"gravatar_id": "",
"url": "https://api.github.com/users/maurosilber",
"html_url": "https://github.com/maurosilber",
"followers_url": "https://api.github.com/us... | [] | closed | false | null | [] | null | [
"Never mind. It works after updating from 2.8.5 to 3.0.18."
] | 2018-02-18T23:25:39 | 2018-02-18T23:31:24 | 2018-02-18T23:31:24 | NONE | null | Here's minimal example reproducing the issue:
```python
from playhouse.apsw_ext import *
db = APSWDatabase('main.db')
db.execute_sql('attach database "other.db" as other')
class MainTable(Model):
field1 = IntegerField()
class Meta:
database = db
class AttachedTable(Model):
... | {
"url": "https://api.github.com/repos/coleifer/peewee/issues/1502/reactions",
"total_count": 0,
"+1": 0,
"-1": 0,
"laugh": 0,
"hooray": 0,
"confused": 0,
"heart": 0,
"rocket": 0,
"eyes": 0
} | https://api.github.com/repos/coleifer/peewee/issues/1502/timeline | null | completed | null | null |
https://api.github.com/repos/coleifer/peewee/issues/1501 | https://api.github.com/repos/coleifer/peewee | https://api.github.com/repos/coleifer/peewee/issues/1501/labels{/name} | https://api.github.com/repos/coleifer/peewee/issues/1501/comments | https://api.github.com/repos/coleifer/peewee/issues/1501/events | https://github.com/coleifer/peewee/issues/1501 | 297,982,754 | MDU6SXNzdWUyOTc5ODI3NTQ= | 1,501 | Why does not peewee support mysql-connector-python? | {
"login": "polikeiji",
"id": 1539285,
"node_id": "MDQ6VXNlcjE1MzkyODU=",
"avatar_url": "https://avatars.githubusercontent.com/u/1539285?v=4",
"gravatar_id": "",
"url": "https://api.github.com/users/polikeiji",
"html_url": "https://github.com/polikeiji",
"followers_url": "https://api.github.com/users/po... | [] | closed | false | null | [] | null | [
"I'm not familiar with mysql-connector-python, but Peewee should work with any DB-API 2.0-compatible driver. If the mysql-connector-python library is fully DB-API 2.0 compatible, you should be able to simply subclass `MySQLDatabase` and override the `_connect()` method so it uses the mysql connector.\r\n\r\nYou can... | 2018-02-17T06:06:24 | 2021-05-26T12:36:39 | 2018-02-17T15:03:42 | NONE | null | I think peewee support currently only MySQLdb and pymsql as drivers for MySQL. I have not compared MySQL drivers in details, but I want to use the mysql-connector-python because I think it is the driver Oracle is maintaining officially. | {
"url": "https://api.github.com/repos/coleifer/peewee/issues/1501/reactions",
"total_count": 0,
"+1": 0,
"-1": 0,
"laugh": 0,
"hooray": 0,
"confused": 0,
"heart": 0,
"rocket": 0,
"eyes": 0
} | https://api.github.com/repos/coleifer/peewee/issues/1501/timeline | null | completed | null | null |
https://api.github.com/repos/coleifer/peewee/issues/1500 | https://api.github.com/repos/coleifer/peewee | https://api.github.com/repos/coleifer/peewee/issues/1500/labels{/name} | https://api.github.com/repos/coleifer/peewee/issues/1500/comments | https://api.github.com/repos/coleifer/peewee/issues/1500/events | https://github.com/coleifer/peewee/issues/1500 | 297,632,359 | MDU6SXNzdWUyOTc2MzIzNTk= | 1,500 | delete triggers firing with on_conflict('replace') | {
"login": "ghost",
"id": 10137,
"node_id": "MDQ6VXNlcjEwMTM3",
"avatar_url": "https://avatars.githubusercontent.com/u/10137?v=4",
"gravatar_id": "",
"url": "https://api.github.com/users/ghost",
"html_url": "https://github.com/ghost",
"followers_url": "https://api.github.com/users/ghost/followers",
"f... | [] | closed | false | null | [] | null | [
"I think you might be confusing triggers with the `ON DELETE` behavior, which I don't believe falls under the same rules as triggers (recursive or otherwise). To avoid the issue, it should be sufficient to remove either the \"on delete cascade\" bit, or to disable the foreign_keys pragma.\r\n\r\nI was able to repli... | 2018-02-15T23:20:23 | 2018-02-17T14:57:55 | 2018-02-16T18:11:07 | NONE | null | Hello.
I encountered this problem while inserting a new row, which violated a UNIQUE constraint, either through `Model.insert()` or `Model.insert_many()`. I didn't expect this behavior, since the [SQLite documentation](https://sqlite.org/lang_conflict.html) states that
> When the REPLACE conflict resolution strat... | {
"url": "https://api.github.com/repos/coleifer/peewee/issues/1500/reactions",
"total_count": 0,
"+1": 0,
"-1": 0,
"laugh": 0,
"hooray": 0,
"confused": 0,
"heart": 0,
"rocket": 0,
"eyes": 0
} | https://api.github.com/repos/coleifer/peewee/issues/1500/timeline | null | completed | null | null |
https://api.github.com/repos/coleifer/peewee/issues/1499 | https://api.github.com/repos/coleifer/peewee | https://api.github.com/repos/coleifer/peewee/issues/1499/labels{/name} | https://api.github.com/repos/coleifer/peewee/issues/1499/comments | https://api.github.com/repos/coleifer/peewee/issues/1499/events | https://github.com/coleifer/peewee/issues/1499 | 297,492,684 | MDU6SXNzdWUyOTc0OTI2ODQ= | 1,499 | Generalize Autofield test between sqlite and postgresql | {
"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 | [
"Yes, it was a bad commit, the test is fixed in master now."
] | 2018-02-15T15:43:35 | 2018-02-15T17:00:27 | 2018-02-15T17:00:27 | NONE | null | In sqlite the `AutoField` used for `PrimaryKeys` is 'INTEGER', while in postgresql its 'SERIAL'. This breaks test `test_db_table` of `TestModelDDL` in `tests/schema.py`. Either this test, or the underlying AutoField has to be generalized. | {
"url": "https://api.github.com/repos/coleifer/peewee/issues/1499/reactions",
"total_count": 0,
"+1": 0,
"-1": 0,
"laugh": 0,
"hooray": 0,
"confused": 0,
"heart": 0,
"rocket": 0,
"eyes": 0
} | https://api.github.com/repos/coleifer/peewee/issues/1499/timeline | null | completed | null | null |
https://api.github.com/repos/coleifer/peewee/issues/1498 | https://api.github.com/repos/coleifer/peewee | https://api.github.com/repos/coleifer/peewee/issues/1498/labels{/name} | https://api.github.com/repos/coleifer/peewee/issues/1498/comments | https://api.github.com/repos/coleifer/peewee/issues/1498/events | https://github.com/coleifer/peewee/pull/1498 | 297,489,213 | MDExOlB1bGxSZXF1ZXN0MTY5NDA0MTU5 | 1,498 | Fixed testcases broken by bugfix 9edf260 | {
"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 | [
"For sqlite the autofield IS an INTEGER, so this solves nothing. Opened issue #1499"
] | 2018-02-15T15:34:31 | 2018-02-15T15:43:45 | 2018-02-15T15:43:44 | NONE | null | I think this test has to be changed, as primary keys are an AutoField, and Postgress' AutoField is SERIAL. This expected behaviour somehow only surfaces after 9edf260. | {
"url": "https://api.github.com/repos/coleifer/peewee/issues/1498/reactions",
"total_count": 0,
"+1": 0,
"-1": 0,
"laugh": 0,
"hooray": 0,
"confused": 0,
"heart": 0,
"rocket": 0,
"eyes": 0
} | https://api.github.com/repos/coleifer/peewee/issues/1498/timeline | null | null | false | {
"url": "https://api.github.com/repos/coleifer/peewee/pulls/1498",
"html_url": "https://github.com/coleifer/peewee/pull/1498",
"diff_url": "https://github.com/coleifer/peewee/pull/1498.diff",
"patch_url": "https://github.com/coleifer/peewee/pull/1498.patch",
"merged_at": null
} |
https://api.github.com/repos/coleifer/peewee/issues/1497 | https://api.github.com/repos/coleifer/peewee | https://api.github.com/repos/coleifer/peewee/issues/1497/labels{/name} | https://api.github.com/repos/coleifer/peewee/issues/1497/comments | https://api.github.com/repos/coleifer/peewee/issues/1497/events | https://github.com/coleifer/peewee/issues/1497 | 297,459,330 | MDU6SXNzdWUyOTc0NTkzMzA= | 1,497 | peewee.OperationalError: unable to open database file | {
"login": "kitten77",
"id": 11948741,
"node_id": "MDQ6VXNlcjExOTQ4NzQx",
"avatar_url": "https://avatars.githubusercontent.com/u/11948741?v=4",
"gravatar_id": "",
"url": "https://api.github.com/users/kitten77",
"html_url": "https://github.com/kitten77",
"followers_url": "https://api.github.com/users/kit... | [] | closed | false | null | [] | null | [
"I've edited your comment to include code formatting...please take the time to format your issues. It takes two seconds.",
"Wontfix, peewee won't magically create directories for you.",
"Thank you for fixing my post I will put more attention into the formatting in the future 😊"
] | 2018-02-15T14:11:41 | 2018-02-15T19:49:08 | 2018-02-15T16:58:48 | NONE | null | Dont know if this is a bug or not but reporting it anyway
this happens when i try to create a db without having the subdir where the file is placed
```
File "/usr/home/user/project/todo.py", line 12, in __init__
DB = todoDB()
File "/usr/home/admin/ragnhild/models/todoDB.py", line 35, in __init__
with ... | {
"url": "https://api.github.com/repos/coleifer/peewee/issues/1497/reactions",
"total_count": 0,
"+1": 0,
"-1": 0,
"laugh": 0,
"hooray": 0,
"confused": 0,
"heart": 0,
"rocket": 0,
"eyes": 0
} | https://api.github.com/repos/coleifer/peewee/issues/1497/timeline | null | completed | null | null |
https://api.github.com/repos/coleifer/peewee/issues/1496 | https://api.github.com/repos/coleifer/peewee | https://api.github.com/repos/coleifer/peewee/issues/1496/labels{/name} | https://api.github.com/repos/coleifer/peewee/issues/1496/comments | https://api.github.com/repos/coleifer/peewee/issues/1496/events | https://github.com/coleifer/peewee/pull/1496 | 297,437,485 | MDExOlB1bGxSZXF1ZXN0MTY5MzY0OTg5 | 1,496 | Create schema when 'creating all' if it doesn't exist | {
"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 | [
"I am going to pass on this, but thanks for the patch."
] | 2018-02-15T13:00:36 | 2018-02-15T17:01:05 | 2018-02-15T17:01:05 | NONE | null | As it says in the table. Not sure if we want to use the safe version of this method in `_create_table` itself, which is also possible. Also, I was not sure where to put Unit Tests for this. If you give me a location, I can write them if you want.
PS. One test fails for PostgreSQL, but it also fails without my pull r... | {
"url": "https://api.github.com/repos/coleifer/peewee/issues/1496/reactions",
"total_count": 0,
"+1": 0,
"-1": 0,
"laugh": 0,
"hooray": 0,
"confused": 0,
"heart": 0,
"rocket": 0,
"eyes": 0
} | https://api.github.com/repos/coleifer/peewee/issues/1496/timeline | null | null | false | {
"url": "https://api.github.com/repos/coleifer/peewee/pulls/1496",
"html_url": "https://github.com/coleifer/peewee/pull/1496",
"diff_url": "https://github.com/coleifer/peewee/pull/1496.diff",
"patch_url": "https://github.com/coleifer/peewee/pull/1496.patch",
"merged_at": null
} |
https://api.github.com/repos/coleifer/peewee/issues/1495 | https://api.github.com/repos/coleifer/peewee | https://api.github.com/repos/coleifer/peewee/issues/1495/labels{/name} | https://api.github.com/repos/coleifer/peewee/issues/1495/comments | https://api.github.com/repos/coleifer/peewee/issues/1495/events | https://github.com/coleifer/peewee/issues/1495 | 297,258,366 | MDU6SXNzdWUyOTcyNTgzNjY= | 1,495 | insert_many throws ValueError with list of collections.Mapping instances | {
"login": "ghost",
"id": 10137,
"node_id": "MDQ6VXNlcjEwMTM3",
"avatar_url": "https://avatars.githubusercontent.com/u/10137?v=4",
"gravatar_id": "",
"url": "https://api.github.com/users/ghost",
"html_url": "https://github.com/ghost",
"followers_url": "https://api.github.com/users/ghost/followers",
"f... | [] | closed | false | null | [] | null | [
"Fix pushed. It's not necessary to check both Mapping and MutableMapping, since MutableMappings are Mappings."
] | 2018-02-14T21:52:31 | 2018-02-15T01:53:44 | 2018-02-15T01:53:11 | NONE | null | Hello. I've been using peewee in my latest project and I'm enjoying it quite a bit. Recently, I came across a problem when trying to pass instances of collections.Mapping to `insert_many()`, namely, it throws an ValueError exception. Here's an [example](https://gist.github.com/Jovito/2adbc33d7d60ddc6b6ebadccb750e8d6). ... | {
"url": "https://api.github.com/repos/coleifer/peewee/issues/1495/reactions",
"total_count": 0,
"+1": 0,
"-1": 0,
"laugh": 0,
"hooray": 0,
"confused": 0,
"heart": 0,
"rocket": 0,
"eyes": 0
} | https://api.github.com/repos/coleifer/peewee/issues/1495/timeline | null | completed | null | null |
https://api.github.com/repos/coleifer/peewee/issues/1494 | https://api.github.com/repos/coleifer/peewee | https://api.github.com/repos/coleifer/peewee/issues/1494/labels{/name} | https://api.github.com/repos/coleifer/peewee/issues/1494/comments | https://api.github.com/repos/coleifer/peewee/issues/1494/events | https://github.com/coleifer/peewee/issues/1494 | 297,029,458 | MDU6SXNzdWUyOTcwMjk0NTg= | 1,494 | SQLITE_DATE_TRUNC_MAPPING undefined variable? | {
"login": "oz123",
"id": 1083045,
"node_id": "MDQ6VXNlcjEwODMwNDU=",
"avatar_url": "https://avatars.githubusercontent.com/u/1083045?v=4",
"gravatar_id": "",
"url": "https://api.github.com/users/oz123",
"html_url": "https://github.com/oz123",
"followers_url": "https://api.github.com/users/oz123/follower... | [] | closed | false | null | [] | null | [
"Made a quick fix, the method was out-of-date. This commit fixes the issue: 0416786d56f770c6cec3b9c7493fae7ffd6a75ec",
"Pushed a new version, 3.0.18, which includes the fix.",
"@coleifer thank you for the quick response!",
"No problems, you should have no issues vendoring the peewee.py module, as that's one o... | 2018-02-14T09:39:52 | 2018-02-14T15:48:18 | 2018-02-14T15:05:17 | NONE | null | When using vim I encountered this:
```
F821 undefined name 'SQLITE_DATE_TRUNC_MAPPING'.
```
```
$ git checkout 2.9.2
$ grep -n SQLITE_DATE_TRUNC_MAPPING *
grep: docs: Is a directory
grep: examples: Is a directory
peewee.py:287:SQLITE_DATE_TRUNC_MAPPING = {
peewee.py:294:MYSQL_DATE_TRUNC_MAPPING = SQLITE_DAT... | {
"url": "https://api.github.com/repos/coleifer/peewee/issues/1494/reactions",
"total_count": 0,
"+1": 0,
"-1": 0,
"laugh": 0,
"hooray": 0,
"confused": 0,
"heart": 0,
"rocket": 0,
"eyes": 0
} | https://api.github.com/repos/coleifer/peewee/issues/1494/timeline | null | completed | null | null |
https://api.github.com/repos/coleifer/peewee/issues/1493 | https://api.github.com/repos/coleifer/peewee | https://api.github.com/repos/coleifer/peewee/issues/1493/labels{/name} | https://api.github.com/repos/coleifer/peewee/issues/1493/comments | https://api.github.com/repos/coleifer/peewee/issues/1493/events | https://github.com/coleifer/peewee/issues/1493 | 297,006,068 | MDU6SXNzdWUyOTcwMDYwNjg= | 1,493 | Broken Docs | {
"login": "ghost",
"id": 10137,
"node_id": "MDQ6VXNlcjEwMTM3",
"avatar_url": "https://avatars.githubusercontent.com/u/10137?v=4",
"gravatar_id": "",
"url": "https://api.github.com/users/ghost",
"html_url": "https://github.com/ghost",
"followers_url": "https://api.github.com/users/ghost/followers",
"f... | [] | closed | false | null | [] | null | [
"Cheers, had those lines indented by an extra 2 spaces on accident. Should be fixed."
] | 2018-02-14T08:03:26 | 2018-02-14T14:44:06 | 2018-02-14T14:44:06 | NONE | null | Broken Docs, Easy to Fix.

http://docs.peewee-orm.com/en/latest/peewee/api.html#ModelIndex
:cat:
| {
"url": "https://api.github.com/repos/coleifer/peewee/issues/1493/reactions",
"total_count": 0,
"+1": 0,
"-1": 0,
"laugh": 0,
"hooray": 0,
"confused": 0,
"heart": 0,
"rocket": 0,
"eyes": 0
} | https://api.github.com/repos/coleifer/peewee/issues/1493/timeline | null | completed | null | null |
https://api.github.com/repos/coleifer/peewee/issues/1492 | https://api.github.com/repos/coleifer/peewee | https://api.github.com/repos/coleifer/peewee/issues/1492/labels{/name} | https://api.github.com/repos/coleifer/peewee/issues/1492/comments | https://api.github.com/repos/coleifer/peewee/issues/1492/events | https://github.com/coleifer/peewee/issues/1492 | 296,989,233 | MDU6SXNzdWUyOTY5ODkyMzM= | 1,492 | .get() results in RecursionError | {
"login": "HassanTariqSLX",
"id": 35286391,
"node_id": "MDQ6VXNlcjM1Mjg2Mzkx",
"avatar_url": "https://avatars.githubusercontent.com/u/35286391?v=4",
"gravatar_id": "",
"url": "https://api.github.com/users/HassanTariqSLX",
"html_url": "https://github.com/HassanTariqSLX",
"followers_url": "https://api.gi... | [] | closed | false | null | [] | null | [
"Can you share the model definition with me? Is the primary key of `AdwordsClient` a foreign-key to some other model?\r\n\r\nThe recursion error is occurring during the save operation when you're creating the new `client` instance. It's attempting to access the model class' `_pk` property, which obtains the value o... | 2018-02-14T06:26:49 | 2018-02-16T00:56:01 | 2018-02-16T00:56:01 | NONE | null | Hi,
I'm looping through some adwords MCCs and for each MCC there are customer accounts. If I iterate through these customer accounts and try to retrieve the model, it throws the following:
```
Traceback (most recent call last):
File "C:\Users\USERNAME\PycharmProjects\PROJECT_NAME\venv\lib\site-packages\pe... | {
"url": "https://api.github.com/repos/coleifer/peewee/issues/1492/reactions",
"total_count": 0,
"+1": 0,
"-1": 0,
"laugh": 0,
"hooray": 0,
"confused": 0,
"heart": 0,
"rocket": 0,
"eyes": 0
} | https://api.github.com/repos/coleifer/peewee/issues/1492/timeline | null | completed | null | null |
https://api.github.com/repos/coleifer/peewee/issues/1491 | https://api.github.com/repos/coleifer/peewee | https://api.github.com/repos/coleifer/peewee/issues/1491/labels{/name} | https://api.github.com/repos/coleifer/peewee/issues/1491/comments | https://api.github.com/repos/coleifer/peewee/issues/1491/events | https://github.com/coleifer/peewee/issues/1491 | 296,723,050 | MDU6SXNzdWUyOTY3MjMwNTA= | 1,491 | foreign key constraint incorrectly formed | {
"login": "MNCODE",
"id": 31220124,
"node_id": "MDQ6VXNlcjMxMjIwMTI0",
"avatar_url": "https://avatars.githubusercontent.com/u/31220124?v=4",
"gravatar_id": "",
"url": "https://api.github.com/users/MNCODE",
"html_url": "https://github.com/MNCODE",
"followers_url": "https://api.github.com/users/MNCODE/fo... | [] | closed | false | null | [] | null | [
"Solved by replacing db_table with table_name \r\ndb_table is from an older version (2.x.x). Probably it also caused the foreignKeyConstraint Error"
] | 2018-02-13T12:40:13 | 2018-02-13T14:55:17 | 2018-02-13T14:55:17 | NONE | null | When I want to create a table I get the error foreign_key
> ERROR session[5924]: (1005, 'Can\'t create table `example_database`.`example_table` (errno: 150 "Foreign key constraint is incorrectly formed")')
example_table is specified as:
```python
class Example_Table(BaseModel):
id = PrimaryKeyField()
... | {
"url": "https://api.github.com/repos/coleifer/peewee/issues/1491/reactions",
"total_count": 0,
"+1": 0,
"-1": 0,
"laugh": 0,
"hooray": 0,
"confused": 0,
"heart": 0,
"rocket": 0,
"eyes": 0
} | https://api.github.com/repos/coleifer/peewee/issues/1491/timeline | null | completed | null | null |
https://api.github.com/repos/coleifer/peewee/issues/1490 | https://api.github.com/repos/coleifer/peewee | https://api.github.com/repos/coleifer/peewee/issues/1490/labels{/name} | https://api.github.com/repos/coleifer/peewee/issues/1490/comments | https://api.github.com/repos/coleifer/peewee/issues/1490/events | https://github.com/coleifer/peewee/issues/1490 | 296,628,719 | MDU6SXNzdWUyOTY2Mjg3MTk= | 1,490 | the mod op has problem in string formatting | {
"login": "Twwy",
"id": 998191,
"node_id": "MDQ6VXNlcjk5ODE5MQ==",
"avatar_url": "https://avatars.githubusercontent.com/u/998191?v=4",
"gravatar_id": "",
"url": "https://api.github.com/users/Twwy",
"html_url": "https://github.com/Twwy",
"followers_url": "https://api.github.com/users/Twwy/followers",
... | [] | closed | false | null | [] | null | [
"Final I get the code passed, but I need to change something.\r\n\r\n```\r\n--- a/test/package/peewee.py\r\n+++ b/test/package/peewee.py\r\n@@ -315,7 +315,7 @@ OP = attrdict(\r\n BIN_AND='&',\r\n BIN_OR='|',\r\n XOR='^',\r\n- MOD='%',\r\n+ MOD='%%',\r\n EQ='=',\r\n LT='<',\r\n LTE='<='... | 2018-02-13T06:36:19 | 2018-02-13T20:29:48 | 2018-02-13T20:29:48 | NONE | null | I use the mod like docs.
```
from peewee import *
from peewee import Expression # the building block for expressions
def mod(lhs, rhs):
return Expression(lhs, '%', rhs)
```
but this code has error
```
TypeError: not all arguments converted during string formatting
```
when I use ```%% ``` replace the ... | {
"url": "https://api.github.com/repos/coleifer/peewee/issues/1490/reactions",
"total_count": 0,
"+1": 0,
"-1": 0,
"laugh": 0,
"hooray": 0,
"confused": 0,
"heart": 0,
"rocket": 0,
"eyes": 0
} | https://api.github.com/repos/coleifer/peewee/issues/1490/timeline | null | completed | null | null |
https://api.github.com/repos/coleifer/peewee/issues/1489 | https://api.github.com/repos/coleifer/peewee | https://api.github.com/repos/coleifer/peewee/issues/1489/labels{/name} | https://api.github.com/repos/coleifer/peewee/issues/1489/comments | https://api.github.com/repos/coleifer/peewee/issues/1489/events | https://github.com/coleifer/peewee/issues/1489 | 296,590,549 | MDU6SXNzdWUyOTY1OTA1NDk= | 1,489 | DateTimeTZField returns datetimes in other timezone | {
"login": "dswah",
"id": 11619412,
"node_id": "MDQ6VXNlcjExNjE5NDEy",
"avatar_url": "https://avatars.githubusercontent.com/u/11619412?v=4",
"gravatar_id": "",
"url": "https://api.github.com/users/dswah",
"html_url": "https://github.com/dswah",
"followers_url": "https://api.github.com/users/dswah/follow... | [] | closed | false | null | [] | null | [
"From: https://www.postgresql.org/docs/current/static/datatype-datetime.html\r\n\r\n> For timestamp with time zone, the internally stored value is always in UTC (Universal Coordinated Time, traditionally known as Greenwich Mean Time, GMT). An input value that has an explicit time zone specified is converted to UTC ... | 2018-02-13T02:10:43 | 2018-02-13T17:23:10 | 2018-02-13T16:38:06 | NONE | null | Hi there.
Thank you for the very useful library. I've used it a ton. However, ive recently run into something annoying with DateTimeTZField.
when i select records with a DateTimeTZField, i always see this field in timezone A (local tz of db), even though the datetimes were originally in timezone B.
why is this? ... | {
"url": "https://api.github.com/repos/coleifer/peewee/issues/1489/reactions",
"total_count": 0,
"+1": 0,
"-1": 0,
"laugh": 0,
"hooray": 0,
"confused": 0,
"heart": 0,
"rocket": 0,
"eyes": 0
} | https://api.github.com/repos/coleifer/peewee/issues/1489/timeline | null | completed | null | null |
https://api.github.com/repos/coleifer/peewee/issues/1488 | https://api.github.com/repos/coleifer/peewee | https://api.github.com/repos/coleifer/peewee/issues/1488/labels{/name} | https://api.github.com/repos/coleifer/peewee/issues/1488/comments | https://api.github.com/repos/coleifer/peewee/issues/1488/events | https://github.com/coleifer/peewee/issues/1488 | 296,435,863 | MDU6SXNzdWUyOTY0MzU4NjM= | 1,488 | Cannot prefetch on MySQL when using limit | {
"login": "Webovani",
"id": 2682406,
"node_id": "MDQ6VXNlcjI2ODI0MDY=",
"avatar_url": "https://avatars.githubusercontent.com/u/2682406?v=4",
"gravatar_id": "",
"url": "https://api.github.com/users/Webovani",
"html_url": "https://github.com/Webovani",
"followers_url": "https://api.github.com/users/Webov... | [] | closed | false | null | [] | null | [
"The way prefetch is implemented, it does not use joins. Instead, it nests dependent clauses in subqueries. So your example would:\r\n\r\n```sql\r\n-- Get branches corresponding to shops in the outer query.\r\nSELECT \"t1\".\"id\", \"t1\".\"shop_id\" \r\nFROM \"branch\" AS \"t1\" \r\nWHERE (\"t1\".\"shop_id\" IN (S... | 2018-02-12T16:22:26 | 2018-02-15T12:45:33 | 2018-02-13T17:23:40 | NONE | null | ```python
from peewee import *
database = MySQLDatabase(...)
class BaseModel(Model):
class Meta:
database = database
class Shop(BaseModel):
name = CharField()
class Branch(BaseModel):
shop = ForeignKeyField(Shop, backref='branches')
shops = Shop.select().limit(10)
shops = prefet... | {
"url": "https://api.github.com/repos/coleifer/peewee/issues/1488/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/1488/timeline | null | completed | null | null |
https://api.github.com/repos/coleifer/peewee/issues/1487 | https://api.github.com/repos/coleifer/peewee | https://api.github.com/repos/coleifer/peewee/issues/1487/labels{/name} | https://api.github.com/repos/coleifer/peewee/issues/1487/comments | https://api.github.com/repos/coleifer/peewee/issues/1487/events | https://github.com/coleifer/peewee/issues/1487 | 296,243,502 | MDU6SXNzdWUyOTYyNDM1MDI= | 1,487 | Cannot connect using postgres. | {
"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 | [
"Install psycopg2 yo.",
"Thanks bro."
] | 2018-02-12T00:48:43 | 2018-02-12T01:24:27 | 2018-02-12T01:23:13 | NONE | null | Cannot connect using postgres.
```
db = PostgresqlDatabase('extra', user='extra',
password='GBQ9x%@S', host='localhost')
def connect():
try:
db._connect()
except BaseException as e:
return e
connect()
```
_AttributeError("'NoneType' obje... | {
"url": "https://api.github.com/repos/coleifer/peewee/issues/1487/reactions",
"total_count": 0,
"+1": 0,
"-1": 0,
"laugh": 0,
"hooray": 0,
"confused": 0,
"heart": 0,
"rocket": 0,
"eyes": 0
} | https://api.github.com/repos/coleifer/peewee/issues/1487/timeline | null | completed | null | null |
https://api.github.com/repos/coleifer/peewee/issues/1486 | https://api.github.com/repos/coleifer/peewee | https://api.github.com/repos/coleifer/peewee/issues/1486/labels{/name} | https://api.github.com/repos/coleifer/peewee/issues/1486/comments | https://api.github.com/repos/coleifer/peewee/issues/1486/events | https://github.com/coleifer/peewee/issues/1486 | 296,146,726 | MDU6SXNzdWUyOTYxNDY3MjY= | 1,486 | NoneType object has no attribute 'connect' while connecting to MySQL server | {
"login": "eliaperantoni",
"id": 6002855,
"node_id": "MDQ6VXNlcjYwMDI4NTU=",
"avatar_url": "https://avatars.githubusercontent.com/u/6002855?v=4",
"gravatar_id": "",
"url": "https://api.github.com/users/eliaperantoni",
"html_url": "https://github.com/eliaperantoni",
"followers_url": "https://api.github.... | [] | closed | false | null | [] | null | [
"You need to install a MySQL python driver like pymysql.\r\n\r\n pip install pymysql",
"It worked! Thanks :grinning:"
] | 2018-02-11T00:19:39 | 2020-03-17T17:09:06 | 2018-02-11T00:45:40 | NONE | null | I've created a MySQL server on my server but whenever I try to connect to it in PeeWee I get this error:
```
>>> from peewee import *
>>> db = MySQLDatabase('tormecapp', user='tormecapp', password='************')
>>> db.connect()
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "... | {
"url": "https://api.github.com/repos/coleifer/peewee/issues/1486/reactions",
"total_count": 0,
"+1": 0,
"-1": 0,
"laugh": 0,
"hooray": 0,
"confused": 0,
"heart": 0,
"rocket": 0,
"eyes": 0
} | https://api.github.com/repos/coleifer/peewee/issues/1486/timeline | null | completed | null | null |
https://api.github.com/repos/coleifer/peewee/issues/1485 | https://api.github.com/repos/coleifer/peewee | https://api.github.com/repos/coleifer/peewee/issues/1485/labels{/name} | https://api.github.com/repos/coleifer/peewee/issues/1485/comments | https://api.github.com/repos/coleifer/peewee/issues/1485/events | https://github.com/coleifer/peewee/issues/1485 | 296,129,687 | MDU6SXNzdWUyOTYxMjk2ODc= | 1,485 | Setting schema in Meta class does not propagate | {
"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 | [
"Fixed and pushed new version, 3.0.17. Added more tests to hopefully prevent this (or similar regressions) from recurring."
] | 2018-02-10T20:09:05 | 2018-02-10T21:49:27 | 2018-02-10T21:44:46 | NONE | null | I usually set a schema in my main class, but it doesn't propagate to subclasses since `3.0.16`. This causes any select to fail because the schema is not set in the raw SQL. Probably caused by #1483, commit 5cfc311eea8adb0d8aa836f493c3f9faf615b745.
``` Python
db = PostgresqlExtDatabase(database='test', host='example... | {
"url": "https://api.github.com/repos/coleifer/peewee/issues/1485/reactions",
"total_count": 0,
"+1": 0,
"-1": 0,
"laugh": 0,
"hooray": 0,
"confused": 0,
"heart": 0,
"rocket": 0,
"eyes": 0
} | https://api.github.com/repos/coleifer/peewee/issues/1485/timeline | null | completed | null | null |
https://api.github.com/repos/coleifer/peewee/issues/1484 | https://api.github.com/repos/coleifer/peewee | https://api.github.com/repos/coleifer/peewee/issues/1484/labels{/name} | https://api.github.com/repos/coleifer/peewee/issues/1484/comments | https://api.github.com/repos/coleifer/peewee/issues/1484/events | https://github.com/coleifer/peewee/issues/1484 | 295,991,028 | MDU6SXNzdWUyOTU5OTEwMjg= | 1,484 | [Feature Request] Support Signals in `insert`/`update`/`delete` in Postgres using `returning` | {
"login": "logannc",
"id": 2867206,
"node_id": "MDQ6VXNlcjI4NjcyMDY=",
"avatar_url": "https://avatars.githubusercontent.com/u/2867206?v=4",
"gravatar_id": "",
"url": "https://api.github.com/users/logannc",
"html_url": "https://github.com/logannc",
"followers_url": "https://api.github.com/users/logannc/... | [] | closed | false | null | [] | null | [
"I'm unsure that this can be done cleanly and correctly, so I'm not inclined to implement or merge an implementation.",
"Briefly, what are your concerns?",
"Where would you install the signal hooks? What would they do? How would you make them work on SQLite and MySQL, which do not have `returning` clause suppor... | 2018-02-09T19:49:08 | 2018-02-10T21:50:31 | 2018-02-10T21:50:31 | NONE | null | It would appear that Postgres can support signals using `returning`.
It should be able to easily support `post_*` signals using returning. The performance penalty should be worth the consistency in `update` vs. `save`.
Supporting `pre_*` signals would be a bit painful as you'd need to execute the save/insert usin... | {
"url": "https://api.github.com/repos/coleifer/peewee/issues/1484/reactions",
"total_count": 0,
"+1": 0,
"-1": 0,
"laugh": 0,
"hooray": 0,
"confused": 0,
"heart": 0,
"rocket": 0,
"eyes": 0
} | https://api.github.com/repos/coleifer/peewee/issues/1484/timeline | null | completed | null | null |
https://api.github.com/repos/coleifer/peewee/issues/1483 | https://api.github.com/repos/coleifer/peewee | https://api.github.com/repos/coleifer/peewee/issues/1483/labels{/name} | https://api.github.com/repos/coleifer/peewee/issues/1483/comments | https://api.github.com/repos/coleifer/peewee/issues/1483/events | https://github.com/coleifer/peewee/issues/1483 | 295,556,946 | MDU6SXNzdWUyOTU1NTY5NDY= | 1,483 | Can't change schema via `Model._meta.schema` (regression from 2.X) | {
"login": "vikt0rs",
"id": 5230490,
"node_id": "MDQ6VXNlcjUyMzA0OTA=",
"avatar_url": "https://avatars.githubusercontent.com/u/5230490?v=4",
"gravatar_id": "",
"url": "https://api.github.com/users/vikt0rs",
"html_url": "https://github.com/vikt0rs",
"followers_url": "https://api.github.com/users/vikt0rs/... | [] | closed | false | null | [] | null | [
"For now, can you try this change for 3.x?\r\n\r\n```python\r\n@contextmanager\r\ndef context(schema_name):\r\n with DB.atomic() as transaction:\r\n del DocumentsModel._meta.table # Don't worry, this won't delete any data.\r\n DocumentsModel._meta.schema = schema_name\r\n yield transaction\... | 2018-02-08T15:34:56 | 2018-02-09T13:07:35 | 2018-02-08T19:58:56 | NONE | null | I'm working to work with several DB schemas and use `Model._meta.schema` to switch them, as shown in attached script. But for some reasons schema switch doesn't work in peewee 3.X. See console output. Please, suggest is it a bug or there is a better way to do it.
Thanks!
Console output
```
$ pip freeze | grep... | {
"url": "https://api.github.com/repos/coleifer/peewee/issues/1483/reactions",
"total_count": 0,
"+1": 0,
"-1": 0,
"laugh": 0,
"hooray": 0,
"confused": 0,
"heart": 0,
"rocket": 0,
"eyes": 0
} | https://api.github.com/repos/coleifer/peewee/issues/1483/timeline | null | completed | null | null |
https://api.github.com/repos/coleifer/peewee/issues/1482 | https://api.github.com/repos/coleifer/peewee | https://api.github.com/repos/coleifer/peewee/issues/1482/labels{/name} | https://api.github.com/repos/coleifer/peewee/issues/1482/comments | https://api.github.com/repos/coleifer/peewee/issues/1482/events | https://github.com/coleifer/peewee/issues/1482 | 295,510,860 | MDU6SXNzdWUyOTU1MTA4NjA= | 1,482 | Foreign key field is None when joining on multiple tables with CompositeKey | {
"login": "Tiscs",
"id": 2810237,
"node_id": "MDQ6VXNlcjI4MTAyMzc=",
"avatar_url": "https://avatars.githubusercontent.com/u/2810237?v=4",
"gravatar_id": "",
"url": "https://api.github.com/users/Tiscs",
"html_url": "https://github.com/Tiscs",
"followers_url": "https://api.github.com/users/Tiscs/follower... | [] | closed | false | null | [] | null | [
"What am I looking at here? What is the output of this on your computer? What's going wrong?",
"Possibly related commit: 6bdcd7dc3800654ba034d03b3e7dc01971388e34\r\n\r\n-------------------\r\n\r\nNote: you're joining on several models unnecessarily...or, you've forgotten to add them to the `select()`:\r\n\r\n```p... | 2018-02-08T13:25:53 | 2018-02-09T02:29:27 | 2018-02-08T16:38:47 | NONE | null | Works fine with peewee<3.0.12., may be something wrong at line 5968 in peewee.py.
Test codes below.
``` python
import peewee
database = peewee.MySQLDatabase('auth.py', **{
'charset': 'utf8',
'use_unicode': True,
'host': 'localhost',
'port': 3306,
'user': 'root',
'password': '****... | {
"url": "https://api.github.com/repos/coleifer/peewee/issues/1482/reactions",
"total_count": 0,
"+1": 0,
"-1": 0,
"laugh": 0,
"hooray": 0,
"confused": 0,
"heart": 0,
"rocket": 0,
"eyes": 0
} | https://api.github.com/repos/coleifer/peewee/issues/1482/timeline | null | completed | null | null |
https://api.github.com/repos/coleifer/peewee/issues/1481 | https://api.github.com/repos/coleifer/peewee | https://api.github.com/repos/coleifer/peewee/issues/1481/labels{/name} | https://api.github.com/repos/coleifer/peewee/issues/1481/comments | https://api.github.com/repos/coleifer/peewee/issues/1481/events | https://github.com/coleifer/peewee/issues/1481 | 295,359,966 | MDU6SXNzdWUyOTUzNTk5NjY= | 1,481 | Pragmas gets unset on init | {
"login": "codito",
"id": 28766,
"node_id": "MDQ6VXNlcjI4NzY2",
"avatar_url": "https://avatars.githubusercontent.com/u/28766?v=4",
"gravatar_id": "",
"url": "https://api.github.com/users/codito",
"html_url": "https://github.com/codito",
"followers_url": "https://api.github.com/users/codito/followers",
... | [] | closed | false | null | [] | null | [
"Thanks for reporting.",
"Fixed, pushed new version to PyPI - 3.0.15. Thanks again for letting me know.",
"Thanks a ton! Confirmed the issue is fixed with 3.0.15."
] | 2018-02-08T02:05:09 | 2018-02-08T13:34:25 | 2018-02-08T04:00:24 | NONE | null | This scenario uses runtime database configuration. The `pragmas` configuration is reset to empty upon doing a `SqliteDatabase.init(name)`. It's happening since `init` now takes `pragmas` as an input argument which defaults to `None`. It's a behavior change from peewee 2. Is it by design?
### Peewee 3.0.13
```python... | {
"url": "https://api.github.com/repos/coleifer/peewee/issues/1481/reactions",
"total_count": 0,
"+1": 0,
"-1": 0,
"laugh": 0,
"hooray": 0,
"confused": 0,
"heart": 0,
"rocket": 0,
"eyes": 0
} | https://api.github.com/repos/coleifer/peewee/issues/1481/timeline | null | completed | null | null |
https://api.github.com/repos/coleifer/peewee/issues/1480 | https://api.github.com/repos/coleifer/peewee | https://api.github.com/repos/coleifer/peewee/issues/1480/labels{/name} | https://api.github.com/repos/coleifer/peewee/issues/1480/comments | https://api.github.com/repos/coleifer/peewee/issues/1480/events | https://github.com/coleifer/peewee/issues/1480 | 295,257,280 | MDU6SXNzdWUyOTUyNTcyODA= | 1,480 | Can't create model instance without primary key | {
"login": "aachurin",
"id": 680329,
"node_id": "MDQ6VXNlcjY4MDMyOQ==",
"avatar_url": "https://avatars.githubusercontent.com/u/680329?v=4",
"gravatar_id": "",
"url": "https://api.github.com/users/aachurin",
"html_url": "https://github.com/aachurin",
"followers_url": "https://api.github.com/users/aachuri... | [] | closed | false | null | [] | null | [
"Ewww, thank you.",
"thx",
"3.0.14 on PyPI."
] | 2018-02-07T19:09:55 | 2018-02-07T19:43:27 | 2018-02-07T19:41:12 | NONE | null | ```python
class Model1(TestModel):
test1 = CharField(max_length=10)
class Meta:
primary_key = False
Model1.create(test1='1') # fails.
```
```
Traceback (most recent call last):
File "tests.py", line 412, in test_add_primary_key
Model1.create(test1='1')
Fil... | {
"url": "https://api.github.com/repos/coleifer/peewee/issues/1480/reactions",
"total_count": 0,
"+1": 0,
"-1": 0,
"laugh": 0,
"hooray": 0,
"confused": 0,
"heart": 0,
"rocket": 0,
"eyes": 0
} | https://api.github.com/repos/coleifer/peewee/issues/1480/timeline | null | completed | null | null |
https://api.github.com/repos/coleifer/peewee/issues/1479 | https://api.github.com/repos/coleifer/peewee | https://api.github.com/repos/coleifer/peewee/issues/1479/labels{/name} | https://api.github.com/repos/coleifer/peewee/issues/1479/comments | https://api.github.com/repos/coleifer/peewee/issues/1479/events | https://github.com/coleifer/peewee/issues/1479 | 295,239,729 | MDU6SXNzdWUyOTUyMzk3Mjk= | 1,479 | Alternative for prepared() | {
"login": "faisalraja",
"id": 3916729,
"node_id": "MDQ6VXNlcjM5MTY3Mjk=",
"avatar_url": "https://avatars.githubusercontent.com/u/3916729?v=4",
"gravatar_id": "",
"url": "https://api.github.com/users/faisalraja",
"html_url": "https://github.com/faisalraja",
"followers_url": "https://api.github.com/users... | [] | closed | false | null | [] | null | [
"There isn't really a comparable API anymore.",
"I was about to submit a new issue but found this one, which seems to be the same, so I'll post mine here: \r\n\r\nI had implemented a decently functional change-tracking system to my peewee v2 integration, which allows me to log/record any changes made to models th... | 2018-02-07T18:12:40 | 2018-12-04T22:20:19 | 2018-02-07T18:14:32 | NONE | null | What should I be using for prepared on version 3? I noticed it's not available anymore and I didn't see it in backwards breaking changes docs. I use it to copy the _data now __data__ whenever prepared is called.
Thanks | {
"url": "https://api.github.com/repos/coleifer/peewee/issues/1479/reactions",
"total_count": 0,
"+1": 0,
"-1": 0,
"laugh": 0,
"hooray": 0,
"confused": 0,
"heart": 0,
"rocket": 0,
"eyes": 0
} | https://api.github.com/repos/coleifer/peewee/issues/1479/timeline | null | completed | null | null |
https://api.github.com/repos/coleifer/peewee/issues/1478 | https://api.github.com/repos/coleifer/peewee | https://api.github.com/repos/coleifer/peewee/issues/1478/labels{/name} | https://api.github.com/repos/coleifer/peewee/issues/1478/comments | https://api.github.com/repos/coleifer/peewee/issues/1478/events | https://github.com/coleifer/peewee/pull/1478 | 295,148,220 | MDExOlB1bGxSZXF1ZXN0MTY3NzAwNDc1 | 1,478 | Scheme resolution for database urls | {
"login": "mguillau",
"id": 3710154,
"node_id": "MDQ6VXNlcjM3MTAxNTQ=",
"avatar_url": "https://avatars.githubusercontent.com/u/3710154?v=4",
"gravatar_id": "",
"url": "https://api.github.com/users/mguillau",
"html_url": "https://github.com/mguillau",
"followers_url": "https://api.github.com/users/mguil... | [] | closed | false | null | [] | null | [
"> I added recursive resolution without allowing two resolutions of the same scheme.\r\n\r\nI'm not sure I understand the need for this. So your overall db-url would be something like `env://sqlite:///:memory:`?",
"The idea is to support the chaining of resolution schemes. Because of the scheme loop constraint, t... | 2018-02-07T14:01:39 | 2018-02-08T20:02:57 | 2018-02-08T20:02:57 | NONE | null | Following the feedback on #1359, here's a minimal patch to allow extensions for resolving database urls.
Below is an example of how one would create a simple standalone extension for reading database URLs stored in environment variables:
db_url_env_ext.py :
```
import os
from urlparse import urlparse
from pla... | {
"url": "https://api.github.com/repos/coleifer/peewee/issues/1478/reactions",
"total_count": 0,
"+1": 0,
"-1": 0,
"laugh": 0,
"hooray": 0,
"confused": 0,
"heart": 0,
"rocket": 0,
"eyes": 0
} | https://api.github.com/repos/coleifer/peewee/issues/1478/timeline | null | null | false | {
"url": "https://api.github.com/repos/coleifer/peewee/pulls/1478",
"html_url": "https://github.com/coleifer/peewee/pull/1478",
"diff_url": "https://github.com/coleifer/peewee/pull/1478.diff",
"patch_url": "https://github.com/coleifer/peewee/pull/1478.patch",
"merged_at": null
} |
https://api.github.com/repos/coleifer/peewee/issues/1477 | https://api.github.com/repos/coleifer/peewee | https://api.github.com/repos/coleifer/peewee/issues/1477/labels{/name} | https://api.github.com/repos/coleifer/peewee/issues/1477/comments | https://api.github.com/repos/coleifer/peewee/issues/1477/events | https://github.com/coleifer/peewee/issues/1477 | 295,046,385 | MDU6SXNzdWUyOTUwNDYzODU= | 1,477 | Feature: Type annotation | {
"login": "cLupus",
"id": 2326244,
"node_id": "MDQ6VXNlcjIzMjYyNDQ=",
"avatar_url": "https://avatars.githubusercontent.com/u/2326244?v=4",
"gravatar_id": "",
"url": "https://api.github.com/users/cLupus",
"html_url": "https://github.com/cLupus",
"followers_url": "https://api.github.com/users/cLupus/foll... | [] | closed | false | null | [] | null | [
"@cLupus this would limit the versions of Python which peewee can run on ...\r\nThis should probably be added after 3.5 and 3.4 are EOL.",
"Does that include [snubs (mypy)](http://mypy.readthedocs.io/en/stable/basics.html#library-stubs-and-the-typeshed-repo) as well, @oz123 ?",
"I'm of the opinion that type ann... | 2018-02-07T08:27:54 | 2022-08-23T17:55:28 | 2018-02-07T14:33:09 | NONE | null | Hi,
Is there any plans of adding type annotation (hinting) to peewee? | {
"url": "https://api.github.com/repos/coleifer/peewee/issues/1477/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/1477/timeline | null | completed | null | null |
https://api.github.com/repos/coleifer/peewee/issues/1476 | https://api.github.com/repos/coleifer/peewee | https://api.github.com/repos/coleifer/peewee/issues/1476/labels{/name} | https://api.github.com/repos/coleifer/peewee/issues/1476/comments | https://api.github.com/repos/coleifer/peewee/issues/1476/events | https://github.com/coleifer/peewee/issues/1476 | 294,978,455 | MDU6SXNzdWUyOTQ5Nzg0NTU= | 1,476 | Broken backward compatibility: missing **playhouse.shortcuts.RetryOperationalError** | {
"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 | [
"I don't see it in the documentation, it's been removed.",
"My old code run on peewee 3.1.5 raise ImportError: cannot import name RetryOperationalError\r\nhow to use RetryOperationalError on 3.1.5, the docs can't find anything about it",
"It was removed in 3.0."
] | 2018-02-07T01:50:41 | 2018-03-21T11:59:16 | 2018-02-07T14:31:39 | NONE | null | ```
File "/home/rcir178/NZ-ORCID-Hub/orcid_hub/__init__.py", line 28, in <module>
from playhouse.shortcuts import RetryOperationalError
ImportError: cannot import name 'RetryOperationalError'
ERROR: could not load /home/rcir178/NZ-ORCID-Hub/tests/conftest.py
```
The documentation still refers to it: | {
"url": "https://api.github.com/repos/coleifer/peewee/issues/1476/reactions",
"total_count": 0,
"+1": 0,
"-1": 0,
"laugh": 0,
"hooray": 0,
"confused": 0,
"heart": 0,
"rocket": 0,
"eyes": 0
} | https://api.github.com/repos/coleifer/peewee/issues/1476/timeline | null | completed | null | null |
https://api.github.com/repos/coleifer/peewee/issues/1475 | https://api.github.com/repos/coleifer/peewee | https://api.github.com/repos/coleifer/peewee/issues/1475/labels{/name} | https://api.github.com/repos/coleifer/peewee/issues/1475/comments | https://api.github.com/repos/coleifer/peewee/issues/1475/events | https://github.com/coleifer/peewee/issues/1475 | 294,805,119 | MDU6SXNzdWUyOTQ4MDUxMTk= | 1,475 | slight change needed for flask-admin/contrib/peewee/forms.py | {
"login": "jefmud",
"id": 3975684,
"node_id": "MDQ6VXNlcjM5NzU2ODQ=",
"avatar_url": "https://avatars.githubusercontent.com/u/3975684?v=4",
"gravatar_id": "",
"url": "https://api.github.com/users/jefmud",
"html_url": "https://github.com/jefmud",
"followers_url": "https://api.github.com/users/jefmud/foll... | [] | closed | false | null | [] | null | [
"I'm not sure why `flask-admin` was importing `BaseModel`...it's changed in 3.0 to `ModelBase`. So the following should work:\r\n\r\n```python\r\nfrom peewee import (CharField, DateTimeField, DateField, TimeField,\r\n PrimaryKeyField, ForeignKeyField)\r\ntry:\r\n from peewee import BaseModel\r... | 2018-02-06T15:39:32 | 2018-02-06T15:57:25 | 2018-02-06T15:55:02 | NONE | null | Charles-- Peewee is great; simple and expressive (it was introduced to me by Kenneth Love).
I noticed this small issue with interoperability with flask-admin, see below.
Issue: (flask-admin) slight change needed for flask-admin/contrib/peewee/form.py
The latest version of peewee (3.0) no longer includes BaseM... | {
"url": "https://api.github.com/repos/coleifer/peewee/issues/1475/reactions",
"total_count": 0,
"+1": 0,
"-1": 0,
"laugh": 0,
"hooray": 0,
"confused": 0,
"heart": 0,
"rocket": 0,
"eyes": 0
} | https://api.github.com/repos/coleifer/peewee/issues/1475/timeline | null | completed | null | null |
https://api.github.com/repos/coleifer/peewee/issues/1474 | https://api.github.com/repos/coleifer/peewee | https://api.github.com/repos/coleifer/peewee/issues/1474/labels{/name} | https://api.github.com/repos/coleifer/peewee/issues/1474/comments | https://api.github.com/repos/coleifer/peewee/issues/1474/events | https://github.com/coleifer/peewee/issues/1474 | 294,678,958 | MDU6SXNzdWUyOTQ2Nzg5NTg= | 1,474 | `instance.save()` returns zero. | {
"login": "ShipraShalini",
"id": 9088430,
"node_id": "MDQ6VXNlcjkwODg0MzA=",
"avatar_url": "https://avatars.githubusercontent.com/u/9088430?v=4",
"gravatar_id": "",
"url": "https://api.github.com/users/ShipraShalini",
"html_url": "https://github.com/ShipraShalini",
"followers_url": "https://api.github.... | [] | closed | false | null | [] | null | [
"Apologies. My mistake.\r\nChanging `AutoFloatField` to the following fixed it.\r\n\r\n```Python\r\nclass AutoFloatField(AutoField):\r\n\r\n def python_value(self, value):\r\n return value/10\r\n```\r\nBut with `PostgresqlExtDatabase` both `python_value` and `db_value` are required. :/"
] | 2018-02-06T09:00:21 | 2018-02-06T14:26:46 | 2018-02-06T10:27:17 | NONE | null | I am using `peewee` 3.0.8/3.0.13 and sqlite3 with [fabric](https://github.com/fabric/fabric/), to store build data.
My model is:
```Python
class AutoFloatField(AutoField):
def db_value(self, value):
return value * 10
def python_value(self, value):
return value/10
class Build(BaseM... | {
"url": "https://api.github.com/repos/coleifer/peewee/issues/1474/reactions",
"total_count": 0,
"+1": 0,
"-1": 0,
"laugh": 0,
"hooray": 0,
"confused": 0,
"heart": 0,
"rocket": 0,
"eyes": 0
} | https://api.github.com/repos/coleifer/peewee/issues/1474/timeline | null | completed | null | null |
https://api.github.com/repos/coleifer/peewee/issues/1473 | https://api.github.com/repos/coleifer/peewee | https://api.github.com/repos/coleifer/peewee/issues/1473/labels{/name} | https://api.github.com/repos/coleifer/peewee/issues/1473/comments | https://api.github.com/repos/coleifer/peewee/issues/1473/events | https://github.com/coleifer/peewee/issues/1473 | 294,599,512 | MDU6SXNzdWUyOTQ1OTk1MTI= | 1,473 | alias() not reflected in get() | {
"login": "rw102",
"id": 9958815,
"node_id": "MDQ6VXNlcjk5NTg4MTU=",
"avatar_url": "https://avatars.githubusercontent.com/u/9958815?v=4",
"gravatar_id": "",
"url": "https://api.github.com/users/rw102",
"html_url": "https://github.com/rw102",
"followers_url": "https://api.github.com/users/rw102/follower... | [] | closed | false | null | [] | null | [
"Wrote a failing test, will work up a fix.",
"Pushed a new release 3.0.13."
] | 2018-02-06T01:18:53 | 2018-02-06T02:00:29 | 2018-02-06T01:56:24 | NONE | null | `Table.select(Table.column.alias('alias')).where(Table.id == 1).dicts().get()`
Until 3.0.2 this correctly returns :
`{'alias' : value}`
From 3.0.3 onwards, it returns :
`{'column': value}`
The same also happens when returning objects. | {
"url": "https://api.github.com/repos/coleifer/peewee/issues/1473/reactions",
"total_count": 0,
"+1": 0,
"-1": 0,
"laugh": 0,
"hooray": 0,
"confused": 0,
"heart": 0,
"rocket": 0,
"eyes": 0
} | https://api.github.com/repos/coleifer/peewee/issues/1473/timeline | null | completed | null | null |
https://api.github.com/repos/coleifer/peewee/issues/1472 | https://api.github.com/repos/coleifer/peewee | https://api.github.com/repos/coleifer/peewee/issues/1472/labels{/name} | https://api.github.com/repos/coleifer/peewee/issues/1472/comments | https://api.github.com/repos/coleifer/peewee/issues/1472/events | https://github.com/coleifer/peewee/issues/1472 | 294,582,817 | MDU6SXNzdWUyOTQ1ODI4MTc= | 1,472 | A replacement for playhouse.shortcuts.RetryOperationalError? | {
"login": "cubranic",
"id": 600891,
"node_id": "MDQ6VXNlcjYwMDg5MQ==",
"avatar_url": "https://avatars.githubusercontent.com/u/600891?v=4",
"gravatar_id": "",
"url": "https://api.github.com/users/cubranic",
"html_url": "https://github.com/cubranic",
"followers_url": "https://api.github.com/users/cubrani... | [] | closed | false | null | [] | null | [
"The code should work with a few modifications...the signature for `execute_sql()` is slightly different. `exception_wrapper` is now `__exception_wrapper__`. `get_cursor()` is just `cursor()`...\r\n\r\nYou'll have to experiment, but look at the way `execute_sql()` is implemented and I'm sure you can sort it out.",
... | 2018-02-05T23:47:14 | 2018-09-29T04:06:41 | 2018-02-06T01:29:18 | NONE | null | Commit 54a672547f549eb381cd9578a2b19310bcf5ef1d removed the class `playhouse.shortcuts.RetryOperationalError`. Is there a new recommended way to automatically reconnect and retry on failed queries? | {
"url": "https://api.github.com/repos/coleifer/peewee/issues/1472/reactions",
"total_count": 0,
"+1": 0,
"-1": 0,
"laugh": 0,
"hooray": 0,
"confused": 0,
"heart": 0,
"rocket": 0,
"eyes": 0
} | https://api.github.com/repos/coleifer/peewee/issues/1472/timeline | null | completed | null | null |
https://api.github.com/repos/coleifer/peewee/issues/1471 | https://api.github.com/repos/coleifer/peewee | https://api.github.com/repos/coleifer/peewee/issues/1471/labels{/name} | https://api.github.com/repos/coleifer/peewee/issues/1471/comments | https://api.github.com/repos/coleifer/peewee/issues/1471/events | https://github.com/coleifer/peewee/pull/1471 | 294,547,040 | MDExOlB1bGxSZXF1ZXN0MTY3MjU4MjIx | 1,471 | Fix formatting and spelling issues | {
"login": "stenci",
"id": 5955495,
"node_id": "MDQ6VXNlcjU5NTU0OTU=",
"avatar_url": "https://avatars.githubusercontent.com/u/5955495?v=4",
"gravatar_id": "",
"url": "https://api.github.com/users/stenci",
"html_url": "https://github.com/stenci",
"followers_url": "https://api.github.com/users/stenci/foll... | [] | closed | false | null | [] | null | [
"Danke"
] | 2018-02-05T21:24:00 | 2018-02-05T21:27:04 | 2018-02-05T21:27:00 | CONTRIBUTOR | null | {
"url": "https://api.github.com/repos/coleifer/peewee/issues/1471/reactions",
"total_count": 0,
"+1": 0,
"-1": 0,
"laugh": 0,
"hooray": 0,
"confused": 0,
"heart": 0,
"rocket": 0,
"eyes": 0
} | https://api.github.com/repos/coleifer/peewee/issues/1471/timeline | null | null | false | {
"url": "https://api.github.com/repos/coleifer/peewee/pulls/1471",
"html_url": "https://github.com/coleifer/peewee/pull/1471",
"diff_url": "https://github.com/coleifer/peewee/pull/1471.diff",
"patch_url": "https://github.com/coleifer/peewee/pull/1471.patch",
"merged_at": "2018-02-05T21:27:00"
} | |
https://api.github.com/repos/coleifer/peewee/issues/1470 | https://api.github.com/repos/coleifer/peewee | https://api.github.com/repos/coleifer/peewee/issues/1470/labels{/name} | https://api.github.com/repos/coleifer/peewee/issues/1470/comments | https://api.github.com/repos/coleifer/peewee/issues/1470/events | https://github.com/coleifer/peewee/issues/1470 | 294,484,420 | MDU6SXNzdWUyOTQ0ODQ0MjA= | 1,470 | pwiz doesn't properly generate models for postgresql array columns | {
"login": "james-lawrence",
"id": 2835871,
"node_id": "MDQ6VXNlcjI4MzU4NzE=",
"avatar_url": "https://avatars.githubusercontent.com/u/2835871?v=4",
"gravatar_id": "",
"url": "https://api.github.com/users/james-lawrence",
"html_url": "https://github.com/james-lawrence",
"followers_url": "https://api.gith... | [] | closed | false | null | [] | null | [
"This is a known limitation of the introspection tools. I'm not sure how to go from the OID returned by the cursor description to a suitable definition of an ArrayField object.",
"then leave this issue open. =)\r\n\r\nside note: each array type has its own OID, you just need to map them:\r\nhere is an example lis... | 2018-02-05T17:52:40 | 2018-02-06T17:23:41 | 2018-02-06T17:23:29 | CONTRIBUTOR | null | given a table with an text array column pwiz generates `UnknownField #ARRAY` instead of `ArrayField(TextField)`. | {
"url": "https://api.github.com/repos/coleifer/peewee/issues/1470/reactions",
"total_count": 0,
"+1": 0,
"-1": 0,
"laugh": 0,
"hooray": 0,
"confused": 0,
"heart": 0,
"rocket": 0,
"eyes": 0
} | https://api.github.com/repos/coleifer/peewee/issues/1470/timeline | null | completed | null | null |
https://api.github.com/repos/coleifer/peewee/issues/1469 | https://api.github.com/repos/coleifer/peewee | https://api.github.com/repos/coleifer/peewee/issues/1469/labels{/name} | https://api.github.com/repos/coleifer/peewee/issues/1469/comments | https://api.github.com/repos/coleifer/peewee/issues/1469/events | https://github.com/coleifer/peewee/issues/1469 | 294,472,140 | MDU6SXNzdWUyOTQ0NzIxNDA= | 1,469 | Cannot nest select within insert in 3.0.11 | {
"login": "tboz203",
"id": 1491427,
"node_id": "MDQ6VXNlcjE0OTE0Mjc=",
"avatar_url": "https://avatars.githubusercontent.com/u/1491427?v=4",
"gravatar_id": "",
"url": "https://api.github.com/users/tboz203",
"html_url": "https://github.com/tboz203",
"followers_url": "https://api.github.com/users/tboz203/... | [] | closed | false | null | [] | null | [
"Committed 8131847467a7be0f44e22f5ceb64470bb8586f93, which fixes the issue. Thank you for reporting, I've also pushed version 3.0.12 to PyPI, which includes the fix.",
"Fantastic! many thanks."
] | 2018-02-05T17:13:51 | 2018-02-09T15:16:27 | 2018-02-05T19:31:10 | NONE | null | Using python 3.5.1 (with pysqlite 2.6.0, sqlite 3.8.11) and peewee 3.0.11
Using an `INSERT` statement like the one below generates sql where the nested `SELECT` expression is not enclosed in parentheses:
```python
query_id = Table.select(Table.id).where(Table.value == "whatever")
Table.insert(id=query_id, value... | {
"url": "https://api.github.com/repos/coleifer/peewee/issues/1469/reactions",
"total_count": 0,
"+1": 0,
"-1": 0,
"laugh": 0,
"hooray": 0,
"confused": 0,
"heart": 0,
"rocket": 0,
"eyes": 0
} | https://api.github.com/repos/coleifer/peewee/issues/1469/timeline | null | completed | null | null |
https://api.github.com/repos/coleifer/peewee/issues/1468 | https://api.github.com/repos/coleifer/peewee | https://api.github.com/repos/coleifer/peewee/issues/1468/labels{/name} | https://api.github.com/repos/coleifer/peewee/issues/1468/comments | https://api.github.com/repos/coleifer/peewee/issues/1468/events | https://github.com/coleifer/peewee/issues/1468 | 294,417,107 | MDU6SXNzdWUyOTQ0MTcxMDc= | 1,468 | Missing post_init from playhouse.signals | {
"login": "michael-ball",
"id": 4253793,
"node_id": "MDQ6VXNlcjQyNTM3OTM=",
"avatar_url": "https://avatars.githubusercontent.com/u/4253793?v=4",
"gravatar_id": "",
"url": "https://api.github.com/users/michael-ball",
"html_url": "https://github.com/michael-ball",
"followers_url": "https://api.github.com... | [] | closed | false | null | [] | null | [
"Ahhh...I believe you're right. Let me look.",
"Yeah, that's no longer provided. Updated the docs and pushed a commit."
] | 2018-02-05T14:44:45 | 2018-02-05T14:51:58 | 2018-02-05T14:51:54 | NONE | null | It looks like the post_init signal is no longer defined in playhouse.signals. Is this intentional? | {
"url": "https://api.github.com/repos/coleifer/peewee/issues/1468/reactions",
"total_count": 0,
"+1": 0,
"-1": 0,
"laugh": 0,
"hooray": 0,
"confused": 0,
"heart": 0,
"rocket": 0,
"eyes": 0
} | https://api.github.com/repos/coleifer/peewee/issues/1468/timeline | null | completed | null | null |
https://api.github.com/repos/coleifer/peewee/issues/1467 | https://api.github.com/repos/coleifer/peewee | https://api.github.com/repos/coleifer/peewee/issues/1467/labels{/name} | https://api.github.com/repos/coleifer/peewee/issues/1467/comments | https://api.github.com/repos/coleifer/peewee/issues/1467/events | https://github.com/coleifer/peewee/issues/1467 | 294,166,497 | MDU6SXNzdWUyOTQxNjY0OTc= | 1,467 | Document peewee 3 change of `register_fields`. | {
"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 looks like you now pass in the `field_types` keyword argument when first creating the database. Is that right? ",
"Trying the above might work, but now I'm seeing the following when trying to import my models.\r\n\r\n # OUT: Traceback (most recent call last):\r\n # OUT: File \"<input>\", line 1, in <m... | 2018-02-04T03:31:22 | 2019-02-22T22:04:03 | 2018-02-04T18:48:01 | NONE | null | I'm just getting around to updating my project to use peewee 3. I got most of what is in the differences page, but it doesn't mention `register_fields` class method of PostgresExtDatabase is also now missing. How should I handle that? | {
"url": "https://api.github.com/repos/coleifer/peewee/issues/1467/reactions",
"total_count": 0,
"+1": 0,
"-1": 0,
"laugh": 0,
"hooray": 0,
"confused": 0,
"heart": 0,
"rocket": 0,
"eyes": 0
} | https://api.github.com/repos/coleifer/peewee/issues/1467/timeline | null | completed | null | null |
https://api.github.com/repos/coleifer/peewee/issues/1466 | https://api.github.com/repos/coleifer/peewee | https://api.github.com/repos/coleifer/peewee/issues/1466/labels{/name} | https://api.github.com/repos/coleifer/peewee/issues/1466/comments | https://api.github.com/repos/coleifer/peewee/issues/1466/events | https://github.com/coleifer/peewee/issues/1466 | 294,138,153 | MDU6SXNzdWUyOTQxMzgxNTM= | 1,466 | Pylint: "No value for argument 'database' in method call" on count() call | {
"login": "mikekeda",
"id": 4765088,
"node_id": "MDQ6VXNlcjQ3NjUwODg=",
"avatar_url": "https://avatars.githubusercontent.com/u/4765088?v=4",
"gravatar_id": "",
"url": "https://api.github.com/users/mikekeda",
"html_url": "https://github.com/mikekeda",
"followers_url": "https://api.github.com/users/mikek... | [] | closed | false | null | [] | null | [
"This is python, a dynamic language. The linter is, quite simply, wrong. Not fixing because there's no bug here. Just silly tools."
] | 2018-02-03T19:26:05 | 2018-02-04T00:07:35 | 2018-02-04T00:07:35 | NONE | null | In my code I have `User.select().count()`, after upgrading Peewee from 2.10.2 to 3.0.10 I'm getting pylint error:
> [E1120(no-value-for-parameter), users_page] No value for argument 'database' in method call
Can we add default value None for database in count method?
```
@database_required
def count(se... | {
"url": "https://api.github.com/repos/coleifer/peewee/issues/1466/reactions",
"total_count": 0,
"+1": 0,
"-1": 0,
"laugh": 0,
"hooray": 0,
"confused": 0,
"heart": 0,
"rocket": 0,
"eyes": 0
} | https://api.github.com/repos/coleifer/peewee/issues/1466/timeline | null | completed | null | null |
https://api.github.com/repos/coleifer/peewee/issues/1465 | https://api.github.com/repos/coleifer/peewee | https://api.github.com/repos/coleifer/peewee/issues/1465/labels{/name} | https://api.github.com/repos/coleifer/peewee/issues/1465/comments | https://api.github.com/repos/coleifer/peewee/issues/1465/events | https://github.com/coleifer/peewee/pull/1465 | 294,038,506 | MDExOlB1bGxSZXF1ZXN0MTY2OTE0ODMy | 1,465 | Fix not_in with empty list | {
"login": "aconz2",
"id": 3137597,
"node_id": "MDQ6VXNlcjMxMzc1OTc=",
"avatar_url": "https://avatars.githubusercontent.com/u/3137597?v=4",
"gravatar_id": "",
"url": "https://api.github.com/users/aconz2",
"html_url": "https://github.com/aconz2",
"followers_url": "https://api.github.com/users/aconz2/foll... | [] | closed | false | null | [] | null | [
"Postgresql treats `IN ()` (and incidentally `NOT IN ()`) as invalid SQL expressions. Because the semantics of `IN ()` are equivalent to false, Peewee replaces `IN ()` with `1 = 0`. I suppose it should do similar rewriting for `NOT IN ()`, converting it to `1 = 1` since it is always true.\r\n\r\nThat being said, it... | 2018-02-02T22:08:17 | 2018-02-02T22:42:29 | 2018-02-02T22:34:51 | CONTRIBUTOR | null | Using `not_in` with an empty list produces malformed SQL
```python
import peewee
from peewee import *
class MyBase(Model):
class Meta:
database = SqliteDatabase(':memory:')
class Foo(MyBase):
name = CharField()
print(peewee.__version__)
print(Foo.select().where(Foo.name.not_in([])).s... | {
"url": "https://api.github.com/repos/coleifer/peewee/issues/1465/reactions",
"total_count": 0,
"+1": 0,
"-1": 0,
"laugh": 0,
"hooray": 0,
"confused": 0,
"heart": 0,
"rocket": 0,
"eyes": 0
} | https://api.github.com/repos/coleifer/peewee/issues/1465/timeline | null | null | false | {
"url": "https://api.github.com/repos/coleifer/peewee/pulls/1465",
"html_url": "https://github.com/coleifer/peewee/pull/1465",
"diff_url": "https://github.com/coleifer/peewee/pull/1465.diff",
"patch_url": "https://github.com/coleifer/peewee/pull/1465.patch",
"merged_at": null
} |
https://api.github.com/repos/coleifer/peewee/issues/1464 | https://api.github.com/repos/coleifer/peewee | https://api.github.com/repos/coleifer/peewee/issues/1464/labels{/name} | https://api.github.com/repos/coleifer/peewee/issues/1464/comments | https://api.github.com/repos/coleifer/peewee/issues/1464/events | https://github.com/coleifer/peewee/issues/1464 | 293,955,150 | MDU6SXNzdWUyOTM5NTUxNTA= | 1,464 | Database.get_cursor missed in 3.X version | {
"login": "vikt0rs",
"id": 5230490,
"node_id": "MDQ6VXNlcjUyMzA0OTA=",
"avatar_url": "https://avatars.githubusercontent.com/u/5230490?v=4",
"gravatar_id": "",
"url": "https://api.github.com/users/vikt0rs",
"html_url": "https://github.com/vikt0rs",
"followers_url": "https://api.github.com/users/vikt0rs/... | [] | closed | false | null | [] | null | [
"It's `Database.cursor()` now. Updated docs to reflect this."
] | 2018-02-02T16:57:00 | 2018-02-02T18:14:32 | 2018-02-02T18:14:21 | NONE | null | Class Database has a "get_cursor" method in peewee 2.X versions, see [0] for example. But for some reason, it missed in 3.X versions. Documentation and changelog say nothing about this change.
Please, suggest. Thanks!
[0] - https://github.com/coleifer/peewee/blob/2.10.2/peewee.py#L3773 | {
"url": "https://api.github.com/repos/coleifer/peewee/issues/1464/reactions",
"total_count": 0,
"+1": 0,
"-1": 0,
"laugh": 0,
"hooray": 0,
"confused": 0,
"heart": 0,
"rocket": 0,
"eyes": 0
} | https://api.github.com/repos/coleifer/peewee/issues/1464/timeline | null | completed | null | null |
https://api.github.com/repos/coleifer/peewee/issues/1463 | https://api.github.com/repos/coleifer/peewee | https://api.github.com/repos/coleifer/peewee/issues/1463/labels{/name} | https://api.github.com/repos/coleifer/peewee/issues/1463/comments | https://api.github.com/repos/coleifer/peewee/issues/1463/events | https://github.com/coleifer/peewee/pull/1463 | 293,893,552 | MDExOlB1bGxSZXF1ZXN0MTY2ODA2MzEx | 1,463 | Pass kwargs through Function decorator. Fixes #1462 | {
"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 | [
"I've restricted the kwargs to just \"coerce\" and merged a similar patch. Thank you for pointing this out: 51cb6bdc25f62916fbc1f9bc471f1a1bccc1a7da"
] | 2018-02-02T13:47:24 | 2018-02-02T14:32:36 | 2018-02-02T14:32:36 | NONE | null | This enables the user to do for example
``` python
fn.ARRAY_AGG(Some.thing, coerce=False)
``` | {
"url": "https://api.github.com/repos/coleifer/peewee/issues/1463/reactions",
"total_count": 0,
"+1": 0,
"-1": 0,
"laugh": 0,
"hooray": 0,
"confused": 0,
"heart": 0,
"rocket": 0,
"eyes": 0
} | https://api.github.com/repos/coleifer/peewee/issues/1463/timeline | null | null | false | {
"url": "https://api.github.com/repos/coleifer/peewee/pulls/1463",
"html_url": "https://github.com/coleifer/peewee/pull/1463",
"diff_url": "https://github.com/coleifer/peewee/pull/1463.diff",
"patch_url": "https://github.com/coleifer/peewee/pull/1463.patch",
"merged_at": null
} |
https://api.github.com/repos/coleifer/peewee/issues/1462 | https://api.github.com/repos/coleifer/peewee | https://api.github.com/repos/coleifer/peewee/issues/1462/labels{/name} | https://api.github.com/repos/coleifer/peewee/issues/1462/comments | https://api.github.com/repos/coleifer/peewee/issues/1462/events | https://github.com/coleifer/peewee/issues/1462 | 293,870,679 | MDU6SXNzdWUyOTM4NzA2Nzk= | 1,462 | fn.ARRAY_AGG in select query tries to re-cast result | {
"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 | [
"Specify ``coerce=False`` in the call to the function.\r\n\r\n```python\r\nfn.ARRAY_AGG(Some.thing, coerce=False)\r\n```\r\n\r\nhttp://docs.peewee-orm.com/en/latest/peewee/api.html#Function"
] | 2018-02-02T12:20:10 | 2018-02-02T13:34:14 | 2018-02-02T13:34:14 | NONE | null | The `ARRAY_AGG` function combines the result of multiple row in a single ArrayField. Peewee doesn't expect that and tries to re-cast to the original field type. For example:
``` python
Network.select(fn.ARRAY_AGG(Network.id)).get()
```
Which returns a int[] in PostgreSQL, but peewee tries to recast to int
``` py... | {
"url": "https://api.github.com/repos/coleifer/peewee/issues/1462/reactions",
"total_count": 0,
"+1": 0,
"-1": 0,
"laugh": 0,
"hooray": 0,
"confused": 0,
"heart": 0,
"rocket": 0,
"eyes": 0
} | https://api.github.com/repos/coleifer/peewee/issues/1462/timeline | null | completed | null | null |
https://api.github.com/repos/coleifer/peewee/issues/1461 | https://api.github.com/repos/coleifer/peewee | https://api.github.com/repos/coleifer/peewee/issues/1461/labels{/name} | https://api.github.com/repos/coleifer/peewee/issues/1461/comments | https://api.github.com/repos/coleifer/peewee/issues/1461/events | https://github.com/coleifer/peewee/issues/1461 | 293,865,143 | MDU6SXNzdWUyOTM4NjUxNDM= | 1,461 | Equality check on postgreSQL ArrayField clarification | {
"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 | [
"> Isn't it possible for peewee to detect a PostgreSQL ArrayField is involved, and thus the operands should not be unpacked?\r\n\r\nWhat behavior are you seeing in relation to ArrayField?",
"I get:\r\n``` python\r\nIn [1]: Network.target_names.__class__\r\nOut[1]: playhouse.postgres_ext.ArrayField\r\n\r\nIn [2]: ... | 2018-02-02T11:57:24 | 2018-02-02T16:08:54 | 2018-02-02T15:41:08 | NONE | null | Continuation of https://github.com/coleifer/peewee/issues/1311
> When doing a SELECT, peewee doesn't know if the list you are passing should be unpacked (as it would for an IN query, for example). To work around, when passing lists in this situation you should wrap it in Param:
Isn't it possible for peewee to detec... | {
"url": "https://api.github.com/repos/coleifer/peewee/issues/1461/reactions",
"total_count": 0,
"+1": 0,
"-1": 0,
"laugh": 0,
"hooray": 0,
"confused": 0,
"heart": 0,
"rocket": 0,
"eyes": 0
} | https://api.github.com/repos/coleifer/peewee/issues/1461/timeline | null | completed | null | null |
https://api.github.com/repos/coleifer/peewee/issues/1460 | https://api.github.com/repos/coleifer/peewee | https://api.github.com/repos/coleifer/peewee/issues/1460/labels{/name} | https://api.github.com/repos/coleifer/peewee/issues/1460/comments | https://api.github.com/repos/coleifer/peewee/issues/1460/events | https://github.com/coleifer/peewee/issues/1460 | 293,862,144 | MDU6SXNzdWUyOTM4NjIxNDQ= | 1,460 | count() on ModelCompoundSelectQuery raises error | {
"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 | [
"Ahhh, interesting. Will get this fixed.",
"Fixed and added a test-case."
] | 2018-02-02T11:45:22 | 2018-02-02T13:25:41 | 2018-02-02T13:25:34 | NONE | null | I'm rewriting code from 2.10.1 to 3.0.9. One used to be able to do a .count() on a combined query, but now it raises an `AttributeError`. For example:
``` python
(Network.select().where(Network.id == 301) |
Network.select().where(Network.id == 300)).count()
```
``` python
~/working/peewee/peewee.py in inner(self... | {
"url": "https://api.github.com/repos/coleifer/peewee/issues/1460/reactions",
"total_count": 0,
"+1": 0,
"-1": 0,
"laugh": 0,
"hooray": 0,
"confused": 0,
"heart": 0,
"rocket": 0,
"eyes": 0
} | https://api.github.com/repos/coleifer/peewee/issues/1460/timeline | null | completed | null | null |
https://api.github.com/repos/coleifer/peewee/issues/1459 | https://api.github.com/repos/coleifer/peewee | https://api.github.com/repos/coleifer/peewee/issues/1459/labels{/name} | https://api.github.com/repos/coleifer/peewee/issues/1459/comments | https://api.github.com/repos/coleifer/peewee/issues/1459/events | https://github.com/coleifer/peewee/pull/1459 | 293,839,582 | MDExOlB1bGxSZXF1ZXN0MTY2NzY1NDU5 | 1,459 | Fixed unsaved relation population | {
"login": "conqp",
"id": 3766192,
"node_id": "MDQ6VXNlcjM3NjYxOTI=",
"avatar_url": "https://avatars.githubusercontent.com/u/3766192?v=4",
"gravatar_id": "",
"url": "https://api.github.com/users/conqp",
"html_url": "https://github.com/conqp",
"followers_url": "https://api.github.com/users/conqp/follower... | [] | closed | false | null | [] | null | [
"Very nice! Thank you and apologies for the oversight."
] | 2018-02-02T10:22:17 | 2018-02-02T13:13:04 | 2018-02-02T13:12:53 | CONTRIBUTOR | null | Fixes #1457
1) The keys in the respective dicts is the foreign key's name, not the field itself.
2) According to `ForeignKeyAccessor.__set__`, foreign key fields are never marked as dirty. | {
"url": "https://api.github.com/repos/coleifer/peewee/issues/1459/reactions",
"total_count": 0,
"+1": 0,
"-1": 0,
"laugh": 0,
"hooray": 0,
"confused": 0,
"heart": 0,
"rocket": 0,
"eyes": 0
} | https://api.github.com/repos/coleifer/peewee/issues/1459/timeline | null | null | false | {
"url": "https://api.github.com/repos/coleifer/peewee/pulls/1459",
"html_url": "https://github.com/coleifer/peewee/pull/1459",
"diff_url": "https://github.com/coleifer/peewee/pull/1459.diff",
"patch_url": "https://github.com/coleifer/peewee/pull/1459.patch",
"merged_at": "2018-02-02T13:12:53"
} |
https://api.github.com/repos/coleifer/peewee/issues/1458 | https://api.github.com/repos/coleifer/peewee | https://api.github.com/repos/coleifer/peewee/issues/1458/labels{/name} | https://api.github.com/repos/coleifer/peewee/issues/1458/comments | https://api.github.com/repos/coleifer/peewee/issues/1458/events | https://github.com/coleifer/peewee/issues/1458 | 293,814,247 | MDU6SXNzdWUyOTM4MTQyNDc= | 1,458 | Orphaned code in peewee-3.0 | {
"login": "conqp",
"id": 3766192,
"node_id": "MDQ6VXNlcjM3NjYxOTI=",
"avatar_url": "https://avatars.githubusercontent.com/u/3766192?v=4",
"gravatar_id": "",
"url": "https://api.github.com/users/conqp",
"html_url": "https://github.com/conqp",
"followers_url": "https://api.github.com/users/conqp/follower... | [] | closed | false | null | [] | null | [
"Yipes, I was scared for a sec that I had a glaring gap in the tests. Looking closer I think the `ForeignKeyAccessor` should handle setting the value so that this code is, indeed, dead. But for now I've simply updated the method to \".get_id()\", which is the correct name."
] | 2018-02-02T08:50:12 | 2018-02-02T13:10:24 | 2018-02-02T13:10:24 | CONTRIBUTOR | null | While debugging some problems with peewee-3.0 I discovered some strange code, e.g. https://github.com/coleifer/peewee/blob/406eb5865d72f1c74f48abd67bb8f4c9ccc1391a/peewee.py#L4095
The `_get_pk_value()` method was part of peewee < 3.0, but is no longer defined on peewee-3.0's `Model`. Heck, it isn't even defined anywh... | {
"url": "https://api.github.com/repos/coleifer/peewee/issues/1458/reactions",
"total_count": 0,
"+1": 0,
"-1": 0,
"laugh": 0,
"hooray": 0,
"confused": 0,
"heart": 0,
"rocket": 0,
"eyes": 0
} | https://api.github.com/repos/coleifer/peewee/issues/1458/timeline | null | completed | null | null |
https://api.github.com/repos/coleifer/peewee/issues/1457 | https://api.github.com/repos/coleifer/peewee | https://api.github.com/repos/coleifer/peewee/issues/1457/labels{/name} | https://api.github.com/repos/coleifer/peewee/issues/1457/comments | https://api.github.com/repos/coleifer/peewee/issues/1457/events | https://github.com/coleifer/peewee/issues/1457 | 293,812,791 | MDU6SXNzdWUyOTM4MTI3OTE= | 1,457 | Setting of models onto foreign key fields yields NULL value | {
"login": "conqp",
"id": 3766192,
"node_id": "MDQ6VXNlcjM3NjYxOTI=",
"avatar_url": "https://avatars.githubusercontent.com/u/3766192?v=4",
"gravatar_id": "",
"url": "https://api.github.com/users/conqp",
"html_url": "https://github.com/conqp",
"followers_url": "https://api.github.com/users/conqp/follower... | [] | closed | false | null | [] | null | [
"Okay, I think I understand the error now.\r\n\r\nAssuming:\r\n\r\n class Parent(Model):\r\n pass\r\n\r\n class Child(Model):\r\n mom = ForeignKeyField(Parent)\r\n dad = ForeignKeyField(Parent)\r\n\r\nIn peewee < 3.0 it was possible to do this:\r\n\r\n mom = Parent()\r\n dad = Paren... | 2018-02-02T08:44:21 | 2018-02-02T13:16:44 | 2018-02-02T13:12:53 | CONTRIBUTOR | null | I have a strange problem with the new peewee-3.0.
When I set a model instance onto a `ForeignKeyField` descriptor of another model instance and try to save the latter model, I get the an error.
Debug code in question (excerpt):
for model in record:
try:
model.save()
except:
... | {
"url": "https://api.github.com/repos/coleifer/peewee/issues/1457/reactions",
"total_count": 0,
"+1": 0,
"-1": 0,
"laugh": 0,
"hooray": 0,
"confused": 0,
"heart": 0,
"rocket": 0,
"eyes": 0
} | https://api.github.com/repos/coleifer/peewee/issues/1457/timeline | null | completed | null | null |
https://api.github.com/repos/coleifer/peewee/issues/1456 | https://api.github.com/repos/coleifer/peewee | https://api.github.com/repos/coleifer/peewee/issues/1456/labels{/name} | https://api.github.com/repos/coleifer/peewee/issues/1456/comments | https://api.github.com/repos/coleifer/peewee/issues/1456/events | https://github.com/coleifer/peewee/issues/1456 | 293,810,077 | MDU6SXNzdWUyOTM4MTAwNzc= | 1,456 | Allow updating existing model via dict_to_model | {
"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 | [
"I implemented something like that some time ago:\r\nhttps://github.com/HOMEINFO/peeweeplus/blob/055be28cc1ce75210772a4c097be1361fe7db6dc/peeweeplus/json.py#L172",
"Implemented it as a separate function. `dict_to_model` works the same as it did previously and to update an existing instance, you can use:\r\n\r\n`u... | 2018-02-02T08:32:45 | 2018-02-02T14:47:12 | 2018-02-02T14:43:27 | NONE | null | Hosting a HTTP API, `PATCH` requests update existing data. Adding `instance` or similar to `dict_to_model` would allow to update the loaded model:
```python
def dict_to_model(model_class, data, ignore_unknown=False):
instance = model_class()
```
As in:
```python
def dict_to_model(..., instance=None, ..... | {
"url": "https://api.github.com/repos/coleifer/peewee/issues/1456/reactions",
"total_count": 0,
"+1": 0,
"-1": 0,
"laugh": 0,
"hooray": 0,
"confused": 0,
"heart": 0,
"rocket": 0,
"eyes": 0
} | https://api.github.com/repos/coleifer/peewee/issues/1456/timeline | null | completed | null | null |
https://api.github.com/repos/coleifer/peewee/issues/1455 | https://api.github.com/repos/coleifer/peewee | https://api.github.com/repos/coleifer/peewee/issues/1455/labels{/name} | https://api.github.com/repos/coleifer/peewee/issues/1455/comments | https://api.github.com/repos/coleifer/peewee/issues/1455/events | https://github.com/coleifer/peewee/issues/1455 | 293,737,247 | MDU6SXNzdWUyOTM3MzcyNDc= | 1,455 | from playhouse.shortcuts import case | {
"login": "ra-esmith",
"id": 24212262,
"node_id": "MDQ6VXNlcjI0MjEyMjYy",
"avatar_url": "https://avatars.githubusercontent.com/u/24212262?v=4",
"gravatar_id": "",
"url": "https://api.github.com/users/ra-esmith",
"html_url": "https://github.com/ra-esmith",
"followers_url": "https://api.github.com/users/... | [] | closed | false | null | [] | null | [
"Ah I see\r\nThe Case() helper has moved from the playhouse.shortcuts module into the main peewee module.\r\n\r\nNot sure what that import is, but great I will find it",
"If you use `from peewee import *` then the Case helper is automatically imported. `Case` is the same as `case` was in 2.x, so it should be as s... | 2018-02-02T00:55:00 | 2018-02-02T01:07:57 | 2018-02-02T01:04:02 | NONE | null | I am porting up from peewee 2 to 3 and use the case statement.
I get an import error now ...
What is the work around for case?
Thanks,
Evan | {
"url": "https://api.github.com/repos/coleifer/peewee/issues/1455/reactions",
"total_count": 0,
"+1": 0,
"-1": 0,
"laugh": 0,
"hooray": 0,
"confused": 0,
"heart": 0,
"rocket": 0,
"eyes": 0
} | https://api.github.com/repos/coleifer/peewee/issues/1455/timeline | null | completed | null | null |
https://api.github.com/repos/coleifer/peewee/issues/1454 | https://api.github.com/repos/coleifer/peewee | https://api.github.com/repos/coleifer/peewee/issues/1454/labels{/name} | https://api.github.com/repos/coleifer/peewee/issues/1454/comments | https://api.github.com/repos/coleifer/peewee/issues/1454/events | https://github.com/coleifer/peewee/issues/1454 | 293,733,372 | MDU6SXNzdWUyOTM3MzMzNzI= | 1,454 | TypeError: unhashable type: 'SQL' | {
"login": "several27",
"id": 3248329,
"node_id": "MDQ6VXNlcjMyNDgzMjk=",
"avatar_url": "https://avatars.githubusercontent.com/u/3248329?v=4",
"gravatar_id": "",
"url": "https://api.github.com/users/several27",
"html_url": "https://github.com/several27",
"followers_url": "https://api.github.com/users/se... | [] | closed | false | null | [] | null | [
"I've fixed the docs, the correct way in 3.x is:\r\n\r\n```python\r\ndef mod(lhs, rhs):\r\n return Expression(lhs, '%', rhs) # No need for \"SQL()\" around '%'.\r\n```"
] | 2018-02-02T00:32:51 | 2018-02-02T01:05:37 | 2018-02-02T01:05:00 | NONE | null | Hi all, I'm trying to run the examples from the docs on sqlite database: http://docs.peewee-orm.com/en/latest/peewee/querying.html?highlight=modulo#adding-user-defined-operators . Creating an exact modulo operator as shown there with just those few lines:
```
from peewee import *
from peewee import Expression # t... | {
"url": "https://api.github.com/repos/coleifer/peewee/issues/1454/reactions",
"total_count": 0,
"+1": 0,
"-1": 0,
"laugh": 0,
"hooray": 0,
"confused": 0,
"heart": 0,
"rocket": 0,
"eyes": 0
} | https://api.github.com/repos/coleifer/peewee/issues/1454/timeline | null | completed | null | null |
https://api.github.com/repos/coleifer/peewee/issues/1453 | https://api.github.com/repos/coleifer/peewee | https://api.github.com/repos/coleifer/peewee/issues/1453/labels{/name} | https://api.github.com/repos/coleifer/peewee/issues/1453/comments | https://api.github.com/repos/coleifer/peewee/issues/1453/events | https://github.com/coleifer/peewee/issues/1453 | 293,726,711 | MDU6SXNzdWUyOTM3MjY3MTE= | 1,453 | cascade with drop_table | {
"login": "ra-esmith",
"id": 24212262,
"node_id": "MDQ6VXNlcjI0MjEyMjYy",
"avatar_url": "https://avatars.githubusercontent.com/u/24212262?v=4",
"gravatar_id": "",
"url": "https://api.github.com/users/ra-esmith",
"html_url": "https://github.com/ra-esmith",
"followers_url": "https://api.github.com/users/... | [] | closed | false | null | [] | null | [
"ahh looks like you just fixed it in 3.0.9\r\nhttps://github.com/coleifer/peewee/commit/d49784c2d6e525d882aab702fe0d2cf8163e4c18\r\n\r\nwill see if i can grab that",
"hmm, tried 3.0.9 and even took what is in git, still get unexpected keyword. Though looks like it should work ... ",
"Let me look into it some m... | 2018-02-01T23:56:15 | 2018-02-02T01:02:57 | 2018-02-02T01:02:48 | NONE | null | Porting up from 2 to 3 looking for cascade option
.db.database.drop_tables(ALL_MODELS, safe=True, cascade=True)
File "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/peewee.py", line 2579, in drop_tables
model.drop_table(**kwargs)
TypeError: drop_table() got an unexpected keywo... | {
"url": "https://api.github.com/repos/coleifer/peewee/issues/1453/reactions",
"total_count": 0,
"+1": 0,
"-1": 0,
"laugh": 0,
"hooray": 0,
"confused": 0,
"heart": 0,
"rocket": 0,
"eyes": 0
} | https://api.github.com/repos/coleifer/peewee/issues/1453/timeline | null | completed | null | null |
https://api.github.com/repos/coleifer/peewee/issues/1452 | https://api.github.com/repos/coleifer/peewee | https://api.github.com/repos/coleifer/peewee/issues/1452/labels{/name} | https://api.github.com/repos/coleifer/peewee/issues/1452/comments | https://api.github.com/repos/coleifer/peewee/issues/1452/events | https://github.com/coleifer/peewee/issues/1452 | 293,666,311 | MDU6SXNzdWUyOTM2NjYzMTE= | 1,452 | MySQL nested atomic bug in 3.X | {
"login": "aconz2",
"id": 3137597,
"node_id": "MDQ6VXNlcjMxMzc1OTc=",
"avatar_url": "https://avatars.githubusercontent.com/u/3137597?v=4",
"gravatar_id": "",
"url": "https://api.github.com/users/aconz2",
"html_url": "https://github.com/aconz2",
"followers_url": "https://api.github.com/users/aconz2/foll... | [] | closed | false | null | [] | null | [
"I'm not sure about all that... This stuff is all tested (with sqlite, mysql and postgres):\r\n\r\nhttps://github.com/coleifer/peewee/blob/41180d6354adcb61280bd4cbf122bd1e5aaa3154/tests/transactions.py#L9-L48",
"I whipped up a test-case and ran it using Python 3.6 and pymysql, connected to MariaDB 10.0.33. Test p... | 2018-02-01T20:07:31 | 2018-02-01T20:50:28 | 2018-02-01T20:47:32 | CONTRIBUTOR | null | I have come across a bug involving savepoints from the use of nested atomic blocks.
```
import peewee
from peewee import *
import os
import logging
logging.basicConfig(level=logging.DEBUG)
db = MySQLDatabase(
os.getenv('db_name'),
host = os.getenv('db_host'),
user = os.getenv('db_use... | {
"url": "https://api.github.com/repos/coleifer/peewee/issues/1452/reactions",
"total_count": 0,
"+1": 0,
"-1": 0,
"laugh": 0,
"hooray": 0,
"confused": 0,
"heart": 0,
"rocket": 0,
"eyes": 0
} | https://api.github.com/repos/coleifer/peewee/issues/1452/timeline | null | completed | null | null |
https://api.github.com/repos/coleifer/peewee/issues/1451 | https://api.github.com/repos/coleifer/peewee | https://api.github.com/repos/coleifer/peewee/issues/1451/labels{/name} | https://api.github.com/repos/coleifer/peewee/issues/1451/comments | https://api.github.com/repos/coleifer/peewee/issues/1451/events | https://github.com/coleifer/peewee/issues/1451 | 293,510,107 | MDU6SXNzdWUyOTM1MTAxMDc= | 1,451 | Implementing database context in peewee 3.0 | {
"login": "conqp",
"id": 3766192,
"node_id": "MDQ6VXNlcjM3NjYxOTI=",
"avatar_url": "https://avatars.githubusercontent.com/u/3766192?v=4",
"gravatar_id": "",
"url": "https://api.github.com/users/conqp",
"html_url": "https://github.com/conqp",
"followers_url": "https://api.github.com/users/conqp/follower... | [] | closed | false | null | [] | null | [
"The [API documentation](http://docs.peewee-orm.com/en/latest/peewee/api.html) is **much** more thorough than the 2.x documentation, have you taken a look there?\r\n\r\nSimilarly the [changes documentation](http://docs.peewee-orm.com/en/latest/peewee/changes.html) describes that, in place of `execution_context()`, ... | 2018-02-01T12:20:16 | 2018-02-02T08:35:26 | 2018-02-02T08:35:26 | CONTRIBUTOR | null | Unfortunately I have been to hasty migrating to peewee 3.0.
I was using an [extension](https://github.com/HOMEINFO/peeweeplus/blob/27aef530f3a871593aa06b9b940057a033afa0ce/peeweeplus/database.py) of the MySQLDatabase class that handles connections well (if invoked with `closing=True`).
This hack was/is supposed to ... | {
"url": "https://api.github.com/repos/coleifer/peewee/issues/1451/reactions",
"total_count": 0,
"+1": 0,
"-1": 0,
"laugh": 0,
"hooray": 0,
"confused": 0,
"heart": 0,
"rocket": 0,
"eyes": 0
} | https://api.github.com/repos/coleifer/peewee/issues/1451/timeline | null | completed | null | null |
https://api.github.com/repos/coleifer/peewee/issues/1450 | https://api.github.com/repos/coleifer/peewee | https://api.github.com/repos/coleifer/peewee/issues/1450/labels{/name} | https://api.github.com/repos/coleifer/peewee/issues/1450/comments | https://api.github.com/repos/coleifer/peewee/issues/1450/events | https://github.com/coleifer/peewee/issues/1450 | 293,448,603 | MDU6SXNzdWUyOTM0NDg2MDM= | 1,450 | Creating temporary databases for unit testing | {
"login": "cLupus",
"id": 2326244,
"node_id": "MDQ6VXNlcjIzMjYyNDQ=",
"avatar_url": "https://avatars.githubusercontent.com/u/2326244?v=4",
"gravatar_id": "",
"url": "https://api.github.com/users/cLupus",
"html_url": "https://github.com/cLupus",
"followers_url": "https://api.github.com/users/cLupus/foll... | [] | closed | false | null | [] | null | [
"So `database.bind(...)` is actually a context-manager. Hence why it is not working as you'd expect. In your `create_database` function you call database.bind(models), which instantiates a _BoundModelsContext context-manager, but since the context-manager is never entered, the binding does not take place.\r\n\r\nTo... | 2018-02-01T08:52:01 | 2020-08-04T16:19:37 | 2018-02-01T16:32:50 | NONE | null | Hi,
I am having trouble creating a database with tables that will be used in unit tests.
In 2.10.2, I used `test_database` (ref #1440 ), however now this functionality have been removed.
The desired functionality is to create / use a database, and create all the tables / (domain) models that is necessary.
Curre... | {
"url": "https://api.github.com/repos/coleifer/peewee/issues/1450/reactions",
"total_count": 0,
"+1": 0,
"-1": 0,
"laugh": 0,
"hooray": 0,
"confused": 0,
"heart": 0,
"rocket": 0,
"eyes": 0
} | https://api.github.com/repos/coleifer/peewee/issues/1450/timeline | null | completed | null | null |
https://api.github.com/repos/coleifer/peewee/issues/1449 | https://api.github.com/repos/coleifer/peewee | https://api.github.com/repos/coleifer/peewee/issues/1449/labels{/name} | https://api.github.com/repos/coleifer/peewee/issues/1449/comments | https://api.github.com/repos/coleifer/peewee/issues/1449/events | https://github.com/coleifer/peewee/issues/1449 | 293,210,624 | MDU6SXNzdWUyOTMyMTA2MjQ= | 1,449 | drop_table missing cascade option in 3.0 | {
"login": "asch99",
"id": 5629047,
"node_id": "MDQ6VXNlcjU2MjkwNDc=",
"avatar_url": "https://avatars.githubusercontent.com/u/5629047?v=4",
"gravatar_id": "",
"url": "https://api.github.com/users/asch99",
"html_url": "https://github.com/asch99",
"followers_url": "https://api.github.com/users/asch99/foll... | [] | closed | false | null | [] | null | [
"Fixed"
] | 2018-01-31T15:55:05 | 2018-01-31T18:30:53 | 2018-01-31T18:00:19 | NONE | null | The cascade=True option is no longer supported for drop_table in 3.0, can you add it back? | {
"url": "https://api.github.com/repos/coleifer/peewee/issues/1449/reactions",
"total_count": 0,
"+1": 0,
"-1": 0,
"laugh": 0,
"hooray": 0,
"confused": 0,
"heart": 0,
"rocket": 0,
"eyes": 0
} | https://api.github.com/repos/coleifer/peewee/issues/1449/timeline | null | completed | null | null |
https://api.github.com/repos/coleifer/peewee/issues/1448 | https://api.github.com/repos/coleifer/peewee | https://api.github.com/repos/coleifer/peewee/issues/1448/labels{/name} | https://api.github.com/repos/coleifer/peewee/issues/1448/comments | https://api.github.com/repos/coleifer/peewee/issues/1448/events | https://github.com/coleifer/peewee/issues/1448 | 293,103,592 | MDU6SXNzdWUyOTMxMDM1OTI= | 1,448 | Inherit database models | {
"login": "cLupus",
"id": 2326244,
"node_id": "MDQ6VXNlcjIzMjYyNDQ=",
"avatar_url": "https://avatars.githubusercontent.com/u/2326244?v=4",
"gravatar_id": "",
"url": "https://api.github.com/users/cLupus",
"html_url": "https://github.com/cLupus",
"followers_url": "https://api.github.com/users/cLupus/foll... | [] | closed | false | null | [] | null | [
"Check out test-case I added in c80c9d4bc64327237b0a8c8de208c5f41e0bed40 -- I'm also developing using Python 3.6 and encounter no such error.\r\n\r\nAre you trying to inherit a `ForeignKeyField`?",
"Looks like it -- I've added a test and a patch: a446a9f244d3b530b79b03ab97923d4081780c71\r\n\r\nFrom a semantic poi... | 2018-01-31T10:21:36 | 2018-01-31T23:04:10 | 2018-01-31T11:45:00 | NONE | null | Hi,
In version 2.10.2, one could define a new model / table with fields and then create a new model that inherits from said model (though foreign keys was a hassle).
ex.
```
class A(BaseModel):
common = TextField()
class B(A):
specific = TextField()
```
However, in 3.0.6, this does not work,... | {
"url": "https://api.github.com/repos/coleifer/peewee/issues/1448/reactions",
"total_count": 0,
"+1": 0,
"-1": 0,
"laugh": 0,
"hooray": 0,
"confused": 0,
"heart": 0,
"rocket": 0,
"eyes": 0
} | https://api.github.com/repos/coleifer/peewee/issues/1448/timeline | null | completed | null | null |
https://api.github.com/repos/coleifer/peewee/issues/1447 | https://api.github.com/repos/coleifer/peewee | https://api.github.com/repos/coleifer/peewee/issues/1447/labels{/name} | https://api.github.com/repos/coleifer/peewee/issues/1447/comments | https://api.github.com/repos/coleifer/peewee/issues/1447/events | https://github.com/coleifer/peewee/issues/1447 | 293,041,314 | MDU6SXNzdWUyOTMwNDEzMTQ= | 1,447 | Add constrain name to ForeignKeyMetadata | {
"login": "aachurin",
"id": 680329,
"node_id": "MDQ6VXNlcjY4MDMyOQ==",
"avatar_url": "https://avatars.githubusercontent.com/u/680329?v=4",
"gravatar_id": "",
"url": "https://api.github.com/users/aachurin",
"html_url": "https://github.com/aachurin",
"followers_url": "https://api.github.com/users/aachuri... | [] | closed | false | null | [] | null | [
"Nope.",
"Why not? IndexMeta has the name of index.\r\n "
] | 2018-01-31T06:05:00 | 2018-01-31T17:19:10 | 2018-01-31T11:59:51 | NONE | null | get_foreign_keys returns list of ForeignKeyMetadata. Can you add constraint name to ForeignKeyMetadata?
| {
"url": "https://api.github.com/repos/coleifer/peewee/issues/1447/reactions",
"total_count": 0,
"+1": 0,
"-1": 0,
"laugh": 0,
"hooray": 0,
"confused": 0,
"heart": 0,
"rocket": 0,
"eyes": 0
} | https://api.github.com/repos/coleifer/peewee/issues/1447/timeline | null | completed | null | null |
https://api.github.com/repos/coleifer/peewee/issues/1446 | https://api.github.com/repos/coleifer/peewee | https://api.github.com/repos/coleifer/peewee/issues/1446/labels{/name} | https://api.github.com/repos/coleifer/peewee/issues/1446/comments | https://api.github.com/repos/coleifer/peewee/issues/1446/events | https://github.com/coleifer/peewee/issues/1446 | 292,998,099 | MDU6SXNzdWUyOTI5OTgwOTk= | 1,446 | update with inner join | {
"login": "ra-esmith",
"id": 24212262,
"node_id": "MDQ6VXNlcjI0MjEyMjYy",
"avatar_url": "https://avatars.githubusercontent.com/u/24212262?v=4",
"gravatar_id": "",
"url": "https://api.github.com/users/ra-esmith",
"html_url": "https://github.com/ra-esmith",
"followers_url": "https://api.github.com/users/... | [] | closed | false | null | [] | null | [
"#my thought is to try\r\n\r\n```python\r\ndef test():\r\n with my_app.db.database.atomic():\r\n Customer.update(x=CustomerRep.select(CustomerRep.x)\r\n .where(CustomerRep.acct == Customer.acct)\r\n .order_by(CustomerRep.id.desc())\r\n .... | 2018-01-31T01:19:26 | 2018-01-31T03:15:17 | 2018-01-31T03:15:16 | NONE | null | hello,
what is the syntax for a peewee query such as the following? Is there a good way to figure this out on my own (like an sql to query syntax generator?).
```sql
update
customer
set
customer.x = customerrep.x,
customer.y = customerrep.y
from
customer cust
inner join
customerrep cu... | {
"url": "https://api.github.com/repos/coleifer/peewee/issues/1446/reactions",
"total_count": 0,
"+1": 0,
"-1": 0,
"laugh": 0,
"hooray": 0,
"confused": 0,
"heart": 0,
"rocket": 0,
"eyes": 0
} | https://api.github.com/repos/coleifer/peewee/issues/1446/timeline | null | completed | null | null |
https://api.github.com/repos/coleifer/peewee/issues/1445 | https://api.github.com/repos/coleifer/peewee | https://api.github.com/repos/coleifer/peewee/issues/1445/labels{/name} | https://api.github.com/repos/coleifer/peewee/issues/1445/comments | https://api.github.com/repos/coleifer/peewee/issues/1445/events | https://github.com/coleifer/peewee/pull/1445 | 292,975,725 | MDExOlB1bGxSZXF1ZXN0MTY2MTI2MTMx | 1,445 | Fix how set's are translated to SQL | {
"login": "aconz2",
"id": 3137597,
"node_id": "MDQ6VXNlcjMxMzc1OTc=",
"avatar_url": "https://avatars.githubusercontent.com/u/3137597?v=4",
"gravatar_id": "",
"url": "https://api.github.com/users/aconz2",
"html_url": "https://github.com/aconz2",
"followers_url": "https://api.github.com/users/aconz2/foll... | [] | closed | false | null | [] | null | [
"Fixed with 7af636d8dd81573cf02ede0bbcb6f605c8ab6118 -- which includes test. Thanks."
] | 2018-01-30T23:24:19 | 2018-01-31T02:51:42 | 2018-01-31T02:41:24 | CONTRIBUTOR | null | The following code breaks from 2 to 3
```python
import peewee
from peewee import *
db = SqliteDatabase(':memory:')
class MyModel(Model):
class Meta:
database = db
class Foo(MyModel):
name = CharField()
print(peewee.__version__)
print(Foo.select().where(Foo.name.in_({'foo'})).sql())
```
... | {
"url": "https://api.github.com/repos/coleifer/peewee/issues/1445/reactions",
"total_count": 0,
"+1": 0,
"-1": 0,
"laugh": 0,
"hooray": 0,
"confused": 0,
"heart": 0,
"rocket": 0,
"eyes": 0
} | https://api.github.com/repos/coleifer/peewee/issues/1445/timeline | null | null | false | {
"url": "https://api.github.com/repos/coleifer/peewee/pulls/1445",
"html_url": "https://github.com/coleifer/peewee/pull/1445",
"diff_url": "https://github.com/coleifer/peewee/pull/1445.diff",
"patch_url": "https://github.com/coleifer/peewee/pull/1445.patch",
"merged_at": null
} |
https://api.github.com/repos/coleifer/peewee/issues/1444 | https://api.github.com/repos/coleifer/peewee | https://api.github.com/repos/coleifer/peewee/issues/1444/labels{/name} | https://api.github.com/repos/coleifer/peewee/issues/1444/comments | https://api.github.com/repos/coleifer/peewee/issues/1444/events | https://github.com/coleifer/peewee/issues/1444 | 292,958,082 | MDU6SXNzdWUyOTI5NTgwODI= | 1,444 | PasswordField & PickledField on 3? | {
"login": "ghost",
"id": 10137,
"node_id": "MDQ6VXNlcjEwMTM3",
"avatar_url": "https://avatars.githubusercontent.com/u/10137?v=4",
"gravatar_id": "",
"url": "https://api.github.com/users/ghost",
"html_url": "https://github.com/ghost",
"followers_url": "https://api.github.com/users/ghost/followers",
"f... | [] | closed | false | null | [] | null | [
"Hey, those are no longer supported. PasswordField had some legitimate security concerns raised about it, and I don't want to give the false sense of security as to what it claims to do. PickleField is quite easy to implement in your own code or in a library.\r\n\r\n```python\r\nimport sqlite\r\nimport pickle\r\n\r... | 2018-01-30T22:15:36 | 2020-10-19T22:50:12 | 2018-01-31T02:43:14 | NONE | null | http://docs.peewee-orm.com/en/latest/peewee/changes.html#fields
What are the alternatives for `PasswordField` and `PickledField` on 3.x ?.
What are you using if you need `PasswordField` and `PickledField` on 3.x ?.
The Documentation dont mention alternatives.
:thinking:
| {
"url": "https://api.github.com/repos/coleifer/peewee/issues/1444/reactions",
"total_count": 0,
"+1": 0,
"-1": 0,
"laugh": 0,
"hooray": 0,
"confused": 0,
"heart": 0,
"rocket": 0,
"eyes": 0
} | https://api.github.com/repos/coleifer/peewee/issues/1444/timeline | null | completed | null | null |
https://api.github.com/repos/coleifer/peewee/issues/1443 | https://api.github.com/repos/coleifer/peewee | https://api.github.com/repos/coleifer/peewee/issues/1443/labels{/name} | https://api.github.com/repos/coleifer/peewee/issues/1443/comments | https://api.github.com/repos/coleifer/peewee/issues/1443/events | https://github.com/coleifer/peewee/issues/1443 | 292,924,274 | MDU6SXNzdWUyOTI5MjQyNzQ= | 1,443 | ForeignKeyField on_update and on_delete | {
"login": "aachurin",
"id": 680329,
"node_id": "MDQ6VXNlcjY4MDMyOQ==",
"avatar_url": "https://avatars.githubusercontent.com/u/680329?v=4",
"gravatar_id": "",
"url": "https://api.github.com/users/aachurin",
"html_url": "https://github.com/aachurin",
"followers_url": "https://api.github.com/users/aachuri... | [] | closed | false | null | [] | null | [
"This is now fixed, the clauses weren't being included in the constraint. Pushed a new release, 3.0.6. Thank you!"
] | 2018-01-30T20:21:45 | 2018-01-30T21:37:23 | 2018-01-30T21:35:56 | NONE | null | Is ForeignKeyField on_update and on_delete no longer supported?
| {
"url": "https://api.github.com/repos/coleifer/peewee/issues/1443/reactions",
"total_count": 0,
"+1": 0,
"-1": 0,
"laugh": 0,
"hooray": 0,
"confused": 0,
"heart": 0,
"rocket": 0,
"eyes": 0
} | https://api.github.com/repos/coleifer/peewee/issues/1443/timeline | null | completed | null | null |
https://api.github.com/repos/coleifer/peewee/issues/1442 | https://api.github.com/repos/coleifer/peewee | https://api.github.com/repos/coleifer/peewee/issues/1442/labels{/name} | https://api.github.com/repos/coleifer/peewee/issues/1442/comments | https://api.github.com/repos/coleifer/peewee/issues/1442/events | https://github.com/coleifer/peewee/issues/1442 | 292,837,643 | MDU6SXNzdWUyOTI4Mzc2NDM= | 1,442 | 3.0.2 release breaks FlaskAdmin | {
"login": "brunson",
"id": 51266,
"node_id": "MDQ6VXNlcjUxMjY2",
"avatar_url": "https://avatars.githubusercontent.com/u/51266?v=4",
"gravatar_id": "",
"url": "https://api.github.com/users/brunson",
"html_url": "https://github.com/brunson",
"followers_url": "https://api.github.com/users/brunson/follower... | [] | closed | false | null | [] | null | [
"I'm not the maintainer of Flask-Admin. You can see in the [changes](http://docs.peewee-orm.com/en/latest/peewee/changes.html#fields) that PrimaryKeyField has been renamed to AutoField.\r\n\r\nTo simplify updating, I suppose I can add a shim that logs a DeprecationWarning if you try to use PrimaryKeyField, however.... | 2018-01-30T16:00:46 | 2018-01-30T16:42:08 | 2018-01-30T16:16:37 | NONE | null | When upgrading to peewee 3.0.2 from 2.10.2 the contrib.peewee module for flask_admin fails attempting to import PrimaryKeyField from peewee.
| {
"url": "https://api.github.com/repos/coleifer/peewee/issues/1442/reactions",
"total_count": 0,
"+1": 0,
"-1": 0,
"laugh": 0,
"hooray": 0,
"confused": 0,
"heart": 0,
"rocket": 0,
"eyes": 0
} | https://api.github.com/repos/coleifer/peewee/issues/1442/timeline | null | completed | null | null |
https://api.github.com/repos/coleifer/peewee/issues/1441 | https://api.github.com/repos/coleifer/peewee | https://api.github.com/repos/coleifer/peewee/issues/1441/labels{/name} | https://api.github.com/repos/coleifer/peewee/issues/1441/comments | https://api.github.com/repos/coleifer/peewee/issues/1441/events | https://github.com/coleifer/peewee/issues/1441 | 292,831,679 | MDU6SXNzdWUyOTI4MzE2Nzk= | 1,441 | Aggregating by month: "user-defined function raised exception" | {
"login": "piotrek-k",
"id": 5506878,
"node_id": "MDQ6VXNlcjU1MDY4Nzg=",
"avatar_url": "https://avatars.githubusercontent.com/u/5506878?v=4",
"gravatar_id": "",
"url": "https://api.github.com/users/piotrek-k",
"html_url": "https://github.com/piotrek-k",
"followers_url": "https://api.github.com/users/pi... | [] | closed | false | null | [] | null | [
"What is the raw data stored in the Message.date column?",
"Executing this code\r\n```\r\n query = (dc.Message.select(dc.Message.date).limit(5))\r\n \r\n for q in query:\r\n print(q.date)\r\n```\r\nGives me this response:\r\n\r\n> 2016-08-31 15:39:00+02:00\r\n> 2016-08-31 15:39:00+02:00\r\n> 2016-... | 2018-01-30T15:46:14 | 2018-01-30T17:59:14 | 2018-01-30T15:58:23 | NONE | null | Hi,
I'm trying to extract month from `date` column in my database. [Just as it's shown here.](http://docs.peewee-orm.com/en/latest/peewee/models.html#datetimefield-datefield-and-timefield)
Here is my code:
```
query = (dc.Message.select(dc.Message.date.month.alias('month')).limit(5))
for q in query:
... | {
"url": "https://api.github.com/repos/coleifer/peewee/issues/1441/reactions",
"total_count": 0,
"+1": 0,
"-1": 0,
"laugh": 0,
"hooray": 0,
"confused": 0,
"heart": 0,
"rocket": 0,
"eyes": 0
} | https://api.github.com/repos/coleifer/peewee/issues/1441/timeline | null | completed | null | null |
https://api.github.com/repos/coleifer/peewee/issues/1440 | https://api.github.com/repos/coleifer/peewee | https://api.github.com/repos/coleifer/peewee/issues/1440/labels{/name} | https://api.github.com/repos/coleifer/peewee/issues/1440/comments | https://api.github.com/repos/coleifer/peewee/issues/1440/events | https://github.com/coleifer/peewee/issues/1440 | 292,751,141 | MDU6SXNzdWUyOTI3NTExNDE= | 1,440 | Peewee 3.0.2, what happened to `playhouse.test_utils.test_database`? | {
"login": "cLupus",
"id": 2326244,
"node_id": "MDQ6VXNlcjIzMjYyNDQ=",
"avatar_url": "https://avatars.githubusercontent.com/u/2326244?v=4",
"gravatar_id": "",
"url": "https://api.github.com/users/cLupus",
"html_url": "https://github.com/cLupus",
"followers_url": "https://api.github.com/users/cLupus/foll... | [] | closed | false | null | [] | null | [
"The functionality has been removed. You can instead use:\r\n\r\n* http://docs.peewee-orm.com/en/latest/peewee/api.html#Model.bind\r\n* http://docs.peewee-orm.com/en/latest/peewee/api.html#Model.bind_ctx\r\n\r\nThese methods allow you to bind a model (and optionally its relations) to a database.\r\n\r\nThe bind() m... | 2018-01-30T11:39:12 | 2018-02-01T07:14:35 | 2018-01-30T15:17:22 | NONE | null | Hi,
The method `test_database` seem to have disappeared, and I can't find any references to it in the new documentation (or in the changes made).
Is there a new way of doing the same, or has the functionality ben removed for good? | {
"url": "https://api.github.com/repos/coleifer/peewee/issues/1440/reactions",
"total_count": 0,
"+1": 0,
"-1": 0,
"laugh": 0,
"hooray": 0,
"confused": 0,
"heart": 0,
"rocket": 0,
"eyes": 0
} | https://api.github.com/repos/coleifer/peewee/issues/1440/timeline | null | completed | null | null |
https://api.github.com/repos/coleifer/peewee/issues/1439 | https://api.github.com/repos/coleifer/peewee | https://api.github.com/repos/coleifer/peewee/issues/1439/labels{/name} | https://api.github.com/repos/coleifer/peewee/issues/1439/comments | https://api.github.com/repos/coleifer/peewee/issues/1439/events | https://github.com/coleifer/peewee/issues/1439 | 292,698,452 | MDU6SXNzdWUyOTI2OTg0NTI= | 1,439 | Peewee 3.0.2, what happened to `Selectquery.naive`? | {
"login": "csytan",
"id": 16357,
"node_id": "MDQ6VXNlcjE2MzU3",
"avatar_url": "https://avatars.githubusercontent.com/u/16357?v=4",
"gravatar_id": "",
"url": "https://api.github.com/users/csytan",
"html_url": "https://github.com/csytan",
"followers_url": "https://api.github.com/users/csytan/followers",
... | [] | closed | false | null | [] | null | [
"Ah, thanks! I'll correct the oversight.\r\n\r\nIn 3.x you can use `.objects()` instead."
] | 2018-01-30T08:51:59 | 2018-01-30T15:14:23 | 2018-01-30T15:14:23 | NONE | null | Here are the docs from 2.7.0, but I see no mention of it in the 3.0.2 change log.
http://docs.peewee-orm.com/en/2.7.0/peewee/api.html#SelectQuery.naive
Thanks! | {
"url": "https://api.github.com/repos/coleifer/peewee/issues/1439/reactions",
"total_count": 0,
"+1": 0,
"-1": 0,
"laugh": 0,
"hooray": 0,
"confused": 0,
"heart": 0,
"rocket": 0,
"eyes": 0
} | https://api.github.com/repos/coleifer/peewee/issues/1439/timeline | null | completed | null | null |
https://api.github.com/repos/coleifer/peewee/issues/1438 | https://api.github.com/repos/coleifer/peewee | https://api.github.com/repos/coleifer/peewee/issues/1438/labels{/name} | https://api.github.com/repos/coleifer/peewee/issues/1438/comments | https://api.github.com/repos/coleifer/peewee/issues/1438/events | https://github.com/coleifer/peewee/issues/1438 | 292,654,474 | MDU6SXNzdWUyOTI2NTQ0NzQ= | 1,438 | MySQL query working in 2.10.2 not working in 3.0.2 | {
"login": "J-Light",
"id": 2544660,
"node_id": "MDQ6VXNlcjI1NDQ2NjA=",
"avatar_url": "https://avatars.githubusercontent.com/u/2544660?v=4",
"gravatar_id": "",
"url": "https://api.github.com/users/J-Light",
"html_url": "https://github.com/J-Light",
"followers_url": "https://api.github.com/users/J-Light/... | [] | closed | false | null | [] | null | [
"Can you share the code for constructing the query? Specifically, what arguments are you passing to the `.select()` method?",
"@coleifer in both cases the querry is \r\n\r\n`temp_prods.select().where(mymodel.AosProducts.name==prd_name).get()`\r\n\r\nwhere,\r\n`temp_prods = database_products.select().where(databas... | 2018-01-30T05:06:25 | 2018-01-31T12:29:50 | 2018-01-31T12:29:50 | NONE | null | I am using a MySQL database and my application is producing errors when upgrading to 3.0.2. The documented changed for v3 does not indicate the source of the error.
The following query is in 3.0.2 is
```
('SELECT FROM `aos_products` AS `t1` WHERE ((`t1`.`aos_product_category_id` IN (%s, %s, %s, %s, %s, %s, %s, %... | {
"url": "https://api.github.com/repos/coleifer/peewee/issues/1438/reactions",
"total_count": 0,
"+1": 0,
"-1": 0,
"laugh": 0,
"hooray": 0,
"confused": 0,
"heart": 0,
"rocket": 0,
"eyes": 0
} | https://api.github.com/repos/coleifer/peewee/issues/1438/timeline | null | completed | null | null |
https://api.github.com/repos/coleifer/peewee/issues/1437 | https://api.github.com/repos/coleifer/peewee | https://api.github.com/repos/coleifer/peewee/issues/1437/labels{/name} | https://api.github.com/repos/coleifer/peewee/issues/1437/comments | https://api.github.com/repos/coleifer/peewee/issues/1437/events | https://github.com/coleifer/peewee/issues/1437 | 292,638,736 | MDU6SXNzdWUyOTI2Mzg3MzY= | 1,437 | Field name case sensitivity bug | {
"login": "rene-dev",
"id": 707259,
"node_id": "MDQ6VXNlcjcwNzI1OQ==",
"avatar_url": "https://avatars.githubusercontent.com/u/707259?v=4",
"gravatar_id": "",
"url": "https://api.github.com/users/rene-dev",
"html_url": "https://github.com/rene-dev",
"followers_url": "https://api.github.com/users/rene-de... | [] | closed | false | null | [] | null | [
"Which peewee version are you using? Sorry--I suppose it's clear that you're using 3.x.",
"I've replicated this locally using Postgres. Has to do with some bug in the code assigning column values to instance attributes. Will update and push a fix as soon as I have more info.",
"Thank you so much for taking the ... | 2018-01-30T03:12:20 | 2018-01-31T05:14:26 | 2018-01-30T15:45:35 | NONE | null | I have a field name which is uppercase, and the model looks like this:
`foo = IntegerField(column_name='Foo', null=True)`
for some reason the field is always None in the query result.
however, if I change the model to lowercase:
`foo = IntegerField(column_name='foo', null=True)`
it works as expected.
I ran the sq... | {
"url": "https://api.github.com/repos/coleifer/peewee/issues/1437/reactions",
"total_count": 0,
"+1": 0,
"-1": 0,
"laugh": 0,
"hooray": 0,
"confused": 0,
"heart": 0,
"rocket": 0,
"eyes": 0
} | https://api.github.com/repos/coleifer/peewee/issues/1437/timeline | null | completed | null | null |
https://api.github.com/repos/coleifer/peewee/issues/1436 | https://api.github.com/repos/coleifer/peewee | https://api.github.com/repos/coleifer/peewee/issues/1436/labels{/name} | https://api.github.com/repos/coleifer/peewee/issues/1436/comments | https://api.github.com/repos/coleifer/peewee/issues/1436/events | https://github.com/coleifer/peewee/pull/1436 | 292,535,111 | MDExOlB1bGxSZXF1ZXN0MTY1Nzk4Nzc0 | 1,436 | Add base class rename | {
"login": "aconz2",
"id": 3137597,
"node_id": "MDQ6VXNlcjMxMzc1OTc=",
"avatar_url": "https://avatars.githubusercontent.com/u/3137597?v=4",
"gravatar_id": "",
"url": "https://api.github.com/users/aconz2",
"html_url": "https://github.com/aconz2",
"followers_url": "https://api.github.com/users/aconz2/foll... | [] | closed | false | null | [] | null | [
"Cheers. This wasn't exactly a public API, but I guess it doesn't hurt to include it?",
"Yea I just ran into this while upgrading some code so figured I would try to give others a heads up. I have some scripts that do consistency checks that totally reach in where they're not supposed to.\r\n\r\nThank you for you... | 2018-01-29T19:42:53 | 2018-01-29T20:07:40 | 2018-01-29T19:43:51 | CONTRIBUTOR | null | {
"url": "https://api.github.com/repos/coleifer/peewee/issues/1436/reactions",
"total_count": 0,
"+1": 0,
"-1": 0,
"laugh": 0,
"hooray": 0,
"confused": 0,
"heart": 0,
"rocket": 0,
"eyes": 0
} | https://api.github.com/repos/coleifer/peewee/issues/1436/timeline | null | null | false | {
"url": "https://api.github.com/repos/coleifer/peewee/pulls/1436",
"html_url": "https://github.com/coleifer/peewee/pull/1436",
"diff_url": "https://github.com/coleifer/peewee/pull/1436.diff",
"patch_url": "https://github.com/coleifer/peewee/pull/1436.patch",
"merged_at": "2018-01-29T19:43:51"
} | |
https://api.github.com/repos/coleifer/peewee/issues/1435 | https://api.github.com/repos/coleifer/peewee | https://api.github.com/repos/coleifer/peewee/issues/1435/labels{/name} | https://api.github.com/repos/coleifer/peewee/issues/1435/comments | https://api.github.com/repos/coleifer/peewee/issues/1435/events | https://github.com/coleifer/peewee/issues/1435 | 291,398,007 | MDU6SXNzdWUyOTEzOTgwMDc= | 1,435 | Peewee Not Propagating Empty Select (i.e., all columns) in certain scenarios | {
"login": "logannc",
"id": 2867206,
"node_id": "MDQ6VXNlcjI4NjcyMDY=",
"avatar_url": "https://avatars.githubusercontent.com/u/2867206?v=4",
"gravatar_id": "",
"url": "https://api.github.com/users/logannc",
"html_url": "https://github.com/logannc",
"followers_url": "https://api.github.com/users/logannc/... | [] | closed | false | null | [] | null | [
"Peewee, for simplicity, will treat \"default\" calls to `select()` as selecting all columns declared on that model. However, when a \"default\" query is used for a subquery, Peewee will only select that table's primary key. To work around this, you can explicitly select the columns you desire.\r\n\r\nAlternatively... | 2018-01-24T23:29:50 | 2018-01-25T21:22:00 | 2018-01-25T04:11:16 | NONE | null | I have not yet figured out why this is happening and there is a workaround that isn't very onerous, but I still thought I'd post this here.
Imagine you have a couple tables, `User` and `Post`.
**Post**
| id | user_id | created_at | content |
| -- | ---------- | -------------- | ---------- |
| int | int | tim... | {
"url": "https://api.github.com/repos/coleifer/peewee/issues/1435/reactions",
"total_count": 0,
"+1": 0,
"-1": 0,
"laugh": 0,
"hooray": 0,
"confused": 0,
"heart": 0,
"rocket": 0,
"eyes": 0
} | https://api.github.com/repos/coleifer/peewee/issues/1435/timeline | null | completed | null | null |
https://api.github.com/repos/coleifer/peewee/issues/1434 | https://api.github.com/repos/coleifer/peewee | https://api.github.com/repos/coleifer/peewee/issues/1434/labels{/name} | https://api.github.com/repos/coleifer/peewee/issues/1434/comments | https://api.github.com/repos/coleifer/peewee/issues/1434/events | https://github.com/coleifer/peewee/issues/1434 | 291,351,594 | MDU6SXNzdWUyOTEzNTE1OTQ= | 1,434 | Issue with insert_many - IndexError: pop from empty list | {
"login": "kelso6969",
"id": 35543864,
"node_id": "MDQ6VXNlcjM1NTQzODY0",
"avatar_url": "https://avatars.githubusercontent.com/u/35543864?v=4",
"gravatar_id": "",
"url": "https://api.github.com/users/kelso6969",
"html_url": "https://github.com/kelso6969",
"followers_url": "https://api.github.com/users/... | [] | closed | false | null | [] | null | [
"Note: I edited your comment to include formatting. Please take the extra 15 seconds to format code properly when submitting issues.\r\n\r\nRegarding the issue, I am unable to replicate it:\r\n\r\n```python\r\n\r\nfrom peewee import *\r\n\r\ndb = SqliteDatabase(':memory:')\r\n\r\nclass Mtas2(Model):\r\n ad = Cha... | 2018-01-24T20:38:37 | 2018-01-24T22:08:58 | 2018-01-24T22:08:58 | NONE | null | I'm getting this error:
```
Traceback (most recent call last):
File "test.py", line 166, in <module>
Mtas2.insert_many(subs).execute()
File "/usr/local/lib/python2.7/dist-packages/peewee.py", line 3147, in __exit__
return self._helper.__exit__(exc_type, exc_val, exc_tb)
File "/usr/local/lib/python2... | {
"url": "https://api.github.com/repos/coleifer/peewee/issues/1434/reactions",
"total_count": 0,
"+1": 0,
"-1": 0,
"laugh": 0,
"hooray": 0,
"confused": 0,
"heart": 0,
"rocket": 0,
"eyes": 0
} | https://api.github.com/repos/coleifer/peewee/issues/1434/timeline | null | completed | null | null |
https://api.github.com/repos/coleifer/peewee/issues/1433 | https://api.github.com/repos/coleifer/peewee | https://api.github.com/repos/coleifer/peewee/issues/1433/labels{/name} | https://api.github.com/repos/coleifer/peewee/issues/1433/comments | https://api.github.com/repos/coleifer/peewee/issues/1433/events | https://github.com/coleifer/peewee/issues/1433 | 291,310,526 | MDU6SXNzdWUyOTEzMTA1MjY= | 1,433 | Oracle | {
"login": "darena-mdsol",
"id": 14183609,
"node_id": "MDQ6VXNlcjE0MTgzNjA5",
"avatar_url": "https://avatars.githubusercontent.com/u/14183609?v=4",
"gravatar_id": "",
"url": "https://api.github.com/users/darena-mdsol",
"html_url": "https://github.com/darena-mdsol",
"followers_url": "https://api.github.c... | [] | closed | false | null | [] | null | [
"Yep, peewee works well with DB-API 2.0 drivers. See docs:\r\n\r\nhttp://docs.peewee-orm.com/en/latest/peewee/database.html#adding-a-new-database-driver"
] | 2018-01-24T18:20:47 | 2018-01-24T19:40:27 | 2018-01-24T19:40:27 | NONE | null | Is it possible for configure cx_Oracle for accessing for oracle DB? | {
"url": "https://api.github.com/repos/coleifer/peewee/issues/1433/reactions",
"total_count": 0,
"+1": 0,
"-1": 0,
"laugh": 0,
"hooray": 0,
"confused": 0,
"heart": 0,
"rocket": 0,
"eyes": 0
} | https://api.github.com/repos/coleifer/peewee/issues/1433/timeline | null | completed | null | null |
https://api.github.com/repos/coleifer/peewee/issues/1432 | https://api.github.com/repos/coleifer/peewee | https://api.github.com/repos/coleifer/peewee/issues/1432/labels{/name} | https://api.github.com/repos/coleifer/peewee/issues/1432/comments | https://api.github.com/repos/coleifer/peewee/issues/1432/events | https://github.com/coleifer/peewee/issues/1432 | 291,224,565 | MDU6SXNzdWUyOTEyMjQ1NjU= | 1,432 | Feature request: Get by primary key shorthand. | {
"login": "conqp",
"id": 3766192,
"node_id": "MDQ6VXNlcjM3NjYxOTI=",
"avatar_url": "https://avatars.githubusercontent.com/u/3766192?v=4",
"gravatar_id": "",
"url": "https://api.github.com/users/conqp",
"html_url": "https://github.com/conqp",
"followers_url": "https://api.github.com/users/conqp/follower... | [] | closed | false | null | [] | null | [
"This is already implemented in 3.0a."
] | 2018-01-24T14:17:23 | 2018-01-24T17:10:02 | 2018-01-24T17:10:02 | CONTRIBUTOR | null | I often want to get instances of models by the respective primary key value.
It would be nice to have a short-hand for:
def by_pk(pk_value):
return Model.get(Model._meta.primary_key == pk_value)
Hence, I suggest adding `__getitem__` to `BaseModel`:
def __getitem__(self, pk_value):
... | {
"url": "https://api.github.com/repos/coleifer/peewee/issues/1432/reactions",
"total_count": 0,
"+1": 0,
"-1": 0,
"laugh": 0,
"hooray": 0,
"confused": 0,
"heart": 0,
"rocket": 0,
"eyes": 0
} | https://api.github.com/repos/coleifer/peewee/issues/1432/timeline | null | completed | null | null |
https://api.github.com/repos/coleifer/peewee/issues/1431 | https://api.github.com/repos/coleifer/peewee | https://api.github.com/repos/coleifer/peewee/issues/1431/labels{/name} | https://api.github.com/repos/coleifer/peewee/issues/1431/comments | https://api.github.com/repos/coleifer/peewee/issues/1431/events | https://github.com/coleifer/peewee/issues/1431 | 290,935,233 | MDU6SXNzdWUyOTA5MzUyMzM= | 1,431 | pwiz not generating foreign key fields for postgres in public schema | {
"login": "TheCleric",
"id": 547567,
"node_id": "MDQ6VXNlcjU0NzU2Nw==",
"avatar_url": "https://avatars.githubusercontent.com/u/547567?v=4",
"gravatar_id": "",
"url": "https://api.github.com/users/TheCleric",
"html_url": "https://github.com/TheCleric",
"followers_url": "https://api.github.com/users/TheC... | [] | closed | false | null | [] | null | [
"The `UnknownField` is part of the boilerplate -- it is included so that it is clear where a field was found that was not of a recognized type.\r\n\r\nAs far as why the foreign key is not being picked, I'm not sure. Under-the-hood, peewee uses the following query to get information from postgres about foreign keys:... | 2018-01-23T17:54:22 | 2018-07-25T13:08:07 | 2018-02-05T16:14:41 | NONE | null | I'm attempting to use pwiz to generate models based on my existing database tables and am having an issue where the generated models do not represent a foreign key that exists within the database.
I found #1021 but it seems like that users problems are related to the schema they were using. I am using the public sch... | {
"url": "https://api.github.com/repos/coleifer/peewee/issues/1431/reactions",
"total_count": 0,
"+1": 0,
"-1": 0,
"laugh": 0,
"hooray": 0,
"confused": 0,
"heart": 0,
"rocket": 0,
"eyes": 0
} | https://api.github.com/repos/coleifer/peewee/issues/1431/timeline | null | completed | null | null |
https://api.github.com/repos/coleifer/peewee/issues/1430 | https://api.github.com/repos/coleifer/peewee | https://api.github.com/repos/coleifer/peewee/issues/1430/labels{/name} | https://api.github.com/repos/coleifer/peewee/issues/1430/comments | https://api.github.com/repos/coleifer/peewee/issues/1430/events | https://github.com/coleifer/peewee/issues/1430 | 290,654,227 | MDU6SXNzdWUyOTA2NTQyMjc= | 1,430 | Trouble compiling and running peewee with speedups | {
"login": "cLupus",
"id": 2326244,
"node_id": "MDQ6VXNlcjIzMjYyNDQ=",
"avatar_url": "https://avatars.githubusercontent.com/u/2326244?v=4",
"gravatar_id": "",
"url": "https://api.github.com/users/cLupus",
"html_url": "https://github.com/cLupus",
"followers_url": "https://api.github.com/users/cLupus/foll... | [] | closed | false | null | [] | null | [
"Not sure... you might try Peewee 3.0a?",
"Tests passed fine for me, for what it's worth.",
"I've now tried the same with 3.0a (0914cee).\r\nThe test above now succeeds, however now there are two new failures:\r\n\r\n\r\n```\r\nUnable to import sqlite C extension tests, skipping.\r\nUnable to import postgres ex... | 2018-01-22T23:26:04 | 2018-01-24T16:13:47 | 2018-01-23T17:15:31 | NONE | null | Hi,
After building peewee with python and the SQLite extension speed ups, I get the following error when running the tests.
```
FAIL: test_regexp (playhouse.tests.test_fields.TestFieldTypes)
----------------------------------------------------------------------
Traceback (most recent call last):
File "/***/bu... | {
"url": "https://api.github.com/repos/coleifer/peewee/issues/1430/reactions",
"total_count": 0,
"+1": 0,
"-1": 0,
"laugh": 0,
"hooray": 0,
"confused": 0,
"heart": 0,
"rocket": 0,
"eyes": 0
} | https://api.github.com/repos/coleifer/peewee/issues/1430/timeline | null | completed | null | null |
https://api.github.com/repos/coleifer/peewee/issues/1429 | https://api.github.com/repos/coleifer/peewee | https://api.github.com/repos/coleifer/peewee/issues/1429/labels{/name} | https://api.github.com/repos/coleifer/peewee/issues/1429/comments | https://api.github.com/repos/coleifer/peewee/issues/1429/events | https://github.com/coleifer/peewee/issues/1429 | 290,352,672 | MDU6SXNzdWUyOTAzNTI2NzI= | 1,429 | multi query slow | {
"login": "m358807551",
"id": 14256423,
"node_id": "MDQ6VXNlcjE0MjU2NDIz",
"avatar_url": "https://avatars.githubusercontent.com/u/14256423?v=4",
"gravatar_id": "",
"url": "https://api.github.com/users/m358807551",
"html_url": "https://github.com/m358807551",
"followers_url": "https://api.github.com/use... | [] | closed | false | null | [] | null | [
"This is the most ludicrous and unrealistic ticket I've seen in a long time. There's no reason you should write your code in this way, in my opinion.\r\n\r\nIf you want to get `None` for the missing values, then you could do something like this:\r\n\r\n```python\r\nquery = ModelClass.select().order_by(ModelClass.id... | 2018-01-22T05:10:57 | 2018-01-23T01:44:06 | 2018-01-22T05:30:08 | NONE | null | I have thousands of ids for a table,and I want to query model one by one by use `xxx.select().filter(id==id).first()` in a for loop(not used `>>` operator because if the given id not exist in the table, I want to get None), but this way need thousands of db query and the huge total time() is unacceptable.
I need the q... | {
"url": "https://api.github.com/repos/coleifer/peewee/issues/1429/reactions",
"total_count": 0,
"+1": 0,
"-1": 0,
"laugh": 0,
"hooray": 0,
"confused": 0,
"heart": 0,
"rocket": 0,
"eyes": 0
} | https://api.github.com/repos/coleifer/peewee/issues/1429/timeline | null | completed | null | null |
https://api.github.com/repos/coleifer/peewee/issues/1428 | https://api.github.com/repos/coleifer/peewee | https://api.github.com/repos/coleifer/peewee/issues/1428/labels{/name} | https://api.github.com/repos/coleifer/peewee/issues/1428/comments | https://api.github.com/repos/coleifer/peewee/issues/1428/events | https://github.com/coleifer/peewee/issues/1428 | 290,171,657 | MDU6SXNzdWUyOTAxNzE2NTc= | 1,428 | Default index for Fields | {
"login": "tomako",
"id": 1412056,
"node_id": "MDQ6VXNlcjE0MTIwNTY=",
"avatar_url": "https://avatars.githubusercontent.com/u/1412056?v=4",
"gravatar_id": "",
"url": "https://api.github.com/users/tomako",
"html_url": "https://github.com/tomako",
"followers_url": "https://api.github.com/users/tomako/foll... | [] | closed | false | null | [] | null | [
"Fixed, thanks for bringing this to my attention (and sorry for the confusion it caused)."
] | 2018-01-20T07:04:10 | 2018-01-21T04:34:42 | 2018-01-21T04:34:24 | NONE | null | Most of the Fields have `index=False` by default. But there are few exceptions in postgres_ext package like ArrayField, BinaryJSONField, HStoreField, TSVectorField where this changed and they get `index=True` silently.
I'm saying silently because I haven't seen in the doc and noticed that only later. Maybe our case is... | {
"url": "https://api.github.com/repos/coleifer/peewee/issues/1428/reactions",
"total_count": 0,
"+1": 0,
"-1": 0,
"laugh": 0,
"hooray": 0,
"confused": 0,
"heart": 0,
"rocket": 0,
"eyes": 0
} | https://api.github.com/repos/coleifer/peewee/issues/1428/timeline | null | completed | null | null |
https://api.github.com/repos/coleifer/peewee/issues/1427 | https://api.github.com/repos/coleifer/peewee | https://api.github.com/repos/coleifer/peewee/issues/1427/labels{/name} | https://api.github.com/repos/coleifer/peewee/issues/1427/comments | https://api.github.com/repos/coleifer/peewee/issues/1427/events | https://github.com/coleifer/peewee/issues/1427 | 289,999,614 | MDU6SXNzdWUyODk5OTk2MTQ= | 1,427 | SQLite datetime field is str after save | {
"login": "lucasrc",
"id": 441976,
"node_id": "MDQ6VXNlcjQ0MTk3Ng==",
"avatar_url": "https://avatars.githubusercontent.com/u/441976?v=4",
"gravatar_id": "",
"url": "https://api.github.com/users/lucasrc",
"html_url": "https://github.com/lucasrc",
"followers_url": "https://api.github.com/users/lucasrc/fo... | [] | closed | false | null | [] | null | [
"I don't know what you're talking about:\r\n\r\n```python\r\nIn [1]: from peewee import *\r\n\r\nIn [2]: db = SqliteDatabase(':memory:')\r\n\r\nIn [3]: class Test(Model):\r\n ...: date = DateTimeField()\r\n ...: class Meta:\r\n ...: database = db\r\n ...: \r\n\r\nIn [4]: Test.create_... | 2018-01-19T14:49:57 | 2018-01-19T19:49:20 | 2018-01-19T15:05:38 | NONE | null | class Customer(BaseModel):
date_test = DateTimeField()
Customer(date_test=now()).save()
customer = Customer.get()
customer.date_test # is a str now not datetime obj | {
"url": "https://api.github.com/repos/coleifer/peewee/issues/1427/reactions",
"total_count": 0,
"+1": 0,
"-1": 0,
"laugh": 0,
"hooray": 0,
"confused": 0,
"heart": 0,
"rocket": 0,
"eyes": 0
} | https://api.github.com/repos/coleifer/peewee/issues/1427/timeline | null | completed | null | null |
https://api.github.com/repos/coleifer/peewee/issues/1426 | https://api.github.com/repos/coleifer/peewee | https://api.github.com/repos/coleifer/peewee/issues/1426/labels{/name} | https://api.github.com/repos/coleifer/peewee/issues/1426/comments | https://api.github.com/repos/coleifer/peewee/issues/1426/events | https://github.com/coleifer/peewee/issues/1426 | 289,855,827 | MDU6SXNzdWUyODk4NTU4Mjc= | 1,426 | Cause a error when using join | {
"login": "cfk1996",
"id": 24725783,
"node_id": "MDQ6VXNlcjI0NzI1Nzgz",
"avatar_url": "https://avatars.githubusercontent.com/u/24725783?v=4",
"gravatar_id": "",
"url": "https://api.github.com/users/cfk1996",
"html_url": "https://github.com/cfk1996",
"followers_url": "https://api.github.com/users/cfk199... | [] | closed | false | null | [] | null | [
"Why is `category_id` not a `ForeignKeyField`?\r\n\r\n```python\r\nclass CsArticle(MyBaseModel):\r\n ...\r\n category = ForeignKeyField(Category) # This will work instead of category_id field.\r\n```\r\n\r\nAfter that, your \".alias()\" needs to apply to the \"on\" expression...not the query as a whole:\r\n\... | 2018-01-19T03:58:28 | 2018-01-19T15:04:02 | 2018-01-19T15:04:02 | NONE | null | ## These are my models:
```python
class MyBaseModel(Model):
class Meta:
database = db
class Category(MyBaseModel):
category_name = CharField(null=False, unique=True)
class CsArticle(MyBaseModel):
title = CharField(null=False, unique=True)
md = TextField(null=False)
html = TextField... | {
"url": "https://api.github.com/repos/coleifer/peewee/issues/1426/reactions",
"total_count": 0,
"+1": 0,
"-1": 0,
"laugh": 0,
"hooray": 0,
"confused": 0,
"heart": 0,
"rocket": 0,
"eyes": 0
} | https://api.github.com/repos/coleifer/peewee/issues/1426/timeline | null | completed | null | null |
https://api.github.com/repos/coleifer/peewee/issues/1425 | https://api.github.com/repos/coleifer/peewee | https://api.github.com/repos/coleifer/peewee/issues/1425/labels{/name} | https://api.github.com/repos/coleifer/peewee/issues/1425/comments | https://api.github.com/repos/coleifer/peewee/issues/1425/events | https://github.com/coleifer/peewee/issues/1425 | 289,580,554 | MDU6SXNzdWUyODk1ODA1NTQ= | 1,425 | pwiz does not generate related_name argument | {
"login": "simopal6",
"id": 4355487,
"node_id": "MDQ6VXNlcjQzNTU0ODc=",
"avatar_url": "https://avatars.githubusercontent.com/u/4355487?v=4",
"gravatar_id": "",
"url": "https://api.github.com/users/simopal6",
"html_url": "https://github.com/simopal6",
"followers_url": "https://api.github.com/users/simop... | [] | closed | false | null | [] | null | [
"The related_name (backref in 3.0) is a property that only exists in python/peewee. It's not an actual database thing, just a convenient way to reference the set of referenced objects. What would you expect to happen?",
"Sorry, I wasn't very clear. I have two tables, `video` and `frame` (as in \"a video has many ... | 2018-01-18T10:37:42 | 2018-01-18T17:29:25 | 2018-01-18T17:13:36 | NONE | null | As in the title, pwiz does not seem to use the `related_name` attribute on `ForeignKeyField`s. Is this expected? And is there a way to force it to do it? | {
"url": "https://api.github.com/repos/coleifer/peewee/issues/1425/reactions",
"total_count": 0,
"+1": 0,
"-1": 0,
"laugh": 0,
"hooray": 0,
"confused": 0,
"heart": 0,
"rocket": 0,
"eyes": 0
} | https://api.github.com/repos/coleifer/peewee/issues/1425/timeline | null | completed | null | null |
https://api.github.com/repos/coleifer/peewee/issues/1424 | https://api.github.com/repos/coleifer/peewee | https://api.github.com/repos/coleifer/peewee/issues/1424/labels{/name} | https://api.github.com/repos/coleifer/peewee/issues/1424/comments | https://api.github.com/repos/coleifer/peewee/issues/1424/events | https://github.com/coleifer/peewee/issues/1424 | 289,023,051 | MDU6SXNzdWUyODkwMjMwNTE= | 1,424 | Compute COUNT of a RawQuery | {
"login": "vadimkantorov",
"id": 1041752,
"node_id": "MDQ6VXNlcjEwNDE3NTI=",
"avatar_url": "https://avatars.githubusercontent.com/u/1041752?v=4",
"gravatar_id": "",
"url": "https://api.github.com/users/vadimkantorov",
"html_url": "https://github.com/vadimkantorov",
"followers_url": "https://api.github.... | [] | closed | false | null | [] | null | [
"What about:\r\n\r\n```python\r\nsql = \"my crazy query\"\r\ncount_sql = \"select count 1 from %s as _\" % sql\r\ncount, = db.execute_sql(count_sql).fetchone()\r\n```",
"Closing due to no response."
] | 2018-01-16T19:11:52 | 2018-01-18T17:13:57 | 2018-01-18T17:13:57 | NONE | null | I have a complex raw query with joins, but I'm interested only in the number of rows in the result set.
For now my workaround is: `len(list(MyModel.raw('SELECT obj.id FROM MyModel obj ...')))` but it's not very elegant and allocates objects uselessly.
Attempts like `MyModel.raw('SELECT COUNT(*) FROM MyModel obj .... | {
"url": "https://api.github.com/repos/coleifer/peewee/issues/1424/reactions",
"total_count": 0,
"+1": 0,
"-1": 0,
"laugh": 0,
"hooray": 0,
"confused": 0,
"heart": 0,
"rocket": 0,
"eyes": 0
} | https://api.github.com/repos/coleifer/peewee/issues/1424/timeline | null | completed | null | null |
https://api.github.com/repos/coleifer/peewee/issues/1423 | https://api.github.com/repos/coleifer/peewee | https://api.github.com/repos/coleifer/peewee/issues/1423/labels{/name} | https://api.github.com/repos/coleifer/peewee/issues/1423/comments | https://api.github.com/repos/coleifer/peewee/issues/1423/events | https://github.com/coleifer/peewee/issues/1423 | 288,921,406 | MDU6SXNzdWUyODg5MjE0MDY= | 1,423 | [Proposal] Decoratorsfor fields conversion | {
"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 | [
"@gugadev -- That's invalid syntax.\r\n\r\nYour example `to_base64` decorator -- do you intend that to be implemented in Python or is that a function provided by your database? Is this feature intended to be bi-directional, i.e.:\r\n\r\n```python\r\nwith open('image-file.jpg', 'rb') as fh:\r\n raw_data = fh.read... | 2018-01-16T14:14:42 | 2018-01-18T17:18:57 | 2018-01-18T17:18:57 | NONE | null | First, congratz to the team for your excelent work. Should be nice have the option to convert automatically a field when the ORM fetchs data or call some property. For example, this model have a BLOB field:
```python
class User(BaseModel):
@to_base64 # this fn converts the binary to base64 on property call
... | {
"url": "https://api.github.com/repos/coleifer/peewee/issues/1423/reactions",
"total_count": 0,
"+1": 0,
"-1": 0,
"laugh": 0,
"hooray": 0,
"confused": 0,
"heart": 0,
"rocket": 0,
"eyes": 0
} | https://api.github.com/repos/coleifer/peewee/issues/1423/timeline | null | completed | null | null |
https://api.github.com/repos/coleifer/peewee/issues/1422 | https://api.github.com/repos/coleifer/peewee | https://api.github.com/repos/coleifer/peewee/issues/1422/labels{/name} | https://api.github.com/repos/coleifer/peewee/issues/1422/comments | https://api.github.com/repos/coleifer/peewee/issues/1422/events | https://github.com/coleifer/peewee/issues/1422 | 288,220,838 | MDU6SXNzdWUyODgyMjA4Mzg= | 1,422 | cast not supported | {
"login": "ra-esmith",
"id": 24212262,
"node_id": "MDQ6VXNlcjI0MjEyMjYy",
"avatar_url": "https://avatars.githubusercontent.com/u/24212262?v=4",
"gravatar_id": "",
"url": "https://api.github.com/users/ra-esmith",
"html_url": "https://github.com/ra-esmith",
"followers_url": "https://api.github.com/users/... | [] | closed | false | null | [] | null | [
"Cast is now just a method call:\r\n\r\n```python\r\n\r\nexpression = column.cast('text').contains(...)\r\n```"
] | 2018-01-12T19:22:59 | 2018-01-12T20:01:25 | 2018-01-12T20:01:25 | NONE | null | Hello,
Peewee rocks! Thank you for a great ORM!
I am porting unto 3.0 and ran into an error that
cast was not supported.
How might I do the following
from playhouse.shortcuts import cast
expr = (cast(column, 'text').contains(str((request_values[key_search]))))
Thanks,
Evan | {
"url": "https://api.github.com/repos/coleifer/peewee/issues/1422/reactions",
"total_count": 0,
"+1": 0,
"-1": 0,
"laugh": 0,
"hooray": 0,
"confused": 0,
"heart": 0,
"rocket": 0,
"eyes": 0
} | https://api.github.com/repos/coleifer/peewee/issues/1422/timeline | null | completed | null | null |
https://api.github.com/repos/coleifer/peewee/issues/1421 | https://api.github.com/repos/coleifer/peewee | https://api.github.com/repos/coleifer/peewee/issues/1421/labels{/name} | https://api.github.com/repos/coleifer/peewee/issues/1421/comments | https://api.github.com/repos/coleifer/peewee/issues/1421/events | https://github.com/coleifer/peewee/pull/1421 | 288,143,901 | MDExOlB1bGxSZXF1ZXN0MTYyNjQ5MTA4 | 1,421 | Fix #1420 InsertQuery | {
"login": "Elfoniok",
"id": 662433,
"node_id": "MDQ6VXNlcjY2MjQzMw==",
"avatar_url": "https://avatars.githubusercontent.com/u/662433?v=4",
"gravatar_id": "",
"url": "https://api.github.com/users/Elfoniok",
"html_url": "https://github.com/Elfoniok",
"followers_url": "https://api.github.com/users/Elfonio... | [] | closed | false | null | [] | null | [] | 2018-01-12T14:55:17 | 2018-01-21T04:35:02 | 2018-01-21T04:35:02 | NONE | null | Signed-off-by: Lukasz Foniok <lukaszfoniok@gmail.com>
Resolves https://github.com/coleifer/peewee/issues/1420 | {
"url": "https://api.github.com/repos/coleifer/peewee/issues/1421/reactions",
"total_count": 0,
"+1": 0,
"-1": 0,
"laugh": 0,
"hooray": 0,
"confused": 0,
"heart": 0,
"rocket": 0,
"eyes": 0
} | https://api.github.com/repos/coleifer/peewee/issues/1421/timeline | null | null | false | {
"url": "https://api.github.com/repos/coleifer/peewee/pulls/1421",
"html_url": "https://github.com/coleifer/peewee/pull/1421",
"diff_url": "https://github.com/coleifer/peewee/pull/1421.diff",
"patch_url": "https://github.com/coleifer/peewee/pull/1421.patch",
"merged_at": null
} |
https://api.github.com/repos/coleifer/peewee/issues/1420 | https://api.github.com/repos/coleifer/peewee | https://api.github.com/repos/coleifer/peewee/issues/1420/labels{/name} | https://api.github.com/repos/coleifer/peewee/issues/1420/comments | https://api.github.com/repos/coleifer/peewee/issues/1420/events | https://github.com/coleifer/peewee/issues/1420 | 288,138,457 | MDU6SXNzdWUyODgxMzg0NTc= | 1,420 | InsertQuery.execute quietly assumes synchronous cursor | {
"login": "Elfoniok",
"id": 662433,
"node_id": "MDQ6VXNlcjY2MjQzMw==",
"avatar_url": "https://avatars.githubusercontent.com/u/662433?v=4",
"gravatar_id": "",
"url": "https://api.github.com/users/Elfoniok",
"html_url": "https://github.com/Elfoniok",
"followers_url": "https://api.github.com/users/Elfonio... | [] | closed | false | null | [] | null | [
"Have you tested with 3.0a? I just added a test-case to 3.0a which would indicate that this case is being handled properly:\r\n\r\n```diff\r\ndiff --git a/tests/sqliteq.py b/tests/sqliteq.py\r\nindex ebda3b7..cd7aecb 100644\r\n--- a/tests/sqliteq.py\r\n+++ b/tests/sqliteq.py\r\n@@ -69,6 +69,11 @@ class BaseTestQueu... | 2018-01-12T14:37:19 | 2018-01-15T15:22:38 | 2018-01-15T14:52:39 | NONE | null | When executing insert query, execute method assumes that synchronous code is executed.
If async cursor was used insted, method will silently return passed row, even though exception should be thrown.
Simple test, using SqliteQueueDatabase test this:
```
model.Payment.create(primarykey="xyz", value=5)
... | {
"url": "https://api.github.com/repos/coleifer/peewee/issues/1420/reactions",
"total_count": 0,
"+1": 0,
"-1": 0,
"laugh": 0,
"hooray": 0,
"confused": 0,
"heart": 0,
"rocket": 0,
"eyes": 0
} | https://api.github.com/repos/coleifer/peewee/issues/1420/timeline | null | completed | null | null |
https://api.github.com/repos/coleifer/peewee/issues/1419 | https://api.github.com/repos/coleifer/peewee | https://api.github.com/repos/coleifer/peewee/issues/1419/labels{/name} | https://api.github.com/repos/coleifer/peewee/issues/1419/comments | https://api.github.com/repos/coleifer/peewee/issues/1419/events | https://github.com/coleifer/peewee/issues/1419 | 287,202,614 | MDU6SXNzdWUyODcyMDI2MTQ= | 1,419 | execution_context decorator throws error when used with Proxy (2.10.2) | {
"login": "tadasant",
"id": 3900899,
"node_id": "MDQ6VXNlcjM5MDA4OTk=",
"avatar_url": "https://avatars.githubusercontent.com/u/3900899?v=4",
"gravatar_id": "",
"url": "https://api.github.com/users/tadasant",
"html_url": "https://github.com/tadasant",
"followers_url": "https://api.github.com/users/tadas... | [] | closed | false | null | [] | null | [
"Python is interpreted at runtime. When Python evaluates the class definition it sees `@database.execution_context()`. A decorator implies a function call and since the `database` is not bound at the time Python constructs the class, you get the error. Not an issue, just Python doing its thing."
] | 2018-01-09T19:27:58 | 2018-01-09T22:52:18 | 2018-01-09T22:52:18 | NONE | null | Haven't dived too deep into this since the workaround is easy, but observed...
`models.py`
```python
from peewee import Model, Proxy
database = Proxy()
class MyObject(Model):
id = CharField(primary_key=True)
class Meta:
database = database
```
`Wrapper.py`
```python
from src.models... | {
"url": "https://api.github.com/repos/coleifer/peewee/issues/1419/reactions",
"total_count": 0,
"+1": 0,
"-1": 0,
"laugh": 0,
"hooray": 0,
"confused": 0,
"heart": 0,
"rocket": 0,
"eyes": 0
} | https://api.github.com/repos/coleifer/peewee/issues/1419/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.