summaryrefslogtreecommitdiff
path: root/docs
diff options
context:
space:
mode:
Diffstat (limited to 'docs')
-rw-r--r--docs/internals/deprecation.txt3
-rw-r--r--docs/releases/6.1.txt3
-rw-r--r--docs/topics/db/transactions.txt15
3 files changed, 19 insertions, 2 deletions
diff --git a/docs/internals/deprecation.txt b/docs/internals/deprecation.txt
index 1e6415e484..2cb6a15f2f 100644
--- a/docs/internals/deprecation.txt
+++ b/docs/internals/deprecation.txt
@@ -126,6 +126,9 @@ details on these changes.
* Support for overriding ``ModelAdmin.get_action_choices()`` without the new
``action_location`` parameter will be removed.
+* The ``django.db.transaction.savepoint()`` alias to
+ ``django.db.transaction.savepoint_create()`` will be removed.
+
.. _deprecation-removed-in-6.1:
6.1
diff --git a/docs/releases/6.1.txt b/docs/releases/6.1.txt
index 12596d4fe6..b041bbdda0 100644
--- a/docs/releases/6.1.txt
+++ b/docs/releases/6.1.txt
@@ -791,6 +791,9 @@ Miscellaneous
* Overriding ``ModelAdmin.get_action_choices()`` without the new
``action_location`` parameter is deprecated.
+* ``django.db.transaction.savepoint()`` is deprecated in favor of
+ ``django.db.transaction.savepoint_create()``.
+
Features removed in 6.1
=======================
diff --git a/docs/topics/db/transactions.txt b/docs/topics/db/transactions.txt
index c44c8c6ee7..4733a95bf8 100644
--- a/docs/topics/db/transactions.txt
+++ b/docs/topics/db/transactions.txt
@@ -547,6 +547,17 @@ Savepoints are controlled by three functions in :mod:`django.db.transaction`:
.. function:: savepoint(using=None)
+ .. deprecated:: 6.1
+
+ ``savepoint`` has been renamed to ``savepoint_create``.
+
+ Creates a new savepoint. This marks a point in the transaction that is
+ known to be in a "good" state. Returns the savepoint ID (``sid``).
+
+.. function:: savepoint_create(using=None)
+
+ .. versionadded:: 6.1
+
Creates a new savepoint. This marks a point in the transaction that is
known to be in a "good" state. Returns the savepoint ID (``sid``).
@@ -579,7 +590,7 @@ The following example demonstrates the use of savepoints::
a.save()
# transaction now contains a.save()
- sid = transaction.savepoint()
+ sid = transaction.savepoint_create()
b.save()
# transaction now contains a.save() and b.save()
@@ -692,7 +703,7 @@ you can roll back the single offending operation, rather than the entire
transaction. For example::
a.save() # Succeeds, and never undone by savepoint rollback
- sid = transaction.savepoint()
+ sid = transaction.savepoint_create()
try:
b.save() # Could throw exception
transaction.savepoint_commit(sid)