| Commit message (Collapse) | Author | Age | Files | Lines |
| |
|
|
|
|
| |
in the last revison
|
|
|
|
| |
to migrate.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
I've applied a modified version of Greg Chapman's patch. I've included
the fixes without introducing the reorganization mentioned, for the sake
of stability. Also, the second fix mentioned in the patch don't fix the
mentioned problem anymore, because of the change introduced by patch
#720991 (by Greg as well). The new fix wasn't complicated though, and is
included as well.
As a note. It seems that there are other places that require the
"protection" of LASTMARK_SAVE()/LASTMARK_RESTORE(), and are just waiting
for someone to find how to break them. Particularly, I belive that every
recursion of SRE_MATCH() should be protected by these macros. I won't
do that right now since I'm not completely sure about this, and we don't
have much time for testing until the next release.
|
|
|
|
| |
Will backport to 2.2.
|
|
|
|
|
|
|
| |
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.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
from Greg Chapman.
* Modules/_sre.c
(lastmark_restore): New function, implementing algorithm to restore
a state to a given lastmark. In addition to the similar algorithm used
in a few places of SRE_MATCH, restore lastindex when restoring lastmark.
(SRE_MATCH): Replace lastmark inline restoring by lastmark_restore(),
function. Also include it where missing. In SRE_OP_MARK, set lastindex
only if i > lastmark.
* Lib/test/re_tests.py
* Lib/test/test_sre.py
Included regression tests for the fixed bugs.
* Misc/NEWS
Mention fixes.
|
|
|
|
|
|
|
|
| |
imports of test modules now import from the test package. Other
related oddities are also fixed (like DeprecationWarning filters that
weren't specifying the full import part, etc.). Also did a general
code cleanup to remove all "from test.test_support import *"'s. Other
from...import *'s weren't changed.
|
|
|
|
|
|
|
|
|
|
|
| |
imports e.g. test_support must do so using an absolute package name
such as "import test.test_support" or "from test import test_support".
This also updates the README in Lib/test, and gets rid of the
duplicate data dirctory in Lib/test/data (replaced by
Lib/email/test/data).
Now Tim and Jack can have at it. :)
|
|
|
|
|
|
|
| |
backed out of broken minimal repeat patch from July
also fixed a couple of minor potential resource leaks in pattern_subx
(Guido had already fixed the big one)
|
|
|
|
|
| |
pickled and we do *not* expect exceptions from either pickle or
cPickle.
|
| |
|
|
|
|
| |
(sorry, barry)
|
|
|
|
|
|
| |
check to the test suite.
added a few missing exception checks in the _sre module
|
|
|
|
|
|
|
|
| |
compile should raise error for non-strings
SRE bug #432570, 448951:
reset group after failed match
also bumped version number to 2.2.0
|
|
|
|
|
|
| |
\g<x> group reference followed by a character escape
(also restructured a few things on the way to fixing #449000)
|
|
|
|
|
|
|
| |
#462270: sub-tle difference between pre.sub and sre.sub. PRE ignored
an empty match at the previous location, SRE didn't.
also synced with Secret Labs "sreopen" codebase.
|
|
|
|
|
|
|
|
| |
- Do not compile unicodeobject, unicodectype, and unicodedata if Unicode is disabled
- check for Py_USING_UNICODE in all places that use Unicode functions
- disables unicode literals, and the builtin functions
- add the types.StringTypes list
- remove Unicode literals from most tests.
|
| |
|
|
|
|
|
| |
sure about this one, but test #133283 now works even with the fix in
place, and so does the test suite. we'll see what comes up...
|
|
|
|
| |
machines...
|
|
|
|
|
|
| |
- take locale into account for word boundary anchors (#410271)
- restored 2.0's *? behaviour (#233283, #408936 and others)
- speed up re.sub/re.subn
|
|
|
|
|
| |
- removed __all__ cruft from internal modules (sorry, skip)
- don't assume ASCII for string escapes (sorry, per)
|
|
|
|
| |
(This one was trivial -- no actual string. references in it!)
|
|
|
|
| |
'verify' iff it's used by a test module...
|
|
|
|
|
|
|
| |
and replaces them with a new API verify(). As a result the regression
suite will also perform its tests in optimization mode.
Written by Marc-Andre Lemburg. Copyright assigned to Guido van Rossum.
|
|
|
|
| |
compatibility patches.
|
|
|
|
|
|
|
|
| |
(bugs #115903, #115696)
This is based on a patch by Darrel Gallion. I'm not 100%
sure about this fix, but I haven't managed to come up with
any test case it cannot handle...
|
| |
|
|
|
|
|
|
|
|
|
|
| |
-- added some more docstrings
-- fixed typo in scanner class (#125531)
-- the multiline flag (?m) should't affect the \Z operator (#127259)
-- fixed non-greedy backtracking bug (#123769, #127259)
-- added sre.DEBUG flag (currently dumps the parsed pattern structure)
-- fixed a couple of glitches in groupdict (the #126587 memory leak
had already been fixed by AMK)
|
|
|
|
|
| |
Use != instead of <> since <> is documented as "obsolescent".
Use "is" and "is not" when comparing with None or type objects.
|
|
|
|
|
|
|
|
| |
-- fixed negative lookbehind to work correctly at the beginning
of the target string (bug #117242)
-- improved syntax check; you can no longer refer to a group
inside itself (bug #110866)
|
| |
|
| |
|
|
|
|
|
|
|
|
|
| |
This was a funny one! The test very subtly relied on 1.5.2's
behavior of treating "\x%" as "\x%", i.e. ignoring that was an
\x escape that didn't make sense. But /F implemented PEP 223,
which causes 2.0 to raise an exception on the bad escape.
Fixed by merely making the 3 such strings of this kind into
raw strings.
|
|
|
|
| |
None (as documented) from start/end/span. closes bug #113254
|
|
|
|
|
| |
-- improved the SRE test harness: don't use asserts, test a few more
things (including more boundary conditions)
|
|
|
|
| |
for undefined groups
|
|
|
|
|
|
|
| |
-- improved error messages
-- factored out SRE_COUNT; the same code is used by
SRE_OP_REPEAT_ONE_TEMPLATE
-- minor cleanups
|
|
|
|
| |
the test again...
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
the pattern must have a fixed width.
- got rid of array-module dependencies; the match pro-
gram is now stored inside the pattern object, rather
than in an extra string buffer.
- cleaned up a various of potential leaks, api abuses,
and other minors in the engine module.
- use mal's new isalnum macro, rather than my own work-
around.
- untabified test_sre.py. seems like I removed a couple
of trailing spaces in the process...
|
| |
|
|
- added test suite
|