@psycopg I am honored to have participated in the resolution of issue #999 :)
https://github.com/psycopg/psycopg/issues/999
#Django #Psycopg #PostgreSQL #Memcached #PyLibMC #Python #Cache
@psycopg I am honored to have participated in the resolution of issue #999 :)
https://github.com/psycopg/psycopg/issues/999
#Django #Psycopg #PostgreSQL #Memcached #PyLibMC #Python #Cache
Psycopg 3.2 has been released 🚀
https://www.psycopg.org/articles/2024/06/30/psycopg-32-released/
I can't wait to test it with Django 5.1b1 😬
#PsycoPG #Python #PostgreSQL #Postgres #Django #ORM
CC @psycopg
How does #Psycopg benefit from #PostgreSQL 17?
Read the last article of @dlax to find out => https://dali.bo/202404_psycopg3-2
Any #python #psycopg people know why this works
```
#results = conn.execute('SELECT (embedding <=> %s) as distance, abstract FROM documents ORDER BY embedding <=> %s LIMIT 5', (query_embedding, query_embedding, )).fetchall()
```
But this throws an error
```
results = conn.execute(f'SELECT (embedding <=> {query_embedding}) as distance, abstract FROM documents ORDER BY embedding <=> {query_embedding} LIMIT 5').fetchall()
```
error in the thread
Just hit another issue related to `ctypes.util.find_library("c")` being broken on #musl libc. The issue has been reported to #CPython mid-2014, and still hasn't been fixed (though admittedly the fix seems non-trivial). My workaround is to add an explicit fallback to `libc.so`, e.g.:
```
ctypes.util.find_library("c") or "libc.so"
```
https://github.com/python/cpython/issues/65821
https://github.com/psycopg/psycopg/pull/725
https://bugs.gentoo.org/923003
Dziś trafiłem na kolejny błąd, wynikający z tego, że `ctypes.util.find_library("c")` nie działa na systemach z #musl libc. Problem zgłoszono do CPythona w połowie roku 2014, i do dziś go nie poprawiono (choć przyznaję, że łatka jest ciut skomplikowana). Moje obejście tego problemu polega na wykorzystaniu `libc.so`, kiedy funkcja nic nie zwraca, np. poprzez:
```
ctypes.util.find_library("c") or "libc.so"
```
https://github.com/python/cpython/issues/65821
https://github.com/psycopg/psycopg/pull/725
https://bugs.gentoo.org/923003
Möp:
```sql
-- works, true
select 1 :: smallint = 1 :: bigint;
-- does not work
select 1 :: smallint <@ int8range(1,2);
-- ERROR: operator does not exist: smallint <@ int8range
```
Guess what psycopg passes in when giving it a python int param...
The binary package is a practical choice for development and testing but in production it is advised to use the package built from sources. 🤭 https://pypi.org/project/psycopg2-binary/ #Python #Django #Postgresql #Psycopg
I plead guilty your honor
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)
Building Binary #Python Dependencies For AMD64 And ARM64 #AWS lambda Layers https://link.medium.com/7KAv7cW5KBb
*Specifically, a #Psycopg Python Lambda Layer For #SQLAlchemy And #Postgres
* Using Docker because it's impossible on #MacOS
Yesterday, on Django 4.2, we bumped #psycopg from v2 to the v3 but suffered an increase in locks & connection waiting during some periods of heavy work on the same hardware (Heroku pg with server-side pgBouncer).
Operational reasons (shipping!) stop us investigating this in more depth right now but thought this warning may be of help to someone.
Django 4.2 LTS has just been released. 🎉
From the Django official post: 💡
"The release notes cover the farrago of new features in detail, but a few highlights are:
- psycopg version 3 support
- comments on columns and tables
- support for asynchronous streaming responses, and async interfaces for related managers and models"
More info: 👇
https://www.djangoproject.com/weblog/2023/apr/03/django-42-released/
#Django #Python #Release #LTS #Psycopg #Async
CC @psycopg
@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
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 ✨
RT @psycopg
Psycopg 3.1.5 released. A few bug fixes and *big* speedup improvements: networking, namedtuples, arrays...
Try it out now! 😄🚀
https://github.com/psycopg/psycopg/blob/master/docs/news.rst#psycopg-315
@Crocmagnon @psycopg has a lot of new features, you can read about them directly in its website 👇
https://www.psycopg.org/
Vous connaissez #psycopg le connecteur #Python à un serveur #PostgreSQL, maintenu par Daniele Varrazzo ? Notre développeur @dlax y contribue. Cette semaine, il aborde le *pipeline mode* => https://dali.bo/202209_psycopg
#openSource #SGBD #logicielsLibres
#psycopg est un connecteur #Python à un serveur #PostgreSQL. L'un de nos développeurs, Denis, vous parle plus spécifiquement des #rowFactories => https://dali.bo/202206_psycopg