Hi all,

Ticket: https://code.djangoproject.com/ticket/26151
PR: https://github.com/django/django/pull/6059

This pull request suggests to rewrite the serialization in the 
MigrationWriter to dedicated classes which are then used by a factory 
function. The reasoning behind this is to reduce the complexity of the 
current serialize() function (according to the reporter McCabe Cyclomatic 
Complexity of 50).

The benefit that comes with the new approach -- yet not implemented and 
would be part of a separate issue -- is a dynamic way to introduce new 
serialization options for data types the current MigrationWriter does not 
support. While neither Simon nor Marten nor I could think of any such case, 
we'd like to get other peoples input.

In case we don't come up with cases where the current MigrationWriter 
fails, the discussion should be made if the added overhead is worth it. 
While I find the new code easier to grasp if I'd see it the first time, I'm 
happy to stick to the current implementation.

Cheers,

/Markus

-- 
You received this message because you are subscribed to the Google Groups 
"Django developers  (Contributions to Django itself)" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to django-developers+unsubscr...@googlegroups.com.
To post to this group, send email to django-developers@googlegroups.com.
Visit this group at https://groups.google.com/group/django-developers.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-developers/b0626c9e-e21f-48aa-bbf1-4a05a39726f3%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to