Y
HN Search
Hacker News Search
new
|
comments
|
top
|
jobs
dvarrazzo
searching Neon…
1.
▲
2.
▲
3.
▲
4.
▲
5.
▲
6.
▲
8 ms
·
1.
▲
Automatic code conversion from async to sync
(psycopg.org)
5 points
by
dvarrazzo
2y ago
|
2 comments
2.
▲
by
dvarrazzo
2y ago
Psycopg 3 supports both sync and async code. Starting from release 3.2, the sync side is automatically generated from the async counterpart. This article explains how it's done, and the workflow used for the initial conversion to autog
3.
▲
by
dvarrazzo
4y ago
As someone who is trying to make a living out of free software, I would love to see this project succeeding. The other remotely similar service, Tidelift, has unacceptable terms and conditions: for the compensation they decide "at [the
4.
▲
by
dvarrazzo
5y ago
This is interesting, thank you for pointing it out. Worth looking if the problems can be fixed the same way in both the adapter (and probably everything else using server-side binding).
5.
▲
by
dvarrazzo
5y ago
There is a mechanism to ensure that there is no unexpected regression. Exposing the PSYCOPG_IMPL env var a program can make sure to obtain a specific implementation and import fails if it's not available. https://www.psycopg
6.
▲
The new COPY support in psycopg3
(psycopg.org)
2 points
by
dvarrazzo
6y ago
|
0 comments
7.
▲
by
dvarrazzo
6y ago
> You can put comments in Python files... only if the comment pertains to a django feature, not to a schema feature that cannot be expressed in django (e.g. a partial index designed for a specific query). > You can name your migration
8.
▲
by
dvarrazzo
6y ago
It also breaks in interesting way: I discovered just today that constants defined on the Model subclass are not available when you use 'get_model()'. I suspect methods wouldn't be accessible either?
9.
▲
by
dvarrazzo
6y ago
My strategy here is to have a staging server where migrations are applied before they can hit production. As someone else pointed out, migration without CI can be dangerous and difficult to coordinate with deployment.
10.
▲
A Trip into Optimisation
(varrazzo.com)
2 points
by
dvarrazzo
6y ago
|
0 comments
11.
▲
First Experience with Mypy
(varrazzo.com)
1 points
by
dvarrazzo
6y ago
|
0 comments
12.
▲
by
dvarrazzo
7y ago
Hi! Much of the difficulty comes from using blocking libpq calls in psycopg2. I'm thinking to avoid them altogether in psycopg3 and only use async calls with Python in charge of blocking. Note that you can obtain a similar result in ps