[Django] #37045: Deprecate and rename django.db.transaction.savepoint

18 views
Skip to first unread message

Django

unread,
Apr 18, 2026, 4:54:06 AMApr 18
to django-...@googlegroups.com
#37045: Deprecate and rename django.db.transaction.savepoint
-------------------------------------+-------------------------------------
Reporter: Lily | Type: New
| feature
Status: new | Component: Database
| layer (models, ORM)
Version: | Severity: Normal
Keywords: | Triage Stage:
| Unreviewed
Has patch: 0 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
-------------------------------------+-------------------------------------
I proposed this in https://github.com/django/new-features/issues/138 and
it is now accepted.

Rename `savepoint` to `savepoint_create` and add a new `savepoint`
function as a deprecated alias or wrapper for `savepoint_create`. Once the
deprecation period has ended remove `savepoint`. This will free the name
for use for a higher-level `savepoint` context manager.
--
Ticket URL: <https://code.djangoproject.com/ticket/37045>
Django <https://code.djangoproject.com/>
The Web framework for perfectionists with deadlines.

Django

unread,
Apr 18, 2026, 4:54:22 AMApr 18
to django-...@googlegroups.com
#37045: Deprecate and rename django.db.transaction.savepoint
-------------------------------------+-------------------------------------
Reporter: Lily | Owner: (none)
Type: New feature | Status: new
Component: Database layer | Version:
(models, ORM) |
Severity: Normal | Resolution:
Keywords: | Triage Stage: Accepted
Has patch: 0 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
-------------------------------------+-------------------------------------
Changes (by Lily):

* stage: Unreviewed => Accepted

--
Ticket URL: <https://code.djangoproject.com/ticket/37045#comment:1>

Django

unread,
Apr 18, 2026, 4:54:49 AMApr 18
to django-...@googlegroups.com
#37045: Deprecate and rename django.db.transaction.savepoint
-------------------------------------+-------------------------------------
Reporter: Lily | Owner: Samuel
| Searles-Bryant
Type: New feature | Status: assigned
Component: Database layer | Version:
(models, ORM) |
Severity: Normal | Resolution:
Keywords: | Triage Stage: Accepted
Has patch: 0 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
-------------------------------------+-------------------------------------
Changes (by Samuel Searles-Bryant):

* owner: (none) => Samuel Searles-Bryant
* status: new => assigned

--
Ticket URL: <https://code.djangoproject.com/ticket/37045#comment:2>

Django

unread,
Apr 18, 2026, 5:43:56 AMApr 18
to django-...@googlegroups.com
#37045: Deprecate and rename django.db.transaction.savepoint
-------------------------------------+-------------------------------------
Reporter: Lily | Owner: Samuel
| Searles-Bryant
Type: New feature | Status: assigned
Component: Database layer | Version:
(models, ORM) |
Severity: Normal | Resolution:
Keywords: | Triage Stage: Accepted
Has patch: 0 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
-------------------------------------+-------------------------------------
Comment (by Samuel Searles-Bryant):

`BaseDatabaseWrapper` also has a `savepoint` method (and a private
`_savepoint`). We ''could'' also rename those, but that's not necessary.
--
Ticket URL: <https://code.djangoproject.com/ticket/37045#comment:3>

Django

unread,
Apr 18, 2026, 6:22:19 AMApr 18
to django-...@googlegroups.com
#37045: Deprecate and rename django.db.transaction.savepoint
-------------------------------------+-------------------------------------
Reporter: Lily | Owner: Samuel
| Searles-Bryant
Type: New feature | Status: assigned
Component: Database layer | Version:
(models, ORM) |
Severity: Normal | Resolution:
Keywords: | Triage Stage: Accepted
Has patch: 1 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
-------------------------------------+-------------------------------------
Changes (by Samuel Searles-Bryant):

* has_patch: 0 => 1

--
Ticket URL: <https://code.djangoproject.com/ticket/37045#comment:4>

Django

unread,
Apr 18, 2026, 10:07:59 AMApr 18
to django-...@googlegroups.com
#37045: Deprecate and rename django.db.transaction.savepoint
-------------------------------------+-------------------------------------
Reporter: Lily | Owner: Samuel
| Searles-Bryant
Type: New feature | Status: assigned
Component: Database layer | Version:
(models, ORM) |
Severity: Normal | Resolution:
Keywords: | Triage Stage: Ready for
| checkin
Has patch: 1 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
-------------------------------------+-------------------------------------
Changes (by Lily):

* stage: Accepted => Ready for checkin

--
Ticket URL: <https://code.djangoproject.com/ticket/37045#comment:5>

Django

unread,
Apr 21, 2026, 8:30:32 AMApr 21
to django-...@googlegroups.com
#37045: Deprecate and rename django.db.transaction.savepoint
-------------------------------------+-------------------------------------
Reporter: Lily | Owner: Samuel
| Searles-Bryant
Type: New feature | Status: assigned
Component: Database layer | Version:
(models, ORM) |
Severity: Normal | Resolution:
Keywords: | Triage Stage: Accepted
Has patch: 1 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 1
Easy pickings: 0 | UI/UX: 0
-------------------------------------+-------------------------------------
Changes (by Mariusz Felisiak):

* needs_better_patch: 0 => 1
* stage: Ready for checkin => Accepted

--
Ticket URL: <https://code.djangoproject.com/ticket/37045#comment:6>

Django

unread,
May 18, 2026, 4:53:05 AM (3 days ago) May 18
to django-...@googlegroups.com
#37045: Deprecate and rename django.db.transaction.savepoint
-------------------------------------+-------------------------------------
Reporter: Lily | Owner: Samuel
| Searles-Bryant
Type: New feature | Status: assigned
Component: Database layer | Version:
(models, ORM) |
Severity: Normal | Resolution:
Keywords: | Triage Stage: Accepted
Has patch: 1 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
-------------------------------------+-------------------------------------
Changes (by Lily):

* needs_better_patch: 1 => 0

--
Ticket URL: <https://code.djangoproject.com/ticket/37045#comment:7>

Django

unread,
May 18, 2026, 4:53:19 AM (3 days ago) May 18
to django-...@googlegroups.com
#37045: Deprecate and rename django.db.transaction.savepoint
-------------------------------------+-------------------------------------
Reporter: Lily | Owner: Samuel
| Searles-Bryant
Type: New feature | Status: assigned
Component: Database layer | Version:
(models, ORM) |
Severity: Normal | Resolution:
Keywords: | Triage Stage: Ready for
| checkin
Has patch: 1 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
-------------------------------------+-------------------------------------
Changes (by Lily):

* stage: Accepted => Ready for checkin

--
Ticket URL: <https://code.djangoproject.com/ticket/37045#comment:8>

Django

unread,
May 20, 2026, 12:16:41 PM (22 hours ago) May 20
to django-...@googlegroups.com
#37045: Deprecate and rename django.db.transaction.savepoint
-------------------------------------+-------------------------------------
Reporter: Lily | Owner: Samuel
| Searles-Bryant
Type: New feature | Status: closed
Component: Database layer | Version:
(models, ORM) |
Severity: Normal | Resolution: fixed
Keywords: | Triage Stage: Ready for
| checkin
Has patch: 1 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
-------------------------------------+-------------------------------------
Changes (by Jacob Walls <jacobtylerwalls@…>):

* resolution: => fixed
* status: assigned => closed

Comment:

In [changeset:"20960df455fffd73d556a5ed92cdf6832c23e65f" 20960df]:
{{{#!CommitTicketReference repository=""
revision="20960df455fffd73d556a5ed92cdf6832c23e65f"
Fixed #37045 -- Renamed savepoint() to savepoint_create().

This makes the name consistent with the `savepoint_commit` and
`savepoint_rollback` functions. The previous name is maintained as a
deprecated alias.

This also frees up the `savepoint` name, which would allow the context
manager from `django-subatomic` to be included in Django.

Co-authored-by: Lily <co...@lilyf.org>
}}}
--
Ticket URL: <https://code.djangoproject.com/ticket/37045#comment:9>
Reply all
Reply to author
Forward
0 new messages