Groups keyboard shortcuts have been updated
Dismiss
See shortcuts

[Django] #26151: Refactor MigrationWriter

7 views
Skip to first unread message

Django

unread,
Jan 28, 2016, 10:22:39 AM1/28/16
to django-...@googlegroups.com
#26151: Refactor MigrationWriter
--------------------------------------+--------------------
Reporter: yoongkang | Owner: nobody
Type: Cleanup/optimization | Status: new
Component: Migrations | Version: master
Severity: Normal | Keywords:
Triage Stage: Unreviewed | Has patch: 0
Easy pickings: 0 | UI/UX: 0
--------------------------------------+--------------------
The serializer() method in MigrationWriter has a McCabe Cyclomatic
Complexity of 50, one of the highest in the entire Django code base.

The serialization logic should be in different Serializer classes.
MigrationWriter.serialize() should call a Serializer Factory to obtain the
correct Serializer for the value passed in.

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

Django

unread,
Jan 28, 2016, 12:51:48 PM1/28/16
to django-...@googlegroups.com
#26151: Refactor MigrationWriter.serialize()
--------------------------------------+------------------------------------

Reporter: yoongkang | Owner: nobody
Type: Cleanup/optimization | Status: new
Component: Migrations | 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 timgraham):

* needs_better_patch: => 0
* needs_tests: => 0
* needs_docs: => 0
* has_patch: 0 => 1
* stage: Unreviewed => Accepted


Comment:

[https://github.com/django/django/pull/6059 PR]

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

Django

unread,
Jan 28, 2016, 6:08:39 PM1/28/16
to django-...@googlegroups.com
#26151: Refactor MigrationWriter.serialize()
--------------------------------------+------------------------------------

Reporter: yoongkang | Owner: nobody
Type: Cleanup/optimization | Status: new
Component: Migrations | 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
--------------------------------------+------------------------------------

Comment (by MarkusH):

Looks good on the first glimpse :) . I'll need a bit more time to actually
look into it.

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

Django

unread,
Jan 28, 2016, 9:47:49 PM1/28/16
to django-...@googlegroups.com
#26151: Refactor MigrationWriter.serialize()
-------------------------------------+-------------------------------------
Reporter: yoongkang | Owner: yoongkang
Type: | Status: assigned
Cleanup/optimization |
Component: Migrations | 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 yoongkang):

* owner: nobody => yoongkang
* status: new => assigned


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

Django

unread,
Jan 29, 2016, 8:07:52 AM1/29/16
to django-...@googlegroups.com
#26151: Refactor MigrationWriter.serialize()
-------------------------------------+-------------------------------------
Reporter: yoongkang | Owner: yoongkang
Type: | Status: assigned
Cleanup/optimization |
Component: Migrations | 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
-------------------------------------+-------------------------------------

Comment (by MarkusH):

Since a discussion on #django-dev came up earlier I posted to the
developer mailing list to get other people's input:
https://groups.google.com/forum/#!topic/django-developers/yGKl7ZkLac4

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

Django

unread,
Feb 25, 2016, 2:06:51 PM2/25/16
to django-...@googlegroups.com
#26151: Refactor MigrationWriter.serialize()
-------------------------------------+-------------------------------------
Reporter: yoongkang | Owner: yoongkang
Type: | Status: closed
Cleanup/optimization |
Component: Migrations | 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 Tim Graham <timograham@…>):

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


Comment:

In [changeset:"4b1529e2cbee697e7e772b05ad5038edef22f38d" 4b1529e2]:
{{{
#!CommitTicketReference repository=""
revision="4b1529e2cbee697e7e772b05ad5038edef22f38d"
Fixed #26151 -- Refactored MigrationWriter.serialize()

Thanks Markus Holtermann for review.
}}}

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

Django

unread,
May 13, 2025, 8:42:30 PMMay 13
to django-...@googlegroups.com
#26151: Refactor MigrationWriter.serialize()
-------------------------------------+-------------------------------------
Reporter: Yoong Kang Lim | Owner: Yoong
Type: | Kang Lim
Cleanup/optimization | Status: closed
Component: Migrations | Version: dev
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
-------------------------------------+-------------------------------------
Comment (by nessita <124304+nessita@…>):

In [changeset:"0f94ecd49d1af92d47bfa690ca39d4d71b5091cb" 0f94ecd4]:
{{{#!CommitTicketReference repository=""
revision="0f94ecd49d1af92d47bfa690ca39d4d71b5091cb"
Refs #36383, #26151 -- Corrected spelling of DeconstructibleSerializer.

"Deconstructible" is the spelling that Django has settled on, such as
for `django.utils.deconstruct`. This commit normalizes a
previously-inconsistent class to match the rest of the codebase.
}}}
--
Ticket URL: <https://code.djangoproject.com/ticket/26151#comment:6>
Reply all
Reply to author
Forward
0 new messages