mirror of https://github.com/python/cpython
merge heads
This commit is contained in:
commit
ffd1f48306
|
@ -1374,7 +1374,7 @@ def strip_python_stderr(stderr):
|
||||||
|
|
||||||
def args_from_interpreter_flags():
|
def args_from_interpreter_flags():
|
||||||
"""Return a list of command-line arguments reproducing the current
|
"""Return a list of command-line arguments reproducing the current
|
||||||
settings in sys.flags."""
|
settings in sys.flags and sys.warnoptions."""
|
||||||
flag_opt_map = {
|
flag_opt_map = {
|
||||||
'bytes_warning': 'b',
|
'bytes_warning': 'b',
|
||||||
'dont_write_bytecode': 'B',
|
'dont_write_bytecode': 'B',
|
||||||
|
@ -1389,6 +1389,9 @@ def args_from_interpreter_flags():
|
||||||
v = getattr(sys.flags, flag)
|
v = getattr(sys.flags, flag)
|
||||||
if v > 0:
|
if v > 0:
|
||||||
args.append('-' + opt * v)
|
args.append('-' + opt * v)
|
||||||
|
if sys.warnoptions:
|
||||||
|
args.append('-W')
|
||||||
|
args.extend(sys.warnoptions)
|
||||||
return args
|
return args
|
||||||
|
|
||||||
#============================================================
|
#============================================================
|
||||||
|
|
|
@ -277,7 +277,7 @@ class FileInputTests(unittest.TestCase):
|
||||||
|
|
||||||
def test_empty_files_list_specified_to_constructor(self):
|
def test_empty_files_list_specified_to_constructor(self):
|
||||||
with FileInput(files=[]) as fi:
|
with FileInput(files=[]) as fi:
|
||||||
self.assertEquals(fi._files, ('-',))
|
self.assertEqual(fi._files, ('-',))
|
||||||
|
|
||||||
def test__getitem__(self):
|
def test__getitem__(self):
|
||||||
"""Tests invoking FileInput.__getitem__() with the current
|
"""Tests invoking FileInput.__getitem__() with the current
|
||||||
|
@ -298,7 +298,7 @@ class FileInputTests(unittest.TestCase):
|
||||||
with FileInput(files=[t]) as fi:
|
with FileInput(files=[t]) as fi:
|
||||||
with self.assertRaises(RuntimeError) as cm:
|
with self.assertRaises(RuntimeError) as cm:
|
||||||
fi[1]
|
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):
|
def test__getitem__eof(self):
|
||||||
"""Tests invoking FileInput.__getitem__() with the line number but at
|
"""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 FileInput(files=[t]) as fi:
|
||||||
with self.assertRaises(IndexError) as cm:
|
with self.assertRaises(IndexError) as cm:
|
||||||
fi[0]
|
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):
|
def test_nextfile_oserror_deleting_backup(self):
|
||||||
"""Tests invoking FileInput.nextfile() when the attempt to delete
|
"""Tests invoking FileInput.nextfile() when the attempt to delete
|
||||||
|
|
|
@ -12,6 +12,10 @@ Core and Builtins
|
||||||
|
|
||||||
- _ast.__version__ is now a Mercurial integer and hex revision.
|
- _ast.__version__ is now a Mercurial integer and hex revision.
|
||||||
|
|
||||||
|
- 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 #9856: Change object.__format__ with a non-empty format string
|
- Issue #9856: Change object.__format__ with a non-empty format string
|
||||||
to be a DeprecationWarning. In 3.2 it was a PendingDeprecationWarning.
|
to be a DeprecationWarning. In 3.2 it was a PendingDeprecationWarning.
|
||||||
In 3.4 it will be a TypeError.
|
In 3.4 it will be a TypeError.
|
||||||
|
|
Loading…
Reference in New Issue