Merge lp:~vila/bzr/integration into lp:bzr

Proposed by Vincent Ladeuil
Status: Merged
Approved by: Vincent Ladeuil
Approved revision: no longer in the source branch.
Merged at revision: 6621
Proposed branch: lp:~vila/bzr/integration
Merge into: lp:bzr
Diff against target: 31 lines (+4/-4)
2 files modified
bzrlib/lazy_regex.py (+3/-3)
doc/en/release-notes/bzr-2.7.txt (+1/-1)
To merge this branch: bzr merge lp:~vila/bzr/integration
Reviewer Review Type Date Requested Status
Vincent Ladeuil Approve
Review via email: mp+315908@code.launchpad.net

Commit message

Merge 2.7 into trunk including fix for bug #1657238

Description of the change

Merge 2.7 into trunk including fix for bug #1657238

To post a comment you must log in.
Revision history for this message
Vincent Ladeuil (vila) wrote :

Re-sync trunk with 2.7.

review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'bzrlib/lazy_regex.py'
2--- bzrlib/lazy_regex.py 2017-01-17 13:48:10 +0000
3+++ bzrlib/lazy_regex.py 2017-01-30 14:32:50 +0000
4@@ -133,11 +133,11 @@
5 " cause infinite recursion")
6
7
8-# re.finditer get confused if it receives a LazyRegex
9-if getattr(re, 'finditer', None is not None):
10+# Some libraries calls re.finditer which fails it if receives a LazyRegex.
11+if getattr(re, 'finditer', False):
12 def finditer_public(pattern, string, flags=0):
13 if isinstance(pattern, LazyRegex):
14 return pattern.finditer(string)
15 else:
16 return _real_re_compile(pattern, flags).finditer(string)
17-re.finditer = finditer_public
18+ re.finditer = finditer_public
19
20=== modified file 'doc/en/release-notes/bzr-2.7.txt'
21--- doc/en/release-notes/bzr-2.7.txt 2017-01-15 20:38:48 +0000
22+++ doc/en/release-notes/bzr-2.7.txt 2017-01-30 14:32:50 +0000
23@@ -31,7 +31,7 @@
24 *********
25
26 * Complete monkey-patching of re.finditer or LazyRegexps leak.
27- (Vincent Ladeuil, #1644003)
28+ (Vincent Ladeuil, #1644003, #1657238)
29
30 * Cope with paramiko making argument to SFTPFile.prefetch() mandatory.
31 (Jelmer Vernooij, #1579093)