[Django] #31979: Make new setup_databases() argument time_keeper optional

11 views
Skip to first unread message

Django

unread,
Sep 2, 2020, 8:04:26 PM9/2/20
to django-...@googlegroups.com
#31979: Make new setup_databases() argument time_keeper optional
------------------------------------------------+------------------------
Reporter: Jon Dufresne | Owner: nobody
Type: Cleanup/optimization | Status: new
Component: Testing framework | 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 argument was added in commit 61a0ba43cfd4ff66f51a9d73dcd8ed6f6a6d9915
as work on ticket #31811.

`setup_databases()` is used by 3rd party tools. As well, the signature is
documented:
https://docs.djangoproject.com/en/3.1/topics/testing/advanced/#django.test.utils.setup_databases

For backwards compatibility, make the new argument optional. If not
provided, a `NullTimeKeeper` can be instantiated so no other None-checks
will be required deeper in the stack.

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

Django

unread,
Sep 2, 2020, 8:06:03 PM9/2/20
to django-...@googlegroups.com
#31979: Make new setup_databases() argument time_keeper optional
-------------------------------------+-------------------------------------

Reporter: Jon Dufresne | Owner: nobody
Type: | Status: new
Cleanup/optimization |

Component: Testing framework | 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/13381

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

Django

unread,
Sep 3, 2020, 1:11:02 AM9/3/20
to django-...@googlegroups.com
#31979: Make new setup_databases() argument time_keeper optional
-------------------------------------+-------------------------------------
Reporter: Jon Dufresne | Owner: Jon
Type: | Dufresne
Cleanup/optimization | Status: assigned

Component: Testing framework | 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 felixxm):

* cc: Ahmad A. Hussein (added)
* owner: nobody => Jon Dufresne
* status: new => assigned
* stage: Unreviewed => Accepted


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

Django

unread,
Sep 3, 2020, 3:48:52 AM9/3/20
to django-...@googlegroups.com
#31979: Make new setup_databases() argument time_keeper optional
-------------------------------------+-------------------------------------
Reporter: Jon Dufresne | Owner: Jon
Type: | Dufresne
Cleanup/optimization | Status: closed

Component: Testing framework | 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: assigned => closed
* resolution: => fixed


Comment:

In [changeset:"0b8871ab6744285943784795ede053839ee009ef" 0b8871a]:
{{{
#!CommitTicketReference repository=""
revision="0b8871ab6744285943784795ede053839ee009ef"
Fixed #31979 -- Made django.test.utils.setup_databases()'s time_keeper
argument optional.
}}}

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

Reply all
Reply to author
Forward
0 new messages