cpython (merge default -> default): Merge heads
https://hg.python.org/cpython/rev/1ccc3ca98d39 changeset: 98885:1ccc3ca98d39 parent: 98883:e80d1e9737d4 parent: 98881:695c50c8cc92 user: Serhiy Storchaka <storchaka@gmail.com> date: Thu Oct 29 08:19:44 2015 +0200 summary: Merge heads files: Lib/getpass.py | 2 +- Lib/pickletools.py | 2 +- Lib/smtplib.py | 2 -- PC/testpy.py | 2 -- Parser/asdl_c.py | 1 - 5 files changed, 2 insertions(+), 7 deletions(-) diff --git a/Lib/getpass.py b/Lib/getpass.py --- a/Lib/getpass.py +++ b/Lib/getpass.py @@ -99,7 +99,7 @@ """Prompt for password with echo off, using Windows getch().""" if sys.stdin is not sys.__stdin__: return fallback_getpass(prompt, stream) - import msvcrt + for c in prompt: msvcrt.putwch(c) pw = "" diff --git a/Lib/pickletools.py b/Lib/pickletools.py --- a/Lib/pickletools.py +++ b/Lib/pickletools.py @@ -2794,7 +2794,7 @@ return doctest.testmod() if __name__ == "__main__": - import sys, argparse + import argparse parser = argparse.ArgumentParser( description='disassemble one or more pickle files') parser.add_argument( diff --git a/Lib/smtplib.py b/Lib/smtplib.py --- a/Lib/smtplib.py +++ b/Lib/smtplib.py @@ -1080,8 +1080,6 @@ # Test the sendmail method, which tests most of the others. # Note: This always sends to localhost. if __name__ == '__main__': - import sys - def prompt(prompt): sys.stdout.write(prompt + ": ") sys.stdout.flush() diff --git a/PC/testpy.py b/PC/testpy.py --- a/PC/testpy.py +++ b/PC/testpy.py @@ -18,8 +18,6 @@ a PC, you should add the dos_8x3 directory to your PYTHONPATH.""") sys.exit(1) -import os - for dir in sys.path: file = os.path.join(dir, "os.py") if os.path.isfile(file): diff --git a/Parser/asdl_c.py b/Parser/asdl_c.py --- a/Parser/asdl_c.py +++ b/Parser/asdl_c.py @@ -1289,7 +1289,6 @@ f.close() if __name__ == "__main__": - import sys import getopt INC_DIR = '' -- Repository URL: https://hg.python.org/cpython
participants (1)
-
serhiy.storchaka