
Luckydonald
07.11.2016
16:49:42

Alexey
07.11.2016
18:24:01

Mikki
09.11.2016
14:09:23
Welcome!

Google

Luckydonald
13.11.2016
22:32:47
Not a pony orm related question, but more general:
I have made some Mixin classes.
Now I want to make a package where I have some ready-to-use classes.
I have no good ideas on how to call that file
So you don't have to do it yourself
Current filename is mixed_mixins.py
And I'm not happy about it :D

Romet
13.11.2016
22:35:54
i'm a django user so i'd go with how everything else is named
so there's models, tests, etc.. and i would just use "mixins"

Luckydonald
13.11.2016
22:36:05
How would that be?
The mixins are already in a file called like that.

Vitalii
13.11.2016
22:37:24
Hi! It is a quite good practice not to separate mixins from the rest of your classes and name / group them by their logical purpose.

Luckydonald
13.11.2016
23:49:15
Thanks for your answers!

Mikki
21.11.2016
17:08:19
Welcome!

Romet
21.11.2016
17:27:31
i'd like to take a moment and thank you for introducing me to this stallman sticker pack

Марк ☢
21.11.2016
20:18:54

Google

Марк ☢
21.11.2016
20:19:15
затем я посмотрел твои фоточки в телеграме. он хранит историю всех фоточек. СЮРПРАЙЗ

Rozen
21.11.2016
20:20:44
wasn't there a rule that stablishes english only?

Angel
21.11.2016
20:21:11
I think so

Марк ☢
21.11.2016
20:21:20
А смысл?

Mikki
21.11.2016
20:21:36
We don't really have rules here yet :p

Romet
21.11.2016
20:21:41
some of us don't speak russian
that includes me
i understand a little, but that's it

Angel
21.11.2016
20:21:49
Ok
That's my cue

Alexander
21.11.2016
20:22:10
Yeah, please in English, guys :) Not all here speak Russian :)

Марк ☢
21.11.2016
20:22:47

Alexander
21.11.2016
20:24:12
I think that's a good idea :)

Rozen
21.11.2016
20:25:58
sorry, i didn't wanted to annoy :(

Alexander
21.11.2016
20:29:12
No problem, I think, I doubt your posts annoyed anybody

Марк ☢
21.11.2016
20:48:33
https://github.com/ponyorm/pony/issues/162
So, how to run tests ?
ImportError: No module named ponytest

Alexander
21.11.2016
20:55:41
We start refactoring of tests in order to execute them with all supported databases, and not only with SQLite. Right now to run tests you need to clone this module: https://github.com/abetkin/ponytest. Currently we are discussing should this part of code be separate package which pony depends on, or it should be part of pony itself. Before making new release we should choose what to do.

Google

Марк ☢
21.11.2016
20:56:49
I'm sure that it should be bundled together with pony itself
What is the reason to split ponytest into separate project ?

Alexander
21.11.2016
20:59:52
The creator of this module (Vitalii Abetkin) thinks it may be useful outside of Pony. I think tomorrow he can comment on this

Марк ☢
21.11.2016
21:01:36
Looks like asyncio module for Python. It is developed in separate git-repo and when Python release is coming, it is COPIED into Python's VCS.
I think you may use same strategy regarding ponytest module.

Alexander
21.11.2016
21:02:55
May be, thanks for the suggestion

Марк ☢
21.11.2016
21:04:53
This is important, since we run tests for every package we build. Without that we should either disable tests (as we do) or package ponytest and make it as build-dependency.

Luckydonald
22.11.2016
19:06:05
In https://editor.ponyorm.com I still can't scroll the Attribute properties, making it impossible to remove attributes.

Alexey
22.11.2016
19:12:31

Romet
22.11.2016
19:35:19
ah i see

Luckydonald
22.11.2016
19:35:25

Romet
22.11.2016
19:35:27
it's scroll-y but the minimap is rendering over it
yeah
it'll be because the sidebar is set top top:60px or something
it's actually taller but gets clipped by the browser window

Mikki
22.11.2016
20:40:24
Welcome!

Max
22.11.2016
20:40:54
Thanks :)

Luckydonald
22.11.2016
21:31:27
Pony is raising
ImportError: No module named 'psycopg2'
During handling of the above exception, another exception occurred:
ImportError: No module named 'psycopg2cffi'

Alexander
22.11.2016
21:33:03
If you want to use Pony with PostgreSQL, you need to install psycopg2 database driver: http://initd.org/psycopg/docs/

Max
22.11.2016
21:33:31
On which language Pony is written?

Google

Alexander
22.11.2016
21:33:45
Python

Max
22.11.2016
21:33:53
spasibo

Alexander
22.11.2016
21:34:09
sure

Luckydonald
22.11.2016
21:35:58
It states it doesn't need anything

Alexander
22.11.2016
21:37:28
psycopg2 is not required to use Pony. It is possible to use just Pony if the database that you use is SQLite. But for other databases it is necessary to use specific database connectors. Pony does not specify these connectors as dependencies, because they are necessary only for some people who use specific database

Luckydonald
22.11.2016
21:39:00
Maybe you should include that in that paragraph, that depending on the database there is something needed.

Max
22.11.2016
21:39:16
Agreed

Alexander
22.11.2016
21:39:36
I think this is a good point, thanks

Michael
22.11.2016
21:40:33
this is how pewee describe it
http://docs.peewee-orm.com/en/latest/peewee/installation.html

Luckydonald
22.11.2016
21:40:56

Michael
22.11.2016
21:42:06
yeah the note section there

Luckydonald
22.11.2016
21:44:47
Never mind, that might be a import failure on my end

Alexander
22.11.2016
21:47:41
If provider specified when the Database instance is defined (i.e. Database('postgres', ...)) then it will be checked at this point. Otherwise, if Database is created without arguments, the connection have place on db.bind(...) method call

Luckydonald
22.11.2016
21:52:32
Was my fault, I imported the database objects locally, in a function
How would I upsert a object?
Say I have a Ùser` with id (Primary key, but given, not auto incremet) and a name.
Now I want to create him if a User with that id doesn't exist, else update the value.

Alexander
22.11.2016
22:00:06
We plan to add special upsert method. Right now you can write something like that:
user = User.get(id=user_id)
if user is not None:
user.name = user_name
else:
user = User(id=user_id, name=user_name)
In a more simple case (if name is unique secondary key and id is auto-incement) you can write:
user = User.get(name=user_name) or User(name=user_name)

Google

Luckydonald
22.11.2016
22:07:10
Cool. Thanks!
I noticed, If you edit at the online editor, and have text changes in the properties pane, the text only gets saved if I unfocus that field, by clicking in some other field.
It doesn't store the content if I click on the "Python Code" tab, and if I come back, the change is lost.