#24949: Force to_field and probably other fields to unicode during migration
deconstruction
----------------------------+------------------------------------
     Reporter:  MarkusH     |                    Owner:  nobody
         Type:  Bug         |                   Status:  new
    Component:  Migrations  |                  Version:  1.7
     Severity:  Normal      |               Resolution:
     Keywords:              |             Triage Stage:  Accepted
    Has patch:  0           |      Needs documentation:  0
  Needs tests:  0           |  Patch needs improvement:  0
Easy pickings:  0           |                    UI/UX:  0
----------------------------+------------------------------------

Comment (by patrys):

 It's also the case if your app does not have an `AppConfig` file and your
 `INSTALLED_APPS` is a list of byte strings.

 As I've noted in #25906, I'm not sure working around problems like this at
 Django level is worth it. It will add a lot of seemingly no-op code that
 in edge cases could silently cover entire classes of unrelated problems.

 I think it would be a sane thing for Django to warn about things being the
 wrong type and do nothing about it. Affected apps and projects will
 continue to work in Python 2 and fail in Python 3 but they do that already
 (they may not know or care). A warning should give enough information to
 fix the problem (or file a bug with app's upstream).

 I was affected and it took me a couple of months to find out. Our entire
 test suite passed with flying colours and things only broke when squashing
 migrations. With a proper validator warning it becomes a five minute fix.

--
Ticket URL: <https://code.djangoproject.com/ticket/24949#comment:5>
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 django-updates+unsubscr...@googlegroups.com.
To post to this group, send email to django-updates@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-updates/065.ee243ee3af2642953aa6cdd55beb2b64%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to