Lucky
I've had too many experiences like this googling man pages
Duckduckgo even detects the github page correctly
Micaiah
I usually get better results with Google, but Duck Duck Go tends to nail it with tech results
Micaiah
I wish the hug docs had better descriptions on unit testing best practices
Anonymous
Now to the pull request your student made. If I understand correctly, the student's main goal is to gain experiense on working with (and contributing to) an OSS project. In this case it may be easier to him to contribute to some project which already has established contributing guidelines and the projecrt maintainers have an experiense of accepting of external contribution. PonyORM was released under Apache license just recently, and our experience in dealing with external contributions is still limited at this point. I hope that PonyORM will gradually become more open to such contributions. The pull request in itself looks good. We have some internal disputes regarding should we accept it or not because of the following reason. Currently we maintan documentation in a separate repository. There ase some benefits in having documentation and code in the same repository and combining code change with corresponding documentation change. But this is convenient when code and documentation are writen by the same person. Currently in PonyORM there are separate persons who write code and documentation. Because of that it is more convenient to us to have two different repositories. This way the probility of merge conflicts are reduced, and unreleased code branches can be rebased more easily. The pool request of your student suggests to include documentation into code in form of docstrings. It may be convenient for a programmer who want to study the code. But after that change the documentation will be duplicated in a two different places - in a separate documentation repository and inside docstrings. It will increase the cost of writing documentation, because now it will be necessary not to forget to update the corresponding place inside some docstring when the main documentation is changed. It is possible to autogenerate documentation from the docstrings, but it will require to us to change the documentation building process, and currently we are not ready for that. Also, it is more convenient to work with documentation when it is contained in a one textual file and not scattered across a multiple docstrings. Because of that, at this moment we are more inclined to work with a documentation which a stored in a small number of a textual files in a separate repository. I think we are ready to accept the pull request and add docstring to the code if someone will maintain them in the future and check that they are correspond with the main documentation.
Thank you so much for your thoughtful response. I've discussed your response with my student and he says he understands. He doesn't seem to have any expectation of contributing functionality to Pony; he just saw the opportunity to make a contribution and was excited to take a shot at it. Both of us are excited to see how Pony grow.
Micaiah
When will Pony be available for 3.6?
Alexander
I hope we can do release which supports Python 3.6 before New Year
Micaiah
Perfect!
Micaiah
Anything simple I can do to help?
Alexander
Cannot suggest anything specific right now, maybe I can tell tomorrow
Micaiah
Is there any word on when migration support is going to be added?
Lucky
It is in the making, as far as I know But @akozlovsky will probably tell you more
Micaiah
It is in the making, as far as I know But @akozlovsky will probably tell you more
That's great news. The lack of migrations was my only complaint using Pony on my senior project
Alexander
We are trying to do release before the end of this week which includes support or Python 3.6 and first version of migrations. Migrations are almost ready, but during implementing of migrations it was necessary to change a way many-to-many intermediate tables are named. Previously the name was entity1_entity2, and now it will be named entity1_collection1. This way of naming is better, and the change is necessary even if a developer dosn't plan to use migrations. We need to have a way to upgrade previously created databases. Regarding Python 3.6 support, today I was able to pass all tests except one on Python 3.6, so it is almost ready.
Michael
Great news
Micaiah
I've got a django project and a hug project going on, and I'd like to eventually run Pony with both.
Alexander
The changes are in decompiler, the bytecode was significantly changed
Alexander
https://docs.python.org/3.6/whatsnew/3.6.html#optimizations
Micaiah
The changes are in decompiler, the bytecode was significantly changed
Oh, that makes sense. I was curious about this as well.
Mark ☢️
They have made bytecode actually word-code (i.e. two-bytes per opcode)
Alexander
Yes. Also the details of some bytecodes (such as MAKE_FUNCTION, CALL_FUNCTION_xxx, etc.) were changed, and some new bytecodes (like BUILD_CONST_KEY_MAP) were added
Alexander
I've got a django project and a hug project going on, and I'd like to eventually run Pony with both.
I think the main difference between django and pony tables is inheritance. Django creates a different table for each subclass, and Pony keep all subclass columns inside the same table. In order to work with Django models we need to add Django-like inheritance to Pony, although it is less efficient than the way used in Pony. Before that Pony will treat Django subclass as a separate model related with a foreign key to a base model.
Alexander
Probably
Micaiah
That'll probably be my plan then
Micaiah
Might have to hack-up manage.py to work with Pony's migrations
Alexander
Probably in the future we can add some Django-Pony adapter. Also, there was a projwct which automatically creates Pony entity for each Django model. Maybe it is possible to revive it https://github.com/nnseva/djony
Micaiah
Oh cool, for now I think I'd probably just not use Django haha. The current project is using hug.
Lucky
Still don't get what hug does
Micaiah
It takes falcon and does magic
Lucky
Okey, now what does falcon do?
Micaiah
HTTP APIs
Lucky
Ah, I see. I use flask, so I just use json... What are the advantages?
Micaiah
Its faster, and you don't have to deal with globals
Micaiah
I like flask a lot, but I think I'm gonna switch to hug as my main for now on
Mikki
Welcome :)
Anonymous
Hi! I saw Pony ORM recently and reading docs now :) About me - study data science on MOOC and making some scientific analytics in my lab.
Anonymous
Having defined a field and populated a few records -- I change my mind and decide that the field should have been unique. What must I do to change the field's schema and have that written back to sqlite? Can't find it in the doc. Thanks!
Romet
you need migrations for that, which are still a work in progress
Romet
for now, you have to alter the table manually
Anonymous
OK! Thanks again.
Micaiah
I wish there was a group like this for general Python, but I can't find one.
James
Kinda tempted to make one, not sure if it'd just be noise though
Micaiah
Kinda tempted to make one, not sure if it'd just be noise though
Yeah I'm curious if there would be enough interest
James
Shall I make one and we can try it?
Micaiah
Sure
James
https://telegram.me/joinchat/AaGuz0De4WkhL72Cxb5MBA
Lukas
good morning 👋
Lucky
hi
Artur Rakhmatulin
hello
Artur Rakhmatulin
Someone uses a PonyOrm with oracle without "triggers" for insert into some tables ?
Artur Rakhmatulin
i have old project with bad arhitecture and noone tables havent triggers. i solved my problem by "before_insert" entity event
Artur Rakhmatulin
with 2 methods "check_trigger" and "create_trigger" )
Alexander
So you still use triggers, but create them dynamically on first insert?
Artur Rakhmatulin
Ok, i know i can ) But , does pony to work with Oracle without triggers ?
Artur Rakhmatulin
like a Hibernate Orm in java
Alexander
Currently Pony relies on triggers when working with Oracle. I think we can add another way of working with identity columns. Please open new issue for that, and provide a link to description how Hibernate does it: https://github.com/ponyorm/pony/issues
Artur Rakhmatulin
wow
Artur Rakhmatulin
Last question. :) What happend if i have tables with Data but havent triggers and i start Pony db.generate_mapping(create_tables=True) That method not erasing my Data? Just creating tgiggers if Table havent it? Maybe anybody know answer or u Alexander. But i cat test it if you dont.
Artur Rakhmatulin
. Thank you for your wonderful project! 👏 Happy holidays!
Alexander
If you use create_tables=True option Pony should create missing tables, indexes and trigers. It should not erase any data, so you can try. But in our next release (which we should release really soon) we change how intermediary many-o-many tables are named. If you use create_table=True option, it is possible that, as part of upgrade to new Pony version, generate_mapping will automatically rename many-to-many tables if table name is not specified explicitly.
Mark ☢️
Alexander
Thanks!
Mikki
Welcome both
Anonymous
Hello. I currently work with Django and PonyORM looks very superior to the Django ORM. The syntax looks much nicer, and on migrations, one frustration with Django is that you can't rename a class easily in their migrations. Would love to see a Pony for Django (to deal with existing projects), and Pony with Flask looks like it could be even better than Django. When will pony.js be released?
Artur Rakhmatulin
I work on oldest java project with hibernate and old spring, and recently i try fast fix some bags in DB with python and pony, and i say u - java sux if u need fast development
Artur Rakhmatulin
I fell in love with python & ponyOrm
Alexey
Hello. I currently work with Django and PonyORM looks very superior to the Django ORM. The syntax looks much nicer, and on migrations, one frustration with Django is that you can't rename a class easily in their migrations. Would love to see a Pony for Django (to deal with existing projects), and Pony with Flask looks like it could be even better than Django. When will pony.js be released?
Hi Dan, We've tried pony.js in one of our projects and found that it requires some more development. We are not ready to release it yet. In the same time, we think that having a possibility to easily represent Pony ORM objects in JSON format would cover many use cases. This feature we are going to release after the migration tool.
Anonymous
Thank you. In your Talk Python To Me interview you also mentioned database reflection. Where does that feature stand priority-wise? If you have migrations and reflection, then I could see reworking existing Django projects with Pony/Flask. (Incidentally, Django has reflection(https://docs.djangoproject.com/en/1.10/ref/django-admin/#django-admin-inspectdb)
Alexey
Dan, Migrations are almost ready, we release it in a matter of weeks. The reflection is the priority, we combine it with the https://editor.ponyorm.com, so that you can launch the reflection tool and get the database diagram and the classes.
Mikki
Welcome!
Micaiah
Have you ever used Django?
Just the tutorial a handful of times
Conner
I want to use pony, but I can't while it still doesn't have migrations.