diff -r 31301b84ac8d Python/pythonrun.c --- a/Python/pythonrun.c Wed Jun 03 11:05:57 2015 -0700 +++ b/Python/pythonrun.c Wed Jun 03 16:51:04 2015 -0700 @@ -108,6 +108,15 @@ Py_XDECREF(v); } err = -1; + + PyRun_SimpleString("import warnings as __Py_temporary_warnings\n" + "import sys as __Py_temporary_sys\n" + "if __Py_temporary_sys.stdin.isatty():\n" + "\t__Py_temporary_warnings.filterwarnings('default',\n" + "\t\tcategory=DeprecationWarning, module='__main__')\n" + "del __Py_temporary_warnings\n" + "del __Py_temporary_sys"); + for (;;) { ret = PyRun_InteractiveOneObject(fp, filename, flags); _PY_DEBUG_PRINT_TOTAL_REFS();