summaryrefslogtreecommitdiffstats
path: root/Doc/whatsnew
diff options
context:
space:
mode:
authorMa Lin <animalize@users.noreply.github.com>2022-03-29 14:31:01 (GMT)
committerGitHub <noreply@github.com>2022-03-29 14:31:01 (GMT)
commit356997cccc21a3391175d20e9ef03d434675b496 (patch)
tree16392c0b0212d7680d04f0ccb85fa6e13d812a9a /Doc/whatsnew
parent788154919c2d843a0a995994bf2aed2d074761ec (diff)
downloadcpython-356997cccc21a3391175d20e9ef03d434675b496.zip
cpython-356997cccc21a3391175d20e9ef03d434675b496.tar.gz
cpython-356997cccc21a3391175d20e9ef03d434675b496.tar.bz2
bpo-35859: Fix a few long-standing bugs in re engine (GH-12427)
In rare cases, capturing group could get wrong result. Regular expression engines in Perl and Java have similar bugs. The new behavior now matches the behavior of more modern RE engines: in the regex module and in PHP, Ruby and Node.js.
Diffstat (limited to 'Doc/whatsnew')
-rw-r--r--Doc/whatsnew/3.11.rst5
1 files changed, 5 insertions, 0 deletions
diff --git a/Doc/whatsnew/3.11.rst b/Doc/whatsnew/3.11.rst
index 41e4659..837d8c8 100644
--- a/Doc/whatsnew/3.11.rst
+++ b/Doc/whatsnew/3.11.rst
@@ -718,6 +718,11 @@ Changes in the Python API
deprecated since Python 3.6.
(Contributed by Serhiy Storchaka in :issue:`47066`.)
+* :mod:`re` module: Fix a few long-standing bugs where, in rare cases,
+ capturing group could get wrong result. So the result may be different than
+ before.
+ (Contributed by Ma Lin in :issue:`35859`.)
+
* The *population* parameter of :func:`random.sample` must be a sequence.
Automatic conversion of sets to lists is no longer supported. If the sample size
is larger than the population size, a :exc:`ValueError` is raised.