A draft merge request adding a psycopg3 backend to #Tryton

https://foss.heptapod.net/tryton/tryton/-/merge_requests/2408

It showed that we need to add a feature to python-sql to support the pyformat paramstyle of the the DB-API

https://peps.python.org/pep-0249/#paramstyle

Switching to psycopg3 would allow to use server side binding and thus give some freedom when processing long list of ids (as it's common with Tryton's ORM).

#python #psycopg3 #postgresql

Update to Psycopg 3 (!2408) · Merge requests · Tryton / Tryton · GitLab

Closes #10901

GitLab
🌗 Psycopg3 與 Psycopg2 的差異
➤ Psycopg3 與 Psycopg2 的差異及解決方案
https://www.psycopg.org/psycopg3/docs/basic/from_pg2.html
Psycopg3 與 Psycopg2 在使用上有幾個差異,例如伺服器端綁定、同一查詢中多個結果的返回、不同的類型轉換規則等。本文將介紹這些差異以及如何解決相關問題。
+ 很有用的文章,謝謝分享!
+ Psycopg3 真的很好用,但需要注意一些差異,這篇文章很詳細地介紹了這些差異及解決方案。
#Python #PostgreSQL #Psycopg3 #Psycopg2
Differences from psycopg2 - psycopg 3.2.0.dev1 documentation

My next project is the Japanese translation of psycopg3 documentation. 🔌🐘 I expected there's already some past existing work for psycopg2, but couldn't find any, a bit surprisingly.

Only the home and async pages were finished!

(Screenshot is locally built from https://github.com/shuuji3/psycopg/commit/df0de57820b8ad33e342fcf968fad9751ef453f0)

#psycopg #psycopg3 #translation

docs: finish translating remaining sections into Japanese and fix sev… · shuuji3/psycopg@df0de57

…eral translation in `async.rst`

GitHub

I've completed my basic migration to #psycopg3 for my projects that don't use ORMs. It's all gone very smoothly and in fact with first class support for UUIDs I have actually been removing code and complexity.

What is interesting now is that the new Row Factory functionality means that much of the reason I used the ORMs so simplify query coding may have gone away. I think I can do much of what I need with the base library.

@djangochat @carlton @wsvincent Continuing to talk about Django and PostgreSQL, a Django Chat episode on the recent merge of the Psycopg 3.1+ backend with @felixxm , @apollo13 and @psycopg would be interesting. 🎙️

As an anticipation we had a great keynote from Daniele Varrazzo at PyCon Italia 2022 @pycon 🇮🇹
https://youtu.be/w41jxB37n8M

#psycopg #psycopg3 #django #djangochat #python #postgresql #orm

Psycopg from 2 to 3: designing and living Free Software - Daniele Varrazzo

YouTube
Paolo Melchiorre @[email protected] #mastodon on Twitter

“The Django @psycopg branch has been merged 🎉 I opened the issue 13 months ago and many developers worked on the PR started by @dvarrazzo 👏 Thanks @fapolloner @MariuszFelisiak Simon Charette, Tim Graham, @AdamChainz, @carltongibson and @David_Smith86 🙏 https://t.co/l5y6MSSsIs”

Twitter

This morning @felixxm merged the branch for @psycopg 3 support in Django 🎉

I opened the related issue 13 months ago and since then many developers have worked on the PR based on the work of Daniele Varrazzo 👏

I thank everyone who made this achievement possible starting from @apollo13 to @felixxm but also Simon Charette, Tim Graham, @adamchainz, @carlton and @davidsmith 🙏

I'm sure that both Django and Psycopg will benefit from this success ✨

#django #psycopg3 #psycopg

https://code.djangoproject.com/ticket/33308

#33308 (Add psycopg3 backend) – Django

Django 4.2 supports Psycopg 3 📢 💥 Thanks to Daniele Varrazzo, @apollo13 and Simon Charette for their humongous work 🌟 🌟 🌟

https://github.com/django/django/pull/15687

#psycopg3 #postgresql  #django 

Fixed #33308 -- Added support for psycopg version 3 by apollo13 · Pull Request #15687 · django/django

What did I do? I took https://github.com/dvarrazzo/django-psycopg3-backend and blackified it + ported over most (all?) new commits. I am now opening this on GitHub to be able to nicely diff and sta...

GitHub

@Crocmagnon @psycopg has a lot of new features, you can read about them directly in its website 👇
https://www.psycopg.org/

#psycopg3 #psycopg

PostgreSQL driver for Python — Psycopg

Python adapter for PostgreSQL

In the @django project a great deal of work is underway to add @psycopg support to the #ORM 🐍🐘
Simon and Florian are doing a great job getting PR merged before #Django 4.2 is released ⚡️
You too could help by trying to test this #PR in your projects 👇
https://github.com/django/django/pull/15687

#django #psycopg #psycopg3 #postgresql

Fixed #33308 -- Added support for psycopg version 3 by apollo13 · Pull Request #15687 · django/django

What did I do? I took https://github.com/dvarrazzo/django-psycopg3-backend and blackified it + ported over most (all?) new commits. I am now opening this on GitHub to be able to nicely diff and sta...

GitHub