If sys.stdin is not a tty, fall back to default_getpass after printing
a warning instead of failing with a termios.error.
diff --git a/Misc/NEWS b/Misc/NEWS
index 660651a..51f6ce1 100644
--- a/Misc/NEWS
+++ b/Misc/NEWS
@@ -37,6 +37,9 @@
 Library
 -------
 
+- getpass.getpass() now works when sys.stdin is not a tty by printing a warning
+  and falling back to sys.stdin.readline instead of raising termios.error.
+
 - Issue #2014: Allow XML-RPC datetime objects to have dates before
   1900-01-01.