Replies: 8 comments 7 replies
-
Our two cents - it does not seem that Django supports setting two different versions of psycopg, so it probably is not very straightforward. Might require mucking around in the internals. However, Django seems pretty intent on deprecating psycopg2 (below) and this release feels like a modernization/breaking release anyway - so we fully support the “ripping off the bandaid”. This would entail taking them out and moving everyone on to v3. Frankly, I worry about the maintenance burden of keeping all those connectors around - legacy interfaces are never fun(!) and feel the reduction in complexity would make it easier for future users. TLDR: We back a switch to v3 as a breaking change. |
Beta Was this translation helpful? Give feedback.
-
I'm interested in whatever gets us to psycopg3 and/or asyncpg (the later of which is what I use exclusively) |
Beta Was this translation helpful? Give feedback.
-
If we can implement a procrastinate connector that reuses the Django postgres connection, then I think we won't have problems. But it's not something easy, since we would have to support both psycopg2 and psycopg3, depending on Django version (and how the database is configured). |
Beta Was this translation helpful? Give feedback.
-
It's probably just a lack of me using Django and Procrastinate together in a real life project, but can anyone expand on why that would cause issues having psycopg2 and 3 together ? I believe they can be installed and used alongside and don't use the same namespace ? |
Beta Was this translation helpful? Give feedback.
-
Ok, I've released 0.34.0b1:
It's the code from #753 . In the end, I kept Any time you may be able to spend on testing will be appreciated :) Cheers |
Beta Was this translation helpful? Give feedback.
-
Does anyone know anything about how well Should running jobs allow for a pooled process executor? Or would the suggested pattern be to launch a process executor from the task code itself? |
Beta Was this translation helpful? Give feedback.
-
Release is planned for sometime in the next 24h :) |
Beta Was this translation helpful? Give feedback.
-
Procrastinate 1.0.0 is out :) |
Beta Was this translation helpful? Give feedback.
-
I'm working on untangling the sync/async situation (happening in #753 and still very messy), using
asgiref
'ssync_to_async
andasync_to_sync
decorators to make it easier to call synchronous stuff in the worker (which today easily results in hard to fix errors).I realized that
psycopg3
has a much better support for async thanaiopg
(I get crashes trying to launchaiopg
coroutines in a thread, while psycopg3 seems to handle this much better).It's clear that finishing the work will involve making Psycopg3 the main supported connector. But I'm wondering what the best path should be for
psycopg2
andaiopg
connectors: we can leave them around (maybe in thecontrib
package, maybe with a disclaimer in the doc or a (deprecation) warning in the code), or we can remove them.In #881, @turicas expressed that it might be complex for projects using Django at a version that doesn't support psycopg3 to use both procrastinate with psycopg3 and django with psycopg2 in the same project. I'd love to discuss this, and gather some feedback from users so as to make the best choices going forward.
So @turicas would you mind giving a little more details on why that might be complicated ? And other people, would you mind expressing your thoughts on the matter?
Pinging people who interacted with the repo recently:
@ashleyheath @turicas @paulzakin @JacobCoffee @aleksandr-shtaub @jerluc
Beta Was this translation helpful? Give feedback.
All reactions