﻿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
24735	"""manage.py makemigrations --noinput"" asks for renaming of fields"	Daniel Hahler	nobody	"I am trying to use `./manage.py makemigrations --exit --dry-run --noinput` to detect if there are changes.

Although `--noinput` is specified, it asks about a renamed field:

{{{
Did you rename model.foo to model.bar (a CharField)? [y/N] ^CTraceback (most recent call last):
  File ""./manage.py"", line 10, in <module>
    execute_from_command_line(sys.argv)
  File ""…/django18/django/core/management/__init__.py"", line 338, in execute_from_command_line
    utility.execute()
  File ""…/django18/django/core/management/__init__.py"", line 330, in execute
    self.fetch_command(subcommand).run_from_argv(self.argv)
  File ""…/django18/django/core/management/base.py"", line 390, in run_from_argv
    self.execute(*args, **cmd_options)
  File ""…/django18/django/core/management/base.py"", line 441, in execute
    output = self.handle(*args, **options)
  File ""…/django18/django/core/management/commands/makemigrations.py"", line 125, in handle
    migration_name=self.migration_name,
  File ""…/django18/django/db/migrations/autodetector.py"", line 43, in changes
    changes = self._detect_changes(convert_apps, graph)
  File ""…/django18/django/db/migrations/autodetector.py"", line 183, in _detect_changes
    self.generate_renamed_fields()
  File ""…/django18/django/db/migrations/autodetector.py"", line 744, in generate_renamed_fields
    if self.questioner.ask_rename(model_name, rem_field_name, field_name, field):
  File ""…/django18/django/db/migrations/questioner.py"", line 168, in ask_rename
    field_instance.__class__.__name__), False)
  File ""…/django18/django/db/migrations/questioner.py"", line 80, in _boolean_input
    result = input(""%s "" % question)
KeyboardInterrupt
}}}

I've also tried closing stdin via `</dev/null`, but that results in another error:
{{{
  File ""/home/daniel/Vcs/django18/django/db/migrations/questioner.py"", line 168, in ask_rename
    field_instance.__class__.__name__), False)
  File ""/home/daniel/Vcs/django18/django/db/migrations/questioner.py"", line 80, in _boolean_input
    result = input(""%s "" % question)
EOFError: EOF when reading a line
}}}

Does it make sense with `--noinput` to automatically assume that the field has been renamed?

Would the `autodetector` in `handle()` need to get passed a `MigrationQuestioner` instance, like it's done in `handle_merge`?"	Bug	closed	Migrations	1.8	Normal	duplicate			Unreviewed	0	0	0	0	0	0
