<feed xmlns='http://www.w3.org/2005/Atom'>
<title>chango.git/django/test/utils.py, branch devmain</title>
<subtitle>django
</subtitle>
<id>http://cgit.adnoto.dev/chango.git/atom?h=devmain</id>
<link rel='self' href='http://cgit.adnoto.dev/chango.git/atom?h=devmain'/>
<link rel='alternate' type='text/html' href='http://cgit.adnoto.dev/chango.git/'/>
<updated>2026-05-13T21:00:56Z</updated>
<entry>
<title>Fixed #35514 -- Implemented dictionary-based MAILERS.</title>
<updated>2026-05-13T21:00:56Z</updated>
<author>
<name>Mike Edmunds</name>
<email>medmunds@gmail.com</email>
</author>
<published>2026-04-01T23:59:14Z</published>
<link rel='alternate' type='text/html' href='http://cgit.adnoto.dev/chango.git/commit/?id=0f581cd29d42d1b5ed1dafb67794c2f3ce6705c9'/>
<id>urn:sha1:0f581cd29d42d1b5ed1dafb67794c2f3ce6705c9</id>
<content type='text'>
See DEP 0018.

Added:
* MAILERS setting.
* django.core.mail.mailers dict-like EmailBackend factory.
* `using` argument to mail sending APIs.
* `sent_using` attribute to mail.outbox messages in locmem backend.
* MAILERS in startproject settings template, set to console backend.
* AdminLogHandler.using argument.
* BrokenLinkEmailsMiddleware.send_mail() method.

Updated:
* BaseEmailBackend to track the MAILERS alias used to construct it, and
  to report errors for unknown kwargs (OPTIONS).
* EmailBackend implementations to initialize from kwargs (OPTIONS) only
  when MAILERS is being used.
* smtp.EmailBackend to require `host` option and to default `port`
  option based on SSL/TLS options.
* SimpleTestCase setup to substitute the locmem backend for all defined
  MAILERS configurations.
* Django's tests that send mail to define MAILERS.

Deprecated:
* EMAIL_BACKEND and other backend-related EMAIL_* settings.
* mail.get_connection().
* The `connection`, `fail_silently`, `auth_user`, and `auth_password`
  arguments to mail functions.
* The EmailMessage.connection attribute.
* BaseEmailBackend support for `fail_silently`. Backends that support
  fail_silently (SMTP, console, file) now implement it directly.
* AdminEmailHandler.email_backend argument.

Removed undocumented features without deprecation:
* EmailMessage.get_connection() method. (send() now raises an error if a
  subclass has attempted to override it.)
* EmailMessage.send() no longer sets self.connection to the connection
  used for sending. (It still _uses_ a pre-existing self.connection.)
* AdminEmailHandler.connection() method. (Init now raises an error if a
  subclass has attempted to override it.)

Thanks to Natalia Bidart for shepherding DEP 0018 and for extensive
reviews and suggestions on the implementation.

Thanks to Jacob Rief for the initial implementation and multiple
iterations while refining the design.

Co-authored-by: Jacob Rief &lt;jacob.rief@gmail.com&gt;
</content>
</entry>
<entry>
<title>Refs #34118 -- Removed asgiref coroutine detection shims.</title>
<updated>2026-01-31T13:59:54Z</updated>
<author>
<name>Jacob Walls</name>
<email>jacobtylerwalls@gmail.com</email>
</author>
<published>2026-01-30T20:53:27Z</published>
<link rel='alternate' type='text/html' href='http://cgit.adnoto.dev/chango.git/commit/?id=4a52533329a03207c1c4592a13fbb12b9ec5ef9e'/>
<id>urn:sha1:4a52533329a03207c1c4592a13fbb12b9ec5ef9e</id>
<content type='text'>
As Python 3.12 is now the floor, we can drop the shims and
use the `inspect` module.
</content>
</entry>
<entry>
<title>Fixed #36410 -- Added support for Template Partials to the Django Template Language.</title>
<updated>2025-08-15T00:53:14Z</updated>
<author>
<name>farhan</name>
<email>farhanalirazaazeemi@gmail.com</email>
</author>
<published>2025-06-03T05:32:34Z</published>
<link rel='alternate' type='text/html' href='http://cgit.adnoto.dev/chango.git/commit/?id=5e06b970956af4854e970e74990cb971ba31c96b'/>
<id>urn:sha1:5e06b970956af4854e970e74990cb971ba31c96b</id>
<content type='text'>
Introduced `{% partialdef %}` and `{% partial %}` template tags to
define and render reusable named fragments within a template file.
Partials can also be accessed using the `template_name#partial_name`
syntax via `get_template()`, `render()`, `{% include %}`, and other
template-loading tools.

Adjusted `get_template()` behavior to support partial resolution, with
appropriate error handling for invalid names and edge cases. Introduced
`PartialTemplate` to encapsulate partial rendering behavior.

Includes tests and internal refactors to support partial context
binding, exception reporting, and tag validation.

Co-authored-by: Carlton Gibson &lt;carlton@noumenal.es&gt;
Co-authored-by: Natalia &lt;124304+nessita@users.noreply.github.com&gt;
Co-authored-by: Nick Pope &lt;nick@nickpope.me.uk&gt;
</content>
</entry>
<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/chango.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 #36435 -- Made CaptureQueriesContext restore reset_queries conditionally.</title>
<updated>2025-06-05T11:49:39Z</updated>
<author>
<name>Adam Johnson</name>
<email>me@adamj.eu</email>
</author>
<published>2025-06-03T22:20:43Z</published>
<link rel='alternate' type='text/html' href='http://cgit.adnoto.dev/chango.git/commit/?id=f0a87895ffaf6532a22143b5e2e304c59b7958ae'/>
<id>urn:sha1:f0a87895ffaf6532a22143b5e2e304c59b7958ae</id>
<content type='text'>
</content>
</entry>
<entry>
<title>Refs #35967 -- Deprecated BaseDatabaseCreation.create_test_db(serialize).</title>
<updated>2025-02-16T07:43:42Z</updated>
<author>
<name>Simon Charette</name>
<email>charette.s@gmail.com</email>
</author>
<published>2024-12-18T04:38:23Z</published>
<link rel='alternate' type='text/html' href='http://cgit.adnoto.dev/chango.git/commit/?id=2d34ebe49a25d0974392583d5bbd954baf742a32'/>
<id>urn:sha1:2d34ebe49a25d0974392583d5bbd954baf742a32</id>
<content type='text'>
Given there are no longer any internal usages of serialize=True and it
poses a risk to non-test databases integrity it seems appropriate to
deprecate it.
</content>
</entry>
<entry>
<title>Fixed #35967 -- Deferred test suite fixtures serialization after all dbs setup.</title>
<updated>2025-02-16T06:58:15Z</updated>
<author>
<name>Simon Charette</name>
<email>charette.s@gmail.com</email>
</author>
<published>2024-12-11T05:37:49Z</published>
<link rel='alternate' type='text/html' href='http://cgit.adnoto.dev/chango.git/commit/?id=dc69a63f844b2ef3bc3371edde91644cf0bef0ee'/>
<id>urn:sha1:dc69a63f844b2ef3bc3371edde91644cf0bef0ee</id>
<content type='text'>
While the top-level objects fed to serialization are bound to the test
database being created nothing prevents code invoked during
serialization from performing queries against other connections entries
that haven't been swapped yet.

The reported example of that is a database router directing all reads to
a test mirror for a set of models involving auto-created many-to-many
fields. It might be tempting to address the many-to-many field case but
this a symptom of a larger problem where the test framework yields the
flow execution to user code that could interact with non-test databases
in unexpected ways.

Deferring test database fixture serialization until the point where all
connections entries have been swapped for their test equivalent ensures
that no code triggered during serialization can interact with non-test
databases.

Thanks Jake Howard for the report and Jacob Walls for the initial
investigation.
</content>
</entry>
<entry>
<title>Refs #34986 -- Moved garbage_collect() helper to django.test.utils.</title>
<updated>2023-12-06T08:26:11Z</updated>
<author>
<name>Nick Pope</name>
<email>nick@nickpope.me.uk</email>
</author>
<published>2023-12-04T11:23:08Z</published>
<link rel='alternate' type='text/html' href='http://cgit.adnoto.dev/chango.git/commit/?id=fb9216382a387685e1082ac97caa3feaf3d5fe80'/>
<id>urn:sha1:fb9216382a387685e1082ac97caa3feaf3d5fe80</id>
<content type='text'>
</content>
</entry>
<entry>
<title>Fixed typo in django/test/utils.py.</title>
<updated>2023-07-27T04:56:38Z</updated>
<author>
<name>Bruno Alla</name>
<email>alla.brunoo@gmail.com</email>
</author>
<published>2023-07-27T04:54:22Z</published>
<link rel='alternate' type='text/html' href='http://cgit.adnoto.dev/chango.git/commit/?id=a564f44350afc4823b9ff6eb14c56e8793ed4b31'/>
<id>urn:sha1:a564f44350afc4823b9ff6eb14c56e8793ed4b31</id>
<content type='text'>
</content>
</entry>
<entry>
<title>Refs #32446 -- Removed SERIALIZE test database setting per deprecation timeline.</title>
<updated>2023-01-17T10:49:15Z</updated>
<author>
<name>Mariusz Felisiak</name>
<email>felisiak.mariusz@gmail.com</email>
</author>
<published>2023-01-06T08:28:25Z</published>
<link rel='alternate' type='text/html' href='http://cgit.adnoto.dev/chango.git/commit/?id=6c0539ed7c7a1ddeaac3ff91622ebf7a8c8442b9'/>
<id>urn:sha1:6c0539ed7c7a1ddeaac3ff91622ebf7a8c8442b9</id>
<content type='text'>
</content>
</entry>
</feed>
