[Django] #31477: Simplify signature of `DatabaseOperations.execute_sql_flush()`

16 views
Skip to first unread message

Django

unread,
Apr 17, 2020, 6:33:17 PM4/17/20
to django-...@googlegroups.com
#31477: Simplify signature of `DatabaseOperations.execute_sql_flush()`
------------------------------------------------+------------------------
Reporter: Jon Dufresne | Owner: nobody
Type: Cleanup/optimization | Status: new
Component: Uncategorized | Version: master
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 |
------------------------------------------------+------------------------
The current signature is:

{{{
def execute_sql_flush(self, using, sql_list):
}}}

The `using` argument can be dropped and inferred by the calling instance:
`self.connection.alias`.

{{{
def execute_sql_flush(self, sql_list):
}}}

Some internal ises of this method are already doing:

{{{
connection.ops.execute_sql_flush(connection.alias, sql_flush)
}}}

--
Ticket URL: <https://code.djangoproject.com/ticket/31477>
Django <https://code.djangoproject.com/>
The Web framework for perfectionists with deadlines.

Django

unread,
Apr 17, 2020, 6:36:25 PM4/17/20
to django-...@googlegroups.com
#31477: Simplify signature of `DatabaseOperations.execute_sql_flush()`
-------------------------------------+-------------------------------------

Reporter: Jon Dufresne | Owner: nobody
Type: | Status: new
Cleanup/optimization |
Component: Uncategorized | Version: master
Severity: Normal | Resolution:
Keywords: | Triage Stage:
| Unreviewed
Has patch: 1 | Needs documentation: 0

Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
-------------------------------------+-------------------------------------
Changes (by Jon Dufresne):

* has_patch: 0 => 1


Comment:

https://github.com/django/django/pull/12741

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

Django

unread,
Apr 17, 2020, 7:21:44 PM4/17/20
to django-...@googlegroups.com
#31477: Simplify signature of `DatabaseOperations.execute_sql_flush()`
--------------------------------------+------------------------------------

Reporter: Jon Dufresne | Owner: nobody
Type: Cleanup/optimization | Status: new
Component: Uncategorized | Version: master
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 Simon Charette):

* stage: Unreviewed => Accepted


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

Django

unread,
Apr 20, 2020, 1:49:49 AM4/20/20
to django-...@googlegroups.com
#31477: Simplify signature of `DatabaseOperations.execute_sql_flush()`
--------------------------------------+------------------------------------

Reporter: Jon Dufresne | Owner: nobody
Type: Cleanup/optimization | Status: closed
Component: Uncategorized | Version: master
Severity: Normal | Resolution: fixed
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 GitHub <noreply@…>):

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


Comment:

In [changeset:"5673d4b10240b1b00bdf060fb7ac6bef858f38a3" 5673d4b]:
{{{
#!CommitTicketReference repository=""
revision="5673d4b10240b1b00bdf060fb7ac6bef858f38a3"
Fixed #31477 -- Removed "using" argument from
DatabaseOperations.execute_sql_flush().
}}}

--
Ticket URL: <https://code.djangoproject.com/ticket/31477#comment:3>

Reply all
Reply to author
Forward
0 new messages