#23226: Migrations generated by python2 break when using python3 to migrate ---------------------------------+------------------------------------ Reporter: morshed.nader@… | Owner: nobody Type: Bug | Status: new Component: Migrations | Version: 1.7-rc-2 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 ---------------------------------+------------------------------------
Comment (by charettes): I guess we didn't hit this before because most of the code bases that intent to support both Python 2 and Python 3 use unicode literals (`from __future__ import unicode_literals`) which would have made the `unique_together` fields `unicode` instances on Python 2 which would have been serialized without the problematic `b` prefix. Can you confirm your migration was generated on Python 2 from a model file without the `from __future__ import unicode_literals` import? I'm unsure if we should document this as a caveat of make sure that all string defined at the model module level on Python2 are always converted to `unicode`. -- Ticket URL: <https://code.djangoproject.com/ticket/23226#comment:4> 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/081.9a9e5914c24a2c008d6694e86f216b5e%40djangoproject.com. For more options, visit https://groups.google.com/d/optout.