Author: Raffael Tfirst <[email protected]>
Branch: py3.5-async
Changeset: r85777:b8cce74eca8e
Date: 2016-07-20 14:29 +0200
http://bitbucket.org/pypy/pypy/changeset/b8cce74eca8e/
Log: Implement MAXGROUPS in the sre module
diff --git a/pypy/interpreter/generator.py b/pypy/interpreter/generator.py
--- a/pypy/interpreter/generator.py
+++ b/pypy/interpreter/generator.py
@@ -567,7 +567,12 @@
break
block = block.previous
-
+ def _GetAwaitableIter(self, o):
+ import pdb; pdb.set_trace()
+ if isinstance(o, Coroutine):
+ return o
+ getter = None
+
def get_printable_location_genentry(bytecode):
diff --git a/pypy/interpreter/pyopcode.py b/pypy/interpreter/pyopcode.py
--- a/pypy/interpreter/pyopcode.py
+++ b/pypy/interpreter/pyopcode.py
@@ -1448,6 +1448,7 @@
def GET_AITER(self, oparg, next_instr):
w_iterable = self.popvalue()
+ import pdb; pdb.set_trace()
self.pushvalue(w_iterable)
def GET_ANEXT(self, oparg, next_instr):
diff --git a/pypy/module/_sre/__init__.py b/pypy/module/_sre/__init__.py
--- a/pypy/module/_sre/__init__.py
+++ b/pypy/module/_sre/__init__.py
@@ -9,6 +9,7 @@
'CODESIZE': 'space.wrap(interp_sre.CODESIZE)',
'MAGIC': 'space.wrap(interp_sre.MAGIC)',
'MAXREPEAT': 'space.wrap(interp_sre.MAXREPEAT)',
+ 'MAXGROUPS': 'space.wrap(interp_sre.MAXGROUPS)',
'compile': 'interp_sre.W_SRE_Pattern',
'getlower': 'interp_sre.w_getlower',
'getcodesize': 'interp_sre.w_getcodesize',
diff --git a/pypy/module/_sre/interp_sre.py b/pypy/module/_sre/interp_sre.py
--- a/pypy/module/_sre/interp_sre.py
+++ b/pypy/module/_sre/interp_sre.py
@@ -14,7 +14,7 @@
# Constants and exposed functions
from rpython.rlib.rsre import rsre_core
-from rpython.rlib.rsre.rsre_char import MAGIC, CODESIZE, MAXREPEAT, getlower,
set_unicode_db
+from rpython.rlib.rsre.rsre_char import MAGIC, CODESIZE, MAXREPEAT, MAXGROUPS,
getlower, set_unicode_db
@unwrap_spec(char_ord=int, flags=int)
diff --git a/rpython/rlib/rsre/rsre_char.py b/rpython/rlib/rsre/rsre_char.py
--- a/rpython/rlib/rsre/rsre_char.py
+++ b/rpython/rlib/rsre/rsre_char.py
@@ -28,8 +28,10 @@
if sys.maxint > 2**32:
MAXREPEAT = int(2**32 - 1)
+ MAXGROUPS = int(2**31 - 1)
else:
MAXREPEAT = int(2**31 - 1)
+ MAXGROUPS = int((2**31 / sys.maxint / 2) - 1)
# In _sre.c this is bytesize of the code word type of the C implementation.
# There it's 2 for normal Python builds and more for wide unicode builds
(large
_______________________________________________
pypy-commit mailing list
[email protected]
https://mail.python.org/mailman/listinfo/pypy-commit