[Python-checkins] cpython (merge default -> default): Merge heads
serhiy.storchaka
python-checkins at python.org
Sun Jun 12 02:49:47 EDT 2016
https://hg.python.org/cpython/rev/1d5ce70da754
changeset: 101929:1d5ce70da754
parent: 101927:e3671a684ea0
parent: 101921:7ed6b4a077c4
user: Serhiy Storchaka <storchaka at gmail.com>
date: Sun Jun 12 09:48:19 2016 +0300
summary:
Merge heads
files:
Doc/library/re.rst | 6 +++---
Doc/whatsnew/2.0.rst | 2 +-
Lib/lib2to3/tests/test_refactor.py | 5 +++--
Lib/test/test_coroutines.py | 2 +-
Misc/NEWS | 6 +++---
5 files changed, 11 insertions(+), 10 deletions(-)
diff --git a/Doc/library/re.rst b/Doc/library/re.rst
--- a/Doc/library/re.rst
+++ b/Doc/library/re.rst
@@ -321,7 +321,7 @@
The special sequences consist of ``'\'`` and a character from the list below.
-If the ordinary character is not ASCII digit or ASCII letter, then the
+If the ordinary character is not an ASCII digit or an ASCII letter, then the
resulting RE will match the second character. For example, ``\$`` matches the
character ``'$'``.
@@ -444,7 +444,7 @@
The ``'\u'`` and ``'\U'`` escape sequences have been added.
.. versionchanged:: 3.6
- Unknown escapes consisting of ``'\'`` and ASCII letter now are errors.
+ Unknown escapes consisting of ``'\'`` and an ASCII letter now are errors.
.. seealso::
@@ -743,7 +743,7 @@
Unmatched groups are replaced with an empty string.
.. versionchanged:: 3.6
- Unknown escapes consisting of ``'\'`` and ASCII letter now are errors.
+ Unknown escapes consisting of ``'\'`` and an ASCII letter now are errors.
.. function:: subn(pattern, repl, string, count=0, flags=0)
diff --git a/Doc/whatsnew/2.0.rst b/Doc/whatsnew/2.0.rst
--- a/Doc/whatsnew/2.0.rst
+++ b/Doc/whatsnew/2.0.rst
@@ -506,7 +506,7 @@
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
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
functions::
diff --git a/Lib/lib2to3/tests/test_refactor.py b/Lib/lib2to3/tests/test_refactor.py
--- a/Lib/lib2to3/tests/test_refactor.py
+++ b/Lib/lib2to3/tests/test_refactor.py
@@ -8,6 +8,7 @@
import os
import codecs
import io
+import re
import tempfile
import shutil
import unittest
@@ -222,8 +223,8 @@
actually_write=False)
# Testing that it logged this message when write=False was passed is
# sufficient to see that it did not bail early after "No changes".
- message_regex = r"Not writing changes to .*%s%s" % (
- os.sep, os.path.basename(test_file))
+ message_regex = r"Not writing changes to .*%s" % \
+ re.escape(os.sep + os.path.basename(test_file))
for message in debug_messages:
if "Not writing changes" in message:
self.assertRegex(message, message_regex)
diff --git a/Lib/test/test_coroutines.py b/Lib/test/test_coroutines.py
--- a/Lib/test/test_coroutines.py
+++ b/Lib/test/test_coroutines.py
@@ -1423,7 +1423,7 @@
with warnings.catch_warnings():
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.
run_async(main())
self.assertEqual(I, 111011)
diff --git a/Misc/NEWS b/Misc/NEWS
--- a/Misc/NEWS
+++ b/Misc/NEWS
@@ -62,7 +62,7 @@
- Issue #27029: Removed deprecated support of universal newlines mode from
ZipFile.open().
-- Issue #27030: Unknown escapes consisting of ``'\'`` and ASCII letter in
+- Issue #27030: Unknown escapes consisting of ``'\'`` and an ASCII letter in
regular expressions now are errors. The re.LOCALE flag now can be used
only with bytes patterns.
@@ -3046,8 +3046,8 @@
writer failed in BufferedRWPair.close().
- Issue #23622: Unknown escapes in regular expressions that consist of ``'\'``
- and ASCII letter now raise a deprecation warning and will be forbidden in
- Python 3.6.
+ and an ASCII letter now raise a deprecation warning and will be forbidden
+ in Python 3.6.
- Issue #23671: string.Template now allows specifying the "self" parameter as
a keyword argument. string.Formatter now allows specifying the "self" and
--
Repository URL: https://hg.python.org/cpython
More information about the Python-checkins
mailing list