Skip to content

Commit 987c1de

Browse files
committed
feat(django-spanner): Stabilize system tests for Django 5.2 migration
1 parent d44c1b0 commit 987c1de

File tree

5 files changed

+1414
-171
lines changed

5 files changed

+1414
-171
lines changed

packages/django-google-spanner/README.rst

Lines changed: 10 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -41,9 +41,9 @@ In order to use this library, you first need to go through the following steps:
4141
.. _Setup Authentication.: https://googleapis.dev/python/google-api-core/latest/auth.html
4242

4343
This package provides a `3rd-party database backend
44-
<https://docs.djangoproject.com/en/4.2/ref/databases/#using-a-3rd-party-database-backend>`__
44+
<https://docs.djangoproject.com/en/5.2/ref/databases/#using-a-3rd-party-database-backend>`__
4545
for using `Cloud Spanner <https://cloud.google.com/spanner>`__ with the `Django
46-
ORM <https://docs.djangoproject.com/en/4.2/topics/db/>`__. It uses the `Cloud
46+
ORM <https://docs.djangoproject.com/en/5.2/topics/db/>`__. It uses the `Cloud
4747
Spanner Python client library <https://github.com/googleapis/python-spanner>`__
4848
under the hood.
4949

@@ -64,16 +64,13 @@ dependencies.
6464
Supported versions
6565
~~~~~~~~~~~~~~~~~~
6666

67-
The library supports `Django 3.2
68-
<https://docs.djangoproject.com/en/3.2/>`_, and `Django 4.2
69-
<https://docs.djangoproject.com/en/4.2/>`_.
70-
Both versions are long-term support (LTS) releases for the
71-
`Django project<https://www.djangoproject.com/download/#supported-versions>_`.
72-
The minimum required Python version is 3.6.
67+
The library supports `Django 5.2
68+
<https://docs.djangoproject.com/en/5.2/>`_.
69+
The minimum required Python version is 3.10.
7370

7471
.. code:: shell
7572
76-
pip3 install django==3.2
73+
pip3 install django==5.2
7774
7875
7976
Installing the package
@@ -165,16 +162,11 @@ disable this behavior with the RANDOM_ID_GENERATION_ENABLED setting:
165162
Transaction support in autocommit mode
166163
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
167164

168-
Django version 4.2 and higher by default supports transactions in autocommit mode.
165+
Django supports transactions in autocommit mode by default.
169166
A transaction is automatically started if you define an
170-
[atomic block](https://docs.djangoproject.com/en/4.2/topics/db/transactions/#controlling-transactions-explicitly).
167+
`atomic block <https://docs.djangoproject.com/en/5.2/topics/db/transactions/#controlling-transactions-explicitly>`__.
171168

172-
Django version 3.2 and earlier did not support transactions in autocommit mode with Spanner.
173-
You can enable transactions in autocommit mode with Spanner with the
174-
`ALLOW_TRANSACTIONS_IN_AUTO_COMMIT` configuration option.
175-
176-
- To enable transactions in autocommit mode in V3.2, set the flag `ALLOW_TRANSACTIONS_IN_AUTO_COMMIT` to True in your settings.py file.
177-
- To disable transactions in autocommit mode in V4.2, set the flag `ALLOW_TRANSACTIONS_IN_AUTO_COMMIT` to False in your settings.py file.
169+
To disable transactions in autocommit mode, set the flag `ALLOW_TRANSACTIONS_IN_AUTO_COMMIT` to False in your ``settings.py`` file.
178170

179171

180172
Set credentials and project environment variables
@@ -231,7 +223,7 @@ Then visit http://127.0.0.1:8000/admin/
231223
Create and register your first model
232224
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
233225

234-
Please follow the guides in https://docs.djangoproject.com/en/4.2/intro/tutorial02/#creating-models
226+
Please follow the guides in https://docs.djangoproject.com/en/5.2/intro/tutorial02/#creating-models
235227
to create and register the model to the Django’s automatically-generated admin site.
236228

237229
How it works

0 commit comments

Comments
 (0)