merge 3.1
This commit is contained in:
commit
c9c8d0edd6
|
@ -743,7 +743,9 @@ class WildcardPattern(BasePattern):
|
|||
else:
|
||||
# The reason for this is that hitting the recursion limit usually
|
||||
# results in some ugly messages about how RuntimeErrors are being
|
||||
# ignored.
|
||||
# ignored. We only have to do this on CPython, though, because other
|
||||
# implementations don't have this nasty bug in the first place.
|
||||
if hasattr(sys, "getrefcount"):
|
||||
save_stderr = sys.stderr
|
||||
sys.stderr = StringIO()
|
||||
try:
|
||||
|
@ -759,6 +761,7 @@ class WildcardPattern(BasePattern):
|
|||
r[self.name] = nodes[:count]
|
||||
yield count, r
|
||||
finally:
|
||||
if hasattr(sys, "getrefcount"):
|
||||
sys.stderr = save_stderr
|
||||
|
||||
def _iterative_matches(self, nodes):
|
||||
|
|
Loading…
Reference in New Issue