[Patches] [ python-Patches-720991 ] Some bug fixes for regular ex code.
SourceForge.net
noreply@sourceforge.net
Fri, 18 Apr 2003 11:57:24 -0700
Patches item #720991, was opened at 2003-04-14 09:14
Message generated for change (Comment added) made by herron
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=305470&aid=720991&group_id=5470
Category: Library (Lib)
Group: Python 2.3
Status: Open
Resolution: None
Priority: 5
Submitted By: Gary Herron (herron)
Assigned to: Fredrik Lundh (effbot)
Summary: Some bug fixes for regular ex code.
Initial Comment:
A small fix for bug #545855 and Greg Chapman's
addition of op code SRE_OP_MIN_REPEAT_ONE for
eliminating recursion on simple uses of pattern '*?' on a
long string.
----------------------------------------------------------------------
>Comment By: Gary Herron (herron)
Date: 2003-04-18 18:57
Message:
Logged In: YES
user_id=395736
I copied all the (8) sre files from the 2.3 branch to the
release22-maint branch and compiled and ran the test. It
worked flawlessly with the single exception that module init
functions are declared as type
DL_EXPORT(void) -- in 2.2
and as type
PyMODINIT_FUNC -- in 2.3
If there are no considerations other than getting the tests to run
successfully, then I'll declare success and produce a patch and
submit it. OK?
----------------------------------------------------------------------
Comment By: Guido van Rossum (gvanrossum)
Date: 2003-04-15 18:41
Message:
Logged In: YES
user_id=6380
The Python 2.2 maintenance branch is labeled with the CVS
tag 'release22-maint'. I hope you know or can find out about
working with CVS branches. Good luck!
----------------------------------------------------------------------
Comment By: Gary Herron (herron)
Date: 2003-04-15 16:50
Message:
Logged In: YES
user_id=395736
Sure, I'll port it to Python2.2. I'm surprised it dod not apply
cleanly there, but then I don't know the history of previous
patches (like when lastmark_restore was introduced). I guess
copying all sre code will be the first thing to try. How do I get a
dev version of Python 2.2?
Yes, the *? code is all Greg Chapman's. He sent it to me the day
I announced my volunteering to maintain the sre code. I wrote
the test cases for it, and used it as a great way to learn my way
through the code.
----------------------------------------------------------------------
Comment By: Guido van Rossum (gvanrossum)
Date: 2003-04-14 19:50
Message:
Logged In: YES
user_id=6380
Gary, I wonder if you could rework your fix for Python 2.2?
The patch doesn't apply cleanly there; one of the problems
is that lastmark_restore() doesn't exist. I wonder if maybe
all of the _sre.c code should simply be copied to the 2.2
branch?
----------------------------------------------------------------------
Comment By: Guido van Rossum (gvanrossum)
Date: 2003-04-14 18:15
Message:
Logged In: YES
user_id=6380
Looks cool; I've checked this in unchanged, except changing
one comment: the comment about the test for bug 545855 said
it would generate errors during matching, while when I try
it, the pattern generates a TypeError during compilation. I
don't feel capable to review the code you added to _sre.c;
I'll assign it to Fredrik, but I don't expect him to have
time to look at it. It seems you haven't broken his
requirement for this code to work back to Python 1.5.2. I'll
backport to Python 2.2 as well.
Do I understand correctly that the .*? addition is all Greg
Chapman's work?
----------------------------------------------------------------------
Comment By: Guido van Rossum (gvanrossum)
Date: 2003-04-14 16:46
Message:
Logged In: YES
user_id=6380
Will look at this ASAP.
----------------------------------------------------------------------
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=305470&aid=720991&group_id=5470