Skip to content

Commit 292088c

Browse files
committed
Remove experimental label from multi-db support
It works, is in use, and there are no known issues, so let's make it stable.
1 parent 0a8473e commit 292088c

File tree

3 files changed

+16
-20
lines changed

3 files changed

+16
-20
lines changed

docs/changelog.rst

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,14 @@
11
Changelog
22
=========
33

4+
v4.12.0 (Not released yet)
5+
--------------------------
6+
7+
Improvements
8+
^^^^^^^^^^^^
9+
10+
* The :ref:`multiple databases <multi-db>` support added in v4.3.0 is no longer considered experimental.
11+
412
v4.11.1 (2025-04-03)
513
--------------------
614

docs/database.rst

Lines changed: 7 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -37,8 +37,8 @@ documentation <pytest:scoped-marking>` for detail::
3737
assert me.is_superuser
3838

3939

40-
By default ``pytest-django`` will set up the Django databases the
41-
first time a test needs them. Once setup, the database is cached to be
40+
By default ``pytest-django`` will set up Django databases the
41+
first time a test needs them. Once setup, a database is cached to be
4242
used for all subsequent tests and rolls back transactions, to isolate
4343
tests from each other. This is the same way the standard Django
4444
:class:`~django.test.TestCase` uses the database. However
@@ -67,22 +67,16 @@ Tests requiring multiple databases
6767

6868
.. versionadded:: 4.3
6969

70-
.. caution::
71-
72-
This support is **experimental** and is subject to change without
73-
deprecation. We are still figuring out the best way to expose this
74-
functionality. If you are using this successfully or unsuccessfully,
75-
`let us know <https://github.com/pytest-dev/pytest-django/issues/924>`_!
76-
77-
``pytest-django`` has experimental support for multi-database configurations.
78-
Currently ``pytest-django`` does not specifically support Django's
79-
multi-database support, using the ``databases`` argument to the
80-
:func:`django_db <pytest.mark.django_db>` mark::
70+
``pytest-django`` has support for multi-database configurations using the
71+
``databases`` argument to the :func:`django_db <pytest.mark.django_db>` mark::
8172

8273
@pytest.mark.django_db(databases=['default', 'other'])
8374
def test_spam():
8475
assert MyModel.objects.using('other').count() == 0
8576

77+
If you don't specify ``databases``, only the default database is requested.
78+
To request all databases, you may use the shortcut ``'__all__'``.
79+
8680
For details see :attr:`django.test.TransactionTestCase.databases` and
8781
:attr:`django.test.TestCase.databases`.
8882

docs/helpers.rst

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -59,16 +59,10 @@ dynamically in a hook or fixture.
5959

6060
:type databases: Iterable[str] | str | None
6161
:param databases:
62-
.. caution::
63-
64-
This argument is **experimental** and is subject to change without
65-
deprecation. We are still figuring out the best way to expose this
66-
functionality. If you are using this successfully or unsuccessfully,
67-
`let us know <https://github.com/pytest-dev/pytest-django/issues/924>`_!
6862

6963
The ``databases`` argument defines which databases in a multi-database
7064
configuration will be set up and may be used by the test. Defaults to
71-
only the ``default`` database. The special value ``"__all__"`` may be use
65+
only the ``default`` database. The special value ``"__all__"`` may be used
7266
to specify all configured databases.
7367
For details see :attr:`django.test.TransactionTestCase.databases` and
7468
:attr:`django.test.TestCase.databases`.

0 commit comments

Comments
 (0)