From d47af531266000a3e22f36ba4ce83dbfb5c0362b Mon Sep 17 00:00:00 2001 From: Brett Cannon Date: Tue, 15 Mar 2011 15:55:12 -0400 Subject: [PATCH 1/3] Move off of assertEquals() and over to assertEqual(). --- Lib/test/test_fileinput.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/Lib/test/test_fileinput.py b/Lib/test/test_fileinput.py index 7afb88c7bfc..27ceaf6719c 100644 --- a/Lib/test/test_fileinput.py +++ b/Lib/test/test_fileinput.py @@ -277,7 +277,7 @@ class FileInputTests(unittest.TestCase): def test_empty_files_list_specified_to_constructor(self): with FileInput(files=[]) as fi: - self.assertEquals(fi._files, ('-',)) + self.assertEqual(fi._files, ('-',)) def test__getitem__(self): """Tests invoking FileInput.__getitem__() with the current @@ -298,7 +298,7 @@ class FileInputTests(unittest.TestCase): with FileInput(files=[t]) as fi: with self.assertRaises(RuntimeError) as cm: fi[1] - self.assertEquals(cm.exception.args, ("accessing lines out of order",)) + self.assertEqual(cm.exception.args, ("accessing lines out of order",)) def test__getitem__eof(self): """Tests invoking FileInput.__getitem__() with the line number but at @@ -308,7 +308,7 @@ class FileInputTests(unittest.TestCase): with FileInput(files=[t]) as fi: with self.assertRaises(IndexError) as cm: fi[0] - self.assertEquals(cm.exception.args, ("end of input reached",)) + self.assertEqual(cm.exception.args, ("end of input reached",)) def test_nextfile_oserror_deleting_backup(self): """Tests invoking FileInput.nextfile() when the attempt to delete From 28edfeedb5fc4fc64190cfcc0d32494a8a84c4cb Mon Sep 17 00:00:00 2001 From: "Gregory P. Smith" Date: Tue, 15 Mar 2011 16:02:10 -0400 Subject: [PATCH 2/3] issue 11432 news entry. --- Misc/NEWS | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/Misc/NEWS b/Misc/NEWS index adc719bf2f5..c1100650352 100644 --- a/Misc/NEWS +++ b/Misc/NEWS @@ -10,6 +10,10 @@ What's New in Python 3.2.1? Core and Builtins ----------------- +- Issue #11432: A bug was introduced in subprocess.Popen on posix systems with + 3.2.0 where the stdout or stderr file descriptor being the same as the stdin + file descriptor would raise an exception. webbrowser.open would fail. fixed. + - Issue #11450: Don't truncate hg version info in Py_GetBuildInfo() when there are many tags (e.g. when using mq). Patch by Nadeem Vawda. From b880c1558e8562351e75837e1ba2932ae5d17111 Mon Sep 17 00:00:00 2001 From: Brett Cannon Date: Tue, 15 Mar 2011 16:03:09 -0400 Subject: [PATCH 3/3] Add warnings support to test.support.args_from_interpreter_flags(). This allows the -j flag to regrtest to propagate warnings settings properly. --- Lib/test/support.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/Lib/test/support.py b/Lib/test/support.py index 53c2956dd0b..f5a53ca6281 100644 --- a/Lib/test/support.py +++ b/Lib/test/support.py @@ -1374,7 +1374,7 @@ def strip_python_stderr(stderr): def args_from_interpreter_flags(): """Return a list of command-line arguments reproducing the current - settings in sys.flags.""" + settings in sys.flags and sys.warnoptions.""" flag_opt_map = { 'bytes_warning': 'b', 'dont_write_bytecode': 'B', @@ -1389,6 +1389,9 @@ def args_from_interpreter_flags(): v = getattr(sys.flags, flag) if v > 0: args.append('-' + opt * v) + if sys.warnoptions: + args.append('-W') + args.extend(sys.warnoptions) return args #============================================================