#22983: Invalid import in a squashed migration of migrations having RunPython
---------------------------------+----------------------------------------
     Reporter:  riklaunim        |                    Owner:  andrewgodwin
         Type:  Bug              |                   Status:  assigned
    Component:  Migrations       |                  Version:  1.7-rc-1
     Severity:  Release blocker  |               Resolution:
     Keywords:                   |             Triage Stage:  Accepted
    Has patch:  0                |      Needs documentation:  0
  Needs tests:  0                |  Patch needs improvement:  0
Easy pickings:  0                |                    UI/UX:  0
---------------------------------+----------------------------------------
Changes (by andrewgodwin):

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


Comment:

 Ah, this is a tricky one; we're not able to squash the custom functions,
 as they're not serialisable. This is possibly why I had initially planned
 RunPython to take strings rather than function objects.

 I don't want to make squash hard fail on this kind of error, though, as
 the fix from the result to a working version is easy (just copy the
 functions over), whereas squashing manually is almost impossible to do
 quickly or easily. I think I'll make it leave the function references in
 place, but remove the valid imports and have squashmigrations output that
 you need to copy the functions over.

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

-- 
You received this message because you are subscribed to the Google Groups 
"Django updates" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-updates/067.779f0b4eed8fd563d4d4cde970f4021c%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to