[Django] #24566: MigrationWriter doesn't serialize timedelta

5 views
Skip to first unread message

Django

unread,
Apr 2, 2015, 10:27:25 AM4/2/15
to django-...@googlegroups.com
#24566: MigrationWriter doesn't serialize timedelta
----------------------------+--------------------
Reporter: knbk | Owner: nobody
Type: Bug | Status: new
Component: Migrations | Version: 1.8
Severity: Normal | Keywords:
Triage Stage: Unreviewed | Has patch: 0
Easy pickings: 1 | UI/UX: 0
----------------------------+--------------------
`makemigrations` fails when using a `timedelta` object as a default value
for a model field.

As the docs explicitly state that the new `DurationField` is "modeled in
Python by `timedelta`", I'm categorizing this as a bug in 1.8 rather than
a new feature.

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

Django

unread,
Apr 2, 2015, 10:31:57 AM4/2/15
to django-...@googlegroups.com
#24566: MigrationWriter doesn't serialize timedelta
---------------------------------+------------------------------------

Reporter: knbk | Owner: nobody
Type: Bug | Status: new
Component: Migrations | Version: 1.8
Severity: Release blocker | Resolution:
Keywords: | Triage Stage: Accepted
Has patch: 0 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0

Easy pickings: 1 | UI/UX: 0
---------------------------------+------------------------------------
Changes (by timgraham):

* needs_better_patch: => 0
* stage: Unreviewed => Accepted
* severity: Normal => Release blocker
* needs_tests: => 0
* needs_docs: => 0


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

Django

unread,
Apr 2, 2015, 10:51:57 AM4/2/15
to django-...@googlegroups.com
#24566: MigrationWriter doesn't serialize timedelta
---------------------------------+------------------------------------

Reporter: knbk | Owner: nobody
Type: Bug | Status: new
Component: Migrations | Version: 1.8
Severity: Release blocker | Resolution:
Keywords: | Triage Stage: Accepted
Has patch: 1 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0

Easy pickings: 1 | UI/UX: 0
---------------------------------+------------------------------------
Changes (by bmispelon):

* has_patch: 0 => 1


Comment:

PR here: https://github.com/django/django/pull/4435

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

Django

unread,
Apr 2, 2015, 11:23:59 AM4/2/15
to django-...@googlegroups.com
#24566: MigrationWriter doesn't serialize timedelta
-------------------------------------+-------------------------------------

Reporter: knbk | Owner: nobody
Type: Bug | Status: new
Component: Migrations | Version: 1.8
Severity: Release blocker | Resolution:
Keywords: | Triage Stage: Ready for
| checkin

Has patch: 1 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0

Easy pickings: 1 | UI/UX: 0
-------------------------------------+-------------------------------------
Changes (by timgraham):

* stage: Accepted => Ready for checkin


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

Django

unread,
Apr 2, 2015, 11:38:46 AM4/2/15
to django-...@googlegroups.com
#24566: MigrationWriter doesn't serialize timedelta
-------------------------------------+-------------------------------------
Reporter: knbk | Owner: nobody
Type: Bug | Status: closed
Component: Migrations | Version: 1.8
Severity: Release blocker | Resolution: fixed

Keywords: | Triage Stage: Ready for
| checkin
Has patch: 1 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0

Easy pickings: 1 | UI/UX: 0
-------------------------------------+-------------------------------------
Changes (by Baptiste Mispelon <bmispelon@…>):

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


Comment:

In [changeset:"30a3c2f74c030449d3a8b9f02ab6744874712e54" 30a3c2f]:
{{{
#!CommitTicketReference repository=""
revision="30a3c2f74c030449d3a8b9f02ab6744874712e54"
Fixed #24566 -- Added support for serializing timedelta

Thanks to knbk for the report.
}}}

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

Django

unread,
Apr 2, 2015, 11:41:57 AM4/2/15
to django-...@googlegroups.com
#24566: MigrationWriter doesn't serialize timedelta
-------------------------------------+-------------------------------------
Reporter: knbk | Owner: nobody
Type: Bug | Status: closed
Component: Migrations | Version: 1.8

Severity: Release blocker | Resolution: fixed
Keywords: | Triage Stage: Ready for
| checkin
Has patch: 1 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0

Easy pickings: 1 | UI/UX: 0
-------------------------------------+-------------------------------------

Comment (by Baptiste Mispelon <bmispelon@…>):

In [changeset:"09188b50247fe3efa1d22cd3f9971bf4589e7cbe" 09188b5]:
{{{
#!CommitTicketReference repository=""
revision="09188b50247fe3efa1d22cd3f9971bf4589e7cbe"
[1.8.x] Fixed #24566 -- Added support for serializing timedelta

Thanks to knbk for the report.

Backport of 30a3c2f74c030449d3a8b9f02ab6744874712e54 from master.
}}}

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

Reply all
Reply to author
Forward
0 new messages