<feed xmlns='http://www.w3.org/2005/Atom'>
<title>django.git/django/db/transaction.py, branch stable/6.0.x</title>
<subtitle>django
</subtitle>
<id>http://cgit.adnoto.dev/django.git/atom?h=stable%2F6.0.x</id>
<link rel='self' href='http://cgit.adnoto.dev/django.git/atom?h=stable%2F6.0.x'/>
<link rel='alternate' type='text/html' href='http://cgit.adnoto.dev/django.git/'/>
<updated>2025-07-23T23:17:55Z</updated>
<entry>
<title>Refs #36500 -- Rewrapped long docstrings and block comments via a script.</title>
<updated>2025-07-23T23:17:55Z</updated>
<author>
<name>django-bot</name>
<email>ops@djangoproject.com</email>
</author>
<published>2025-07-23T03:41:41Z</published>
<link rel='alternate' type='text/html' href='http://cgit.adnoto.dev/django.git/commit/?id=69a93a88edb56ba47f624dac7a21aacc47ea474f'/>
<id>urn:sha1:69a93a88edb56ba47f624dac7a21aacc47ea474f</id>
<content type='text'>
Rewrapped long docstrings and block comments to 79 characters + newline
using script from https://github.com/medmunds/autofix-w505.
</content>
</entry>
<entry>
<title>Fixed typos in Atomic docstring.</title>
<updated>2024-07-22T06:27:27Z</updated>
<author>
<name>Muhammad N. Fadhil</name>
<email>34566369+MuhammadNFadhil@users.noreply.github.com</email>
</author>
<published>2024-07-15T18:57:03Z</published>
<link rel='alternate' type='text/html' href='http://cgit.adnoto.dev/django.git/commit/?id=ee20e2d0380e3f4f87c0ea386c7365056473d6ad'/>
<id>urn:sha1:ee20e2d0380e3f4f87c0ea386c7365056473d6ad</id>
<content type='text'>
</content>
</entry>
<entry>
<title>Fixed #23353 -- Used "raise from" when raising TransactionManagementError.</title>
<updated>2022-10-03T04:08:54Z</updated>
<author>
<name>David Wobrock</name>
<email>david.wobrock@gmail.com</email>
</author>
<published>2022-10-02T16:53:05Z</published>
<link rel='alternate' type='text/html' href='http://cgit.adnoto.dev/django.git/commit/?id=3b4a5b9f97f113ca5151cff744019e39a1ed7475'/>
<id>urn:sha1:3b4a5b9f97f113ca5151cff744019e39a1ed7475</id>
<content type='text'>
This change sets the __cause__ attribute to raised exceptions.
</content>
</entry>
<entry>
<title>Fixed #33616 -- Allowed registering callbacks that can fail in transaction.on_commit().</title>
<updated>2022-09-06T10:21:36Z</updated>
<author>
<name>SirAbhi13</name>
<email>abhinav.sny.2002@gmail.com</email>
</author>
<published>2022-06-07T15:50:46Z</published>
<link rel='alternate' type='text/html' href='http://cgit.adnoto.dev/django.git/commit/?id=4a1150b41d1312feacd4316b2691227f5a509ae9'/>
<id>urn:sha1:4a1150b41d1312feacd4316b2691227f5a509ae9</id>
<content type='text'>
Thanks David Wobrock and Mariusz Felisiak for reviews.
</content>
</entry>
<entry>
<title>Refs #33476 -- Reformatted code with Black.</title>
<updated>2022-02-07T19:37:05Z</updated>
<author>
<name>django-bot</name>
<email>ops@djangoproject.com</email>
</author>
<published>2022-02-03T19:24:19Z</published>
<link rel='alternate' type='text/html' href='http://cgit.adnoto.dev/django.git/commit/?id=9c19aff7c7561e3a82978a272ecdaad40dda5c00'/>
<id>urn:sha1:9c19aff7c7561e3a82978a272ecdaad40dda5c00</id>
<content type='text'>
</content>
</entry>
<entry>
<title>Fixed #33161 -- Enabled durability check for nested atomic blocks in TestCase.</title>
<updated>2021-11-12T12:05:56Z</updated>
<author>
<name>Krzysztof Jagiello</name>
<email>me@kjagiello.com</email>
</author>
<published>2021-09-30T17:13:56Z</published>
<link rel='alternate' type='text/html' href='http://cgit.adnoto.dev/django.git/commit/?id=8d9827c06ce1592cca111e7eafb9ebe0153104ef'/>
<id>urn:sha1:8d9827c06ce1592cca111e7eafb9ebe0153104ef</id>
<content type='text'>
Co-Authored-By: Adam Johnson &lt;me@adamj.eu&gt;
</content>
</entry>
<entry>
<title>Fixed #32220 -- Added durable argument to transaction.atomic().</title>
<updated>2020-11-27T20:43:15Z</updated>
<author>
<name>Ian Foote</name>
<email>python@ian.feete.org</email>
</author>
<published>2020-11-22T16:20:56Z</published>
<link rel='alternate' type='text/html' href='http://cgit.adnoto.dev/django.git/commit/?id=3828879eee09da95bf99886c1ae182a36b1d89b3'/>
<id>urn:sha1:3828879eee09da95bf99886c1ae182a36b1d89b3</id>
<content type='text'>
</content>
</entry>
<entry>
<title>Fixed #30116 -- Dropped support for Python 3.5.</title>
<updated>2019-01-30T15:19:48Z</updated>
<author>
<name>Tim Graham</name>
<email>timograham@gmail.com</email>
</author>
<published>2019-01-18T15:04:29Z</published>
<link rel='alternate' type='text/html' href='http://cgit.adnoto.dev/django.git/commit/?id=7e6b214ed34f5562dbd83cf54924a5b589a29715'/>
<id>urn:sha1:7e6b214ed34f5562dbd83cf54924a5b589a29715</id>
<content type='text'>
</content>
</entry>
<entry>
<title>Refs #27025 -- Removed obsolete sqlite3 transaction management workaround for Python 3.6+.</title>
<updated>2018-10-25T23:54:48Z</updated>
<author>
<name>Tim Graham</name>
<email>timograham@gmail.com</email>
</author>
<published>2018-10-25T23:54:48Z</published>
<link rel='alternate' type='text/html' href='http://cgit.adnoto.dev/django.git/commit/?id=717ee63e5615a6c3a018351a07028513f9b01f0b'/>
<id>urn:sha1:717ee63e5615a6c3a018351a07028513f9b01f0b</id>
<content type='text'>
Obsolete per https://bugs.python.org/issue10740#msg274816.</content>
</entry>
<entry>
<title>Fixed #21171 -- Avoided starting a transaction when a single (or atomic queries) are executed.</title>
<updated>2018-10-17T10:19:02Z</updated>
<author>
<name>Florian Apolloner</name>
<email>florian@apolloner.eu</email>
</author>
<published>2018-09-27T07:45:10Z</published>
<link rel='alternate' type='text/html' href='http://cgit.adnoto.dev/django.git/commit/?id=bc7dd8490b882b2cefdc7faf431dc64c532b79c9'/>
<id>urn:sha1:bc7dd8490b882b2cefdc7faf431dc64c532b79c9</id>
<content type='text'>
Checked the following locations:

 * Model.save(): If there are parents involved, take the safe way and use
   transactions since this should be an all or nothing operation.

   If the model has no parents:

    * Signals are executed before and after the previous existing
      transaction -- they were never been part of the transaction.

    * if `force_insert` is set then only one query is executed -&gt; atomic
      by definition and no transaction needed.

    * same applies to `force_update`.

    * If a primary key is set and no `force_*` is set Django will try an
      UPDATE and if that returns zero rows it tries an INSERT. The first
      case is completly save (single query). In the second case a
      transaction should not produce different results since the update
      query is basically a no-op then (might miss something though).

 * QuerySet.update(): no signals issued, single query -&gt; no transaction
   needed.

 * Model/Collector.delete(): This one is fun due to the fact that is
   does many things at once.

   Most importantly though: It does send signals as part of the
   transaction, so for maximum backwards compatibility we need to be
   conservative.

   To ensure maximum compatibility the transaction here is removed only
   if the following holds true:

     * A single instance is being deleted.
     * There are no signal handlers attached to that instance.
     * There are no deletions/updates to cascade.
     * There are no parents which also need deletion.
</content>
</entry>
</feed>
