This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author serhiy.storchaka
Recipients The Compiler, effbot, ezio.melotti, mrabarnett, pitrou, serhiy.storchaka
Date 2015-11-04.09:27:11
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1446629232.01.0.273591339993.issue25550@psf.upfronthosting.co.za>
In-reply-to
Content
This isn't a bug, this is a limitation of the implementation. Regular expression parser is recursive and Python has a limit for recursion depth. You can increase this limit if needed.

>>> import sys, re
>>> sys.setrecursionlimit(2000)
>>> re.compile('(' * 500)
Traceback (most recent call last):
  File "/home/serhiy/py/cpython/Lib/sre_parse.py", line 437, in _parse_sub
    itemsappend(_parse(source, state))
  File "/home/serhiy/py/cpython/Lib/sre_parse.py", line 778, in _parse
    p = _parse_sub(source, state)
  File "/home/serhiy/py/cpython/Lib/sre_parse.py", line 437, in _parse_sub
    itemsappend(_parse(source, state))
...
  File "/home/serhiy/py/cpython/Lib/sre_parse.py", line 778, in _parse
    p = _parse_sub(source, state)
  File "/home/serhiy/py/cpython/Lib/sre_parse.py", line 437, in _parse_sub
    itemsappend(_parse(source, state))
  File "/home/serhiy/py/cpython/Lib/sre_parse.py", line 781, in _parse
    source.tell() - start)
sre_constants.error: missing ), unterminated subpattern at position 499
History
Date User Action Args
2015-11-04 09:27:12serhiy.storchakasetrecipients: + serhiy.storchaka, effbot, pitrou, ezio.melotti, mrabarnett, The Compiler
2015-11-04 09:27:12serhiy.storchakasetmessageid: <1446629232.01.0.273591339993.issue25550@psf.upfronthosting.co.za>
2015-11-04 09:27:11serhiy.storchakalinkissue25550 messages
2015-11-04 09:27:11serhiy.storchakacreate