mirror of https://github.com/python/cpython
Merge heads
This commit is contained in:
commit
cbe6142135
|
@ -506,7 +506,7 @@ arguments and/or a dictionary of keyword arguments. In Python 1.5 and earlier,
|
||||||
you'd use the :func:`apply` built-in function: ``apply(f, args, kw)`` calls the
|
you'd use the :func:`apply` built-in function: ``apply(f, args, kw)`` calls the
|
||||||
function :func:`f` with the argument tuple *args* and the keyword arguments in
|
function :func:`f` with the argument tuple *args* and the keyword arguments in
|
||||||
the dictionary *kw*. :func:`apply` is the same in 2.0, but thanks to a patch
|
the dictionary *kw*. :func:`apply` is the same in 2.0, but thanks to a patch
|
||||||
from Greg Ewing, ``f(*args, **kw)`` as a shorter and clearer way to achieve the
|
from Greg Ewing, ``f(*args, **kw)`` is a shorter and clearer way to achieve the
|
||||||
same effect. This syntax is symmetrical with the syntax for defining
|
same effect. This syntax is symmetrical with the syntax for defining
|
||||||
functions::
|
functions::
|
||||||
|
|
||||||
|
|
|
@ -9,6 +9,7 @@ import os
|
||||||
import codecs
|
import codecs
|
||||||
import operator
|
import operator
|
||||||
import io
|
import io
|
||||||
|
import re
|
||||||
import tempfile
|
import tempfile
|
||||||
import shutil
|
import shutil
|
||||||
import unittest
|
import unittest
|
||||||
|
@ -226,8 +227,8 @@ from __future__ import print_function"""
|
||||||
actually_write=False)
|
actually_write=False)
|
||||||
# Testing that it logged this message when write=False was passed is
|
# Testing that it logged this message when write=False was passed is
|
||||||
# sufficient to see that it did not bail early after "No changes".
|
# sufficient to see that it did not bail early after "No changes".
|
||||||
message_regex = r"Not writing changes to .*%s%s" % (
|
message_regex = r"Not writing changes to .*%s" % \
|
||||||
os.sep, os.path.basename(test_file))
|
re.escape(os.sep + os.path.basename(test_file))
|
||||||
for message in debug_messages:
|
for message in debug_messages:
|
||||||
if "Not writing changes" in message:
|
if "Not writing changes" in message:
|
||||||
self.assertRegex(message, message_regex)
|
self.assertRegex(message, message_regex)
|
||||||
|
|
|
@ -1423,7 +1423,7 @@ class CoroutineTest(unittest.TestCase):
|
||||||
|
|
||||||
with warnings.catch_warnings():
|
with warnings.catch_warnings():
|
||||||
warnings.simplefilter("error")
|
warnings.simplefilter("error")
|
||||||
# Test that __aiter__ that returns an asyncronous iterator
|
# Test that __aiter__ that returns an asynchronous iterator
|
||||||
# directly does not throw any warnings.
|
# directly does not throw any warnings.
|
||||||
run_async(main())
|
run_async(main())
|
||||||
self.assertEqual(I, 111011)
|
self.assertEqual(I, 111011)
|
||||||
|
|
|
@ -2221,8 +2221,8 @@ Library
|
||||||
writer failed in BufferedRWPair.close().
|
writer failed in BufferedRWPair.close().
|
||||||
|
|
||||||
- Issue #23622: Unknown escapes in regular expressions that consist of ``'\'``
|
- Issue #23622: Unknown escapes in regular expressions that consist of ``'\'``
|
||||||
and ASCII letter now raise a deprecation warning and will be forbidden in
|
and an ASCII letter now raise a deprecation warning and will be forbidden
|
||||||
Python 3.6.
|
in Python 3.6.
|
||||||
|
|
||||||
- Issue #23671: string.Template now allows specifying the "self" parameter as
|
- Issue #23671: string.Template now allows specifying the "self" parameter as
|
||||||
a keyword argument. string.Formatter now allows specifying the "self" and
|
a keyword argument. string.Formatter now allows specifying the "self" and
|
||||||
|
|
Loading…
Reference in New Issue