#21134: Documentation for transaction.atomic needs more explicit warning about catching DatabaseErrors -------------------------------+-------------------- Reporter: RichardOfWard | Owner: nobody Type: Uncategorized | Status: new Component: Documentation | Version: 1.5 Severity: Normal | Keywords: Triage Stage: Unreviewed | Has patch: 0 Easy pickings: 0 | UI/UX: 0 -------------------------------+-------------------- Catching a database error inside transaction.atomic and then subsequently issuing more database commands before the end of the atomic block leads to a silent implicit rollback of the subsequent commands in Atomic's `__exit__`, even when there is no current exception. When using PostrgeSQL an InternalError is raised by the db when these subsequent commands are attempted as PostgreSQL disallows this behaviour. MySQL and SQLite3 are less strict and so no error is raised, leading to confusing and hard to diagnose behaviour. The current documentation doesn't highlight this potential pitfall.
-- Ticket URL: <https://code.djangoproject.com/ticket/21134> 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 post to this group, send email to django-updates@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/django-updates/056.3ea682e997d26b143bad5a2814f081cc%40djangoproject.com. For more options, visit https://groups.google.com/groups/opt_out.