diff --git a/Lib/distutils/command/register.py b/Lib/distutils/command/register.py index bd9b8c0143f..30e9a37e6ad 100644 --- a/Lib/distutils/command/register.py +++ b/Lib/distutils/command/register.py @@ -150,7 +150,7 @@ def send_metadata(self): 3. have the server generate a new password for you (and email it to you), or 4. quit Your selection [default 1]: ''', log.INFO) - choice = raw_input() + choice = input() if not choice: choice = '1' elif choice not in choices: diff --git a/Lib/distutils/tests/test_register.py b/Lib/distutils/tests/test_register.py index 3a3a3b739b9..021b3ea884c 100644 --- a/Lib/distutils/tests/test_register.py +++ b/Lib/distutils/tests/test_register.py @@ -60,7 +60,7 @@ def test_create_pypirc(self): # Save your login (y/N)? : 'y' inputs = RawInputs('1', 'tarek', 'y') from distutils.command import register as register_module - register_module.raw_input = inputs.__call__ + register_module.input = inputs.__call__ def _getpass(prompt): return 'xxx' register_module.getpass.getpass = _getpass @@ -71,8 +71,7 @@ def __init__(self): def __call__(self, *args): # we want to compare them, so let's store # something comparable - els = args[0].items() - els.sort() + els = sorted(args[0].items()) self.calls.append(tuple(els)) return 200, 'OK'