Opened 7 weeks ago

Closed 2 weeks ago

#37045 closed New feature (fixed)

Deprecate and rename django.db.transaction.savepoint

Reported by: Lily Owned by: Samuel Searles-Bryant
Component: Database layer (models, ORM) Version:
Severity: Normal Keywords:
Cc: Triage Stage: Ready for checkin
Has patch: yes Needs documentation: no
Needs tests: no Patch needs improvement: no
Easy pickings: no UI/UX: no

Description

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.

Change History (9)

comment:1 by Lily, 7 weeks ago

Triage Stage: UnreviewedAccepted

comment:2 by Samuel Searles-Bryant, 7 weeks ago

Owner: set to Samuel Searles-Bryant
Status: newassigned

comment:3 by Samuel Searles-Bryant, 7 weeks ago

BaseDatabaseWrapper also has a savepoint method (and a private _savepoint). We could also rename those, but that's not necessary.

comment:4 by Samuel Searles-Bryant, 7 weeks ago

Has patch: set

comment:5 by Lily, 7 weeks ago

Triage Stage: AcceptedReady for checkin

comment:6 by Mariusz Felisiak, 6 weeks ago

Patch needs improvement: set
Triage Stage: Ready for checkinAccepted

comment:7 by Lily, 3 weeks ago

Patch needs improvement: unset

comment:8 by Lily, 3 weeks ago

Triage Stage: AcceptedReady for checkin

comment:9 by Jacob Walls <jacobtylerwalls@…>, 2 weeks ago

Resolution: fixed
Status: assignedclosed

In 20960df:

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 <code@…>

Note: See TracTickets for help on using tickets.
Back to Top