﻿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
24701	Migration created on python2.7 fails to load on python 3 due to models.Manager	Reto Aebersold	Markus Holtermann	"If I create a migration on python 2.7 containing a model referencing a ''model.Manager'' with {{{use_in_migrations = True}}} the following line is added in the migration file:
{{{
managers=[
                (b'objects', accounts.models.UserManager()),
            ],
}}}

If I try to load this file under python 3.4 I get the error {{{TypeError: attribute name must be string, not 'bytes}}} from [https://github.com/django/django/blob/1.8/django/db/models/manager.py#L169 this line].

The problem is that the string 'objects' is prefixed with 'b' on [https://github.com/django/django/blob/1.8/django/db/migrations/writer.py#L340 this line].
I think this is maybe a bug as all other attribute names are just plain strings. 
"	Bug	closed	Migrations	1.8	Normal	fixed			Ready for checkin	1	0	0	0	0	0
