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/2719
https://api.github.com/repos/coleifer/peewee
https://api.github.com/repos/coleifer/peewee/issues/2719/labels{/name}
https://api.github.com/repos/coleifer/peewee/issues/2719/comments
https://api.github.com/repos/coleifer/peewee/issues/2719/events
https://github.com/coleifer/peewee/issues/2719
1,692,808,474
I_kwDOAA7yGM5k5jUa
2,719
PeeWee ForeignKeyField error. IntegrityError: (1215, 'Cannot add foreign key constraint')
{ "login": "Ezyhoo", "id": 43151697, "node_id": "MDQ6VXNlcjQzMTUxNjk3", "avatar_url": "https://avatars.githubusercontent.com/u/43151697?v=4", "gravatar_id": "", "url": "https://api.github.com/users/Ezyhoo", "html_url": "https://github.com/Ezyhoo", "followers_url": "https://api.github.com/users/Ezyhoo/fo...
[]
closed
false
null
[]
null
[ "It is probably not recommended to put the UNIQUE in the field definitions since these are already primary keys:\r\n\r\n```python\r\nclass UnsignedBigAutoField(pw.BigAutoField):\r\n field_type = 'BIGINT UNSIGNED AUTO_INCREMENT'\r\n\r\nclass UnsignedAutoField(pw.AutoField):\r\n field_type = 'INT UNSIGNED AUTO_...
2023-05-02T17:26:01
2023-05-02T19:42:51
2023-05-02T19:42:05
NONE
null
I have code like below: ``` import datetime import peewee as pw import os my_db = pw.MySQLDatabase(database=os.getenv("DB_NAME"), host=os.getenv("DB_HOST"), port=os.getenv("DB_PORT"), user=os.getenv("DB_USER"), passwd=os.getenv("DB_PASSWORD") class MySQLModel(pw.Model): ...
{ "url": "https://api.github.com/repos/coleifer/peewee/issues/2719/reactions", "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 }
https://api.github.com/repos/coleifer/peewee/issues/2719/timeline
null
completed
null
null
https://api.github.com/repos/coleifer/peewee/issues/2718
https://api.github.com/repos/coleifer/peewee
https://api.github.com/repos/coleifer/peewee/issues/2718/labels{/name}
https://api.github.com/repos/coleifer/peewee/issues/2718/comments
https://api.github.com/repos/coleifer/peewee/issues/2718/events
https://github.com/coleifer/peewee/issues/2718
1,692,807,469
I_kwDOAA7yGM5k5jEt
2,718
Fastapi db connection doc
{ "login": "AndyJiangIsTaken", "id": 87741207, "node_id": "MDQ6VXNlcjg3NzQxMjA3", "avatar_url": "https://avatars.githubusercontent.com/u/87741207?v=4", "gravatar_id": "", "url": "https://api.github.com/users/AndyJiangIsTaken", "html_url": "https://github.com/AndyJiangIsTaken", "followers_url": "https://...
[]
closed
false
null
[]
null
[ "The FastAPI docs have a thorough section, I probably need to just link it since your comment is correct and my docs may be misleading.\r\n\r\nhttps://fastapi.tiangolo.com/advanced/sql-databases-peewee/#make-peewee-async-compatible-peeweeconnectionstate", "Updated doc here: http://docs.peewee-orm.com/en/latest/pe...
2023-05-02T17:25:10
2023-05-02T17:48:16
2023-05-02T17:34:10
NONE
null
Hi, Here's the peewee doc I'm referring to: https://docs.peewee-orm.com/en/latest/peewee/database.html#fastapi According to the FastAPI doc, the startup & shutdown events are for when the application, not request here: https://fastapi.tiangolo.com/advanced/events/#startup-event Let me know I'm missing someth...
{ "url": "https://api.github.com/repos/coleifer/peewee/issues/2718/reactions", "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 }
https://api.github.com/repos/coleifer/peewee/issues/2718/timeline
null
completed
null
null
https://api.github.com/repos/coleifer/peewee/issues/2717
https://api.github.com/repos/coleifer/peewee
https://api.github.com/repos/coleifer/peewee/issues/2717/labels{/name}
https://api.github.com/repos/coleifer/peewee/issues/2717/comments
https://api.github.com/repos/coleifer/peewee/issues/2717/events
https://github.com/coleifer/peewee/issues/2717
1,690,728,970
I_kwDOAA7yGM5kxnoK
2,717
Calling save fails when PK is provided but record does not exist yet.
{ "login": "keiranjprice101", "id": 44777678, "node_id": "MDQ6VXNlcjQ0Nzc3Njc4", "avatar_url": "https://avatars.githubusercontent.com/u/44777678?v=4", "gravatar_id": "", "url": "https://api.github.com/users/keiranjprice101", "html_url": "https://github.com/keiranjprice101", "followers_url": "https://api...
[]
closed
false
null
[]
null
[ "The docs do make mention of this, there is in fact a section on this: http://docs.peewee-orm.com/en/latest/peewee/models.html#manually-specifying-primary-keys\r\n\r\nAt the most basic, though, this is all you need to add if you are doing this one-off:\r\n\r\n```\r\ncustomer.id = 4\r\ncustomer.email = \"example@exa...
2023-05-01T12:02:11
2023-05-01T13:07:19
2023-05-01T13:07:18
NONE
null
In this example: ```python class CustomerPeewee(BaseModel): email = CharField() class Meta: db_table = "customer" customer = CustomerPeewee() customer.id = 4 customer.email = "example@example.com" customer.save() ``` No record is created and 0 is returned. If this is intended it feels...
{ "url": "https://api.github.com/repos/coleifer/peewee/issues/2717/reactions", "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 }
https://api.github.com/repos/coleifer/peewee/issues/2717/timeline
null
completed
null
null
https://api.github.com/repos/coleifer/peewee/issues/2716
https://api.github.com/repos/coleifer/peewee
https://api.github.com/repos/coleifer/peewee/issues/2716/labels{/name}
https://api.github.com/repos/coleifer/peewee/issues/2716/comments
https://api.github.com/repos/coleifer/peewee/issues/2716/events
https://github.com/coleifer/peewee/issues/2716
1,687,136,706
I_kwDOAA7yGM5kj6nC
2,716
Automatic Migrations Capability
{ "login": "anuran-roy", "id": 76481787, "node_id": "MDQ6VXNlcjc2NDgxNzg3", "avatar_url": "https://avatars.githubusercontent.com/u/76481787?v=4", "gravatar_id": "", "url": "https://api.github.com/users/anuran-roy", "html_url": "https://github.com/anuran-roy", "followers_url": "https://api.github.com/use...
[]
closed
false
null
[]
null
[ ">since I couldn't find any automated tool for migrations\r\n\r\nYou may not have looked very hard, there are several I'm aware of:\r\n\r\n* https://github.com/klen/peewee_migrate\r\n* https://github.com/aachurin/peewee_migrations\r\n* https://github.com/timster/peewee-moves\r\n\r\nI can't vouch for the fitness or ...
2023-04-27T15:58:44
2023-04-27T16:35:29
2023-04-27T16:13:05
NONE
null
Hey there! Anuran this side! I'm a long time fan of peewee, been using it for a quite a few projects - thanks for this awesome tool, really saves a lot of time for someone who uses Django as well! 🚀 Actually I was on the process of creating a custom script for automated migrations, since I couldn't find any aut...
{ "url": "https://api.github.com/repos/coleifer/peewee/issues/2716/reactions", "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 }
https://api.github.com/repos/coleifer/peewee/issues/2716/timeline
null
completed
null
null
https://api.github.com/repos/coleifer/peewee/issues/2715
https://api.github.com/repos/coleifer/peewee
https://api.github.com/repos/coleifer/peewee/issues/2715/labels{/name}
https://api.github.com/repos/coleifer/peewee/issues/2715/comments
https://api.github.com/repos/coleifer/peewee/issues/2715/events
https://github.com/coleifer/peewee/issues/2715
1,685,261,994
I_kwDOAA7yGM5kcw6q
2,715
Postgres error : Driver not installed, using peewee,docker and fastapi
{ "login": "Master-Y0da", "id": 10148942, "node_id": "MDQ6VXNlcjEwMTQ4OTQy", "avatar_url": "https://avatars.githubusercontent.com/u/10148942?v=4", "gravatar_id": "", "url": "https://api.github.com/users/Master-Y0da", "html_url": "https://github.com/Master-Y0da", "followers_url": "https://api.github.com/...
[]
closed
false
null
[]
null
[ "Apparently you didn't install `psycopg2`, or for some reason Peewee is unable to import it. In your `main.py` try adding a line `import psycopg2 ; print(psycopg2)` - it should be easy to tell.", "I intalled pyscogp2 not psycopg2 , really bad one hahaha thank you!!", "You might've installed some malware or a mi...
2023-04-26T15:33:40
2023-04-26T16:44:22
2023-04-26T15:51:31
NONE
null
I have installed peewee 3.16.2 ,pyscopg2 66.0.2 and fastapi 0.95.1. I follow the steps in peewee docs about integrate fastapi apps, but showing up this error **peewee.ImproperlyConfigured: Postgres driver not installed!** This is my config file in fastapi: def init_db(): db = Postgres...
{ "url": "https://api.github.com/repos/coleifer/peewee/issues/2715/reactions", "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 }
https://api.github.com/repos/coleifer/peewee/issues/2715/timeline
null
completed
null
null
https://api.github.com/repos/coleifer/peewee/issues/2714
https://api.github.com/repos/coleifer/peewee
https://api.github.com/repos/coleifer/peewee/issues/2714/labels{/name}
https://api.github.com/repos/coleifer/peewee/issues/2714/comments
https://api.github.com/repos/coleifer/peewee/issues/2714/events
https://github.com/coleifer/peewee/issues/2714
1,681,779,813
I_kwDOAA7yGM5kPexl
2,714
`peewee` for WebAssembly (JupyterLite + XEUS-Python + emscripten-forge)
{ "login": "michaelweinold", "id": 23102087, "node_id": "MDQ6VXNlcjIzMTAyMDg3", "avatar_url": "https://avatars.githubusercontent.com/u/23102087?v=4", "gravatar_id": "", "url": "https://api.github.com/users/michaelweinold", "html_url": "https://github.com/michaelweinold", "followers_url": "https://api.gi...
[]
closed
false
null
[]
null
[ "1. peewee does not necessarily require c extensions\r\n2. psycopg2cffi is only needed if you want to use postgres and is primarily aimed at pypy users who don't have c extensions, so I'm completely at a loss why this particular bit seemed so important to you.\r\n3. the error is not coming from peewee but seems rel...
2023-04-24T18:06:14
2023-04-24T18:14:13
2023-04-24T18:14:12
NONE
null
## Overview To bring the [Brightway life-cycle assessment python package](https://documentation.brightway.dev/) to the browser, [we](https://github.com/brightway-lca) recently added `peewee` to the WebAssembly [`emscripten-forge`](https://github.com/emscripten-forge/recipes) package repository. This was necessary si...
{ "url": "https://api.github.com/repos/coleifer/peewee/issues/2714/reactions", "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 }
https://api.github.com/repos/coleifer/peewee/issues/2714/timeline
null
completed
null
null
https://api.github.com/repos/coleifer/peewee/issues/2713
https://api.github.com/repos/coleifer/peewee
https://api.github.com/repos/coleifer/peewee/issues/2713/labels{/name}
https://api.github.com/repos/coleifer/peewee/issues/2713/comments
https://api.github.com/repos/coleifer/peewee/issues/2713/events
https://github.com/coleifer/peewee/issues/2713
1,680,911,617
I_kwDOAA7yGM5kMK0B
2,713
How to "NOT" create index on a "unique" field
{ "login": "eddysnjack", "id": 38407276, "node_id": "MDQ6VXNlcjM4NDA3Mjc2", "avatar_url": "https://avatars.githubusercontent.com/u/38407276?v=4", "gravatar_id": "", "url": "https://api.github.com/users/eddysnjack", "html_url": "https://github.com/eddysnjack", "followers_url": "https://api.github.com/use...
[]
closed
false
null
[]
null
[ "What database engine are you using?", "> What database engine are you using?\r\n\r\nhow can i check that?", "You presumably declared it yourself... SqliteDatabase, MySQLDatabase, PostgresqlDatabase...", "At any rate it seems to be working fine for me:\r\n\r\n```python\r\ndb = SqliteDatabase(':memory:')\r\n\r...
2023-04-24T10:09:35
2023-04-24T13:47:48
2023-04-24T12:42:17
NONE
null
i have o model looking like this. ``` class User(BaseModel): id = BigIntegerField(unique=True) first_name = TextField() last_name = CharField(null=True) username = CharField(unique=True, null=True, index=False) phone = CharField(null=True) deleted = BooleanField(null=True) is_bot ...
{ "url": "https://api.github.com/repos/coleifer/peewee/issues/2713/reactions", "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 }
https://api.github.com/repos/coleifer/peewee/issues/2713/timeline
null
completed
null
null
https://api.github.com/repos/coleifer/peewee/issues/2712
https://api.github.com/repos/coleifer/peewee
https://api.github.com/repos/coleifer/peewee/issues/2712/labels{/name}
https://api.github.com/repos/coleifer/peewee/issues/2712/comments
https://api.github.com/repos/coleifer/peewee/issues/2712/events
https://github.com/coleifer/peewee/issues/2712
1,680,522,237
I_kwDOAA7yGM5kKrv9
2,712
insert_many method missing field values.
{ "login": "frelion", "id": 71957494, "node_id": "MDQ6VXNlcjcxOTU3NDk0", "avatar_url": "https://avatars.githubusercontent.com/u/71957494?v=4", "gravatar_id": "", "url": "https://api.github.com/users/frelion", "html_url": "https://github.com/frelion", "followers_url": "https://api.github.com/users/frelio...
[]
closed
false
null
[]
null
[ "http://docs.peewee-orm.com/en/latest/peewee/api.html?highlight=insert_many#Model.insert_many", "Looks to be working fine:\r\n\r\n```python\r\nclass Reg(db.Model):\r\n val = TextField(null=True)\r\n\r\nReg.create_table()\r\nReg.insert_many([{}, {'val': 'asdf'}], fields=[Reg.val]).execute()\r\nprint(list(Reg.se...
2023-04-24T06:07:36
2023-04-24T12:37:00
2023-04-24T07:07:49
NONE
null
peewee==3.16.0 Python 3.10.6 For the following code: ``` class TestModel(Model): class Meta: database = mysql_db test_field = CharField(null=True) TestModel.create_table() insert_data = [ {}, { 'test_field': "hello" } ] TestModel.insert_many(insert_data).execute() ...
{ "url": "https://api.github.com/repos/coleifer/peewee/issues/2712/reactions", "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 }
https://api.github.com/repos/coleifer/peewee/issues/2712/timeline
null
completed
null
null
https://api.github.com/repos/coleifer/peewee/issues/2711
https://api.github.com/repos/coleifer/peewee
https://api.github.com/repos/coleifer/peewee/issues/2711/labels{/name}
https://api.github.com/repos/coleifer/peewee/issues/2711/comments
https://api.github.com/repos/coleifer/peewee/issues/2711/events
https://github.com/coleifer/peewee/pull/2711
1,676,462,240
PR_kwDOAA7yGM5OwRRM
2,711
Feature/filter none on where
{ "login": "ponponon", "id": 38725104, "node_id": "MDQ6VXNlcjM4NzI1MTA0", "avatar_url": "https://avatars.githubusercontent.com/u/38725104?v=4", "gravatar_id": "", "url": "https://api.github.com/users/ponponon", "html_url": "https://github.com/ponponon", "followers_url": "https://api.github.com/users/pon...
[]
closed
false
null
[]
null
[ "I don't think silently ignoring arguments is a good plan, the issue is the caller passing `None` in the first place." ]
2023-04-20T10:35:57
2023-04-20T12:33:25
2023-04-20T12:33:25
NONE
null
```python q = SeriesTable.select().where( None, None ) ``` If where is called for the first time and where has more than one None parameter, an error will occur: ```shell Traceback (most recent call last): File "<frozen runpy>", line 198, in _run_module_as_main File "<frozen runpy>", line 88, in ...
{ "url": "https://api.github.com/repos/coleifer/peewee/issues/2711/reactions", "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 }
https://api.github.com/repos/coleifer/peewee/issues/2711/timeline
null
null
false
{ "url": "https://api.github.com/repos/coleifer/peewee/pulls/2711", "html_url": "https://github.com/coleifer/peewee/pull/2711", "diff_url": "https://github.com/coleifer/peewee/pull/2711.diff", "patch_url": "https://github.com/coleifer/peewee/pull/2711.patch", "merged_at": null }
https://api.github.com/repos/coleifer/peewee/issues/2710
https://api.github.com/repos/coleifer/peewee
https://api.github.com/repos/coleifer/peewee/issues/2710/labels{/name}
https://api.github.com/repos/coleifer/peewee/issues/2710/comments
https://api.github.com/repos/coleifer/peewee/issues/2710/events
https://github.com/coleifer/peewee/pull/2710
1,676,397,519
PR_kwDOAA7yGM5OwDKO
2,710
feature: When `.in_(None)` is executed, the null condition should be …
{ "login": "ponponon", "id": 38725104, "node_id": "MDQ6VXNlcjM4NzI1MTA0", "avatar_url": "https://avatars.githubusercontent.com/u/38725104?v=4", "gravatar_id": "", "url": "https://api.github.com/users/ponponon", "html_url": "https://github.com/ponponon", "followers_url": "https://api.github.com/users/pon...
[]
closed
false
null
[]
null
[ "No, I think `.in_(None)` is incorrect since `None` is not an iterable - going to pass on this." ]
2023-04-20T09:55:00
2023-04-20T12:32:35
2023-04-20T12:32:35
NONE
null
When `.in_(None)` is executed, the null condition should be ignored as `0 = 1`
{ "url": "https://api.github.com/repos/coleifer/peewee/issues/2710/reactions", "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 }
https://api.github.com/repos/coleifer/peewee/issues/2710/timeline
null
null
false
{ "url": "https://api.github.com/repos/coleifer/peewee/pulls/2710", "html_url": "https://github.com/coleifer/peewee/pull/2710", "diff_url": "https://github.com/coleifer/peewee/pull/2710.diff", "patch_url": "https://github.com/coleifer/peewee/pull/2710.patch", "merged_at": null }
https://api.github.com/repos/coleifer/peewee/issues/2709
https://api.github.com/repos/coleifer/peewee
https://api.github.com/repos/coleifer/peewee/issues/2709/labels{/name}
https://api.github.com/repos/coleifer/peewee/issues/2709/comments
https://api.github.com/repos/coleifer/peewee/issues/2709/events
https://github.com/coleifer/peewee/issues/2709
1,674,699,657
I_kwDOAA7yGM5j0eOJ
2,709
db.atomic decorator is not a thread-safe
{ "login": "delatars", "id": 22956479, "node_id": "MDQ6VXNlcjIyOTU2NDc5", "avatar_url": "https://avatars.githubusercontent.com/u/22956479?v=4", "gravatar_id": "", "url": "https://api.github.com/users/delatars", "html_url": "https://github.com/delatars", "followers_url": "https://api.github.com/users/del...
[]
closed
false
null
[]
null
[ "Yes you're quite right, thanks for finding this. The issue is down to the fact that a single instance is being created and reused/overwritten. I will figure out a fix. For now the workaround will need to be to use the context manager.", "This should now be fixed.", "3.16.2 release contains this fix, thanks for...
2023-04-19T11:19:19
2023-04-21T20:18:44
2023-04-19T13:11:14
NONE
null
Hello! peewee: 3.15.4 python: 3.10.8 Using db.atomic as decorator is not a thread-safe. The following example is showing that behaviour. ```python import logging import random import uuid from concurrent.futures import ThreadPoolExecutor from time import sleep import peewee from playhouse.pool impor...
{ "url": "https://api.github.com/repos/coleifer/peewee/issues/2709/reactions", "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 }
https://api.github.com/repos/coleifer/peewee/issues/2709/timeline
null
completed
null
null
https://api.github.com/repos/coleifer/peewee/issues/2708
https://api.github.com/repos/coleifer/peewee
https://api.github.com/repos/coleifer/peewee/issues/2708/labels{/name}
https://api.github.com/repos/coleifer/peewee/issues/2708/comments
https://api.github.com/repos/coleifer/peewee/issues/2708/events
https://github.com/coleifer/peewee/pull/2708
1,667,423,731
PR_kwDOAA7yGM5OSM0H
2,708
update pwiz add fields attr
{ "login": "GuoGuo54", "id": 38908865, "node_id": "MDQ6VXNlcjM4OTA4ODY1", "avatar_url": "https://avatars.githubusercontent.com/u/38908865?v=4", "gravatar_id": "", "url": "https://api.github.com/users/GuoGuo54", "html_url": "https://github.com/GuoGuo54", "followers_url": "https://api.github.com/users/Guo...
[]
closed
false
null
[]
null
[ "Going to pass. `column_comment` isn't supported by postgres, btw." ]
2023-04-14T02:47:10
2023-04-14T14:09:35
2023-04-14T14:09:34
NONE
null
Issues #2707 : https://github.com/coleifer/peewee/issues
{ "url": "https://api.github.com/repos/coleifer/peewee/issues/2708/reactions", "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 }
https://api.github.com/repos/coleifer/peewee/issues/2708/timeline
null
null
false
{ "url": "https://api.github.com/repos/coleifer/peewee/pulls/2708", "html_url": "https://github.com/coleifer/peewee/pull/2708", "diff_url": "https://github.com/coleifer/peewee/pull/2708.diff", "patch_url": "https://github.com/coleifer/peewee/pull/2708.patch", "merged_at": null }
https://api.github.com/repos/coleifer/peewee/issues/2707
https://api.github.com/repos/coleifer/peewee
https://api.github.com/repos/coleifer/peewee/issues/2707/labels{/name}
https://api.github.com/repos/coleifer/peewee/issues/2707/comments
https://api.github.com/repos/coleifer/peewee/issues/2707/events
https://github.com/coleifer/peewee/issues/2707
1,667,373,094
I_kwDOAA7yGM5jYhgm
2,707
pwiz generates detailed field attributes
{ "login": "GuoGuo54", "id": 38908865, "node_id": "MDQ6VXNlcjM4OTA4ODY1", "avatar_url": "https://avatars.githubusercontent.com/u/38908865?v=4", "gravatar_id": "", "url": "https://api.github.com/users/GuoGuo54", "html_url": "https://github.com/GuoGuo54", "followers_url": "https://api.github.com/users/Guo...
[]
closed
false
null
[]
null
[ "Going to pass. Column comments is mysql-specific, and the varchar max length is negligible in my view, since adding it to the introspected field doesn't change any behavior (and it usually isn't enforced anywhere)." ]
2023-04-14T01:32:46
2023-04-14T14:11:37
2023-04-14T14:11:37
NONE
null
The peewee model generated by pwiz based on the database table is too simple, like: class NameModel(Model): name = CharField(null=True) status = IntegerField(default=11, index=True) class Meta: table_name = 'name_model' But generally we need more detailed field attributes,like (max_len...
{ "url": "https://api.github.com/repos/coleifer/peewee/issues/2707/reactions", "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 }
https://api.github.com/repos/coleifer/peewee/issues/2707/timeline
null
completed
null
null
https://api.github.com/repos/coleifer/peewee/issues/2706
https://api.github.com/repos/coleifer/peewee
https://api.github.com/repos/coleifer/peewee/issues/2706/labels{/name}
https://api.github.com/repos/coleifer/peewee/issues/2706/comments
https://api.github.com/repos/coleifer/peewee/issues/2706/events
https://github.com/coleifer/peewee/issues/2706
1,666,749,628
I_kwDOAA7yGM5jWJS8
2,706
How to avoid fetch-then-create pattern, when fk id already known?
{ "login": "anentropic", "id": 147840, "node_id": "MDQ6VXNlcjE0Nzg0MA==", "avatar_url": "https://avatars.githubusercontent.com/u/147840?v=4", "gravatar_id": "", "url": "https://api.github.com/users/anentropic", "html_url": "https://github.com/anentropic", "followers_url": "https://api.github.com/users/a...
[]
closed
false
null
[]
null
[ "You can just do this:\r\n\r\n```\r\ngame = GameSession.create(user=user_id, subject=subject)\r\n```" ]
2023-04-13T16:33:13
2023-04-13T16:37:19
2023-04-13T16:37:18
NONE
null
New to Peewee... I'm sure this is easy but could not find an example in the docs In a case like this: ```python def start_game(user_id, subject: str) -> GameSession: user = User.get(User.id == user_id) game = GameSession.create(user=user, subject=subject) return game ``` How do I avoid first f...
{ "url": "https://api.github.com/repos/coleifer/peewee/issues/2706/reactions", "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 }
https://api.github.com/repos/coleifer/peewee/issues/2706/timeline
null
completed
null
null
https://api.github.com/repos/coleifer/peewee/issues/2705
https://api.github.com/repos/coleifer/peewee
https://api.github.com/repos/coleifer/peewee/issues/2705/labels{/name}
https://api.github.com/repos/coleifer/peewee/issues/2705/comments
https://api.github.com/repos/coleifer/peewee/issues/2705/events
https://github.com/coleifer/peewee/issues/2705
1,663,812,893
I_kwDOAA7yGM5jK8Ud
2,705
Bitwise shift operators as functions?
{ "login": "andycasey", "id": 504436, "node_id": "MDQ6VXNlcjUwNDQzNg==", "avatar_url": "https://avatars.githubusercontent.com/u/504436?v=4", "gravatar_id": "", "url": "https://api.github.com/users/andycasey", "html_url": "https://github.com/andycasey", "followers_url": "https://api.github.com/users/andy...
[]
closed
false
null
[]
null
[ "You can look at how the `bin_and()`, `bin_or()`, and `__xor__()` methods on field/columns are implemented. There are no bitwish shifts at present, but it should be easy to add them for your case. You can do this as a standalone function, e.g.\r\n\r\n```python\r\ndef lshift(lhs, rhs):\r\n return Expression(lhs, ...
2023-04-12T05:22:22
2023-04-12T13:04:38
2023-04-12T13:04:37
NONE
null
Hi, I know the Python operators `<<` and `>>` are overloaded in `peewee`. I'm wondering if there is some function (in `peewee.fn`) to use the [bitwise shift left/right operators in Postgresql](https://www.postgresql.org/docs/current/functions-bitstring.html). I've searched a lot but can't find anything myself. My...
{ "url": "https://api.github.com/repos/coleifer/peewee/issues/2705/reactions", "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 }
https://api.github.com/repos/coleifer/peewee/issues/2705/timeline
null
completed
null
null
https://api.github.com/repos/coleifer/peewee/issues/2704
https://api.github.com/repos/coleifer/peewee
https://api.github.com/repos/coleifer/peewee/issues/2704/labels{/name}
https://api.github.com/repos/coleifer/peewee/issues/2704/comments
https://api.github.com/repos/coleifer/peewee/issues/2704/events
https://github.com/coleifer/peewee/issues/2704
1,661,731,988
I_kwDOAA7yGM5jDASU
2,704
get_or_none() fails with postgres
{ "login": "TxMat", "id": 46858765, "node_id": "MDQ6VXNlcjQ2ODU4NzY1", "avatar_url": "https://avatars.githubusercontent.com/u/46858765?v=4", "gravatar_id": "", "url": "https://api.github.com/users/TxMat", "html_url": "https://github.com/TxMat", "followers_url": "https://api.github.com/users/TxMat/follow...
[]
closed
false
null
[]
null
[ "`get_or_none()` takes an expression. See docs: https://docs.peewee-orm.com/en/latest/peewee/api.html#Model.get_or_none\r\n\r\n```python\r\nShippingInfo.get_or_none(\r\n ShippingInfo.id == order.shipping_info)\r\n```\r\n\r\nA cursory look would have solved this for you.", "It indeed makes sense but for some rea...
2023-04-11T04:01:29
2023-04-11T17:48:12
2023-04-11T11:55:38
NONE
null
```py # Get shipping info from order.shipping_info_id shipping_info = {} if order.shipping_info: shipping_info = model_to_dict(ShippingInfo.get_or_none(order.shipping_info)) # no need to send id to client del shipping_info["id"] ``` Get_or_none with postgres raises `psycopg2.errors.Datatype...
{ "url": "https://api.github.com/repos/coleifer/peewee/issues/2704/reactions", "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 }
https://api.github.com/repos/coleifer/peewee/issues/2704/timeline
null
completed
null
null
https://api.github.com/repos/coleifer/peewee/issues/2703
https://api.github.com/repos/coleifer/peewee
https://api.github.com/repos/coleifer/peewee/issues/2703/labels{/name}
https://api.github.com/repos/coleifer/peewee/issues/2703/comments
https://api.github.com/repos/coleifer/peewee/issues/2703/events
https://github.com/coleifer/peewee/issues/2703
1,661,723,222
I_kwDOAA7yGM5jC-JW
2,703
Failed constraints raises IntegrityError but exceeding max_length raises DataEror with postgres
{ "login": "TxMat", "id": 46858765, "node_id": "MDQ6VXNlcjQ2ODU4NzY1", "avatar_url": "https://avatars.githubusercontent.com/u/46858765?v=4", "gravatar_id": "", "url": "https://api.github.com/users/TxMat", "html_url": "https://github.com/TxMat", "followers_url": "https://api.github.com/users/TxMat/follow...
[]
closed
false
null
[]
null
[ "These errors are raised by postgres and passed on through psycopg2, which determines what error type to raise. Typically one would perform validation beforehand to eliminate something as simple as an over-length violation." ]
2023-04-11T03:48:34
2023-04-11T11:57:35
2023-04-11T11:57:35
NONE
null
```py # shipping info model class ShippingInfo(BaseModel): id = peewee.AutoField(primary_key=True, unique=True) country = peewee.CharField(null=False) address = peewee.CharField(null=False) postal_code = peewee.CharField(null=False, max_length=7, constraints=[peewee.Check('length(postal_code) = 7'...
{ "url": "https://api.github.com/repos/coleifer/peewee/issues/2703/reactions", "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 }
https://api.github.com/repos/coleifer/peewee/issues/2703/timeline
null
completed
null
null
https://api.github.com/repos/coleifer/peewee/issues/2702
https://api.github.com/repos/coleifer/peewee
https://api.github.com/repos/coleifer/peewee/issues/2702/labels{/name}
https://api.github.com/repos/coleifer/peewee/issues/2702/comments
https://api.github.com/repos/coleifer/peewee/issues/2702/events
https://github.com/coleifer/peewee/issues/2702
1,661,715,757
I_kwDOAA7yGM5jC8Ut
2,702
LIKE statement with postgres returns IndexError
{ "login": "TxMat", "id": 46858765, "node_id": "MDQ6VXNlcjQ2ODU4NzY1", "avatar_url": "https://avatars.githubusercontent.com/u/46858765?v=4", "gravatar_id": "", "url": "https://api.github.com/users/TxMat", "html_url": "https://github.com/TxMat", "followers_url": "https://api.github.com/users/TxMat/follow...
[]
closed
false
null
[]
null
[ "The \"%\" need to be escaped:\r\n\r\n```\r\nemail = peewee.CharField(null=True, constraints=[peewee.Check(\"email LIKE '%%@%%'\")])\r\n```" ]
2023-04-11T03:37:04
2023-04-11T12:38:33
2023-04-11T12:38:14
NONE
null
The like statement inside the email field is causing peewee to return an index error when constructing the database ```py class Order(BaseModel): id = peewee.AutoField(primary_key=True, unique=True) shipping_info = peewee.ForeignKeyField(ShippingInfo, backref='shipping_info', null=True) product = pee...
{ "url": "https://api.github.com/repos/coleifer/peewee/issues/2702/reactions", "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 }
https://api.github.com/repos/coleifer/peewee/issues/2702/timeline
null
completed
null
null
https://api.github.com/repos/coleifer/peewee/issues/2701
https://api.github.com/repos/coleifer/peewee
https://api.github.com/repos/coleifer/peewee/issues/2701/labels{/name}
https://api.github.com/repos/coleifer/peewee/issues/2701/comments
https://api.github.com/repos/coleifer/peewee/issues/2701/events
https://github.com/coleifer/peewee/issues/2701
1,657,252,090
I_kwDOAA7yGM5ix6j6
2,701
setup.py being deprecated
{ "login": "crdoconnor", "id": 6067509, "node_id": "MDQ6VXNlcjYwNjc1MDk=", "avatar_url": "https://avatars.githubusercontent.com/u/6067509?v=4", "gravatar_id": "", "url": "https://api.github.com/users/crdoconnor", "html_url": "https://github.com/crdoconnor", "followers_url": "https://api.github.com/users...
[]
closed
false
null
[]
null
[ "What version of peewee are you using? I think this should be fixed since we have a magic pyproject toml file now.", "3.16.0, installed with python 3.11.2:\r\n\r\n```\r\nroot@6b1a08642656:/src# /venv/bin/pip install peewee==3.16.0 \r\nCollecting peewee==3.16.0\r\n Using cached peewee-3.16.0.tar.gz (866 kB)\r\n ...
2023-04-06T11:34:12
2023-04-06T12:10:17
2023-04-06T12:10:17
NONE
null
This message is being displayed when pip installing peewee on python version 3.11.2: ``` DEPRECATION: peewee is being installed using the legacy 'setup.py install' method, because it does not have a 'pyproject.toml' and the 'wheel' package is not installed. pip 23.1 will enforce this behaviour change. A possible ...
{ "url": "https://api.github.com/repos/coleifer/peewee/issues/2701/reactions", "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 }
https://api.github.com/repos/coleifer/peewee/issues/2701/timeline
null
completed
null
null
https://api.github.com/repos/coleifer/peewee/issues/2700
https://api.github.com/repos/coleifer/peewee
https://api.github.com/repos/coleifer/peewee/issues/2700/labels{/name}
https://api.github.com/repos/coleifer/peewee/issues/2700/comments
https://api.github.com/repos/coleifer/peewee/issues/2700/events
https://github.com/coleifer/peewee/issues/2700
1,656,510,705
I_kwDOAA7yGM5ivFjx
2,700
Create aware datetime objects for TimestampField
{ "login": "IBuckton", "id": 48970269, "node_id": "MDQ6VXNlcjQ4OTcwMjY5", "avatar_url": "https://avatars.githubusercontent.com/u/48970269?v=4", "gravatar_id": "", "url": "https://api.github.com/users/IBuckton", "html_url": "https://github.com/IBuckton", "followers_url": "https://api.github.com/users/IBu...
[]
closed
false
null
[]
null
[ "You can't compare naive and tz-aware datetimes, so this is a non-starter unfortunately. The idea is that your naive datetime *is* already in UTC so the tzinfo is meaningless and provides flexibility -- that is *also* why `utc=False` by default. We can't be switching the return value between naive and tz-aware base...
2023-04-06T00:55:51
2023-04-06T04:02:53
2023-04-06T04:02:52
NONE
null
**Description** With `TimestampField(utc=True)` it returns a naive datetime object. This is not recommended as they are treated by many datetime methods as local times. **Expected behaviour** Return an aware datetime object to avoid confusion, per the recommendation in [datetime docs](https://docs.python.org/3.11/...
{ "url": "https://api.github.com/repos/coleifer/peewee/issues/2700/reactions", "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 }
https://api.github.com/repos/coleifer/peewee/issues/2700/timeline
null
completed
null
null
https://api.github.com/repos/coleifer/peewee/issues/2699
https://api.github.com/repos/coleifer/peewee
https://api.github.com/repos/coleifer/peewee/issues/2699/labels{/name}
https://api.github.com/repos/coleifer/peewee/issues/2699/comments
https://api.github.com/repos/coleifer/peewee/issues/2699/events
https://github.com/coleifer/peewee/issues/2699
1,652,084,899
I_kwDOAA7yGM5ieNCj
2,699
test_multiple_writers failing with database is locked on ppc64le arch
{ "login": "vkrizan", "id": 7695766, "node_id": "MDQ6VXNlcjc2OTU3NjY=", "avatar_url": "https://avatars.githubusercontent.com/u/7695766?v=4", "gravatar_id": "", "url": "https://api.github.com/users/vkrizan", "html_url": "https://github.com/vkrizan", "followers_url": "https://api.github.com/users/vkrizan/...
[]
closed
false
null
[]
null
[ "Thanks for the report. That timing for the tests (500+ seconds) is unreal, for comparison they run in less than 4 seconds on my workstation:\r\n\r\n```\r\nRan 1154 tests in 3.359s\r\n```\r\n\r\nSo I wonder if you are hitting the sqlite busy timeout on that particular test-case. Is there a particular test that is s...
2023-04-03T13:34:00
2023-04-18T17:11:16
2023-04-03T14:41:20
NONE
null
Hello, The `tests.db_tests.TestThreadSafety.test_multiple_writers` test is failing on ppc64le architecture with: ``` peewee.OperationalError: database is locked ``` ``` + createdb peewee_test + psql -c 'CREATE EXTENSION hstore' peewee_test CREATE EXTENSION + /usr/bin/python3 runtests.py .....................
{ "url": "https://api.github.com/repos/coleifer/peewee/issues/2699/reactions", "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 }
https://api.github.com/repos/coleifer/peewee/issues/2699/timeline
null
completed
null
null
https://api.github.com/repos/coleifer/peewee/issues/2698
https://api.github.com/repos/coleifer/peewee
https://api.github.com/repos/coleifer/peewee/issues/2698/labels{/name}
https://api.github.com/repos/coleifer/peewee/issues/2698/comments
https://api.github.com/repos/coleifer/peewee/issues/2698/events
https://github.com/coleifer/peewee/pull/2698
1,641,066,536
PR_kwDOAA7yGM5M6wfI
2,698
Ae configurable default
{ "login": "paetling", "id": 3281726, "node_id": "MDQ6VXNlcjMyODE3MjY=", "avatar_url": "https://avatars.githubusercontent.com/u/3281726?v=4", "gravatar_id": "", "url": "https://api.github.com/users/paetling", "html_url": "https://github.com/paetling", "followers_url": "https://api.github.com/users/paetl...
[]
closed
false
null
[]
null
[ "Is there a reason you are not just using:\r\n\r\n```python\r\nclass Base(Model):\r\n id = BinaryUUIDField(primary_key=True, ...)\r\n\r\nclass MyModel(Base):\r\n # MyModel.id will be a binary uuid field\r\n```\r\n\r\nThis change seems redundant." ]
2023-03-26T20:10:10
2023-03-27T12:48:35
2023-03-27T12:48:30
NONE
null
## Context Make it so that we can configure the type of the id that is created
{ "url": "https://api.github.com/repos/coleifer/peewee/issues/2698/reactions", "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 }
https://api.github.com/repos/coleifer/peewee/issues/2698/timeline
null
null
true
{ "url": "https://api.github.com/repos/coleifer/peewee/pulls/2698", "html_url": "https://github.com/coleifer/peewee/pull/2698", "diff_url": "https://github.com/coleifer/peewee/pull/2698.diff", "patch_url": "https://github.com/coleifer/peewee/pull/2698.patch", "merged_at": null }
https://api.github.com/repos/coleifer/peewee/issues/2697
https://api.github.com/repos/coleifer/peewee
https://api.github.com/repos/coleifer/peewee/issues/2697/labels{/name}
https://api.github.com/repos/coleifer/peewee/issues/2697/comments
https://api.github.com/repos/coleifer/peewee/issues/2697/events
https://github.com/coleifer/peewee/issues/2697
1,634,492,330
I_kwDOAA7yGM5hbF-q
2,697
peewee-value-returns-to-its-default-after-few-seconds-bug
{ "login": "instasck", "id": 43851500, "node_id": "MDQ6VXNlcjQzODUxNTAw", "avatar_url": "https://avatars.githubusercontent.com/u/43851500?v=4", "gravatar_id": "", "url": "https://api.github.com/users/instasck", "html_url": "https://github.com/instasck", "followers_url": "https://api.github.com/users/ins...
[]
closed
false
null
[]
null
[ "OK ISSUES IS\r\nThat a pointer to the database is not refreshing automatically, it pointing to local data in memory so holding old data.", "Don't spam the issues -- please try to have a bit of patience.", "Well it took me 2 hours before I found the issue.\r\nit is not clear about refreshing data from the doc.....
2023-03-21T18:26:54
2023-03-21T19:09:42
2023-03-21T19:06:38
NONE
null
https://stackoverflow.com/questions/75804965/peewee-value-returns-to-its-default-after-few-seconds-bug Can you explain this ?
{ "url": "https://api.github.com/repos/coleifer/peewee/issues/2697/reactions", "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 }
https://api.github.com/repos/coleifer/peewee/issues/2697/timeline
null
completed
null
null
https://api.github.com/repos/coleifer/peewee/issues/2696
https://api.github.com/repos/coleifer/peewee
https://api.github.com/repos/coleifer/peewee/issues/2696/labels{/name}
https://api.github.com/repos/coleifer/peewee/issues/2696/comments
https://api.github.com/repos/coleifer/peewee/issues/2696/events
https://github.com/coleifer/peewee/issues/2696
1,634,154,999
I_kwDOAA7yGM5hZzn3
2,696
Point type
{ "login": "diegocatalao", "id": 81654879, "node_id": "MDQ6VXNlcjgxNjU0ODc5", "avatar_url": "https://avatars.githubusercontent.com/u/81654879?v=4", "gravatar_id": "", "url": "https://api.github.com/users/diegocatalao", "html_url": "https://github.com/diegocatalao", "followers_url": "https://api.github.c...
[]
closed
false
null
[]
null
[ "No plans on integrating this into Peewee at the present." ]
2023-03-21T15:22:36
2023-03-21T15:25:31
2023-03-21T15:25:30
NONE
null
Good afternoon people. Most databases implement the Point type. I've implemented a custom type but I don't know if that's on your roadmap. I would like to implement it natively in PeeWee.
{ "url": "https://api.github.com/repos/coleifer/peewee/issues/2696/reactions", "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 }
https://api.github.com/repos/coleifer/peewee/issues/2696/timeline
null
completed
null
null
https://api.github.com/repos/coleifer/peewee/issues/2695
https://api.github.com/repos/coleifer/peewee
https://api.github.com/repos/coleifer/peewee/issues/2695/labels{/name}
https://api.github.com/repos/coleifer/peewee/issues/2695/comments
https://api.github.com/repos/coleifer/peewee/issues/2695/events
https://github.com/coleifer/peewee/issues/2695
1,630,086,918
I_kwDOAA7yGM5hKScG
2,695
FOR UPDATE not supported by CockroachDatabase
{ "login": "arel", "id": 153497, "node_id": "MDQ6VXNlcjE1MzQ5Nw==", "avatar_url": "https://avatars.githubusercontent.com/u/153497?v=4", "gravatar_id": "", "url": "https://api.github.com/users/arel", "html_url": "https://github.com/arel", "followers_url": "https://api.github.com/users/arel/followers", ...
[]
closed
false
null
[]
null
[ "Thank you for letting me know, I'll get this fixed.\r\n\r\nIn the meantime you can set the flag manually when you do your database initialization.\r\n\r\n```\r\ndb = ...\r\ndb.for_update = True\r\n```", "Thanks!", "When I enabled the flag the crdb tests are locking up and failing, so something must be special ...
2023-03-18T02:06:31
2023-03-18T21:13:38
2023-03-18T21:13:37
NONE
null
I believe this is a bug. I am getting the following error when I try to use `for_update()` in Cockroach DB: ``` File "/workspace/nuhom-api/.venv/lib/python3.10/site-packages/peewee.py", line 2509, in __sql__ raise ValueError('FOR UPDATE specified but not supported ' graphql.error.graphql_error.GraphQLError:...
{ "url": "https://api.github.com/repos/coleifer/peewee/issues/2695/reactions", "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 }
https://api.github.com/repos/coleifer/peewee/issues/2695/timeline
null
completed
null
null
https://api.github.com/repos/coleifer/peewee/issues/2694
https://api.github.com/repos/coleifer/peewee
https://api.github.com/repos/coleifer/peewee/issues/2694/labels{/name}
https://api.github.com/repos/coleifer/peewee/issues/2694/comments
https://api.github.com/repos/coleifer/peewee/issues/2694/events
https://github.com/coleifer/peewee/issues/2694
1,629,501,735
I_kwDOAA7yGM5hIDkn
2,694
`CharField.max_length` has no effect on a Sqlite database
{ "login": "calvinweb", "id": 38599774, "node_id": "MDQ6VXNlcjM4NTk5Nzc0", "avatar_url": "https://avatars.githubusercontent.com/u/38599774?v=4", "gravatar_id": "", "url": "https://api.github.com/users/calvinweb", "html_url": "https://github.com/calvinweb", "followers_url": "https://api.github.com/users/...
[]
closed
false
null
[]
null
[ "That is correct, and is down to the way SQLite implements text affinity columns.\r\n\r\nIf you want to enforce a max length you can add a check constraint or implement a subclass of charfield that overrides the `db_value()` method to trim the string.", "> That is correct, and is down to the way SQLite implements...
2023-03-17T15:23:13
2023-03-18T01:57:47
2023-03-17T16:16:44
NONE
null
null
{ "url": "https://api.github.com/repos/coleifer/peewee/issues/2694/reactions", "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 }
https://api.github.com/repos/coleifer/peewee/issues/2694/timeline
null
completed
null
null
https://api.github.com/repos/coleifer/peewee/issues/2693
https://api.github.com/repos/coleifer/peewee
https://api.github.com/repos/coleifer/peewee/issues/2693/labels{/name}
https://api.github.com/repos/coleifer/peewee/issues/2693/comments
https://api.github.com/repos/coleifer/peewee/issues/2693/events
https://github.com/coleifer/peewee/issues/2693
1,628,079,936
I_kwDOAA7yGM5hCodA
2,693
peewee.ProgrammingError: Error binding parameter 1: type 'builtin_function_or_method' is not supported
{ "login": "RanjithSivam", "id": 57189095, "node_id": "MDQ6VXNlcjU3MTg5MDk1", "avatar_url": "https://avatars.githubusercontent.com/u/57189095?v=4", "gravatar_id": "", "url": "https://api.github.com/users/RanjithSivam", "html_url": "https://github.com/RanjithSivam", "followers_url": "https://api.github.c...
[]
closed
false
null
[]
null
[ "Do not post questions like this on here. Post your questions on stack overflow. The error is extremely basic, and the error message tells you what is going on. You cannot pass a function as a query parameter.\r\n\r\n```python\r\n# Actually call .now(), don't pass the function itself:\r\n.update(last_login=datetime...
2023-03-16T18:45:53
2023-03-16T18:55:45
2023-03-16T18:55:44
NONE
null
I am trying to update. I get this error. My Code: ![image](https://user-images.githubusercontent.com/57189095/225722329-ac69c23c-d0d4-44bc-8571-aba021a24f28.png) Here is the error: Traceback (most recent call last): File "C:\Users\ranjith-15557\AppData\Local\Programs\Python\Python311\Lib\site-packages\peewee...
{ "url": "https://api.github.com/repos/coleifer/peewee/issues/2693/reactions", "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 }
https://api.github.com/repos/coleifer/peewee/issues/2693/timeline
null
completed
null
null
https://api.github.com/repos/coleifer/peewee/issues/2692
https://api.github.com/repos/coleifer/peewee
https://api.github.com/repos/coleifer/peewee/issues/2692/labels{/name}
https://api.github.com/repos/coleifer/peewee/issues/2692/comments
https://api.github.com/repos/coleifer/peewee/issues/2692/events
https://github.com/coleifer/peewee/issues/2692
1,623,585,150
I_kwDOAA7yGM5gxfF-
2,692
Creating indexes on UUID primary key failes
{ "login": "martijnED", "id": 104991209, "node_id": "U_kgDOBkIJ6Q", "avatar_url": "https://avatars.githubusercontent.com/u/104991209?v=4", "gravatar_id": "", "url": "https://api.github.com/users/martijnED", "html_url": "https://github.com/martijnED", "followers_url": "https://api.github.com/users/martij...
[]
closed
false
null
[]
null
[ "The docs are pretty clear:\r\n\r\n```python\r\n# Adding an index:\r\n\r\n# Specify the table, column names, and whether the index should be\r\n# UNIQUE or not.\r\nmigrate(\r\n # Create an index on the `pub_date` column.\r\n migrator.add_index('story', ('pub_date',), False),\r\n\r\n # Create a multi-column...
2023-03-14T14:19:57
2023-03-14T14:41:00
2023-03-14T14:25:14
NONE
null
During creating of tables and creating indexes on that table it failes to create indexes on UUID key. ## The code ``` python import uuid from playhouse.postgres_ext import UUIDField class CommandControl(Model): id = UUIDField(primary_key=True, default=uuid.uuid4) def migrate(migrator, database, fake=F...
{ "url": "https://api.github.com/repos/coleifer/peewee/issues/2692/reactions", "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 }
https://api.github.com/repos/coleifer/peewee/issues/2692/timeline
null
completed
null
null
https://api.github.com/repos/coleifer/peewee/issues/2691
https://api.github.com/repos/coleifer/peewee
https://api.github.com/repos/coleifer/peewee/issues/2691/labels{/name}
https://api.github.com/repos/coleifer/peewee/issues/2691/comments
https://api.github.com/repos/coleifer/peewee/issues/2691/events
https://github.com/coleifer/peewee/issues/2691
1,619,326,207
I_kwDOAA7yGM5ghPT_
2,691
reflection.generate_models BinaryJSONField column always has index, even when underlying database schema has no index
{ "login": "rberman", "id": 6520506, "node_id": "MDQ6VXNlcjY1MjA1MDY=", "avatar_url": "https://avatars.githubusercontent.com/u/6520506?v=4", "gravatar_id": "", "url": "https://api.github.com/users/rberman", "html_url": "https://github.com/rberman", "followers_url": "https://api.github.com/users/rberman/...
[]
closed
false
null
[]
null
[]
2023-03-10T17:16:36
2023-03-10T19:03:17
2023-03-10T19:03:17
NONE
null
I have a table defined as follows: ```python from playhouse.postgres_ext import BinaryJSONField class MyTable(flask_db.Model): some_data = BinaryJSONField(index=False) ``` For this table, we don’t need an index since we only ever write to this table. When I try to use generate_models on this table, the ge...
{ "url": "https://api.github.com/repos/coleifer/peewee/issues/2691/reactions", "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 }
https://api.github.com/repos/coleifer/peewee/issues/2691/timeline
null
completed
null
null
https://api.github.com/repos/coleifer/peewee/issues/2690
https://api.github.com/repos/coleifer/peewee
https://api.github.com/repos/coleifer/peewee/issues/2690/labels{/name}
https://api.github.com/repos/coleifer/peewee/issues/2690/comments
https://api.github.com/repos/coleifer/peewee/issues/2690/events
https://github.com/coleifer/peewee/issues/2690
1,618,951,492
I_kwDOAA7yGM5gfz1E
2,690
Prefetch with many ForeignKeyField to same model
{ "login": "dim49v", "id": 15666913, "node_id": "MDQ6VXNlcjE1NjY2OTEz", "avatar_url": "https://avatars.githubusercontent.com/u/15666913?v=4", "gravatar_id": "", "url": "https://api.github.com/users/dim49v", "html_url": "https://github.com/dim49v", "followers_url": "https://api.github.com/users/dim49v/fo...
[]
closed
false
null
[]
null
[ "Seems to be working OK for me:\r\n\r\n```python\r\nclass State(db.Model):\r\n name = TextField()\r\n def __str__(self):\r\n return self.name\r\n\r\nclass Transition(db.Model):\r\n source_state = ForeignKeyField(State, backref='sources')\r\n target_state = ForeignKeyField(State, backref='targets'...
2023-03-10T13:06:12
2023-03-12T14:15:30
2023-03-12T14:08:10
NONE
null
Hello! I'm have 2 models: ``` class State(Entity): uuid = UUIDField(column_name='uuid', primary_key=True) class Transition(Entity): uuid = UUIDField(column_name='uuid', primary_key=True) source_state = ForeignKeyField(State, column_name='source_state_id', backref='_db_source_transitions') targ...
{ "url": "https://api.github.com/repos/coleifer/peewee/issues/2690/reactions", "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 }
https://api.github.com/repos/coleifer/peewee/issues/2690/timeline
null
completed
null
null
https://api.github.com/repos/coleifer/peewee/issues/2689
https://api.github.com/repos/coleifer/peewee
https://api.github.com/repos/coleifer/peewee/issues/2689/labels{/name}
https://api.github.com/repos/coleifer/peewee/issues/2689/comments
https://api.github.com/repos/coleifer/peewee/issues/2689/events
https://github.com/coleifer/peewee/issues/2689
1,617,001,747
I_kwDOAA7yGM5gYX0T
2,689
Is it possible to serialise peewee.Expression?
{ "login": "vdytyniak-exos", "id": 94358054, "node_id": "U_kgDOBZ_KJg", "avatar_url": "https://avatars.githubusercontent.com/u/94358054?v=4", "gravatar_id": "", "url": "https://api.github.com/users/vdytyniak-exos", "html_url": "https://github.com/vdytyniak-exos", "followers_url": "https://api.github.com...
[]
closed
false
null
[]
null
[ "No, not really or not officially. You can see how the [dynamic filters work in flask-peewee](http://docs.peewee-orm.com/projects/flask-peewee/en/latest/admin.html#filters): https://github.com/coleifer/flask-peewee/blob/master/flask_peewee/filters.py\r\n\r\nProbably the easiest thing to do though is to use the djan...
2023-03-09T11:19:40
2023-03-09T14:04:47
2023-03-09T12:43:27
NONE
null
it is not an issue, but I didn't find other communication channel to get some ideas in how to serialise peewee.Expression to pass it to the API and later use there as filter in the query. Thanks
{ "url": "https://api.github.com/repos/coleifer/peewee/issues/2689/reactions", "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 }
https://api.github.com/repos/coleifer/peewee/issues/2689/timeline
null
completed
null
null
https://api.github.com/repos/coleifer/peewee/issues/2688
https://api.github.com/repos/coleifer/peewee
https://api.github.com/repos/coleifer/peewee/issues/2688/labels{/name}
https://api.github.com/repos/coleifer/peewee/issues/2688/comments
https://api.github.com/repos/coleifer/peewee/issues/2688/events
https://github.com/coleifer/peewee/pull/2688
1,611,011,168
PR_kwDOAA7yGM5LWNxs
2,688
mysql add column comment
{ "login": "smzhao", "id": 2282742, "node_id": "MDQ6VXNlcjIyODI3NDI=", "avatar_url": "https://avatars.githubusercontent.com/u/2282742?v=4", "gravatar_id": "", "url": "https://api.github.com/users/smzhao", "html_url": "https://github.com/smzhao", "followers_url": "https://api.github.com/users/smzhao/foll...
[]
closed
false
null
[]
null
[ "Going to pass." ]
2023-03-06T09:33:38
2023-03-06T12:16:44
2023-03-06T12:16:44
NONE
null
mysql add column comment with verbose_name or help_text
{ "url": "https://api.github.com/repos/coleifer/peewee/issues/2688/reactions", "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 }
https://api.github.com/repos/coleifer/peewee/issues/2688/timeline
null
null
false
{ "url": "https://api.github.com/repos/coleifer/peewee/pulls/2688", "html_url": "https://github.com/coleifer/peewee/pull/2688", "diff_url": "https://github.com/coleifer/peewee/pull/2688.diff", "patch_url": "https://github.com/coleifer/peewee/pull/2688.patch", "merged_at": null }
https://api.github.com/repos/coleifer/peewee/issues/2687
https://api.github.com/repos/coleifer/peewee
https://api.github.com/repos/coleifer/peewee/issues/2687/labels{/name}
https://api.github.com/repos/coleifer/peewee/issues/2687/comments
https://api.github.com/repos/coleifer/peewee/issues/2687/events
https://github.com/coleifer/peewee/issues/2687
1,610,105,140
I_kwDOAA7yGM5f-EE0
2,687
`playhouse.signals.Signal.disconnect` disconnects more than key, sender pair.
{ "login": "real-yfprojects", "id": 62463991, "node_id": "MDQ6VXNlcjYyNDYzOTkx", "avatar_url": "https://avatars.githubusercontent.com/u/62463991?v=4", "gravatar_id": "", "url": "https://api.github.com/users/real-yfprojects", "html_url": "https://github.com/real-yfprojects", "followers_url": "https://api...
[]
closed
false
null
[]
null
[ "Oh yes it should be instead:\r\n\r\n```\r\nif not (n,s)==key\r\n```", "Nice! Thanks for fixing. Do you have a rough estimate for the next release date?", "Let me think on it." ]
2023-03-05T08:30:29
2023-03-05T14:57:19
2023-03-05T14:49:03
NONE
null
When connecting two receiver to the same sender and disconnecting one of them. Both are disconnected. This bug is also illustrated by the code itself: https://github.com/coleifer/peewee/blob/f88fa44a29601ca2de9fe492fda11b1fb28fb412/playhouse/signals.py#L25-L38 The `_receivers` set stores pairs of receiver and mod...
{ "url": "https://api.github.com/repos/coleifer/peewee/issues/2687/reactions", "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 }
https://api.github.com/repos/coleifer/peewee/issues/2687/timeline
null
completed
null
null
https://api.github.com/repos/coleifer/peewee/issues/2686
https://api.github.com/repos/coleifer/peewee
https://api.github.com/repos/coleifer/peewee/issues/2686/labels{/name}
https://api.github.com/repos/coleifer/peewee/issues/2686/comments
https://api.github.com/repos/coleifer/peewee/issues/2686/events
https://github.com/coleifer/peewee/issues/2686
1,610,098,096
I_kwDOAA7yGM5f-CWw
2,686
Undocumented parameter `sender` for `playhouse.signals.Signal.disconnect`.
{ "login": "real-yfprojects", "id": 62463991, "node_id": "MDQ6VXNlcjYyNDYzOTkx", "avatar_url": "https://avatars.githubusercontent.com/u/62463991?v=4", "gravatar_id": "", "url": "https://api.github.com/users/real-yfprojects", "html_url": "https://github.com/real-yfprojects", "followers_url": "https://api...
[]
closed
false
null
[]
null
[ "You just don't want to update/improve the documentation of your library or why are you closing it without a comment. Others will find that pretty unwelcoming.", "7246a7f2b8c5adbae33180af3c817601560dc33a" ]
2023-03-05T08:03:44
2023-03-05T16:53:34
2023-03-05T12:25:53
NONE
null
https://github.com/coleifer/peewee/blob/f88fa44a29601ca2de9fe492fda11b1fb28fb412/playhouse/signals.py#L25 There is a `sender` parameter. However there is no such parameter here: https://github.com/coleifer/peewee/blob/f88fa44a29601ca2de9fe492fda11b1fb28fb412/docs/peewee/playhouse.rst?plain=1#L2740
{ "url": "https://api.github.com/repos/coleifer/peewee/issues/2686/reactions", "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 }
https://api.github.com/repos/coleifer/peewee/issues/2686/timeline
null
not_planned
null
null
https://api.github.com/repos/coleifer/peewee/issues/2685
https://api.github.com/repos/coleifer/peewee
https://api.github.com/repos/coleifer/peewee/issues/2685/labels{/name}
https://api.github.com/repos/coleifer/peewee/issues/2685/comments
https://api.github.com/repos/coleifer/peewee/issues/2685/events
https://github.com/coleifer/peewee/issues/2685
1,609,389,010
I_kwDOAA7yGM5f7VPS
2,685
Cast Bigint to timestamp
{ "login": "antoinebrtd", "id": 34452191, "node_id": "MDQ6VXNlcjM0NDUyMTkx", "avatar_url": "https://avatars.githubusercontent.com/u/34452191?v=4", "gravatar_id": "", "url": "https://api.github.com/users/antoinebrtd", "html_url": "https://github.com/antoinebrtd", "followers_url": "https://api.github.com/...
[]
closed
false
null
[]
null
[ "Is there a very compelling reason why you are using `TimestampField` at all, instead of `DateTimeField`? It's really intended mostly for Sqlite users, which does not provide a dedicated date/time type.\r\n\r\nAt any rate, you need to use the postgres `to_timestamp` function here if you insist on doing it this way:...
2023-03-03T23:16:36
2023-03-03T23:56:30
2023-03-03T23:56:29
NONE
null
Hello, I am trying to partition some data using `fn.date_part` on a `TimestampField`. Here is my simplified model: ``` class Game(Model): id = PrimaryKeyField() ts_played = TimestampField(utc=True, default=None, null=True) score = IntegerField(null=True) ``` My full query: ``` results = Game ...
{ "url": "https://api.github.com/repos/coleifer/peewee/issues/2685/reactions", "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 }
https://api.github.com/repos/coleifer/peewee/issues/2685/timeline
null
completed
null
null
https://api.github.com/repos/coleifer/peewee/issues/2684
https://api.github.com/repos/coleifer/peewee
https://api.github.com/repos/coleifer/peewee/issues/2684/labels{/name}
https://api.github.com/repos/coleifer/peewee/issues/2684/comments
https://api.github.com/repos/coleifer/peewee/issues/2684/events
https://github.com/coleifer/peewee/issues/2684
1,601,653,522
I_kwDOAA7yGM5fd0sS
2,684
Build failures with Cython 3.0.0b1
{ "login": "mgorny", "id": 110765, "node_id": "MDQ6VXNlcjExMDc2NQ==", "avatar_url": "https://avatars.githubusercontent.com/u/110765?v=4", "gravatar_id": "", "url": "https://api.github.com/users/mgorny", "html_url": "https://github.com/mgorny", "followers_url": "https://api.github.com/users/mgorny/follow...
[]
closed
false
null
[]
null
[ "Thank you, I think I got 'em in the above commit.", "Thanks, seems to build now. Note that there's still this warning though:\r\n\r\n```\r\n[1/2] Cythonizing playhouse/_sqlite_ext.pyx\r\n/tmp/peewee/venv/lib/python3.11/site-packages/Cython/Compiler/Main.py:370: FutureWarning: Cython directive 'language_level' no...
2023-02-27T17:48:43
2023-02-27T18:05:46
2023-02-27T17:57:56
NONE
null
Cython 3.0.0 has released its first beta, meaning that 3.0.0 final will be out sooner than later. Right now peewee fails to build with it: ``` $ python setup.py build Compiling playhouse/_sqlite_udf.pyx because it changed. Compiling playhouse/_sqlite_ext.pyx because it changed. [1/2] Cythonizing playhouse/_sqlit...
{ "url": "https://api.github.com/repos/coleifer/peewee/issues/2684/reactions", "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 }
https://api.github.com/repos/coleifer/peewee/issues/2684/timeline
null
completed
null
null
https://api.github.com/repos/coleifer/peewee/issues/2683
https://api.github.com/repos/coleifer/peewee
https://api.github.com/repos/coleifer/peewee/issues/2683/labels{/name}
https://api.github.com/repos/coleifer/peewee/issues/2683/comments
https://api.github.com/repos/coleifer/peewee/issues/2683/events
https://github.com/coleifer/peewee/issues/2683
1,599,887,876
I_kwDOAA7yGM5fXFoE
2,683
Can't query with unicode character
{ "login": "groggyegg", "id": 66879210, "node_id": "MDQ6VXNlcjY2ODc5MjEw", "avatar_url": "https://avatars.githubusercontent.com/u/66879210?v=4", "gravatar_id": "", "url": "https://api.github.com/users/groggyegg", "html_url": "https://github.com/groggyegg", "followers_url": "https://api.github.com/users/...
[]
closed
false
null
[]
null
[ "This probably has to do with the collation you're using. Is this MySQL?", "No, I’m using SQLite", "Wait so your data is *literally* the Unicode escapes? If so have you tried double escaping the forward quote?", "> Wait so your data is _literally_ the Unicode escapes? If so have you tried double escaping the ...
2023-02-26T00:49:33
2023-02-26T12:53:07
2023-02-26T12:53:07
NONE
null
I have a column containing this type of data `{"zh": "\u65e5\u97e9\u5267"}` and when I query it with this code `Video.select().where(Video.director.contains('\u65e5\u97e9\u5267'))` , I'm not getting any result. It only works when I query non-unicode text e.g. `Video.select().where(Video.director.contains('"zh"'))`.
{ "url": "https://api.github.com/repos/coleifer/peewee/issues/2683/reactions", "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 }
https://api.github.com/repos/coleifer/peewee/issues/2683/timeline
null
completed
null
null
https://api.github.com/repos/coleifer/peewee/issues/2682
https://api.github.com/repos/coleifer/peewee
https://api.github.com/repos/coleifer/peewee/issues/2682/labels{/name}
https://api.github.com/repos/coleifer/peewee/issues/2682/comments
https://api.github.com/repos/coleifer/peewee/issues/2682/events
https://github.com/coleifer/peewee/issues/2682
1,599,859,949
I_kwDOAA7yGM5fW-zt
2,682
peewee.InterfaceError: Error, database must be initialized before opening a connection.
{ "login": "NPZYMR", "id": 101792221, "node_id": "U_kgDOBhE53Q", "avatar_url": "https://avatars.githubusercontent.com/u/101792221?v=4", "gravatar_id": "", "url": "https://api.github.com/users/NPZYMR", "html_url": "https://github.com/NPZYMR", "followers_url": "https://api.github.com/users/NPZYMR/follower...
[]
closed
false
null
[]
null
[ "If you had taken a moment to debug this, you would have found that `db_name = os.environ.get('DB_NAME')` is somehow getting set to `None`. This is the issue.", "In debug, I'm getting my DB name in \"db_name = os.environ.get('DB_NAME')\" but\ndon't know how to rectify this now. please don't mind this I'm new to\n...
2023-02-25T22:25:31
2023-02-26T19:46:52
2023-02-25T22:42:51
NONE
null
import os from playhouse.postgres_ext import CharField, DateTimeField, IntegerField, BooleanField from .base import Base import datetime from peewee import PostgresqlDatabase from playhouse.migrate import * db_name = os.environ.get('DB_NAME') db_host = os.environ.get('DB_HOST') db_port = os.environ.get('DB_PO...
{ "url": "https://api.github.com/repos/coleifer/peewee/issues/2682/reactions", "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 }
https://api.github.com/repos/coleifer/peewee/issues/2682/timeline
null
completed
null
null
https://api.github.com/repos/coleifer/peewee/issues/2681
https://api.github.com/repos/coleifer/peewee
https://api.github.com/repos/coleifer/peewee/issues/2681/labels{/name}
https://api.github.com/repos/coleifer/peewee/issues/2681/comments
https://api.github.com/repos/coleifer/peewee/issues/2681/events
https://github.com/coleifer/peewee/issues/2681
1,599,322,496
I_kwDOAA7yGM5fU7mA
2,681
Does migrate() run every time I run server(Ex. flask server)
{ "login": "NPZYMR", "id": 101792221, "node_id": "U_kgDOBhE53Q", "avatar_url": "https://avatars.githubusercontent.com/u/101792221?v=4", "gravatar_id": "", "url": "https://api.github.com/users/NPZYMR", "html_url": "https://github.com/NPZYMR", "followers_url": "https://api.github.com/users/NPZYMR/follower...
[]
closed
false
null
[]
null
[ "Let's say you want to add a column to a model in an application. The typical process would be to:\r\n\r\n1. Stop the application.\r\n2. Update the schema of the database by running a migration once.\r\n3. Restart the application with the new field present in the code.\r\n\r\nYou can always add a \"check\" in your ...
2023-02-24T21:54:40
2023-02-25T12:46:39
2023-02-24T22:51:06
NONE
null
Suppose I've added create_table(fail_silently=True) when the flask server starts. In this model class below, I want to add the column "test" in my DB corresponding field "test_field". Question: 1. Do I need to add "test_field" in my model **EmpDetails** or outside the **class** or both(like I did in the code snipp...
{ "url": "https://api.github.com/repos/coleifer/peewee/issues/2681/reactions", "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 }
https://api.github.com/repos/coleifer/peewee/issues/2681/timeline
null
completed
null
null
https://api.github.com/repos/coleifer/peewee/issues/2680
https://api.github.com/repos/coleifer/peewee
https://api.github.com/repos/coleifer/peewee/issues/2680/labels{/name}
https://api.github.com/repos/coleifer/peewee/issues/2680/comments
https://api.github.com/repos/coleifer/peewee/issues/2680/events
https://github.com/coleifer/peewee/issues/2680
1,593,303,175
I_kwDOAA7yGM5e9-CH
2,680
How to use with pgbouncer?
{ "login": "backpropogation", "id": 34347364, "node_id": "MDQ6VXNlcjM0MzQ3MzY0", "avatar_url": "https://avatars.githubusercontent.com/u/34347364?v=4", "gravatar_id": "", "url": "https://api.github.com/users/backpropogation", "html_url": "https://github.com/backpropogation", "followers_url": "https://api...
[]
closed
false
null
[]
null
[ "They are somewhat orthogonal, and also dependent upon what kind of pooling you use in pgbouncer (session, txn or statement). Peewee's pooled variants will maintain open connections to postgres so doubling-up and using `PooledPostgresqlDatabase` + pgbouncer is probably unnecessary. It also kinda depends on what lat...
2023-02-21T11:23:00
2023-02-21T13:35:54
2023-02-21T13:35:54
NONE
null
Could someone, please, make clear, how to use peewee with pgbouncer? Am I supposed to use `PooledPostgresqlExtDatabase` or it's overkill and just `PostgresqlExtDatabase` will be fine? Connection string will point to pgbouncer.
{ "url": "https://api.github.com/repos/coleifer/peewee/issues/2680/reactions", "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 }
https://api.github.com/repos/coleifer/peewee/issues/2680/timeline
null
completed
null
null
https://api.github.com/repos/coleifer/peewee/issues/2679
https://api.github.com/repos/coleifer/peewee
https://api.github.com/repos/coleifer/peewee/issues/2679/labels{/name}
https://api.github.com/repos/coleifer/peewee/issues/2679/comments
https://api.github.com/repos/coleifer/peewee/issues/2679/events
https://github.com/coleifer/peewee/pull/2679
1,592,259,335
PR_kwDOAA7yGM5KXb30
2,679
Fix typo in docs
{ "login": "puntonim", "id": 6423485, "node_id": "MDQ6VXNlcjY0MjM0ODU=", "avatar_url": "https://avatars.githubusercontent.com/u/6423485?v=4", "gravatar_id": "", "url": "https://api.github.com/users/puntonim", "html_url": "https://github.com/puntonim", "followers_url": "https://api.github.com/users/punto...
[]
closed
false
null
[]
null
[]
2023-02-20T17:54:34
2023-02-20T21:01:12
2023-02-20T21:01:12
NONE
null
null
{ "url": "https://api.github.com/repos/coleifer/peewee/issues/2679/reactions", "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 }
https://api.github.com/repos/coleifer/peewee/issues/2679/timeline
null
null
false
{ "url": "https://api.github.com/repos/coleifer/peewee/pulls/2679", "html_url": "https://github.com/coleifer/peewee/pull/2679", "diff_url": "https://github.com/coleifer/peewee/pull/2679.diff", "patch_url": "https://github.com/coleifer/peewee/pull/2679.patch", "merged_at": null }
https://api.github.com/repos/coleifer/peewee/issues/2678
https://api.github.com/repos/coleifer/peewee
https://api.github.com/repos/coleifer/peewee/issues/2678/labels{/name}
https://api.github.com/repos/coleifer/peewee/issues/2678/comments
https://api.github.com/repos/coleifer/peewee/issues/2678/events
https://github.com/coleifer/peewee/issues/2678
1,587,353,006
I_kwDOAA7yGM5enRWu
2,678
Playhouse Migrator does not honour model schema
{ "login": "berzi", "id": 32619123, "node_id": "MDQ6VXNlcjMyNjE5MTIz", "avatar_url": "https://avatars.githubusercontent.com/u/32619123?v=4", "gravatar_id": "", "url": "https://api.github.com/users/berzi", "html_url": "https://github.com/berzi", "followers_url": "https://api.github.com/users/berzi/follow...
[]
closed
false
null
[]
null
[ "I monkeypatched this on my end like so:\r\n```python\r\ndef __sql__(self, ctx):\r\n return ctx.literal(\".\".join(self._path))\r\nEntity.__sql__ = __sql__\r\n```\r\nand then I pass `schema.table` as table name to each migrator action, but that gets rid of quoting entirely (and I can't even manually add them in ...
2023-02-16T09:41:36
2023-02-17T19:19:43
2023-02-16T16:37:17
NONE
null
Sorry for not including a full code example: I'm using playhouse.migrate in a utility and it would be more than overkill to include all of it, not to mention it's closed-source company code I'm not allowed to share. But I believe there's enough information to tackle the issue. In all the scenarios below, I call `mig...
{ "url": "https://api.github.com/repos/coleifer/peewee/issues/2678/reactions", "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 }
https://api.github.com/repos/coleifer/peewee/issues/2678/timeline
null
completed
null
null
https://api.github.com/repos/coleifer/peewee/issues/2677
https://api.github.com/repos/coleifer/peewee
https://api.github.com/repos/coleifer/peewee/issues/2677/labels{/name}
https://api.github.com/repos/coleifer/peewee/issues/2677/comments
https://api.github.com/repos/coleifer/peewee/issues/2677/events
https://github.com/coleifer/peewee/pull/2677
1,577,460,129
PR_kwDOAA7yGM5JmIK6
2,677
query.first() mutates the query
{ "login": "klen", "id": 90699, "node_id": "MDQ6VXNlcjkwNjk5", "avatar_url": "https://avatars.githubusercontent.com/u/90699?v=4", "gravatar_id": "", "url": "https://api.github.com/users/klen", "html_url": "https://github.com/klen", "followers_url": "https://api.github.com/users/klen/followers", "follo...
[]
closed
false
null
[]
null
[ "The `first()` method is a bit of a special-case. It applies a limit of 1 to avoid making the server generate the full result-set, as it is assumed that after calling `first()` the query itself will not be iterated. Similarly, the mutation is done in-place so that multiple calls to `first()` do not result in additi...
2023-02-09T08:32:19
2023-02-09T13:40:24
2023-02-09T13:40:24
CONTRIBUTOR
null
The `query.first()` method mutates the query and it may lead to unexpected behaviour ```python query = SomeModel.select() first_item = query.first() for item in query: # This cycle only runs once, because after first() the query is mutated and now it has limit 1 ``` The PR fixes the behaviour.
{ "url": "https://api.github.com/repos/coleifer/peewee/issues/2677/reactions", "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 }
https://api.github.com/repos/coleifer/peewee/issues/2677/timeline
null
null
false
{ "url": "https://api.github.com/repos/coleifer/peewee/pulls/2677", "html_url": "https://github.com/coleifer/peewee/pull/2677", "diff_url": "https://github.com/coleifer/peewee/pull/2677.diff", "patch_url": "https://github.com/coleifer/peewee/pull/2677.patch", "merged_at": null }
https://api.github.com/repos/coleifer/peewee/issues/2676
https://api.github.com/repos/coleifer/peewee
https://api.github.com/repos/coleifer/peewee/issues/2676/labels{/name}
https://api.github.com/repos/coleifer/peewee/issues/2676/comments
https://api.github.com/repos/coleifer/peewee/issues/2676/events
https://github.com/coleifer/peewee/pull/2676
1,577,125,031
PR_kwDOAA7yGM5JlA0X
2,676
merge latest dev
{ "login": "guardrails-test", "id": 63639880, "node_id": "MDQ6VXNlcjYzNjM5ODgw", "avatar_url": "https://avatars.githubusercontent.com/u/63639880?v=4", "gravatar_id": "", "url": "https://api.github.com/users/guardrails-test", "html_url": "https://github.com/guardrails-test", "followers_url": "https://api...
[]
closed
false
null
[]
null
[ "Delete this please." ]
2023-02-09T02:30:01
2023-02-09T13:48:24
2023-02-09T02:31:43
NONE
null
void
{ "url": "https://api.github.com/repos/coleifer/peewee/issues/2676/reactions", "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 }
https://api.github.com/repos/coleifer/peewee/issues/2676/timeline
null
null
false
{ "url": "https://api.github.com/repos/coleifer/peewee/pulls/2676", "html_url": "https://github.com/coleifer/peewee/pull/2676", "diff_url": "https://github.com/coleifer/peewee/pull/2676.diff", "patch_url": "https://github.com/coleifer/peewee/pull/2676.patch", "merged_at": null }
https://api.github.com/repos/coleifer/peewee/issues/2675
https://api.github.com/repos/coleifer/peewee
https://api.github.com/repos/coleifer/peewee/issues/2675/labels{/name}
https://api.github.com/repos/coleifer/peewee/issues/2675/comments
https://api.github.com/repos/coleifer/peewee/issues/2675/events
https://github.com/coleifer/peewee/issues/2675
1,575,789,960
I_kwDOAA7yGM5d7KWI
2,675
excuse, how could i use a variable as table's field
{ "login": "EasyArch-lyy", "id": 46855467, "node_id": "MDQ6VXNlcjQ2ODU1NDY3", "avatar_url": "https://avatars.githubusercontent.com/u/46855467?v=4", "gravatar_id": "", "url": "https://api.github.com/users/EasyArch-lyy", "html_url": "https://github.com/EasyArch-lyy", "followers_url": "https://api.github.c...
[]
closed
false
null
[]
null
[ "Post stuff like this on stackoverflow in the future. You use `getattr(test, field) == 'cc'`." ]
2023-02-08T09:36:58
2023-02-08T13:43:03
2023-02-08T13:43:03
NONE
null
eg: create table test ( id int auto_increment primary key, name varchar(255) null, ); field = 'name' query_list = list(test.select().where(test.field=='cc').dicts()) AttributeError: type object 'test' has no attribute 'field' want to know the api
{ "url": "https://api.github.com/repos/coleifer/peewee/issues/2675/reactions", "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 }
https://api.github.com/repos/coleifer/peewee/issues/2675/timeline
null
completed
null
null
https://api.github.com/repos/coleifer/peewee/issues/2674
https://api.github.com/repos/coleifer/peewee
https://api.github.com/repos/coleifer/peewee/issues/2674/labels{/name}
https://api.github.com/repos/coleifer/peewee/issues/2674/comments
https://api.github.com/repos/coleifer/peewee/issues/2674/events
https://github.com/coleifer/peewee/issues/2674
1,574,923,381
I_kwDOAA7yGM5d32x1
2,674
Example of custom operators for custom fields?
{ "login": "eddyg", "id": 3235109, "node_id": "MDQ6VXNlcjMyMzUxMDk=", "avatar_url": "https://avatars.githubusercontent.com/u/3235109?v=4", "gravatar_id": "", "url": "https://api.github.com/users/eddyg", "html_url": "https://github.com/eddyg", "followers_url": "https://api.github.com/users/eddyg/follower...
[]
closed
false
null
[]
null
[ "You can find an example of a field with a custom `__add__` implementation in `peewee._StringField` which overrides the add operation to perform a string concatenation. The implementation looks like this:\r\n\r\n```python\r\nclass _StringField(Field):\r\n def adapt(self, value):\r\n if isinstance(value, t...
2023-02-07T19:43:24
2023-02-13T19:31:20
2023-02-07T21:54:22
NONE
null
I've tried to find an instance of a custom field that needed to override the behavior of something like the `+` operator but haven't found one. As an example scenario, let's say I had a custom field named `CounterDictField` (that subclassed `JSONField` for storage). I want to override the `__add__` method in the ...
{ "url": "https://api.github.com/repos/coleifer/peewee/issues/2674/reactions", "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 }
https://api.github.com/repos/coleifer/peewee/issues/2674/timeline
null
completed
null
null
https://api.github.com/repos/coleifer/peewee/issues/2673
https://api.github.com/repos/coleifer/peewee
https://api.github.com/repos/coleifer/peewee/issues/2673/labels{/name}
https://api.github.com/repos/coleifer/peewee/issues/2673/comments
https://api.github.com/repos/coleifer/peewee/issues/2673/events
https://github.com/coleifer/peewee/issues/2673
1,573,925,868
I_kwDOAA7yGM5d0DPs
2,673
MySQL introspector returns columns in non-deterministic order
{ "login": "linhr", "id": 5601366, "node_id": "MDQ6VXNlcjU2MDEzNjY=", "avatar_url": "https://avatars.githubusercontent.com/u/5601366?v=4", "gravatar_id": "", "url": "https://api.github.com/users/linhr", "html_url": "https://github.com/linhr", "followers_url": "https://api.github.com/users/linhr/follower...
[]
closed
false
null
[]
null
[]
2023-02-07T08:52:16
2023-02-07T13:44:13
2023-02-07T13:44:13
NONE
null
When I use the introspector to generate model classes for MySQL tables, the order of columns seems non-deterministic. It turns out that `MySQLDatabase.get_columns()` does not fetch columns ordered by their ordinal position. (Sometimes the columns are simply returned alphabetically, from what I observed.) Could we add `...
{ "url": "https://api.github.com/repos/coleifer/peewee/issues/2673/reactions", "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 }
https://api.github.com/repos/coleifer/peewee/issues/2673/timeline
null
completed
null
null
https://api.github.com/repos/coleifer/peewee/issues/2672
https://api.github.com/repos/coleifer/peewee
https://api.github.com/repos/coleifer/peewee/issues/2672/labels{/name}
https://api.github.com/repos/coleifer/peewee/issues/2672/comments
https://api.github.com/repos/coleifer/peewee/issues/2672/events
https://github.com/coleifer/peewee/issues/2672
1,561,906,409
I_kwDOAA7yGM5dGMzp
2,672
migrator may conflict with AutoIncrementField in sqlite
{ "login": "js515990", "id": 108316845, "node_id": "U_kgDOBnTIrQ", "avatar_url": "https://avatars.githubusercontent.com/u/108316845?v=4", "gravatar_id": "", "url": "https://api.github.com/users/js515990", "html_url": "https://github.com/js515990", "followers_url": "https://api.github.com/users/js515990/...
[]
closed
false
null
[]
null
[ "The problem is that Sqlite does not support a way to modify constraints. So in order to do this, we have to create a new table without the changed constraint, copy data into it, drop the old table, then rename the new table -> old table. In this process, your autoincrement sequence gets lost." ]
2023-01-30T07:38:45
2023-01-30T13:48:35
2023-01-30T13:48:35
NONE
null
I have created a sqlite table 'user' using peewee: The table generally looks like this: > id name > 1 name1 > 2 name2 > 3 name3 > 4 name4 (deleted) For column id, i'm using `AutoIncrementField` from `playhouse.sqlite_ext` to prevent the deleted id from being reused Since the name4 line has been dele...
{ "url": "https://api.github.com/repos/coleifer/peewee/issues/2672/reactions", "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 }
https://api.github.com/repos/coleifer/peewee/issues/2672/timeline
null
completed
null
null
https://api.github.com/repos/coleifer/peewee/issues/2671
https://api.github.com/repos/coleifer/peewee
https://api.github.com/repos/coleifer/peewee/issues/2671/labels{/name}
https://api.github.com/repos/coleifer/peewee/issues/2671/comments
https://api.github.com/repos/coleifer/peewee/issues/2671/events
https://github.com/coleifer/peewee/issues/2671
1,557,037,210
I_kwDOAA7yGM5czoCa
2,671
Value not saved when an alias (column_name) used
{ "login": "ehcpdeveloper", "id": 1267949, "node_id": "MDQ6VXNlcjEyNjc5NDk=", "avatar_url": "https://avatars.githubusercontent.com/u/1267949?v=4", "gravatar_id": "", "url": "https://api.github.com/users/ehcpdeveloper", "html_url": "https://github.com/ehcpdeveloper", "followers_url": "https://api.github....
[]
closed
false
null
[]
null
[ "Adding a second field like that is most definitely \"undefined behavior\" and not advisable. If you want something like this (for some reason), it should be done in Python as perhaps a property. Your example doesn't make clear what the intended goal you were going for, but let's say you wanted something like a nor...
2023-01-25T17:37:28
2023-01-26T07:25:02
2023-01-25T17:54:50
NONE
null
``` >>> class Test(BaseModel): ... test1 = DecimalField(constraints=[SQL("DEFAULT 0.00")], null=True) ... class Meta: ... table_name = 'test' ... >>> >>> >>> Test.create_table() >>> Test.insert(test1=12).execute() 1 >>> a=Test[1] >>> a.test1=20; >>> a.save() 1 >>> a=Test[1] >>> a.test1 ...
{ "url": "https://api.github.com/repos/coleifer/peewee/issues/2671/reactions", "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 }
https://api.github.com/repos/coleifer/peewee/issues/2671/timeline
null
completed
null
null
https://api.github.com/repos/coleifer/peewee/issues/2670
https://api.github.com/repos/coleifer/peewee
https://api.github.com/repos/coleifer/peewee/issues/2670/labels{/name}
https://api.github.com/repos/coleifer/peewee/issues/2670/comments
https://api.github.com/repos/coleifer/peewee/issues/2670/events
https://github.com/coleifer/peewee/issues/2670
1,552,809,681
I_kwDOAA7yGM5cjf7R
2,670
[Feature Request] Event hooks for peewee
{ "login": "Zheaoli", "id": 7054676, "node_id": "MDQ6VXNlcjcwNTQ2NzY=", "avatar_url": "https://avatars.githubusercontent.com/u/7054676?v=4", "gravatar_id": "", "url": "https://api.github.com/users/Zheaoli", "html_url": "https://github.com/Zheaoli", "followers_url": "https://api.github.com/users/Zheaoli/...
[]
closed
false
null
[]
null
[ "peewee already have signal support see more in https://docs.peewee-orm.com/en/latest/peewee/playhouse.html#signals\n\nDoes this feature meets your needs?\n ", "@Zheaoli - I'm going to pass, as the generally-supported approach for Peewee users has been to override the `Database.execute_sql()` method in these type...
2023-01-23T10:00:47
2023-01-23T14:16:43
2023-01-23T14:16:42
NONE
null
For now, I'm looking for event hooks in peewee, but I think we don't support event hooks for peewee yet(I have already read the docs, please feel free to correct me if I'm wrong) I think it's an excellent choice to support event hooks like Django ORM or sqlalchemy like below. ```python from peewee import event ...
{ "url": "https://api.github.com/repos/coleifer/peewee/issues/2670/reactions", "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 }
https://api.github.com/repos/coleifer/peewee/issues/2670/timeline
null
completed
null
null
https://api.github.com/repos/coleifer/peewee/issues/2669
https://api.github.com/repos/coleifer/peewee
https://api.github.com/repos/coleifer/peewee/issues/2669/labels{/name}
https://api.github.com/repos/coleifer/peewee/issues/2669/comments
https://api.github.com/repos/coleifer/peewee/issues/2669/events
https://github.com/coleifer/peewee/issues/2669
1,551,887,516
I_kwDOAA7yGM5cf-yc
2,669
How to use instance-relative SQLite databases with FlaskDB
{ "login": "eddyg", "id": 3235109, "node_id": "MDQ6VXNlcjMyMzUxMDk=", "avatar_url": "https://avatars.githubusercontent.com/u/3235109?v=4", "gravatar_id": "", "url": "https://api.github.com/users/eddyg", "html_url": "https://github.com/eddyg", "followers_url": "https://api.github.com/users/eddyg/follower...
[]
closed
false
null
[]
null
[ "What is the value of app.instance_path at the time you're trying to use it? The error seems to me to indicate it's a badly formed filename.", "If I add this line to code above (before the call to `db.create_tables`):\r\n\r\n```python\r\n print(f\"{os.getcwd()=}\\n{app.instance_path=}\\n{app.config['DATABASE']...
2023-01-21T19:10:44
2023-01-21T20:20:40
2023-01-21T19:44:03
NONE
null
I have this code in `test/__init__.py`: ```python import os import contextlib from flask import Flask from peewee import CharField, PrimaryKeyField from playhouse.flask_utils import FlaskDB db_wrapper = FlaskDB() class User(db_wrapper.Model): user_id = PrimaryKeyField() user_name = CharField(max...
{ "url": "https://api.github.com/repos/coleifer/peewee/issues/2669/reactions", "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 }
https://api.github.com/repos/coleifer/peewee/issues/2669/timeline
null
completed
null
null
https://api.github.com/repos/coleifer/peewee/issues/2668
https://api.github.com/repos/coleifer/peewee
https://api.github.com/repos/coleifer/peewee/issues/2668/labels{/name}
https://api.github.com/repos/coleifer/peewee/issues/2668/comments
https://api.github.com/repos/coleifer/peewee/issues/2668/events
https://github.com/coleifer/peewee/issues/2668
1,533,214,216
I_kwDOAA7yGM5bYv4I
2,668
The record is not saving in only one Table
{ "login": "d1n0z", "id": 79446044, "node_id": "MDQ6VXNlcjc5NDQ2MDQ0", "avatar_url": "https://avatars.githubusercontent.com/u/79446044?v=4", "gravatar_id": "", "url": "https://api.github.com/users/d1n0z", "html_url": "https://github.com/d1n0z", "followers_url": "https://api.github.com/users/d1n0z/follow...
[]
closed
false
null
[]
null
[ ">```c.users = c.users.replace(f\"{self.event.text.lower()[15:]}/\", \"\")\r\nc.save()```\r\n\r\nThis is so far off-base I don't really know where to start. But try something like this:\r\n\r\n```\r\nUser.update(user_clan='').where(user_clan=x).execute()\r\n```\r\n\r\nWhere x is the old clan name...if I understand ...
2023-01-14T10:55:57
2023-01-14T15:02:01
2023-01-14T12:51:00
NONE
null
Only the "c" part is saved, although I do exactly the same thing, the "u" part changes, but it is not saved in the database. When I put .save (force_insert) it gives an error: `UNIQUE constraint failed: Users.id` Code(3 files): ``` # main.py # self.event.text.lower()[15:] - user id # self.db - current use...
{ "url": "https://api.github.com/repos/coleifer/peewee/issues/2668/reactions", "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 }
https://api.github.com/repos/coleifer/peewee/issues/2668/timeline
null
completed
null
null
https://api.github.com/repos/coleifer/peewee/issues/2667
https://api.github.com/repos/coleifer/peewee
https://api.github.com/repos/coleifer/peewee/issues/2667/labels{/name}
https://api.github.com/repos/coleifer/peewee/issues/2667/comments
https://api.github.com/repos/coleifer/peewee/issues/2667/events
https://github.com/coleifer/peewee/issues/2667
1,533,156,449
I_kwDOAA7yGM5bYhxh
2,667
OSS License compatibility question
{ "login": "Ashley123456789", "id": 56197499, "node_id": "MDQ6VXNlcjU2MTk3NDk5", "avatar_url": "https://avatars.githubusercontent.com/u/56197499?v=4", "gravatar_id": "", "url": "https://api.github.com/users/Ashley123456789", "html_url": "https://github.com/Ashley123456789", "followers_url": "https://api...
[]
closed
false
null
[]
null
[]
2023-01-14T06:21:09
2023-01-14T12:45:25
2023-01-14T12:45:25
NONE
null
There’s some possible confusion on the license of your repository when you combine other open-source code. The module `tests/libs/mock.py` claims its license as **the BSD License**. However, the license of your whole project is shown as **the MIT license** in LICENSE, i.e., **less strict** than the BSD License on l...
{ "url": "https://api.github.com/repos/coleifer/peewee/issues/2667/reactions", "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 }
https://api.github.com/repos/coleifer/peewee/issues/2667/timeline
null
completed
null
null
https://api.github.com/repos/coleifer/peewee/issues/2666
https://api.github.com/repos/coleifer/peewee
https://api.github.com/repos/coleifer/peewee/issues/2666/labels{/name}
https://api.github.com/repos/coleifer/peewee/issues/2666/comments
https://api.github.com/repos/coleifer/peewee/issues/2666/events
https://github.com/coleifer/peewee/issues/2666
1,530,933,173
I_kwDOAA7yGM5bQC-1
2,666
Closing SQLite3 db blocks
{ "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
[ "Your code works just fine for me, though I would note that you do **not** need to call `Database.db.commit()`. Peewee operates in autocommit mode unless you are explicitly using either an `atomic()` or `transaction()` block. This *may* be related to your issue or not, I'm not sure.\r\n\r\nExample output when I run...
2023-01-12T15:36:23
2023-01-13T16:45:37
2023-01-12T16:07:17
NONE
null
hi, I am writing a Kodi addon where I wanted to use peewee as my CRM. My Kodi build uses python3.8 internally. I packaged the latest peewee version available and it works fine. I can create databases write to them read from them etc. But if I try to call close() on the database, it blocks forever and the code nev...
{ "url": "https://api.github.com/repos/coleifer/peewee/issues/2666/reactions", "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 }
https://api.github.com/repos/coleifer/peewee/issues/2666/timeline
null
completed
null
null
https://api.github.com/repos/coleifer/peewee/issues/2665
https://api.github.com/repos/coleifer/peewee
https://api.github.com/repos/coleifer/peewee/issues/2665/labels{/name}
https://api.github.com/repos/coleifer/peewee/issues/2665/comments
https://api.github.com/repos/coleifer/peewee/issues/2665/events
https://github.com/coleifer/peewee/issues/2665
1,518,819,649
I_kwDOAA7yGM5ah1lB
2,665
Unable to import module 'app': No module named 'playhouse'
{ "login": "bitfede", "id": 15684622, "node_id": "MDQ6VXNlcjE1Njg0NjIy", "avatar_url": "https://avatars.githubusercontent.com/u/15684622?v=4", "gravatar_id": "", "url": "https://api.github.com/users/bitfede", "html_url": "https://github.com/bitfede", "followers_url": "https://api.github.com/users/bitfed...
[]
closed
false
null
[]
null
[ "Peewee, the package, includes `playhouse` so I'd assume you would just need to ensure that `peewee` is installed in your environment and then `playhouse` should work. I am not familiar with chalice, and questions such as this are better suited to StackOverflow.", "@bitfede Note that you can [deploy AWS Chalice i...
2023-01-04T11:36:10
2023-01-06T14:44:52
2023-01-04T13:46:18
NONE
null
Hello, I am working on an [AWS Chalice](https://aws.github.io/chalice/quickstart.html#deploying) project, and I chose peewee as the ORM for the postgresql DB we have. When I run things locally with `chalice local` I can run my api with no problem, I'm able to CRUD normally. When I deploy my microservice using ...
{ "url": "https://api.github.com/repos/coleifer/peewee/issues/2665/reactions", "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 }
https://api.github.com/repos/coleifer/peewee/issues/2665/timeline
null
completed
null
null
https://api.github.com/repos/coleifer/peewee/issues/2664
https://api.github.com/repos/coleifer/peewee
https://api.github.com/repos/coleifer/peewee/issues/2664/labels{/name}
https://api.github.com/repos/coleifer/peewee/issues/2664/comments
https://api.github.com/repos/coleifer/peewee/issues/2664/events
https://github.com/coleifer/peewee/issues/2664
1,513,647,552
I_kwDOAA7yGM5aOG3A
2,664
Error when aurora cluster instance failover
{ "login": "oxeye-schmil", "id": 86559997, "node_id": "MDQ6VXNlcjg2NTU5OTk3", "avatar_url": "https://avatars.githubusercontent.com/u/86559997?v=4", "gravatar_id": "", "url": "https://api.github.com/users/oxeye-schmil", "html_url": "https://github.com/oxeye-schmil", "followers_url": "https://api.github.c...
[]
closed
false
null
[]
null
[ "`is_closed()` refers to internal state of Peewee, not the underlying psycopg2/libpq connection. Psycopg2 does not really expose a good way to check the state, see this comment for some background explanation: https://github.com/coleifer/peewee/issues/2654#issuecomment-1325199936 - also note that handling failover ...
2022-12-29T11:31:08
2022-12-29T14:18:51
2022-12-29T14:18:51
NONE
null
Hi, I'm using PostgresqlDatabase to manage my Aurora DB. I've encountered the following error after the the AZ on which the writer instance went down and caused a failover. ``` Traceback (most recent call last): File "/Users/schmil/work/oxeye-cloud/data_pipeline/sink_instance_creator/sink_instance_persistant_s...
{ "url": "https://api.github.com/repos/coleifer/peewee/issues/2664/reactions", "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 }
https://api.github.com/repos/coleifer/peewee/issues/2664/timeline
null
completed
null
null
https://api.github.com/repos/coleifer/peewee/issues/2663
https://api.github.com/repos/coleifer/peewee
https://api.github.com/repos/coleifer/peewee/issues/2663/labels{/name}
https://api.github.com/repos/coleifer/peewee/issues/2663/comments
https://api.github.com/repos/coleifer/peewee/issues/2663/events
https://github.com/coleifer/peewee/issues/2663
1,511,683,801
I_kwDOAA7yGM5aGnbZ
2,663
Suggestion: .is_ and .is_not query lookups
{ "login": "frosthamster", "id": 17183342, "node_id": "MDQ6VXNlcjE3MTgzMzQy", "avatar_url": "https://avatars.githubusercontent.com/u/17183342?v=4", "gravatar_id": "", "url": "https://api.github.com/users/frosthamster", "html_url": "https://github.com/frosthamster", "followers_url": "https://api.github.c...
[]
closed
false
null
[]
null
[ "We use `.is_null()`: http://docs.peewee-orm.com/en/latest/peewee/api.html#ColumnBase", "But we can use it only for generating `is null` and `it not null`, not for `is not true`" ]
2022-12-27T10:50:26
2022-12-28T07:33:40
2022-12-27T13:40:07
NONE
null
It'd be great to have an option to write `is` and `is not` lookups via functions `Model.field.is_(value)` and not `Model.field >> value` which is unreadable, similar to `Model.field.in_(value)`. It's useful for writing queries against nullable boolean fields, like `Model.is_finished.is_not(True)` I can submit a pr if ...
{ "url": "https://api.github.com/repos/coleifer/peewee/issues/2663/reactions", "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 }
https://api.github.com/repos/coleifer/peewee/issues/2663/timeline
null
completed
null
null
https://api.github.com/repos/coleifer/peewee/issues/2662
https://api.github.com/repos/coleifer/peewee
https://api.github.com/repos/coleifer/peewee/issues/2662/labels{/name}
https://api.github.com/repos/coleifer/peewee/issues/2662/comments
https://api.github.com/repos/coleifer/peewee/issues/2662/events
https://github.com/coleifer/peewee/issues/2662
1,511,046,894
I_kwDOAA7yGM5aEL7u
2,662
Suggestion: SQLiteDatabase option to disable automatic DB creation
{ "login": "MrBillium", "id": 14281367, "node_id": "MDQ6VXNlcjE0MjgxMzY3", "avatar_url": "https://avatars.githubusercontent.com/u/14281367?v=4", "gravatar_id": "", "url": "https://api.github.com/users/MrBillium", "html_url": "https://github.com/MrBillium", "followers_url": "https://api.github.com/users/...
[]
closed
false
null
[]
null
[ "Going to pass" ]
2022-12-26T15:45:26
2022-12-26T16:05:49
2022-12-26T16:05:39
NONE
null
There does not appear to be a way to disable DB creation if not found. e.g db = SqliteDatabase('mydb.db', pragmas={'foreign_keys': 1}, **create_db=False**) Why this could be helpful: I just went down a rabbit hole moving running code to an Apache server where I forgot to set **home=/var/www/myapp** in my a...
{ "url": "https://api.github.com/repos/coleifer/peewee/issues/2662/reactions", "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 }
https://api.github.com/repos/coleifer/peewee/issues/2662/timeline
null
completed
null
null
https://api.github.com/repos/coleifer/peewee/issues/2661
https://api.github.com/repos/coleifer/peewee
https://api.github.com/repos/coleifer/peewee/issues/2661/labels{/name}
https://api.github.com/repos/coleifer/peewee/issues/2661/comments
https://api.github.com/repos/coleifer/peewee/issues/2661/events
https://github.com/coleifer/peewee/issues/2661
1,502,355,166
I_kwDOAA7yGM5ZjB7e
2,661
bulk_create() doesn't work with server-side default values
{ "login": "gondolio", "id": 4338344, "node_id": "MDQ6VXNlcjQzMzgzNDQ=", "avatar_url": "https://avatars.githubusercontent.com/u/4338344?v=4", "gravatar_id": "", "url": "https://api.github.com/users/gondolio", "html_url": "https://github.com/gondolio", "followers_url": "https://api.github.com/users/gondo...
[]
closed
false
null
[]
null
[ "Yes, this is because `bulk_create()` is explicit about inserting all fields. If you want finer-grained control, for (e.g.) fields w/server-side defaults, you should just use `insert_many()` and be explicit.", "Got it - so first convert the objects to dicts (via `object.__data__`) and then feed it into `insert_ma...
2022-12-19T05:58:06
2022-12-20T08:39:11
2022-12-19T19:31:49
NONE
null
It appears that bulk_create does not work with server-side default values specified in [constraint](https://docs.peewee-orm.com/en/latest/peewee/models.html?highlight=table%20generation#:~:text=can%20use%20the-,constraints,-parameter%20to%20specify). For example, with this model: ``` class MyModel(Modell): d...
{ "url": "https://api.github.com/repos/coleifer/peewee/issues/2661/reactions", "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 }
https://api.github.com/repos/coleifer/peewee/issues/2661/timeline
null
completed
null
null
https://api.github.com/repos/coleifer/peewee/issues/2660
https://api.github.com/repos/coleifer/peewee
https://api.github.com/repos/coleifer/peewee/issues/2660/labels{/name}
https://api.github.com/repos/coleifer/peewee/issues/2660/comments
https://api.github.com/repos/coleifer/peewee/issues/2660/events
https://github.com/coleifer/peewee/issues/2660
1,500,328,870
I_kwDOAA7yGM5ZbTOm
2,660
playhouse/_sqlite_udf.pyx: compilation error
{ "login": "wedobetter", "id": 31860030, "node_id": "MDQ6VXNlcjMxODYwMDMw", "avatar_url": "https://avatars.githubusercontent.com/u/31860030?v=4", "gravatar_id": "", "url": "https://api.github.com/users/wedobetter", "html_url": "https://github.com/wedobetter", "followers_url": "https://api.github.com/use...
[]
closed
false
null
[]
null
[]
2022-12-16T14:32:30
2022-12-16T18:31:37
2022-12-16T18:31:37
NONE
null
Peewee Version: 3.15.4 Python: 3.11.0 Cython: 3.0.0a11 Platform: MacOS M1 - arm64 How to reproduce: pip install peewee ``` Error compiling Cython file: ------------------------------------------------------------ ... if self.ct == 0: return None eli...
{ "url": "https://api.github.com/repos/coleifer/peewee/issues/2660/reactions", "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 }
https://api.github.com/repos/coleifer/peewee/issues/2660/timeline
null
completed
null
null
https://api.github.com/repos/coleifer/peewee/issues/2659
https://api.github.com/repos/coleifer/peewee
https://api.github.com/repos/coleifer/peewee/issues/2659/labels{/name}
https://api.github.com/repos/coleifer/peewee/issues/2659/comments
https://api.github.com/repos/coleifer/peewee/issues/2659/events
https://github.com/coleifer/peewee/issues/2659
1,488,771,281
I_kwDOAA7yGM5YvNjR
2,659
Type support
{ "login": "gp-slick-coder", "id": 1906169, "node_id": "MDQ6VXNlcjE5MDYxNjk=", "avatar_url": "https://avatars.githubusercontent.com/u/1906169?v=4", "gravatar_id": "", "url": "https://api.github.com/users/gp-slick-coder", "html_url": "https://github.com/gp-slick-coder", "followers_url": "https://api.gith...
[]
closed
false
null
[]
null
[ "Hey, why was this closed? Is there already a solution for this?", "I already did some research ;-) unfortunately, the creator of this nice ORM doesn't like type hints. Coming from Typescript, python does miss a nice modern ORM solution :-( ", "You can create your own hints (I think they're called \"stubs\"?), ...
2022-12-10T18:12:21
2022-12-12T11:32:34
2022-12-10T18:26:52
NONE
null
Type support in VSCode would be nice. ![image](https://user-images.githubusercontent.com/1906169/206869371-b9555cef-e9d1-4d66-a27f-5fc61968aae8.png)
{ "url": "https://api.github.com/repos/coleifer/peewee/issues/2659/reactions", "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 }
https://api.github.com/repos/coleifer/peewee/issues/2659/timeline
null
completed
null
null
https://api.github.com/repos/coleifer/peewee/issues/2658
https://api.github.com/repos/coleifer/peewee
https://api.github.com/repos/coleifer/peewee/issues/2658/labels{/name}
https://api.github.com/repos/coleifer/peewee/issues/2658/comments
https://api.github.com/repos/coleifer/peewee/issues/2658/events
https://github.com/coleifer/peewee/issues/2658
1,473,350,239
I_kwDOAA7yGM5X0Ypf
2,658
Gotcha for folks using update
{ "login": "brewerja", "id": 410845, "node_id": "MDQ6VXNlcjQxMDg0NQ==", "avatar_url": "https://avatars.githubusercontent.com/u/410845?v=4", "gravatar_id": "", "url": "https://api.github.com/users/brewerja", "html_url": "https://github.com/brewerja", "followers_url": "https://api.github.com/users/brewerj...
[]
closed
false
null
[]
null
[ ">Would an update_instance method help?\r\n\r\nThe docs and examples are already quite clear. You update an instance by setting the attributes and using `save()`, as this is an active-record style ORM.", "I think it would be worth a warning note in the docs, letting folks know that Python will happily allow them ...
2022-12-02T19:36:38
2022-12-02T21:22:24
2022-12-02T20:33:02
NONE
null
Speaking from recent experience, I made a mistake when attempting to update a single field on a model. ```python flag = Flag.get_by_id(flag_id) flag.update(active=False).execute() ``` Given that I was operating on an instance of the model, I assumed I'd be updating that field only on a single row. However, giv...
{ "url": "https://api.github.com/repos/coleifer/peewee/issues/2658/reactions", "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 }
https://api.github.com/repos/coleifer/peewee/issues/2658/timeline
null
completed
null
null
https://api.github.com/repos/coleifer/peewee/issues/2657
https://api.github.com/repos/coleifer/peewee
https://api.github.com/repos/coleifer/peewee/issues/2657/labels{/name}
https://api.github.com/repos/coleifer/peewee/issues/2657/comments
https://api.github.com/repos/coleifer/peewee/issues/2657/events
https://github.com/coleifer/peewee/issues/2657
1,472,272,003
I_kwDOAA7yGM5XwRaD
2,657
[feature] Query tagging capability
{ "login": "recipe", "id": 1947600, "node_id": "MDQ6VXNlcjE5NDc2MDA=", "avatar_url": "https://avatars.githubusercontent.com/u/1947600?v=4", "gravatar_id": "", "url": "https://api.github.com/users/recipe", "html_url": "https://github.com/recipe", "followers_url": "https://api.github.com/users/recipe/foll...
[]
closed
false
null
[]
null
[ "Since this is so google-specific, I'm not too inclined to add it at the present." ]
2022-12-02T03:55:25
2022-12-02T16:54:01
2022-12-02T16:54:01
NONE
null
Hi @coleifer, What do you think in general about providing a capability to add [tags for queries](https://cloud.google.com/sql/docs/postgres/using-query-insights#using-sqlcommenter:~:text=When%20you%20examine%20results%20in%20SQL%20database%20logs%2C%20they%20appear%20as%20follows)? Tagging SQL queries simplifies appl...
{ "url": "https://api.github.com/repos/coleifer/peewee/issues/2657/reactions", "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 }
https://api.github.com/repos/coleifer/peewee/issues/2657/timeline
null
completed
null
null
https://api.github.com/repos/coleifer/peewee/issues/2656
https://api.github.com/repos/coleifer/peewee
https://api.github.com/repos/coleifer/peewee/issues/2656/labels{/name}
https://api.github.com/repos/coleifer/peewee/issues/2656/comments
https://api.github.com/repos/coleifer/peewee/issues/2656/events
https://github.com/coleifer/peewee/issues/2656
1,469,201,531
I_kwDOAA7yGM5Xkjx7
2,656
can't select self-children items
{ "login": "1fisher", "id": 91577407, "node_id": "U_kgDOBXVcPw", "avatar_url": "https://avatars.githubusercontent.com/u/91577407?v=4", "gravatar_id": "", "url": "https://api.github.com/users/1fisher", "html_url": "https://github.com/1fisher", "followers_url": "https://api.github.com/users/1fisher/follow...
[]
closed
false
null
[]
null
[ "`item.children` is exposed as a select query, which is iterable. Do this:\r\n\r\n```python\r\na = A.get(...)\r\nfor child in a.children:\r\n print(child)\r\n```\r\n\r\nAlso post questions like this on stack overflow. Self-referential fk docs are here for your reference: http://docs.peewee-orm.com/en/latest/peew...
2022-11-30T07:55:55
2022-11-30T14:17:50
2022-11-30T14:17:50
NONE
null
``` Python class A(BaseModel): parent = ForieginField('self', null=True, backref='children') for item in A.select(): print(item.children) ```
{ "url": "https://api.github.com/repos/coleifer/peewee/issues/2656/reactions", "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 }
https://api.github.com/repos/coleifer/peewee/issues/2656/timeline
null
completed
null
null
https://api.github.com/repos/coleifer/peewee/issues/2655
https://api.github.com/repos/coleifer/peewee
https://api.github.com/repos/coleifer/peewee/issues/2655/labels{/name}
https://api.github.com/repos/coleifer/peewee/issues/2655/comments
https://api.github.com/repos/coleifer/peewee/issues/2655/events
https://github.com/coleifer/peewee/issues/2655
1,468,443,855
I_kwDOAA7yGM5XhqzP
2,655
PostgresqlDatabase multithreading performance problem
{ "login": "mohamin1995", "id": 45896467, "node_id": "MDQ6VXNlcjQ1ODk2NDY3", "avatar_url": "https://avatars.githubusercontent.com/u/45896467?v=4", "gravatar_id": "", "url": "https://api.github.com/users/mohamin1995", "html_url": "https://github.com/mohamin1995", "followers_url": "https://api.github.com/...
[]
closed
false
null
[]
null
[ "@coleifer ", ">but the performance is worse than sequential running. anyone have any ideas?\r\n\r\nPython uses a global interpreter lock so only 1 thread is ever executing python code. If your code is CPU-bound then, due to context-switching, you will waste time overall.\r\n\r\nYou can try using multiple process...
2022-11-29T17:27:28
2022-12-02T19:33:42
2022-11-29T17:44:11
NONE
null
Hello, I have a postgresql db connection: ``` database = PostgresqlDatabase(config_server['database_name'], **{'host': config_server['host'], 'port': config_server['port'], 'user': config_server['user'], 'password': ...
{ "url": "https://api.github.com/repos/coleifer/peewee/issues/2655/reactions", "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 }
https://api.github.com/repos/coleifer/peewee/issues/2655/timeline
null
completed
null
null
https://api.github.com/repos/coleifer/peewee/issues/2654
https://api.github.com/repos/coleifer/peewee
https://api.github.com/repos/coleifer/peewee/issues/2654/labels{/name}
https://api.github.com/repos/coleifer/peewee/issues/2654/comments
https://api.github.com/repos/coleifer/peewee/issues/2654/events
https://github.com/coleifer/peewee/issues/2654
1,461,470,014
I_kwDOAA7yGM5XHEM-
2,654
PostgresqlDatabase:is_connection_usable returns True, although the database is shut down
{ "login": "parallaxe", "id": 1765580, "node_id": "MDQ6VXNlcjE3NjU1ODA=", "avatar_url": "https://avatars.githubusercontent.com/u/1765580?v=4", "gravatar_id": "", "url": "https://api.github.com/users/parallaxe", "html_url": "https://github.com/parallaxe", "followers_url": "https://api.github.com/users/pa...
[]
closed
false
null
[]
null
[ "There could potentially be a lot of overhead in checking liveness so Peewee uses two things:\r\n\r\n1. Internal flag indicating whether we successfully connected.\r\n2. Whether psycopg2's underlying connection transaction state is not in error.\r\n\r\nIf you are just using plain old psycopg2 and try this experimen...
2022-11-23T10:24:40
2022-11-23T15:00:55
2022-11-23T14:54:54
NONE
null
I'm using peewee 3.15.4 with psycopg2-binary to connect to a postgres-database. To test how the system behaves in case that the database is not available, I shut the database down. In the code I call `is_connection_usable` to check if the database is available. It returns `True`, although the database is no longer a...
{ "url": "https://api.github.com/repos/coleifer/peewee/issues/2654/reactions", "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 }
https://api.github.com/repos/coleifer/peewee/issues/2654/timeline
null
completed
null
null
https://api.github.com/repos/coleifer/peewee/issues/2653
https://api.github.com/repos/coleifer/peewee
https://api.github.com/repos/coleifer/peewee/issues/2653/labels{/name}
https://api.github.com/repos/coleifer/peewee/issues/2653/comments
https://api.github.com/repos/coleifer/peewee/issues/2653/events
https://github.com/coleifer/peewee/issues/2653
1,460,850,759
I_kwDOAA7yGM5XEtBH
2,653
When the connection is maintained, the query suddenly takes a lot of time one day
{ "login": "liuhuanxg", "id": 45617105, "node_id": "MDQ6VXNlcjQ1NjE3MTA1", "avatar_url": "https://avatars.githubusercontent.com/u/45617105?v=4", "gravatar_id": "", "url": "https://api.github.com/users/liuhuanxg", "html_url": "https://github.com/liuhuanxg", "followers_url": "https://api.github.com/users/...
[]
closed
false
null
[]
null
[ "That's quite odd, but I can't really speculate as to what might be going on. When you say \"the service\" are you referring to the database server, or the python application? What does the query look like that went from 3 seconds -> 90 seconds? I'm almost positive that something in the Peewee code wouldn't be affe...
2022-11-23T02:30:17
2022-11-23T14:41:38
2022-11-23T14:41:37
NONE
null
I use pypy2.7, When I connect to MySQL, Because of the large amount of data, the paging query used took about 3 seconds to complete all queries at the beginning, but after about seven days, it took 80-90 seconds. When the service was restarted, it was restored. I don't know why, does anyone know?
{ "url": "https://api.github.com/repos/coleifer/peewee/issues/2653/reactions", "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 }
https://api.github.com/repos/coleifer/peewee/issues/2653/timeline
null
completed
null
null
https://api.github.com/repos/coleifer/peewee/issues/2652
https://api.github.com/repos/coleifer/peewee
https://api.github.com/repos/coleifer/peewee/issues/2652/labels{/name}
https://api.github.com/repos/coleifer/peewee/issues/2652/comments
https://api.github.com/repos/coleifer/peewee/issues/2652/events
https://github.com/coleifer/peewee/issues/2652
1,458,397,909
I_kwDOAA7yGM5W7WLV
2,652
Does peewee support PostgreSQL `CREATE INDEX CONCURRENTLY`?
{ "login": "ilyakamens", "id": 3293811, "node_id": "MDQ6VXNlcjMyOTM4MTE=", "avatar_url": "https://avatars.githubusercontent.com/u/3293811?v=4", "gravatar_id": "", "url": "https://api.github.com/users/ilyakamens", "html_url": "https://github.com/ilyakamens", "followers_url": "https://api.github.com/users...
[]
closed
false
null
[]
null
[ "We don't have that right now, but the use-case is probably a one-off migration (if you need to do it concurrently, without locking things). In those situations its probably better to just write and run the SQL directly, e.g.\r\n\r\n```python\r\ndb.execute_sql('create index concurrently ...')\r\n```", "Yes, that'...
2022-11-21T18:30:58
2022-11-22T15:50:28
2022-11-21T19:22:01
CONTRIBUTOR
null
I didn't see any mention of [this](https://www.postgresql.org/docs/current/sql-createindex.html#:~:text=Normally%20PostgreSQL%20locks%20the%20table,the%20index%20build%20is%20finished.) in code, docs, or past issues (apologies if I didn't search thoroughly enough). My guess is it doesn't, but figured I'd ask just in ca...
{ "url": "https://api.github.com/repos/coleifer/peewee/issues/2652/reactions", "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 }
https://api.github.com/repos/coleifer/peewee/issues/2652/timeline
null
completed
null
null
https://api.github.com/repos/coleifer/peewee/issues/2651
https://api.github.com/repos/coleifer/peewee
https://api.github.com/repos/coleifer/peewee/issues/2651/labels{/name}
https://api.github.com/repos/coleifer/peewee/issues/2651/comments
https://api.github.com/repos/coleifer/peewee/issues/2651/events
https://github.com/coleifer/peewee/issues/2651
1,457,962,502
I_kwDOAA7yGM5W5r4G
2,651
Allow usage of __init_subclass__ in Models
{ "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
[ "Darn it. This is already fixed in `3.15.4`. I was using `3.14.8` on that particular machine.\r\nSorry for the noise.", "No problem at all, I only just released that fix, with thanks to @smac89 for the patch." ]
2022-11-21T13:35:12
2022-11-21T13:55:31
2022-11-21T13:39:58
CONTRIBUTOR
null
Currently, one cannot use `__init_subclass__()` on `Model`s. This is useful, if one wants to create an abstract model to be implemented with different parameters. Unfortunately `ModelBase` currently hands off all kwargs to the parent type `type` resulting in `TypeError`s: ```python from peewee import Model c...
{ "url": "https://api.github.com/repos/coleifer/peewee/issues/2651/reactions", "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 }
https://api.github.com/repos/coleifer/peewee/issues/2651/timeline
null
completed
null
null
https://api.github.com/repos/coleifer/peewee/issues/2650
https://api.github.com/repos/coleifer/peewee
https://api.github.com/repos/coleifer/peewee/issues/2650/labels{/name}
https://api.github.com/repos/coleifer/peewee/issues/2650/comments
https://api.github.com/repos/coleifer/peewee/issues/2650/events
https://github.com/coleifer/peewee/issues/2650
1,457,710,908
I_kwDOAA7yGM5W4uc8
2,650
affairs exist concurrency Error
{ "login": "DreamBizideal", "id": 82210587, "node_id": "MDQ6VXNlcjgyMjEwNTg3", "avatar_url": "https://avatars.githubusercontent.com/u/82210587?v=4", "gravatar_id": "", "url": "https://api.github.com/users/DreamBizideal", "html_url": "https://github.com/DreamBizideal", "followers_url": "https://api.githu...
[]
closed
false
null
[]
null
[ "You need to re-fetch it or use update... returning (if your database supports it)." ]
2022-11-21T10:40:40
2022-11-21T12:50:45
2022-11-21T11:52:04
NONE
null
![QQ截图20221121183253](https://user-images.githubusercontent.com/82210587/203028544-30f73d9f-3684-485f-90e5-eefee34f40a3.png) `if __name__ == '__main__': t1 = threading.Thread(target=sell2) t2 = threading.Thread(target=sell2) t1.start() t2.start() t1.join() t2.join()` sorry i don't ...
{ "url": "https://api.github.com/repos/coleifer/peewee/issues/2650/reactions", "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 }
https://api.github.com/repos/coleifer/peewee/issues/2650/timeline
null
completed
null
null
https://api.github.com/repos/coleifer/peewee/issues/2649
https://api.github.com/repos/coleifer/peewee
https://api.github.com/repos/coleifer/peewee/issues/2649/labels{/name}
https://api.github.com/repos/coleifer/peewee/issues/2649/comments
https://api.github.com/repos/coleifer/peewee/issues/2649/events
https://github.com/coleifer/peewee/issues/2649
1,451,340,015
I_kwDOAA7yGM5WgbDv
2,649
Build a database (SQLite) with peewee WITHOUT setting in the python code the "name" of the table fields
{ "login": "rollobesson", "id": 118347770, "node_id": "U_kgDOBw3X-g", "avatar_url": "https://avatars.githubusercontent.com/u/118347770?v=4", "gravatar_id": "", "url": "https://api.github.com/users/rollobesson", "html_url": "https://github.com/rollobesson", "followers_url": "https://api.github.com/users/...
[]
closed
false
null
[]
null
[ "The easiest way to do this is using the `type()` builtin:\r\n\r\n```python\r\nclass BaseModel(Model):\r\n class Meta:\r\n database = ...\r\n\r\nfields = {\r\n 'dynamic1': CharField(),\r\n 'dynamic2': IntegerField(),\r\n ...\r\n}\r\n\r\n# Create a new class. Signature is (name, bases, attrs).\r\n...
2022-11-16T10:41:53
2022-11-16T14:06:40
2022-11-16T14:06:14
NONE
null
Hi everyboby Hope my english will be understable I need to read a folder fulled of Excel file and to feed a sqlite data base: Yes EASY In fact I want to make a tool : I feed a txt file with the name of the folder, the cells (eg: A1, B6, ...) and the names of the datas (eg: firstname, lastname, ...) I lunch a Peewe...
{ "url": "https://api.github.com/repos/coleifer/peewee/issues/2649/reactions", "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 }
https://api.github.com/repos/coleifer/peewee/issues/2649/timeline
null
completed
null
null
https://api.github.com/repos/coleifer/peewee/issues/2648
https://api.github.com/repos/coleifer/peewee
https://api.github.com/repos/coleifer/peewee/issues/2648/labels{/name}
https://api.github.com/repos/coleifer/peewee/issues/2648/comments
https://api.github.com/repos/coleifer/peewee/issues/2648/events
https://github.com/coleifer/peewee/pull/2648
1,446,286,891
PR_kwDOAA7yGM5Cvxas
2,648
Remove redundant wheel dep from pyproject.toml
{ "login": "mgorny", "id": 110765, "node_id": "MDQ6VXNlcjExMDc2NQ==", "avatar_url": "https://avatars.githubusercontent.com/u/110765?v=4", "gravatar_id": "", "url": "https://api.github.com/users/mgorny", "html_url": "https://github.com/mgorny", "followers_url": "https://api.github.com/users/mgorny/follow...
[]
closed
false
null
[]
null
[ "I'm just following what is listed here: https://pip.pypa.io/en/stable/reference/build-system/pyproject-toml/#fallback-behaviour\r\n\r\nAnd as recently as this week by another one of the pypa team: https://github.com/pypa/pip/issues/8559#issuecomment-1310317396", "> I'm just following what is listed here: https:/...
2022-11-12T06:22:32
2022-11-14T14:26:58
2022-11-14T13:30:49
NONE
null
Remove the redundant `wheel` dependency, as it is added by the backend automatically. Listing it explicitly in the documentation was a historical mistake and has been fixed since, see: https://github.com/pypa/setuptools/commit/f7d30a9529378cf69054b5176249e5457aaf640a
{ "url": "https://api.github.com/repos/coleifer/peewee/issues/2648/reactions", "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 }
https://api.github.com/repos/coleifer/peewee/issues/2648/timeline
null
null
false
{ "url": "https://api.github.com/repos/coleifer/peewee/pulls/2648", "html_url": "https://github.com/coleifer/peewee/pull/2648", "diff_url": "https://github.com/coleifer/peewee/pull/2648.diff", "patch_url": "https://github.com/coleifer/peewee/pull/2648.patch", "merged_at": null }
https://api.github.com/repos/coleifer/peewee/issues/2647
https://api.github.com/repos/coleifer/peewee
https://api.github.com/repos/coleifer/peewee/issues/2647/labels{/name}
https://api.github.com/repos/coleifer/peewee/issues/2647/comments
https://api.github.com/repos/coleifer/peewee/issues/2647/events
https://github.com/coleifer/peewee/issues/2647
1,443,869,429
I_kwDOAA7yGM5WD7L1
2,647
make the build system pep518 compatible
{ "login": "sileht", "id": 200878, "node_id": "MDQ6VXNlcjIwMDg3OA==", "avatar_url": "https://avatars.githubusercontent.com/u/200878?v=4", "gravatar_id": "", "url": "https://api.github.com/users/sileht", "html_url": "https://github.com/sileht", "followers_url": "https://api.github.com/users/sileht/follow...
[]
closed
false
null
[]
null
[ "For fucks sake, pypa is so obnoxious! I don't know how to make our setup process compatible with this toml nonsense because we offer several installation modes:\r\n\r\n1. When cython is available we will cythonize the extension files\r\n2. When sqlite headers are available we will compile the extensions\r\n3. If s...
2022-11-10T13:01:36
2022-11-10T13:52:52
2022-11-10T13:50:10
NONE
null
Installation of this package is going to break soon. ``` $ pip install peewee Collecting peewee Using cached peewee-3.15.3.tar.gz (858 kB) Preparing metadata (setup.py) ... done Installing collected packages: peewee DEPRECATION: peewee is being installed using the legacy 'setup.py install' method, becaus...
{ "url": "https://api.github.com/repos/coleifer/peewee/issues/2647/reactions", "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 }
https://api.github.com/repos/coleifer/peewee/issues/2647/timeline
null
completed
null
null
https://api.github.com/repos/coleifer/peewee/issues/2646
https://api.github.com/repos/coleifer/peewee
https://api.github.com/repos/coleifer/peewee/issues/2646/labels{/name}
https://api.github.com/repos/coleifer/peewee/issues/2646/comments
https://api.github.com/repos/coleifer/peewee/issues/2646/events
https://github.com/coleifer/peewee/issues/2646
1,443,775,831
I_kwDOAA7yGM5WDkVX
2,646
NameError: name 'Counter' is not defined in example
{ "login": "stefaneidelloth", "id": 12675339, "node_id": "MDQ6VXNlcjEyNjc1MzM5", "avatar_url": "https://avatars.githubusercontent.com/u/12675339?v=4", "gravatar_id": "", "url": "https://api.github.com/users/stefaneidelloth", "html_url": "https://github.com/stefaneidelloth", "followers_url": "https://api...
[]
closed
false
null
[]
null
[ "Yeah the readme is just showing that to illustrate a point. It's hopefully obvious what the intent is.", "No, its not. I thought Counter is a missing Class that is also mapped to the database or there is a missing import." ]
2022-11-10T11:56:24
2022-11-10T12:08:51
2022-11-10T12:02:34
NONE
null
--------------------------------------------------------------------------- NameError Traceback (most recent call last) Cell In [7], line 35 28 users = (User 29 .select(User, tweet_ct.alias('ct')) 30 .join(Tweet, JOIN.LEFT_OUTER) 31 .g...
{ "url": "https://api.github.com/repos/coleifer/peewee/issues/2646/reactions", "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 }
https://api.github.com/repos/coleifer/peewee/issues/2646/timeline
null
completed
null
null
https://api.github.com/repos/coleifer/peewee/issues/2645
https://api.github.com/repos/coleifer/peewee
https://api.github.com/repos/coleifer/peewee/issues/2645/labels{/name}
https://api.github.com/repos/coleifer/peewee/issues/2645/comments
https://api.github.com/repos/coleifer/peewee/issues/2645/events
https://github.com/coleifer/peewee/issues/2645
1,443,527,569
I_kwDOAA7yGM5WCnuR
2,645
Bug: ``insert_many`` with tuple insert first character of string
{ "login": "Sherlock-Homlmes", "id": 19506491, "node_id": "MDQ6VXNlcjE5NTA2NDkx", "avatar_url": "https://avatars.githubusercontent.com/u/19506491?v=4", "gravatar_id": "", "url": "https://api.github.com/users/Sherlock-Homlmes", "html_url": "https://github.com/Sherlock-Homlmes", "followers_url": "https://...
[]
closed
false
null
[]
null
[ "The thing is `('val1-1')` is not a tuple, it's just a string.\r\n\r\n```\r\n>>> v = ('val1-1')\r\n>>> type(v)\r\n<class 'str'>\r\n```\r\n\r\nFor tuple It shoud be `('val1-1',)`.", "This is not a big but you have a mistake in your syntax. @rudyryk has the correct solution.\r\n\r\nAlso do you really think somethin...
2022-11-10T09:13:48
2022-11-10T11:56:33
2022-11-10T11:56:33
NONE
null
**Model:** ``` class Tags(PeeweeModel): id = IntegerField() name = TextField() class Meta: db_table = 'tags' ``` **Insert function:** ``` def create_sample_tags(): list_tags=[ ('val1-1'), ('val2-1'), ('val3-1') ] Tags.insert_many(list_tags, fie...
{ "url": "https://api.github.com/repos/coleifer/peewee/issues/2645/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/2645/timeline
null
completed
null
null
https://api.github.com/repos/coleifer/peewee/issues/2644
https://api.github.com/repos/coleifer/peewee
https://api.github.com/repos/coleifer/peewee/issues/2644/labels{/name}
https://api.github.com/repos/coleifer/peewee/issues/2644/comments
https://api.github.com/repos/coleifer/peewee/issues/2644/events
https://github.com/coleifer/peewee/issues/2644
1,435,402,355
I_kwDOAA7yGM5VjoBz
2,644
What's the proper way of serializing a dynamically extended model for use in another process?
{ "login": "Jessime", "id": 8493770, "node_id": "MDQ6VXNlcjg0OTM3NzA=", "avatar_url": "https://avatars.githubusercontent.com/u/8493770?v=4", "gravatar_id": "", "url": "https://api.github.com/users/Jessime", "html_url": "https://github.com/Jessime", "followers_url": "https://api.github.com/users/Jessime/...
[]
closed
false
null
[]
null
[ "So you're wanting to store a pickle of the model class itself? My own interpretation without knowing any of the context is that you've got an accretion of hacks and are looking for more hacks to add on top, without considering that maybe the whole approach is flawed. When pickle looks up the class in the 2nd proce...
2022-11-04T00:32:18
2022-11-04T23:29:55
2022-11-04T13:08:14
NONE
null
I can hack my way out of this situation, but it seems a common enough pattern that there might be a conical way of doing it that I'm not able to Google. I want to be able to: 1. Dynamically add fields to some basic model, then save a bunch of data to a db. 2. In a second python process, I want to be able to query ...
{ "url": "https://api.github.com/repos/coleifer/peewee/issues/2644/reactions", "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 }
https://api.github.com/repos/coleifer/peewee/issues/2644/timeline
null
completed
null
null
https://api.github.com/repos/coleifer/peewee/issues/2643
https://api.github.com/repos/coleifer/peewee
https://api.github.com/repos/coleifer/peewee/issues/2643/labels{/name}
https://api.github.com/repos/coleifer/peewee/issues/2643/comments
https://api.github.com/repos/coleifer/peewee/issues/2643/events
https://github.com/coleifer/peewee/issues/2643
1,435,051,834
I_kwDOAA7yGM5ViSc6
2,643
Peewee Not Honouring Alias When Alias Name Matches Column Name
{ "login": "NinjaMeTimbers", "id": 1312289, "node_id": "MDQ6VXNlcjEzMTIyODk=", "avatar_url": "https://avatars.githubusercontent.com/u/1312289?v=4", "gravatar_id": "", "url": "https://api.github.com/users/NinjaMeTimbers", "html_url": "https://github.com/NinjaMeTimbers", "followers_url": "https://api.gith...
[]
closed
false
null
[]
null
[ "This is known behavior, as Peewee falls back to using heuristics (column name in this case) to try to determine which \"converter\" to apply to the value coming back from the database cursor. It is treating each string, 'Y' and 'N' as truth-y boolean values.\r\n\r\nTo eliminate this behavior, just add `.coerce(Fal...
2022-11-03T17:49:16
2022-11-03T18:24:54
2022-11-03T18:14:55
NONE
null
When doing a query with peewee (version 3.14.0), when making an alias for a column that matches the actual column name, the values in the output do not match what was given in the query. It seems to be casting the data to match the data type of the original column. The following code highlights this issue: ``` from...
{ "url": "https://api.github.com/repos/coleifer/peewee/issues/2643/reactions", "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 }
https://api.github.com/repos/coleifer/peewee/issues/2643/timeline
null
completed
null
null
https://api.github.com/repos/coleifer/peewee/issues/2642
https://api.github.com/repos/coleifer/peewee
https://api.github.com/repos/coleifer/peewee/issues/2642/labels{/name}
https://api.github.com/repos/coleifer/peewee/issues/2642/comments
https://api.github.com/repos/coleifer/peewee/issues/2642/events
https://github.com/coleifer/peewee/issues/2642
1,430,059,326
I_kwDOAA7yGM5VPPk-
2,642
Bug: insert_many execute in PostgreSQL returns cursor instead of int row count
{ "login": "bravegag", "id": 4385408, "node_id": "MDQ6VXNlcjQzODU0MDg=", "avatar_url": "https://avatars.githubusercontent.com/u/4385408?v=4", "gravatar_id": "", "url": "https://api.github.com/users/bravegag", "html_url": "https://github.com/bravegag", "followers_url": "https://api.github.com/users/brave...
[]
closed
false
null
[]
null
[ "And if you scrolled further, you'll see: ![screenshot](https://user-images.githubusercontent.com/119974/199052251-48224a6c-cb9c-492e-9102-91894e6deebb.png)\r\n\r\n>The default return value is the number of rows modified. However, when using Postgres, Peewee will return a cursor by default that yields the primary-k...
2022-10-31T15:40:33
2022-11-01T12:08:35
2022-10-31T15:59:30
NONE
null
Bug: insert_many execute in PostgreSQL returns cursor instead of int row count. In SQLite it returns the int number of rows inserted while in PostgreSQL it returns a cursor. [In the documentation it states that `insert_many(...).execute()` returns the number of inserted rows.](https://docs.peewee-orm.com/en/latest/p...
{ "url": "https://api.github.com/repos/coleifer/peewee/issues/2642/reactions", "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 }
https://api.github.com/repos/coleifer/peewee/issues/2642/timeline
null
completed
null
null
https://api.github.com/repos/coleifer/peewee/issues/2641
https://api.github.com/repos/coleifer/peewee
https://api.github.com/repos/coleifer/peewee/issues/2641/labels{/name}
https://api.github.com/repos/coleifer/peewee/issues/2641/comments
https://api.github.com/repos/coleifer/peewee/issues/2641/events
https://github.com/coleifer/peewee/issues/2641
1,429,964,464
I_kwDOAA7yGM5VO4aw
2,641
API for removing all models Or getting all models
{ "login": "dyadav7", "id": 8121360, "node_id": "MDQ6VXNlcjgxMjEzNjA=", "avatar_url": "https://avatars.githubusercontent.com/u/8121360?v=4", "gravatar_id": "", "url": "https://api.github.com/users/dyadav7", "html_url": "https://github.com/dyadav7", "followers_url": "https://api.github.com/users/dyadav7/...
[]
closed
false
null
[]
null
[ "http://docs.peewee-orm.com/en/latest/peewee/api.html#SubclassAwareMetadata\r\n\r\n```python\r\nfrom peewee import SubclassAwareMetadata\r\n\r\ndb = SqliteDatabase(':memory:')\r\n\r\nclass Base(Model):\r\n class Meta:\r\n database = db\r\n model_metadata_class = SubclassAwareMetadata ...
2022-10-31T14:42:51
2022-11-01T12:39:00
2022-10-31T14:52:26
NONE
null
I want to remove all the models (i.e. remove all tables) without listing all the Model names. Is there a way to do it ? OR I can get all model names using some API and call "drop_tables(models)" also. Is there an API to get the list of models ? e.g. ``` db.remove all models() OR db.remove ...
{ "url": "https://api.github.com/repos/coleifer/peewee/issues/2641/reactions", "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 }
https://api.github.com/repos/coleifer/peewee/issues/2641/timeline
null
completed
null
null
https://api.github.com/repos/coleifer/peewee/issues/2640
https://api.github.com/repos/coleifer/peewee
https://api.github.com/repos/coleifer/peewee/issues/2640/labels{/name}
https://api.github.com/repos/coleifer/peewee/issues/2640/comments
https://api.github.com/repos/coleifer/peewee/issues/2640/events
https://github.com/coleifer/peewee/issues/2640
1,425,622,126
I_kwDOAA7yGM5U-URu
2,640
Setting just <fieldtype>(default=None) does not work - but should
{ "login": "MrBillium", "id": 14281367, "node_id": "MDQ6VXNlcjE0MjgxMzY3", "avatar_url": "https://avatars.githubusercontent.com/u/14281367?v=4", "gravatar_id": "", "url": "https://api.github.com/users/MrBillium", "html_url": "https://github.com/MrBillium", "followers_url": "https://api.github.com/users/...
[]
closed
false
null
[]
null
[ "Disagree, fields are not-null by default, and there is no \"sentinel\" value for `default` -- in other words, the default is (by default) None.\r\n\r\nAll you really need to specify is:\r\n\r\n`last_logged_on = DateTimeField(null=True)`\r\n\r\n" ]
2022-10-27T13:16:36
2022-10-27T16:37:49
2022-10-27T16:37:33
NONE
null
New user here and just ran into this one which surprised me. Setting a Field default to None does not work by itself when creating a Model row because there is an implicit null=False. ``` class User(BaseModel): name = TextField() # last_logged_on = DateTimeField(default=None) # This will not work when ...
{ "url": "https://api.github.com/repos/coleifer/peewee/issues/2640/reactions", "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 }
https://api.github.com/repos/coleifer/peewee/issues/2640/timeline
null
completed
null
null
https://api.github.com/repos/coleifer/peewee/issues/2639
https://api.github.com/repos/coleifer/peewee
https://api.github.com/repos/coleifer/peewee/issues/2639/labels{/name}
https://api.github.com/repos/coleifer/peewee/issues/2639/comments
https://api.github.com/repos/coleifer/peewee/issues/2639/events
https://github.com/coleifer/peewee/issues/2639
1,422,124,248
I_kwDOAA7yGM5Uw-TY
2,639
enhancement for doing get/update/create at the same time
{ "login": "James4Ever0", "id": 103997068, "node_id": "U_kgDOBjLejA", "avatar_url": "https://avatars.githubusercontent.com/u/103997068?v=4", "gravatar_id": "", "url": "https://api.github.com/users/James4Ever0", "html_url": "https://github.com/James4Ever0", "followers_url": "https://api.github.com/users/...
[]
closed
false
null
[]
null
[ "Pass", "[similar commit](https://github.com/coleifer/peewee/commit/073364ad89a8de48f4a25bbf6106bf42050d34fa)" ]
2022-10-25T09:06:45
2022-11-10T11:22:25
2022-10-25T12:52:13
NONE
null
here's the following code. it's been tested on some schema with one single unique key. ```python # peewee.py:7119 @classmethod def get_and_update_or_create(cls, _unique_keys:list=[],**kwargs): try: obj, flag = cls.get_or_create( **kwargs ) # will it u...
{ "url": "https://api.github.com/repos/coleifer/peewee/issues/2639/reactions", "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 }
https://api.github.com/repos/coleifer/peewee/issues/2639/timeline
null
completed
null
null
https://api.github.com/repos/coleifer/peewee/issues/2638
https://api.github.com/repos/coleifer/peewee
https://api.github.com/repos/coleifer/peewee/issues/2638/labels{/name}
https://api.github.com/repos/coleifer/peewee/issues/2638/comments
https://api.github.com/repos/coleifer/peewee/issues/2638/events
https://github.com/coleifer/peewee/issues/2638
1,420,385,314
I_kwDOAA7yGM5UqVwi
2,638
Noob question about accesing meta data
{ "login": "ionesculiviucristian", "id": 7398490, "node_id": "MDQ6VXNlcjczOTg0OTA=", "avatar_url": "https://avatars.githubusercontent.com/u/7398490?v=4", "gravatar_id": "", "url": "https://api.github.com/users/ionesculiviucristian", "html_url": "https://github.com/ionesculiviucristian", "followers_url":...
[]
closed
false
null
[]
null
[ "> you can modify the source code just like me\r\n\r\nThanks for the response but I have no idea what you are referring to. What source code is that? Worst case I'm gonna add the same ```table_name``` on the parent class which is definitely not the way to do it.", "The table name is accessible via:\r\n\r\n```\r\n...
2022-10-24T07:57:08
2022-10-24T13:25:25
2022-10-24T13:23:52
NONE
null
Hi. I have the following class: ```py class Migration(BaseModel): name = CharField(null=True, unique=True) class Meta: table_name = "migrations" ``` How can I access the table name without using it like this: ```py Migration._meta.table.__name__ ``` Need something more "public" kinda way...
{ "url": "https://api.github.com/repos/coleifer/peewee/issues/2638/reactions", "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 }
https://api.github.com/repos/coleifer/peewee/issues/2638/timeline
null
completed
null
null
https://api.github.com/repos/coleifer/peewee/issues/2637
https://api.github.com/repos/coleifer/peewee
https://api.github.com/repos/coleifer/peewee/issues/2637/labels{/name}
https://api.github.com/repos/coleifer/peewee/issues/2637/comments
https://api.github.com/repos/coleifer/peewee/issues/2637/events
https://github.com/coleifer/peewee/issues/2637
1,419,758,189
I_kwDOAA7yGM5Un8pt
2,637
enhancement to simplify the BaseModel boilerplate code
{ "login": "James4Ever0", "id": 103997068, "node_id": "U_kgDOBjLejA", "avatar_url": "https://avatars.githubusercontent.com/u/103997068?v=4", "gravatar_id": "", "url": "https://api.github.com/users/James4Ever0", "html_url": "https://github.com/James4Ever0", "followers_url": "https://api.github.com/users/...
[]
closed
false
null
[]
null
[ "ps: i've seen this pattern from [sqla-wrapper](https://sqla-wrapper.scaletti.dev/sqlalchemy-wrapper/). this library might be helpful as well.", "another enhancement:\r\n\r\n```python\r\n# /usr/local/lib/python3.9/dist-packages/peewee.py:3420\r\n\r\n# def create_tables(self, models, bind=True,**options):\r\n# ...
2022-10-23T11:10:13
2022-10-24T13:36:34
2022-10-24T13:36:34
NONE
null
i wrote some code for simplification: ```python from peewee import * # some patch on /usr/local/lib/python3.9/dist-packages/peewee.py:3142 # @property # def Model(self): # this is interesting. does it work as expected? # class BaseModel(Model): # class Meta: # database = self # ...
{ "url": "https://api.github.com/repos/coleifer/peewee/issues/2637/reactions", "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 }
https://api.github.com/repos/coleifer/peewee/issues/2637/timeline
null
completed
null
null
https://api.github.com/repos/coleifer/peewee/issues/2636
https://api.github.com/repos/coleifer/peewee
https://api.github.com/repos/coleifer/peewee/issues/2636/labels{/name}
https://api.github.com/repos/coleifer/peewee/issues/2636/comments
https://api.github.com/repos/coleifer/peewee/issues/2636/events
https://github.com/coleifer/peewee/issues/2636
1,418,844,633
I_kwDOAA7yGM5UkdnZ
2,636
datetime compare not working correctly with single digit
{ "login": "marcelkb", "id": 60894942, "node_id": "MDQ6VXNlcjYwODk0OTQy", "avatar_url": "https://avatars.githubusercontent.com/u/60894942?v=4", "gravatar_id": "", "url": "https://api.github.com/users/marcelkb", "html_url": "https://github.com/marcelkb", "followers_url": "https://api.github.com/users/mar...
[]
closed
false
null
[]
null
[ "seems to be a problem of missing data ;)", "I hope it turns up! Sometimes when I lose something, I throw something similar away and watch where it goes." ]
2022-10-21T20:47:07
2022-10-21T21:04:08
2022-10-21T20:52:38
NONE
null
MariaDBConnectorDatabase: DateTimeField: PriceArchive.select().where(PriceArchive.time <= datetime.datetime(2022, 10, 10, 00, 00)).order_by( PriceArchive.time.desc()).limit(1).get() works correctly with datetime.datetime(2022, 10, 1, 00, 00) it gives first entry in Database, in my case somethin...
{ "url": "https://api.github.com/repos/coleifer/peewee/issues/2636/reactions", "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 }
https://api.github.com/repos/coleifer/peewee/issues/2636/timeline
null
completed
null
null
https://api.github.com/repos/coleifer/peewee/issues/2635
https://api.github.com/repos/coleifer/peewee
https://api.github.com/repos/coleifer/peewee/issues/2635/labels{/name}
https://api.github.com/repos/coleifer/peewee/issues/2635/comments
https://api.github.com/repos/coleifer/peewee/issues/2635/events
https://github.com/coleifer/peewee/issues/2635
1,417,379,884
I_kwDOAA7yGM5Ue4As
2,635
Alter column query has wrong syntax
{ "login": "martinzarza", "id": 54747048, "node_id": "MDQ6VXNlcjU0NzQ3MDQ4", "avatar_url": "https://avatars.githubusercontent.com/u/54747048?v=4", "gravatar_id": "", "url": "https://api.github.com/users/martinzarza", "html_url": "https://github.com/martinzarza", "followers_url": "https://api.github.com/...
[]
closed
false
null
[]
null
[ "`change_fields` is not part of the peewee migration API. Not sure what library you're using but I suggest taking the issue up there.", "For what it's worth, the playhouse migrate seems working well (it is not necessary or desirable to include the `primary_key=True` when converting field type - this is preserved)...
2022-10-20T22:15:25
2022-10-21T21:02:22
2022-10-20T23:32:16
NONE
null
Hi everyone, I was running an update migration to alter a column type in PostgreSQL, but the query execution fails due to a syntax error. Here is the migration file: ```python def migrate(migrator, database, fake=False, **kwargs): """Write your migrations here.""" migrator.change_fields('users', user_i...
{ "url": "https://api.github.com/repos/coleifer/peewee/issues/2635/reactions", "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 }
https://api.github.com/repos/coleifer/peewee/issues/2635/timeline
null
completed
null
null
https://api.github.com/repos/coleifer/peewee/issues/2634
https://api.github.com/repos/coleifer/peewee
https://api.github.com/repos/coleifer/peewee/issues/2634/labels{/name}
https://api.github.com/repos/coleifer/peewee/issues/2634/comments
https://api.github.com/repos/coleifer/peewee/issues/2634/events
https://github.com/coleifer/peewee/pull/2634
1,414,810,440
PR_kwDOAA7yGM5BGaGi
2,634
udpate fastapi example
{ "login": "verigle", "id": 32769358, "node_id": "MDQ6VXNlcjMyNzY5MzU4", "avatar_url": "https://avatars.githubusercontent.com/u/32769358?v=4", "gravatar_id": "", "url": "https://api.github.com/users/verigle", "html_url": "https://github.com/verigle", "followers_url": "https://api.github.com/users/verigl...
[]
closed
false
null
[]
null
[]
2022-10-19T11:38:28
2022-10-19T12:25:21
2022-10-19T12:25:21
NONE
null
to fix wrong fastapi example detail please reference : #2633
{ "url": "https://api.github.com/repos/coleifer/peewee/issues/2634/reactions", "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 }
https://api.github.com/repos/coleifer/peewee/issues/2634/timeline
null
null
false
{ "url": "https://api.github.com/repos/coleifer/peewee/pulls/2634", "html_url": "https://github.com/coleifer/peewee/pull/2634", "diff_url": "https://github.com/coleifer/peewee/pull/2634.diff", "patch_url": "https://github.com/coleifer/peewee/pull/2634.patch", "merged_at": null }
https://api.github.com/repos/coleifer/peewee/issues/2633
https://api.github.com/repos/coleifer/peewee
https://api.github.com/repos/coleifer/peewee/issues/2633/labels{/name}
https://api.github.com/repos/coleifer/peewee/issues/2633/comments
https://api.github.com/repos/coleifer/peewee/issues/2633/events
https://github.com/coleifer/peewee/issues/2633
1,414,778,786
I_kwDOAA7yGM5UU8-i
2,633
fastapi example is wrong for db connect and close
{ "login": "verigle", "id": 32769358, "node_id": "MDQ6VXNlcjMyNzY5MzU4", "avatar_url": "https://avatars.githubusercontent.com/u/32769358?v=4", "gravatar_id": "", "url": "https://api.github.com/users/verigle", "html_url": "https://github.com/verigle", "followers_url": "https://api.github.com/users/verigl...
[]
closed
false
null
[]
null
[ ">So those code can not set db connect before request processing and set db close for request processing over.\r\n\r\nPeewee is connection-per-thread. FastAPI does not have such a concept -- rather it has an async context that may be interrupted at any time to switch to another request *within the same thread*. The...
2022-10-19T11:15:10
2022-10-19T12:24:48
2022-10-19T12:24:47
NONE
null
there has wrong example for db connect and close http://docs.peewee-orm.com/en/latest/peewee/database.html#fastapi ```python from fastapi import FastAPI from peewee import * db = SqliteDatabase('my_app.db') app = FastAPI() # This hook ensures that a connection is opened to handle any queries # generated...
{ "url": "https://api.github.com/repos/coleifer/peewee/issues/2633/reactions", "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 }
https://api.github.com/repos/coleifer/peewee/issues/2633/timeline
null
completed
null
null
https://api.github.com/repos/coleifer/peewee/issues/2632
https://api.github.com/repos/coleifer/peewee
https://api.github.com/repos/coleifer/peewee/issues/2632/labels{/name}
https://api.github.com/repos/coleifer/peewee/issues/2632/comments
https://api.github.com/repos/coleifer/peewee/issues/2632/events
https://github.com/coleifer/peewee/pull/2632
1,413,066,120
PR_kwDOAA7yGM5BAh0m
2,632
Support IN and INNER JOIN subqueries on prefetch
{ "login": "nomme", "id": 216670, "node_id": "MDQ6VXNlcjIxNjY3MA==", "avatar_url": "https://avatars.githubusercontent.com/u/216670?v=4", "gravatar_id": "", "url": "https://api.github.com/users/nomme", "html_url": "https://github.com/nomme", "followers_url": "https://api.github.com/users/nomme/followers"...
[]
closed
false
null
[]
null
[ "Nice patch, thank you. I've rebased your commits into a single commit af3f34f10555a22003726dca90fb2d577617656a and amended it to respect the line-length limit, but otherwise your changes are all merged." ]
2022-10-18T11:39:59
2022-10-19T12:45:03
2022-10-19T12:45:02
CONTRIBUTOR
null
This PR intends to solve #2631 It adds a parameter to `prefetch` that allows the user to choose the type of subquery performed. Using `INNER JOIN` is desirable when combining `LIMIT` with MySQL as the current implementation is not compatible. Usage example ```python from peewee import PREFETCH_TYPE people ...
{ "url": "https://api.github.com/repos/coleifer/peewee/issues/2632/reactions", "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 }
https://api.github.com/repos/coleifer/peewee/issues/2632/timeline
null
null
false
{ "url": "https://api.github.com/repos/coleifer/peewee/pulls/2632", "html_url": "https://github.com/coleifer/peewee/pull/2632", "diff_url": "https://github.com/coleifer/peewee/pull/2632.diff", "patch_url": "https://github.com/coleifer/peewee/pull/2632.patch", "merged_at": null }
https://api.github.com/repos/coleifer/peewee/issues/2631
https://api.github.com/repos/coleifer/peewee
https://api.github.com/repos/coleifer/peewee/issues/2631/labels{/name}
https://api.github.com/repos/coleifer/peewee/issues/2631/comments
https://api.github.com/repos/coleifer/peewee/issues/2631/events
https://github.com/coleifer/peewee/issues/2631
1,413,056,572
I_kwDOAA7yGM5UOYg8
2,631
Support LIMIT with prefetch and MySQL
{ "login": "nomme", "id": 216670, "node_id": "MDQ6VXNlcjIxNjY3MA==", "avatar_url": "https://avatars.githubusercontent.com/u/216670?v=4", "gravatar_id": "", "url": "https://api.github.com/users/nomme", "html_url": "https://github.com/nomme", "followers_url": "https://api.github.com/users/nomme/followers"...
[]
closed
false
null
[]
null
[ "Merged your PR here: af3f34f10555a22003726dca90fb2d577617656a", "Awesome, thank you!" ]
2022-10-18T11:33:15
2022-10-19T14:01:40
2022-10-19T12:46:13
CONTRIBUTOR
null
Hi The premise is simple. It would be pretty sweet if peewee's `prefetch` supports `LIMIT` when using MySQL. I want to add support for it by introducing a switch on `prefetch` that subqueries using `INNER JOIN` instead of `IN`. Background: In a project using peewee and MySQL we often encounter the following limi...
{ "url": "https://api.github.com/repos/coleifer/peewee/issues/2631/reactions", "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 }
https://api.github.com/repos/coleifer/peewee/issues/2631/timeline
null
completed
null
null
https://api.github.com/repos/coleifer/peewee/issues/2630
https://api.github.com/repos/coleifer/peewee
https://api.github.com/repos/coleifer/peewee/issues/2630/labels{/name}
https://api.github.com/repos/coleifer/peewee/issues/2630/comments
https://api.github.com/repos/coleifer/peewee/issues/2630/events
https://github.com/coleifer/peewee/issues/2630
1,412,990,339
I_kwDOAA7yGM5UOIWD
2,630
Unable to install peewee on py 3.10 on windows - ERROR: No .egg-info directory found in C:\Users\*User*\AppData\Local\Temp\pip-pip-egg-info-fhrb40k6
{ "login": "jurezic", "id": 71229581, "node_id": "MDQ6VXNlcjcxMjI5NTgx", "avatar_url": "https://avatars.githubusercontent.com/u/71229581?v=4", "gravatar_id": "", "url": "https://api.github.com/users/jurezic", "html_url": "https://github.com/jurezic", "followers_url": "https://api.github.com/users/jurezi...
[]
closed
false
null
[]
null
[ "Can you try doing:\r\n\r\n```\r\ngit clone https://github.com/coleifer/peewee\r\ncd peewee\r\npython setup.py egg_info\r\n```\r\n\r\nAnd share the output?", "Sorry, forgot to mention, I have also downloaded peewee-3.15.3.tar.gz and tried\r\n- py -3.10 -m pip install helpers/peewee-3.15.3.tar.gz\r\n- poetry add h...
2022-10-18T10:42:35
2022-10-18T12:49:34
2022-10-18T12:49:10
NONE
null
Always getting the same error, except everytime I get another tag in the end of the trace. Setup- Python 3.10. setuptools-65.5.0 pip-22.3 poetry- 1.1.13. What I have tried: Update python/pip/setuptools Install over poetry - same error Does anyone have an idea how to proceed?
{ "url": "https://api.github.com/repos/coleifer/peewee/issues/2630/reactions", "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 }
https://api.github.com/repos/coleifer/peewee/issues/2630/timeline
null
completed
null
null
https://api.github.com/repos/coleifer/peewee/issues/2629
https://api.github.com/repos/coleifer/peewee
https://api.github.com/repos/coleifer/peewee/issues/2629/labels{/name}
https://api.github.com/repos/coleifer/peewee/issues/2629/comments
https://api.github.com/repos/coleifer/peewee/issues/2629/events
https://github.com/coleifer/peewee/issues/2629
1,410,578,986
I_kwDOAA7yGM5UE7oq
2,629
How to query nodes without children with closure table extension
{ "login": "trifle", "id": 450916, "node_id": "MDQ6VXNlcjQ1MDkxNg==", "avatar_url": "https://avatars.githubusercontent.com/u/450916?v=4", "gravatar_id": "", "url": "https://api.github.com/users/trifle", "html_url": "https://github.com/trifle", "followers_url": "https://api.github.com/users/trifle/follow...
[]
closed
false
null
[]
null
[ "~~You don't even need the closure for this, you can find all categories with zero children:~~\r\n\r\nSorry, I see you already have a formulation for this:\r\n\r\n```python\r\nCA = Category.alias()\r\n(CA\r\n .select()\r\n .join(\r\n Category,\r\n on=(CA.id == Category.parent_id),\r\n join_type=JOIN.LEF...
2022-10-16T18:36:20
2022-10-17T16:32:19
2022-10-17T13:13:20
NONE
null
Hi, thanks for making peewee! This issue is a somewhat exotic question, so feel free to close if it doesn't fit in here. I'm trying to model a DAG in peewee where children are created to contain the result of some processing of parents. Let's take the example of video files: The root may be a raw video file, w...
{ "url": "https://api.github.com/repos/coleifer/peewee/issues/2629/reactions", "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 }
https://api.github.com/repos/coleifer/peewee/issues/2629/timeline
null
completed
null
null
https://api.github.com/repos/coleifer/peewee/issues/2628
https://api.github.com/repos/coleifer/peewee
https://api.github.com/repos/coleifer/peewee/issues/2628/labels{/name}
https://api.github.com/repos/coleifer/peewee/issues/2628/comments
https://api.github.com/repos/coleifer/peewee/issues/2628/events
https://github.com/coleifer/peewee/issues/2628
1,405,670,351
I_kwDOAA7yGM5TyNPP
2,628
With db.atomic decorator, ReconnectMixin does not automatically reconnect
{ "login": "breezechen", "id": 2368879, "node_id": "MDQ6VXNlcjIzNjg4Nzk=", "avatar_url": "https://avatars.githubusercontent.com/u/2368879?v=4", "gravatar_id": "", "url": "https://api.github.com/users/breezechen", "html_url": "https://github.com/breezechen", "followers_url": "https://api.github.com/users...
[]
closed
false
null
[]
null
[ "The behavior of peewee could certainly be better here, but what is the correct thing to do if a connection dies midway through a transaction? Important changes would be lost with no indication given to the caller. I've added a patch that will instead raise the exception without reconnecting if Peewee is in a trans...
2022-10-12T06:53:19
2022-10-13T03:19:38
2022-10-12T13:33:01
NONE
null
Steps to reproduce the issue: 1. change mysql `wait_timeout` and `interactive_timeout` to 5. ``` version: '3.1' services: db: image: mysql restart: always environment: - LANG=C.UTF-8 - MYSQL_ROOT_PASSWORD=root - MYSQL_DATABASE=testapp volumes: - /etc/localtim...
{ "url": "https://api.github.com/repos/coleifer/peewee/issues/2628/reactions", "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 }
https://api.github.com/repos/coleifer/peewee/issues/2628/timeline
null
completed
null
null
https://api.github.com/repos/coleifer/peewee/issues/2627
https://api.github.com/repos/coleifer/peewee
https://api.github.com/repos/coleifer/peewee/issues/2627/labels{/name}
https://api.github.com/repos/coleifer/peewee/issues/2627/comments
https://api.github.com/repos/coleifer/peewee/issues/2627/events
https://github.com/coleifer/peewee/pull/2627
1,403,737,387
PR_kwDOAA7yGM5AhiB9
2,627
Forward class creation keyword arguments
{ "login": "smac89", "id": 8305511, "node_id": "MDQ6VXNlcjgzMDU1MTE=", "avatar_url": "https://avatars.githubusercontent.com/u/8305511?v=4", "gravatar_id": "", "url": "https://api.github.com/users/smac89", "html_url": "https://github.com/smac89", "followers_url": "https://api.github.com/users/smac89/foll...
[]
closed
false
null
[]
null
[ "Sure, I've merged an equivalent patch w/just the 79 char line limit.", "That was easy. Thanks!\r\n\r\nWhen do you think a new release will be available?", "There's hardly any fixes, I think it may need a bit of time." ]
2022-10-10T21:37:44
2022-10-11T00:52:02
2022-10-10T22:46:50
NONE
null
https://docs.python.org/3/library/functions.html#type I wanted to be able to create a template model which other models inherit from and modify, by passing keyword arguments in the class definition. However, the current implementation of `ModelBase` does not pass along those arguments which results in errors like ...
{ "url": "https://api.github.com/repos/coleifer/peewee/issues/2627/reactions", "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 }
https://api.github.com/repos/coleifer/peewee/issues/2627/timeline
null
null
false
{ "url": "https://api.github.com/repos/coleifer/peewee/pulls/2627", "html_url": "https://github.com/coleifer/peewee/pull/2627", "diff_url": "https://github.com/coleifer/peewee/pull/2627.diff", "patch_url": "https://github.com/coleifer/peewee/pull/2627.patch", "merged_at": null }
https://api.github.com/repos/coleifer/peewee/issues/2626
https://api.github.com/repos/coleifer/peewee
https://api.github.com/repos/coleifer/peewee/issues/2626/labels{/name}
https://api.github.com/repos/coleifer/peewee/issues/2626/comments
https://api.github.com/repos/coleifer/peewee/issues/2626/events
https://github.com/coleifer/peewee/issues/2626
1,399,287,530
I_kwDOAA7yGM5TZ27q
2,626
Any way to change table naming logic?
{ "login": "Glucksistemi", "id": 5073004, "node_id": "MDQ6VXNlcjUwNzMwMDQ=", "avatar_url": "https://avatars.githubusercontent.com/u/5073004?v=4", "gravatar_id": "", "url": "https://api.github.com/users/Glucksistemi", "html_url": "https://github.com/Glucksistemi", "followers_url": "https://api.github.com...
[]
closed
false
null
[]
null
[ "Yes, specify `legacy_table_names = False` in your base model Meta:\r\n\r\n```python\r\nfrom peewee import *\r\n\r\ndef table_name(cls):\r\n return cls.__name__\r\n\r\nclass Base(Model):\r\n class Meta:\r\n legacy_table_names = False\r\n\r\nclass RealModelWithLongName(Base):\r\n pass\r\n\r\nprint(Re...
2022-10-06T10:15:57
2022-10-06T12:48:30
2022-10-06T12:46:13
NONE
null
By default, if I call my Model class using python conventional CamelCase with multiple words in its name (like `class ManyWordsNamedTable(peewee.Model)`) Peewee will just lowercase it, so I'll get table "manywordsnamedtable" created in my DB which is hardly readable. I know there's an option to use Meta.table_name para...
{ "url": "https://api.github.com/repos/coleifer/peewee/issues/2626/reactions", "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 }
https://api.github.com/repos/coleifer/peewee/issues/2626/timeline
null
completed
null
null
https://api.github.com/repos/coleifer/peewee/issues/2625
https://api.github.com/repos/coleifer/peewee
https://api.github.com/repos/coleifer/peewee/issues/2625/labels{/name}
https://api.github.com/repos/coleifer/peewee/issues/2625/comments
https://api.github.com/repos/coleifer/peewee/issues/2625/events
https://github.com/coleifer/peewee/issues/2625
1,393,493,599
I_kwDOAA7yGM5TDwZf
2,625
Postgresql: Updating an existing field with adding/incrementing some value didn't work as expected
{ "login": "Sonotoki-da", "id": 34913890, "node_id": "MDQ6VXNlcjM0OTEzODkw", "avatar_url": "https://avatars.githubusercontent.com/u/34913890?v=4", "gravatar_id": "", "url": "https://api.github.com/users/Sonotoki-da", "html_url": "https://github.com/Sonotoki-da", "followers_url": "https://api.github.com/...
[]
closed
false
null
[]
null
[ "I found that I'm concatenating a string with a None type object...\r\n```python\r\n# Work.authors = None\r\n# author = 'string'\r\nWork.update(authors=Work.authors + author)\r\n```\r\nMaybe this is the problem I'm encountering? It's strange that I'm not getting any errors though", "All is working as far as I can...
2022-10-01T17:58:26
2022-10-03T17:13:00
2022-10-03T13:05:32
NONE
null
My table is: ```python class Work(BaseModel): id = AutoField() user_id = BigIntegerField() name = TextField(unique=True) filename = CharField(null=True, unique=True) authors = TextField(null=True) content = TextField(null=True) start_date = DateField() end_date = DateField(null...
{ "url": "https://api.github.com/repos/coleifer/peewee/issues/2625/reactions", "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 }
https://api.github.com/repos/coleifer/peewee/issues/2625/timeline
null
completed
null
null
https://api.github.com/repos/coleifer/peewee/issues/2624
https://api.github.com/repos/coleifer/peewee
https://api.github.com/repos/coleifer/peewee/issues/2624/labels{/name}
https://api.github.com/repos/coleifer/peewee/issues/2624/comments
https://api.github.com/repos/coleifer/peewee/issues/2624/events
https://github.com/coleifer/peewee/issues/2624
1,384,201,801
I_kwDOAA7yGM5SgT5J
2,624
`_id` field required for some transactions
{ "login": "rmskinsa2", "id": 86251795, "node_id": "MDQ6VXNlcjg2MjUxNzk1", "avatar_url": "https://avatars.githubusercontent.com/u/86251795?v=4", "gravatar_id": "", "url": "https://api.github.com/users/rmskinsa2", "html_url": "https://github.com/rmskinsa2", "followers_url": "https://api.github.com/users/...
[]
closed
false
null
[]
null
[ "Is this just occurring while you're doing things in a schema change? Can you post a minimal reproduction of the problem, as I'm having a hard time making sense of the issue as-is.", "The actual problem occurs after doing a schema migration. In several places where our code is executing and an instance of Bob tri...
2022-09-23T19:09:27
2022-09-27T16:38:54
2022-09-23T21:37:25
NONE
null
This has happened twice now and I'm trying to figure out if we're implementing things correctly. So I have a model with several ManyToMany fields like so: ``` class Bob(db.Model): ... joes = ManyToManyField(Joe, backref='bobs') sues = ManyToManyField(Sue, backref='bobs') pams = ManyToManyField(Pam,...
{ "url": "https://api.github.com/repos/coleifer/peewee/issues/2624/reactions", "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 }
https://api.github.com/repos/coleifer/peewee/issues/2624/timeline
null
completed
null
null
https://api.github.com/repos/coleifer/peewee/issues/2623
https://api.github.com/repos/coleifer/peewee
https://api.github.com/repos/coleifer/peewee/issues/2623/labels{/name}
https://api.github.com/repos/coleifer/peewee/issues/2623/comments
https://api.github.com/repos/coleifer/peewee/issues/2623/events
https://github.com/coleifer/peewee/issues/2623
1,383,788,163
I_kwDOAA7yGM5Seu6D
2,623
Is it possible to make non-peewee models play nicely with Peewee?
{ "login": "ilyakamens", "id": 3293811, "node_id": "MDQ6VXNlcjMyOTM4MTE=", "avatar_url": "https://avatars.githubusercontent.com/u/3293811?v=4", "gravatar_id": "", "url": "https://api.github.com/users/ilyakamens", "html_url": "https://github.com/ilyakamens", "followers_url": "https://api.github.com/users...
[]
closed
false
null
[]
null
[ "I would not advise doing this, even if it works in the simple case. It will be too confusing, I think, especially if you have more than one person working on this codebase or intend to support it for a while (imagine trying to explain all this to a new hire).\r\n\r\nBetter, in my opinion, to just explicitly refere...
2022-09-23T13:11:29
2022-09-23T14:27:29
2022-09-23T13:44:09
CONTRIBUTOR
null
Good morning (?), @coleifer. I'm wondering if it's possible to make non-peewee models play nicely with Peewee. Consider the following, which is contrived, but also a real pattern we use at my company: ```python class DBUser(Model): pass class DBAccount(Model): user = ForeignKeyField(DBUser) class...
{ "url": "https://api.github.com/repos/coleifer/peewee/issues/2623/reactions", "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 }
https://api.github.com/repos/coleifer/peewee/issues/2623/timeline
null
completed
null
null
https://api.github.com/repos/coleifer/peewee/issues/2622
https://api.github.com/repos/coleifer/peewee
https://api.github.com/repos/coleifer/peewee/issues/2622/labels{/name}
https://api.github.com/repos/coleifer/peewee/issues/2622/comments
https://api.github.com/repos/coleifer/peewee/issues/2622/events
https://github.com/coleifer/peewee/pull/2622
1,382,324,942
PR_kwDOAA7yGM4_bFS1
2,622
[CC Reduction]
{ "login": "isaevmik", "id": 45544322, "node_id": "MDQ6VXNlcjQ1NTQ0MzIy", "avatar_url": "https://avatars.githubusercontent.com/u/45544322?v=4", "gravatar_id": "", "url": "https://api.github.com/users/isaevmik", "html_url": "https://github.com/isaevmik", "followers_url": "https://api.github.com/users/isa...
[]
closed
false
null
[]
null
[ "Pass for now " ]
2022-09-22T11:55:41
2022-09-22T12:02:18
2022-09-22T12:02:18
NONE
null
Reduction of CC (cyclomatic complixty) of model_to_dict function by putting some some function pieces.
{ "url": "https://api.github.com/repos/coleifer/peewee/issues/2622/reactions", "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 }
https://api.github.com/repos/coleifer/peewee/issues/2622/timeline
null
null
false
{ "url": "https://api.github.com/repos/coleifer/peewee/pulls/2622", "html_url": "https://github.com/coleifer/peewee/pull/2622", "diff_url": "https://github.com/coleifer/peewee/pull/2622.diff", "patch_url": "https://github.com/coleifer/peewee/pull/2622.patch", "merged_at": null }
https://api.github.com/repos/coleifer/peewee/issues/2621
https://api.github.com/repos/coleifer/peewee
https://api.github.com/repos/coleifer/peewee/issues/2621/labels{/name}
https://api.github.com/repos/coleifer/peewee/issues/2621/comments
https://api.github.com/repos/coleifer/peewee/issues/2621/events
https://github.com/coleifer/peewee/pull/2621
1,382,050,645
PR_kwDOAA7yGM4_aLqd
2,621
Fix typo
{ "login": "pylipp", "id": 10617122, "node_id": "MDQ6VXNlcjEwNjE3MTIy", "avatar_url": "https://avatars.githubusercontent.com/u/10617122?v=4", "gravatar_id": "", "url": "https://api.github.com/users/pylipp", "html_url": "https://github.com/pylipp", "followers_url": "https://api.github.com/users/pylipp/fo...
[]
closed
false
null
[]
null
[ "Ill clean this up later. Thx" ]
2022-09-22T08:31:11
2022-09-22T11:34:19
2022-09-22T11:34:18
NONE
null
null
{ "url": "https://api.github.com/repos/coleifer/peewee/issues/2621/reactions", "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 }
https://api.github.com/repos/coleifer/peewee/issues/2621/timeline
null
null
false
{ "url": "https://api.github.com/repos/coleifer/peewee/pulls/2621", "html_url": "https://github.com/coleifer/peewee/pull/2621", "diff_url": "https://github.com/coleifer/peewee/pull/2621.diff", "patch_url": "https://github.com/coleifer/peewee/pull/2621.patch", "merged_at": null }
https://api.github.com/repos/coleifer/peewee/issues/2620
https://api.github.com/repos/coleifer/peewee
https://api.github.com/repos/coleifer/peewee/issues/2620/labels{/name}
https://api.github.com/repos/coleifer/peewee/issues/2620/comments
https://api.github.com/repos/coleifer/peewee/issues/2620/events
https://github.com/coleifer/peewee/pull/2620
1,381,601,607
PR_kwDOAA7yGM4_YutS
2,620
Skip test_murmur_hash on big endian architectures
{ "login": "carlwgeorge", "id": 12187228, "node_id": "MDQ6VXNlcjEyMTg3MjI4", "avatar_url": "https://avatars.githubusercontent.com/u/12187228?v=4", "gravatar_id": "", "url": "https://api.github.com/users/carlwgeorge", "html_url": "https://github.com/carlwgeorge", "followers_url": "https://api.github.com/...
[]
closed
false
null
[]
null
[ "My man, thank you. I got my hands full with the kids this evening so I wasn't going to get this until tomorrow. Looks good!" ]
2022-09-21T22:44:27
2022-09-21T23:19:29
2022-09-21T22:59:02
CONTRIBUTOR
null
Resolves #2619
{ "url": "https://api.github.com/repos/coleifer/peewee/issues/2620/reactions", "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 }
https://api.github.com/repos/coleifer/peewee/issues/2620/timeline
null
null
false
{ "url": "https://api.github.com/repos/coleifer/peewee/pulls/2620", "html_url": "https://github.com/coleifer/peewee/pull/2620", "diff_url": "https://github.com/coleifer/peewee/pull/2620.diff", "patch_url": "https://github.com/coleifer/peewee/pull/2620.patch", "merged_at": "2022-09-21T22:59:02" }