Roundup Robot added the comment:
New changeset 10314c9b7c5a by Antoine Pitrou in branch '2.7':
Issue #1160: Fix compiling large regular expressions on UCS2 builds.
http://hg.python.org/cpython/rev/10314c9b7c5a
--
nosy: +python-dev
___
Python tracker
Roundup Robot added the comment:
New changeset a3579d766fb6 by Antoine Pitrou in branch '3.2':
Issue #1160: Fix compiling large regular expressions on UCS2 builds.
http://hg.python.org/cpython/rev/a3579d766fb6
New changeset 8b73a069ae4f by Antoine Pitrou in branch '3.3':
Merge test from issue
Antoine Pitrou added the comment:
I've committed the patch to 3.2 and 2.7, and added the test to 3.3 and default.
Thank you!
--
resolution: - fixed
stage: patch review - committed/rejected
status: open - closed
___
Python tracker
Serhiy Storchaka added the comment:
If we will considered it's important enough to fix, here are patches.
--
keywords: +patch
Added file: http://bugs.python.org/file27957/sre_code_ucs4-2.7.patch
___
Python tracker rep...@bugs.python.org
Changes by Serhiy Storchaka storch...@gmail.com:
Added file: http://bugs.python.org/file27958/sre_code_ucs4-3.2.patch
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue1160
___
Changes by Serhiy Storchaka storch...@gmail.com:
--
stage: test needed - patch review
Added file: http://bugs.python.org/file27959/sre_code_ucs4_test.patch
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue1160
Serhiy Storchaka storch...@gmail.com added the comment:
This has probably been fixed in 3.3 in c67b7e0c818a.
Then the issue may be closed?
--
nosy: +storchaka
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue1160
Antoine Pitrou pit...@free.fr added the comment:
Then the issue may be closed?
Well, it's still present in 2.7 and 3.2 (assuming we consider it's important
enough to fix).
--
___
Python tracker rep...@bugs.python.org
Antoine Pitrou pit...@free.fr added the comment:
This has probably been fixed in 3.3 in c67b7e0c818a.
--
assignee: effbot -
versions: +Python 3.2 -Python 3.1
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue1160
Matthew Barnett pyt...@mrabarnett.plus.com added the comment:
As stated in msg73781, this is being addressed in issue #2636.
My regex module handles the test case without complaint:
import regex
r = regex.compile('|'.join('%d'%x for x in range(7000)))
r.match(1000)
_regex.REGEX_Match object
Michael K Johnson a1237+pyb...@danlj.org added the comment:
The test case at the top of this issue reproduces just fine; if you are
looking for a different test case you'll have to specify what you don't
like about it so that it's clear what you are looking for.
I don't think there's any
Michael K Johnson a1237+pyb...@danlj.org added the comment:
I also ran into this issue, and dealt with it as suggested here by
changing to sets. Because I have underlying code that has to deal both
with small hand-crafted regular expressions and arbitrarily-large
machine-generated sets of
Ezio Melotti ezio.melo...@gmail.com added the comment:
Michael, can you provide the regex or even better a testcase that shows
the problem?
--
stage: - test needed
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue1160
Antoine Pitrou pit...@free.fr added the comment:
Kristall, can you post the troublesome regular expression?
--
nosy: +pitrou
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue1160
___
Changes by Ezio Melotti ezio.melo...@gmail.com:
--
nosy: +ezio.melotti
type: crash - behavior
versions: +Python 3.1
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue1160
___
kristall krist...@c-base.org added the comment:
aloha,
I also use large RE's. re.compile() worked fine under python2.6 (OS
ubuntu-linux). After moving the code to python3.0 I get the same error
as ostkamp did. Under 3.1 also. Under 3.1 I tried to the fix that
ostkamp described (setting 'short'
Changes by Jeffrey C. Jacobs [EMAIL PROTECTED]:
--
nosy: +timehorse
___
Python tracker [EMAIL PROTECTED]
http://bugs.python.org/issue1160
___
___
Python-bugs-list mailing
Jeffrey C. Jacobs [EMAIL PROTECTED] added the comment:
It seems that changing the size type of the Regular Expression Byte-code
is a nice quick-fix, even though it doubles the size of a pattern. It
may have the added benefit that most machine architectures available
today are at least
Adi [EMAIL PROTECTED] added the comment:
Is there any progress on this bug? I am currently considering
maintaining a branch of 2.5.2 which includes the patch suggested by effbot.
--
nosy: +adi
___
Python tracker [EMAIL PROTECTED]
Changes by Russ Cox [EMAIL PROTECTED]:
--
nosy: +rsc
__
Tracker [EMAIL PROTECTED]
http://bugs.python.org/issue1160
__
___
Python-bugs-list mailing list
Unsubscribe:
Greg Detre [EMAIL PROTECTED] added the comment:
Dear all,
I've just switched from linux to a mac, and I'm suddenly starting to
experience this issue with a machine-generated regexp that I depend on.
Are there any plans to fix this in a future version of python?
Thank you,
Greg
--
Guilherme Polo added the comment:
I tried Frederik's solution against trunk and it works. I compiled
python with ucs2 so it is surely setting SRE_CODE to unsigned long.
Before this change I got the same exception as pointed by Guido Ostkamp.
--
nosy: +gpolo
A.M. Kuchling added the comment:
Trying effbot's suggested experiment is easy, at least, and would
provide useful info. If it fails, then fixing this bug might be difficult.
--
keywords: +easy
nosy: +akuchling
__
Tracker [EMAIL PROTECTED]
Changes by mathieu Clabaut:
--
nosy: +mathieu.clabaut
__
Tracker [EMAIL PROTECTED]
http://bugs.python.org/issue1160
__
___
Python-bugs-list mailing list
Unsubscribe:
Changes by Brett Cannon:
--
priority: - normal
__
Tracker [EMAIL PROTECTED]
http://bugs.python.org/issue1160
__
___
Python-bugs-list mailing list
Unsubscribe:
Fredrik Lundh added the comment:
Well, I'm not sure 81k qualifies as medium sized, really. If you look
at the size distribution for typical RE:s (which are usually
handwritten, not machine generated), that's one or two orders of
magnitude larger than medium.
(And even if this was guaranteed to
Guido van Rossum added the comment:
/F?
--
assignee: - effbot
nosy: +effbot, gvanrossum
__
Tracker [EMAIL PROTECTED]
http://bugs.python.org/issue1160
__
___
Python-bugs-list
New submission from
Guido Ostkamp
:
Hello,
a medium size regular expression crashes Python 2.5.1 as follows:
Traceback (most recent call last):
File ./regtest.py, line 14, in module
m = rematch(pats)
File
28 matches
Mail list logo