#34434: psycopg 3 cursor.execute no longer accepts Python tuple binding -------------------------------------+------------------------------------- Reporter: David Burke | Owner: nobody Type: Bug | Status: closed Component: Database layer | Version: 4.2 (models, ORM) | Severity: Normal | Resolution: invalid Keywords: | Triage Stage: | Unreviewed Has patch: 0 | Needs documentation: 0 Needs tests: 0 | Patch needs improvement: 0 Easy pickings: 0 | UI/UX: 0 -------------------------------------+------------------------------------- Changes (by Mariusz Felisiak):
* cc: Florian Apolloner, Simon Charette (added) * status: new => closed * resolution: => invalid Comment: Replying to [ticket:34434 David Burke]: > This may be a bug or a missing feature of psycopg 3. If expected, it may be worth mentioning as a breaking change when using psycopg3. Thanks for the ticket. This is a backward incompatibility change explicitly stated in `psycopg` [https://www.psycopg.org/psycopg3/docs/basic/from_pg2.html#you-cannot-use- in-s-with-a-tuple docs] (there are other small [https://www.psycopg.org/articles/2020/11/24/psycopg3-adaptation/ caveats] when using raw SQL statements). It's not something that we want/can change in Django itself. Moreover, it crashes with other backends so it's now more consistent. We normally don't document backward incompatibility changes in database adapters, especially on a low-level of executing raw SQL statements. We don't want to copy `psycopg` 3 docs here. I think your ticket will be enough to raise awareness on this small inconvenience. -- Ticket URL: <https://code.djangoproject.com/ticket/34434#comment:1> Django <https://code.djangoproject.com/> The Web framework for perfectionists with deadlines. -- You received this message because you are subscribed to the Google Groups "Django updates" group. To unsubscribe from this group and stop receiving emails from it, send an email to django-updates+unsubscr...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/django-updates/01070187124b146c-fd9b54ec-8985-449a-baab-19968fd2843e-000000%40eu-central-1.amazonses.com.