﻿id	summary	reporter	owner	description	type	status	component	version	severity	resolution	keywords	cc	stage	has_patch	needs_docs	needs_tests	needs_better_patch	easy	ui_ux
22564	Migrations generated by Python 2 do not work in Python 3 due to b'' prefix on strings	Tim Graham	Claude Paroz	"I think this is an issue if we expect apps to be able to support both Python 2 and 3.

{{{
  File ""/home/tim/code/mysite/polls/migrations/0001_initial.py"", line 7, in <module>
    class Migration(migrations.Migration):
  File ""/home/tim/code/mysite/polls/migrations/0001_initial.py"", line 28, in Migration
    (b'poll', models.ForeignKey(to=b'polls.Poll', to_field='id')),
  File ""/home/tim/code/django/django/db/models/fields/related.py"", line 1589, in __init__
    assert isinstance(to, six.string_types), ""%s(%r) is invalid. First parameter to ForeignKey must be either a model, a model name, or the string %r"" % (self.__class__.__name__, to, RECURSIVE_RELATIONSHIP_CONSTANT)
AssertionError: ForeignKey(b'polls.Poll') is invalid. First parameter to ForeignKey must be either a model, a model name, or the string 'self'
}}}

`six.string_types` is `str` on Python 3, not `bytes`."	Bug	closed	Migrations	1.7-beta-2	Release blocker	fixed		loic@…	Ready for checkin	1	0	0	0	0	0
