#23982: Clarify how to properly support both Python 2 and 3 for third-party apps
with migrations
--------------------------------------+------------------------------------
Reporter: spookylukey | Owner: nobody
Type: Cleanup/optimization | Status: new
Component: Documentation | 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 carljm):
I'm not convinced that playing whack-a-mole with conversions of specific
model/field properties makes sense; I think you were right Tim to resist
that approach in #23455. It's not clear that auto-converting _any_ such
properties in migrations is safe: it introduces an unnecessary difference
in behavior between the migration model state and the real models, and
it's entirely possible that users will have code, particularly in Python
3, which is called from migrations in one way or another and which breaks
if it gets a text string instead of a byte string.
And even if we don't care about that problem, it's still a game of
whack-a-mole that doesn't end and only serves to longer conceal the real
underlying problem, which will only be fixed by `unicode_literals`.
--
Ticket URL: <https://code.djangoproject.com/ticket/23982#comment:7>
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/069.6b8533225bdcdb7748206780cf3013e8%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.