<feed xmlns='http://www.w3.org/2005/Atom'>
<title>django.git/tests/delete_regress, branch main</title>
<subtitle>django
</subtitle>
<id>http://cgit.adnoto.dev/django.git/atom?h=main</id>
<link rel='self' href='http://cgit.adnoto.dev/django.git/atom?h=main'/>
<link rel='alternate' type='text/html' href='http://cgit.adnoto.dev/django.git/'/>
<updated>2024-02-08T17:41:32Z</updated>
<entry>
<title>Fixed #35073 -- Avoided unnecessary calling of callables used by SET/SET_DEFAULT in Collector.collect().</title>
<updated>2024-02-08T17:41:32Z</updated>
<author>
<name>bcail</name>
<email>bcail@crossway.org</email>
</author>
<published>2024-02-08T17:41:32Z</published>
<link rel='alternate' type='text/html' href='http://cgit.adnoto.dev/django.git/commit/?id=9c5e382b981608a26f2c55f1259d9e823fee5f15'/>
<id>urn:sha1:9c5e382b981608a26f2c55f1259d9e823fee5f15</id>
<content type='text'>
</content>
</entry>
<entry>
<title>Used addCleanup() in tests where appropriate.</title>
<updated>2023-12-31T09:01:31Z</updated>
<author>
<name>Mariusz Felisiak</name>
<email>felisiak.mariusz@gmail.com</email>
</author>
<published>2023-12-31T09:01:31Z</published>
<link rel='alternate' type='text/html' href='http://cgit.adnoto.dev/django.git/commit/?id=d88ec42bd0a37340c8477a6f20bf26e58bd84735'/>
<id>urn:sha1:d88ec42bd0a37340c8477a6f20bf26e58bd84735</id>
<content type='text'>
</content>
</entry>
<entry>
<title>Refs #32433 -- Reallowed calling QuerySet.delete() after distinct().</title>
<updated>2023-07-07T05:08:28Z</updated>
<author>
<name>Simon Charette</name>
<email>charette.s@gmail.com</email>
</author>
<published>2023-07-04T21:34:20Z</published>
<link rel='alternate' type='text/html' href='http://cgit.adnoto.dev/django.git/commit/?id=28e2077148f7602d29165e90965974698819cbba'/>
<id>urn:sha1:28e2077148f7602d29165e90965974698819cbba</id>
<content type='text'>
While values(*field_excluding_pk).distinct() and
distinct(*field_excluding_pk) can reduce the number of resulting rows
in a way that makes subsequent delete() calls ambiguous standalone
.distinct() calls cannot.

Since delete() already disallows chain usages with values() the only
case that needs to be handled, as originally reported, is when
DISTINCT ON is used via distinct(*fields).

Refs #32682 which had to resort to subqueries to prevent duplicates in
the admin and caused significant performance regressions on MySQL
(refs #34639).

This partly reverts 6307c3f1a123f5975c73b231e8ac4f115fd72c0d.
</content>
</entry>
<entry>
<title>Fixed #33759 -- Avoided unnecessary subquery in QuerySet.delete() with self-referential subqueries if supported.</title>
<updated>2023-05-01T08:20:20Z</updated>
<author>
<name>4the4ryushin</name>
<email>aman2001mi@gmail.com</email>
</author>
<published>2023-04-27T21:03:25Z</published>
<link rel='alternate' type='text/html' href='http://cgit.adnoto.dev/django.git/commit/?id=0b0998dc151feb77068e2387c34cc50ef6b356ae'/>
<id>urn:sha1:0b0998dc151feb77068e2387c34cc50ef6b356ae</id>
<content type='text'>
</content>
</entry>
<entry>
<title>Refs #33476 -- Applied Black's 2023 stable style.</title>
<updated>2023-02-01T10:04:38Z</updated>
<author>
<name>David Smith</name>
<email>smithdc@gmail.com</email>
</author>
<published>2023-02-01T07:13:39Z</published>
<link rel='alternate' type='text/html' href='http://cgit.adnoto.dev/django.git/commit/?id=097e3a70c1481ee7b042b2edd91b2be86fb7b5b6'/>
<id>urn:sha1:097e3a70c1481ee7b042b2edd91b2be86fb7b5b6</id>
<content type='text'>
Black 23.1.0 is released which, as the first release of the year,
introduces the 2023 stable style. This incorporates most of last year's
preview style.

https://github.com/psf/black/releases/tag/23.1.0
</content>
</entry>
<entry>
<title>Fixed #33928 -- Avoided unnecessary queries when cascade updating.</title>
<updated>2022-08-27T12:25:55Z</updated>
<author>
<name>Simon Charette</name>
<email>charette.s@gmail.com</email>
</author>
<published>2022-08-17T20:33:22Z</published>
<link rel='alternate' type='text/html' href='http://cgit.adnoto.dev/django.git/commit/?id=0701bb8e1f1771b36cdde45602ad377007e372b3'/>
<id>urn:sha1:0701bb8e1f1771b36cdde45602ad377007e372b3</id>
<content type='text'>
Models that use SET, SET_NULL, and SET_DEFAULT as on_delete handler
don't have to fetch objects for the sole purpose of passing them back to
a follow up UPDATE query filtered by the retrieved objects primary key.

This was achieved by flagging SET handlers as _lazy_ and having the
collector logic defer object collections until the last minute. This
should ensure that the rare cases where custom on_delete handlers are
defined remain uncalled when when dealing with an empty collection of
instances.

This reduces the number queries required to apply SET handlers from
2 to 1 where the remaining UPDATE use the same predicate as the non
removed SELECT query.

In a lot of ways this is similar to the fast-delete optimization that
was added in #18676 but for updates this time. The conditions only
happen to be simpler in this case because SET handlers are always
terminal. They never cascade to more deletes that can be combined.

Thanks Renan GEHAN for the report.
</content>
</entry>
<entry>
<title>Refs #33476 -- Refactored code to strictly match 88 characters line length.</title>
<updated>2022-02-07T19:37:05Z</updated>
<author>
<name>Mariusz Felisiak</name>
<email>felisiak.mariusz@gmail.com</email>
</author>
<published>2022-02-04T07:08:27Z</published>
<link rel='alternate' type='text/html' href='http://cgit.adnoto.dev/django.git/commit/?id=7119f40c9881666b6f9b5cf7df09ee1d21cc8344'/>
<id>urn:sha1:7119f40c9881666b6f9b5cf7df09ee1d21cc8344</id>
<content type='text'>
</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>Refs #32682 -- Fixed QuerySet.delete() crash on querysets with self-referential subqueries on MySQL.</title>
<updated>2021-04-27T08:34:47Z</updated>
<author>
<name>Mariusz Felisiak</name>
<email>felisiak.mariusz@gmail.com</email>
</author>
<published>2021-04-27T07:53:27Z</published>
<link rel='alternate' type='text/html' href='http://cgit.adnoto.dev/django.git/commit/?id=4074f38e1dcc93b859bbbfd6abd8441c3bca36b3'/>
<id>urn:sha1:4074f38e1dcc93b859bbbfd6abd8441c3bca36b3</id>
<content type='text'>
</content>
</entry>
<entry>
<title>Fixed #32433 -- Added error message on QuerySet.delete() following distinct().</title>
<updated>2021-02-11T07:33:30Z</updated>
<author>
<name>Egidijus Macijauskas</name>
<email>e.macijauskas@outlook.com</email>
</author>
<published>2021-02-09T21:43:01Z</published>
<link rel='alternate' type='text/html' href='http://cgit.adnoto.dev/django.git/commit/?id=6307c3f1a123f5975c73b231e8ac4f115fd72c0d'/>
<id>urn:sha1:6307c3f1a123f5975c73b231e8ac4f115fd72c0d</id>
<content type='text'>
</content>
</entry>
</feed>
