[issue2636] Regexp 2.7 (modifications to current re 2.2.2)

2010-09-12 Thread Matthew Barnett
Matthew Barnett added the comment: issue2636-20100913.zip is a new version of the regex module. I've removed the ZEROWIDTH flag and added the NEW flag, which turns on the new behaviour such as splitting on zero-width matches and positional flags. If the NEW flag isn't turned o

[issue1708652] Exact matching

2010-09-17 Thread Matthew Barnett
Matthew Barnett added the comment: Does this request still stand? If so then I'll add it to the new regex module. -- ___ Python tracker <http://bugs.python.org/issu

[issue2636] Regexp 2.7 (modifications to current re 2.2.2)

2010-09-17 Thread Matthew Barnett
Matthew Barnett added the comment: issue2636-20100918.zip is a new version of the regex module. I've added 'pos' and 'endpos' arguments to regex.sub and regex.subn and refactored a little. I can't think of any other features that need to be added or see any mor

[issue1708652] Exact matching

2010-09-18 Thread Matthew Barnett
Matthew Barnett added the comment: '$' matches at the end of the string or at a newline at the end of a string (if multiline mode isn't turned on). '\Z' matches only at the end of the string. If not even the OP is convinced of the need, then I have

[issue2027] Module containing C implementations of common text algorithms

2010-09-20 Thread Matthew Barnett
Matthew Barnett added the comment: I've started on a module called 'texttools'. So far it has Levenshtein and Porter (both coded in C). If there's interest I'll put it on PyPI. Suggestions for other additions? -- nosy: +mrabarnett _

[issue2636] Regexp 2.7 (modifications to current re 2.2.2)

2010-09-21 Thread Matthew Barnett
Matthew Barnett added the comment: I use Python 3, where len("\U00010337") == 2 on a narrow build. Yes, wide Unicode on a narrow build is a problem: >>> regex.findall("\\U00010337", "a\U00010337bc") [] >>> regex.findall("(?i)\\U00010337&quo

[issue2972] arguments and default path not set in site.py and sitecustomize.py

2010-09-28 Thread Matthew Woodcraft
Matthew Woodcraft added the comment: open("/proc/self/cmdline").read() should work on linux (note that the arguments are separated by NULs). -- nosy: +mattheww ___ Python tracker <http://bugs.python.

[issue9976] Make TestCase._formatMessage public

2010-09-28 Thread Matthew Woodcraft
New submission from Matthew Woodcraft : It would be pleasant if TestCase._formatMessage, or something similar, could be made part of the documented API; I think pretty much anyone writing a custom TypeEqualityFunc is going to end up reimplementing it. (This is the code that makes the

[issue9977] TestCase.assertItemsEqual's description of differences

2010-09-28 Thread Matthew Woodcraft
New submission from Matthew Woodcraft : TestCase.assertItemsEqual uses two different techniques to describe the differences in the inputs that it compares. If the inputs are sortable, it sorts them and then uses assertSequenceEqual to describe the difference between them considered as ordered

[issue9977] TestCase.assertItemsEqual's description of differences

2010-10-01 Thread Matthew Woodcraft
Matthew Woodcraft added the comment: Terry J. Reedy wrote: > If I understand correctly, you are requesting that .assertItemsEqual > only use the 2nd (multiset comparison) method, so that if one want the > first method, one should directly call .assertSequenceEqual(sorted(a), > sort

[issue2636] Regexp 2.7 (modifications to current re 2.2.2)

2010-10-08 Thread Matthew Barnett
Matthew Barnett added the comment: issue2636-20101009.zip is a new version of the regex module. It appears from a posting in python-list and a closer look at the docs that string positions in the 're' module are limited to 32 bits, even on 64-bit builds. I think it's because

[issue4106] multiprocessing occasionally spits out exception during shutdown

2010-10-10 Thread Matthew Woodcraft
Changes by Matthew Woodcraft : -- nosy: +mattheww ___ Python tracker <http://bugs.python.org/issue4106> ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue2636] Regexp 2.7 (modifications to current re 2.2.2)

2010-10-14 Thread Matthew Barnett
Matthew Barnett added the comment: I am not able to build or test a 64-bit version. The update was to the source files to ensure that if it is compiled for 64 bits then the string positions will also be 64-bit. This change was prompted by a poster who tried to use the re module of a 64-bit

[issue2636] Regexp 2.7 (modifications to current re 2.2.2)

2010-10-29 Thread Matthew Barnett
Matthew Barnett added the comment: That's a bug. I'll fix it as soon has I've reinstalled the SDK. -- ___ Python tracker <http://bugs.py

[issue2636] Regexp 2.7 (modifications to current re 2.2.2)

2010-10-29 Thread Matthew Barnett
Matthew Barnett added the comment: issue2636-20101029.zip is a new version of the regex module. I've also added to the unit tests. -- Added file: http://bugs.python.org/file19419/issue2636-20101029.zip ___ Python tracker <http://bugs.py

[issue2636] Regexp 2.7 (modifications to current re 2.2.2)

2010-10-29 Thread Matthew Barnett
Matthew Barnett added the comment: issue2636-20101030.zip is a new version of the regex module. I've also added yet more to the unit tests. -- Added file: http://bugs.python.org/file19422/issue2636-20101030.zip ___ Python tracker

[issue2636] Regexp 2.7 (modifications to current re 2.2.2)

2010-10-30 Thread Matthew Barnett
Matthew Barnett added the comment: issue2636-20101030a.zip is a new version of the regex module. This bug was a bit more difficult to fix, but I think it's OK now! -- Added file: http://bugs.python.org/file19435/issue2636-20101030a.zip ___ P

[issue2636] Regexp 2.7 (modifications to current re 2.2.2)

2010-11-01 Thread Matthew Barnett
Matthew Barnett added the comment: issue2636-20101101.zip is a new version of the regex module. I hope it's finally fixed this time! :-) -- Added file: http://bugs.python.org/file19456/issue2636-20101101.zip ___ Python tracker

[issue2636] Regexp 2.7 (modifications to current re 2.2.2)

2010-11-01 Thread Matthew Barnett
Matthew Barnett added the comment: issue2636-20101102.zip is a new version of the regex module. -- Added file: http://bugs.python.org/file19460/issue2636-20101102.zip ___ Python tracker <http://bugs.python.org/issue2

[issue2636] Regexp 2.7 (modifications to current re 2.2.2)

2010-11-02 Thread Matthew Barnett
Matthew Barnett added the comment: issue2636-20101102a.zip is a new version of the regex module. msg120204 relates to issue #1519638 "Unmatched group in replacement". In 'regex' an unmatched group is treated as an empty string in a replacement template. This behaviour is

[issue10328] re.sub[n] doesn't seem to handle /Z replacements correctly in all cases

2010-11-05 Thread Matthew Barnett
Matthew Barnett added the comment: It's a bug caused by trying to avoid getting stuck when a zero-width match is found. Basically the fix is to advance one character after a zero-width match, but that doesn't always give the correct result. There are a number of related issues

[issue2636] Regexp 2.7 (modifications to current re 2.2.2)

2010-11-05 Thread Matthew Barnett
Matthew Barnett added the comment: issue2636-20101106.zip is a new version of the regex module. Fix for issue 10328, which regex also shared. -- Added file: http://bugs.python.org/file19514/issue2636-20101106.zip ___ Python tracker <h

[issue2636] Regexp 2.7 (modifications to current re 2.2.2)

2010-11-11 Thread Matthew Barnett
Matthew Barnett added the comment: It looks like a similar problem to msg116252 and msg116276. -- ___ Python tracker <http://bugs.python.org/issue2636> ___ ___

[issue2636] Regexp 2.7 (modifications to current re 2.2.2)

2010-11-13 Thread Matthew Barnett
Matthew Barnett added the comment: issue2636-20101113.zip is a new version of the regex module. It now supports Unicode 6.0.0. -- Added file: http://bugs.python.org/file19597/issue2636-20101113.zip ___ Python tracker <http://bugs.python.

[issue11288] Python installed from MSI doesn't work

2011-02-22 Thread Matthew Funke
New submission from Matthew Funke : I uninstalled Python 3.1.3 and installed the 32-bit version of Python 3.2 on my 64-bit Win7 box. (My favorite IDE requires the 32-bit version.) trying to run IDLE crashes; running C:\python32\python.exe returns this error: Fatal Python error

[issue11288] Python installed from MSI doesn't work

2011-02-22 Thread Matthew Funke
Matthew Funke added the comment: Here's the output, in its entirety: - C:\Python32>python -v # installing zipimport hook import zipimport # builtin # installed zipimport hook Fatal Python error: Py_Initialize: unable to load the file system codec LookupError:

[issue11288] Python installed from MSI doesn't work

2011-02-22 Thread Matthew Funke
Matthew Funke added the comment: I also tried uninstalling, re-downloading the MSI, and re-installing, but no joy. Thank you for any insight you can lend. -- ___ Python tracker <http://bugs.python.org/issue11

[issue11288] Python installed from MSI doesn't work

2011-02-23 Thread Matthew Funke
Matthew Funke added the comment: Changing the environment variables did the trick! Thank you very much! -- ___ Python tracker <http://bugs.python.org/issue11

[issue11307] re engine exhaustively explores more than necessary

2011-02-24 Thread Matthew Barnett
Matthew Barnett added the comment: It's a known issue (see issue #1662581, for example). There's a new implementation at PyPI which doesn't have this problem: http://pypi.python.org/pypi/regex -- nosy: +mrabarnett ___ Python

[issue2636] Regexp 2.7 (modifications to current re 2.2.2)

2011-03-14 Thread Matthew Barnett
Matthew Barnett added the comment: @Gregory: I've added you to the project. I'm currently trying to fix a problem with iterators shared across threads. As a temporary measure, the current release on PyPI doesn't enable multithreading for them. The mrab-regex-hg project doe

[issue2636] Regexp 2.7 (modifications to current re 2.2.2)

2011-03-15 Thread Matthew Barnett
Matthew Barnett added the comment: I've fixed the problem with iterators for both Python 3 and Python 2. They can now be shared safely across threads. I've updated the release on PyPI. -- ___ Python tracker <http://bugs.python.

[issue6210] Exception Chaining missing method for suppressing context

2011-03-16 Thread Matthew Barnett
Matthew Barnett added the comment: I've been looking through the list of current keywords and the best syntax I could come up with for suppressing the context is: try: x / y except ZeroDivisionError as e: raise as Exception( 'Invalid value for y' ) T

[issue11665] Regexp findall freezes

2011-03-25 Thread Matthew Barnett
Matthew Barnett added the comment: Alex is correct. This part: [^<>]* can match an empty string, and it's nested with a repeated group. It stalls, repeatedly matching an empty string. Incidentally, my regex implementation (available on Py

[issue11733] Implement a `Counter.elements_count` method

2011-03-31 Thread Matthew Barnett
Matthew Barnett added the comment: The name isn't meaningful to me. My preference would be for something like "total_count". -- nosy: +mrabarnett ___ Python tracker <http://bugs.pyt

[issue11775] `bool(Counter({'a': 0})) is True`

2011-04-05 Thread Matthew Barnett
Matthew Barnett added the comment: It depends on what kind of object it's like. If it's like a dict then your example is clearly not empty, but if it's like a set then it /is/ empty, in which case it's empty if: all(count == 0 for count in my_counter.values

[issue11947] re.IGNORECASE does not match literal "_" (underscore)

2011-04-28 Thread Matthew Barnett
Matthew Barnett added the comment: help(re.sub) says: sub(pattern, repl, string, count=0) and re.IGNORECASE has a value of 2. Therefore this: re.sub("_", "X", subject, re.IGNORECASE) is telling it to replace at most 2 occurrences of "_".

[issue11947] re.IGNORECASE does not match literal "_" (underscore)

2011-04-28 Thread Matthew Barnett
Matthew Barnett added the comment: I don't know how much code that might break. It might not be that much; I can't remember when I last used re.sub without the default count. -- ___ Python tracker <http://bugs.python.o

[issue11957] re.sub confusion between count and flags args

2011-05-06 Thread Matthew Barnett
Matthew Barnett added the comment: Something like "" may be more Pythonic. -- ___ Python tracker <http://bugs.python.org/issue11957> ___ ___ Python-b

[issue12078] re.sub() replaces only several matches

2011-05-14 Thread Matthew Barnett
Matthew Barnett added the comment: Argument 4 of re.sub is the maximum number of replacements, NOT flags: Help on function sub in module re: sub(pattern, repl, string, count=0, flags=0) Return the string obtained by replacing the leftmost non-overlapping occurrences of the pattern in

[issue12130] regex 0.1.20110514 findall overlapped not working with 'start of string' expression

2011-05-20 Thread Matthew Barnett
Matthew Barnett added the comment: Replied to the regex bug tracker. -- ___ Python tracker <http://bugs.python.org/issue12130> ___ ___ Python-bugs-list mailin

[issue7132] Regexp: capturing groups in repetitions

2010-11-18 Thread Matthew Barnett
Matthew Barnett added the comment: Earlier this week I discovered that .Net supports repeated capture and its API suggested a much cleaner approach than what Perl offered, so I'll be adding it to the regex module at: http://pypi.python.org/pypi/regex The new methods will follo

[issue2636] Regexp 2.7 (modifications to current re 2.2.2)

2010-11-19 Thread Matthew Barnett
Matthew Barnett added the comment: issue2636-20101120.zip is a new version of the regex module. The match object now supports additional methods which return information on all the successful matches of a repeated capture group. The API was inspired by that of .Net: matchobject.captures

[issue2636] Regexp 2.7 (modifications to current re 2.2.2)

2010-11-20 Thread Matthew Barnett
Matthew Barnett added the comment: issue2636-20101121.zip is a new version of the regex module. The captures didn't work properly with lookarounds or atomic groups. -- Added file: http://bugs.python.org/file19723/issue2636-20101121.zip ___ P

[issue1859] textwrap doesn't linebreak on "\n"

2010-11-22 Thread Matthew Barnett
Matthew Barnett added the comment: I'd be interested in having a go if I knew what the desired behaviour was, ie unit tests to confirm what was 'correct'. How should it handle line breaks? Should it treat them like any other whitespace as at present, should it honour them, o

[issue2636] Regexp 2.7 (modifications to current re 2.2.2)

2010-11-23 Thread Matthew Barnett
Matthew Barnett added the comment: issue2636-20101123.zip is a new version of the regex module. Oops, sorry, the weird behaviour of msg11 was a bug. :-( -- Added file: http://bugs.python.org/file19786/issue2636-20101123.zip ___ Python tracker

[issue1859] textwrap doesn't linebreak on "\n"

2010-11-23 Thread Matthew Barnett
Matthew Barnett added the comment: textwrap_2010-11-23.diff is my attempt to provide a fix, if it's wanted/needed. -- Added file: http://bugs.python.org/file19791/textwrap_2010-11-23.diff ___ Python tracker <http://bugs.python.org/i

[issue10532] A bug related to matching the empty string

2010-11-25 Thread Matthew Barnett
Matthew Barnett added the comment: The spans say this: >>> for m in re.finditer('((.d.)*)*', 'adb'): print(m.span()) (0, 3) (3, 3) There's an non-empty match followed by an empty match. IHMO, not a bug. -- nosy: +mrabarnett

[issue2650] re.escape should not escape underscore

2010-11-25 Thread Matthew Barnett
Matthew Barnett added the comment: Re the regex module (issue #2636), would a good compromise be: regex.escape(user_input, special_only=True) to maintain compatibility? -- nosy: +mrabarnett ___ Python tracker <http://bugs.python.org/issue2

[issue2636] Regexp 2.7 (modifications to current re 2.2.2)

2010-11-29 Thread Matthew Barnett
Matthew Barnett added the comment: issue2636-20101130.zip is a new version of the regex module. Added 'special_only' keyword parameter (default False) to regex.escape. When True, regex.escape escapes only 'special' characters, such as '?'. -- Adde

[issue2636] Regexp 2.7 (modifications to current re 2.2.2)

2010-12-06 Thread Matthew Barnett
Matthew Barnett added the comment: issue2636-20101207.zip is a new version of the regex module. It includes additional checks against pathological regexes. -- Added file: http://bugs.python.org/file19965/issue2636-20101207.zip ___ Python tracker

[issue2636] Regexp 2.7 (modifications to current re 2.2.2)

2010-12-10 Thread Matthew Barnett
Matthew Barnett added the comment: issue2636-20101210.zip is a new version of the regex module. I've extended the additional checks of the previous version. It has been tested with Python 2.5 to Python 3.2b1. -- Added file: http://bugs.python.org/file20001/issue2636-2010121

[issue10704] Regex 0.1.20101210 Python 3.1 install problem Mac OS X 10.6.5

2010-12-14 Thread Matthew Barnett
Matthew Barnett added the comment: I use Windows XP, so I can't help with MacOS X. >From the error log it looks like it doesn't like the sources for Python either! -- ___ Python tracker <http://bugs.pytho

[issue10703] Regex 0.1.20101210

2010-12-14 Thread Matthew Barnett
Matthew Barnett added the comment: The regex module is intended to replace the re module, so its default behaviour is the same: in Python 2, regexes default to matching ASCII, and in Python 3, they default to matching Unicode. If you want to use a regex on a Unicode string in Python 2 then

[issue2636] Regexp 2.7 (modifications to current re 2.2.2)

2010-12-23 Thread Matthew Barnett
Matthew Barnett added the comment: issue2636-20101224.zip is a new version of the regex module. Case-insensitive matching is now faster. The matching functions and methods now accept a keyword argument to release the GIL during matching to enable other Python threads to run concurrently

[issue2636] Regexp 2.7 (modifications to current re 2.2.2)

2010-12-24 Thread Matthew Barnett
Matthew Barnett added the comment: I've been trying to push the history to Launchpad, completely without success; it just won't authenticate (no such account, even though I can log in!). I doubt that the history would be much use to

[issue2636] Regexp 2.7 (modifications to current re 2.2.2)

2010-12-24 Thread Matthew Barnett
Matthew Barnett added the comment: It does have an SSH key. It's probably something simple that I'm missing. I think that the only change I'm likely to make is to a support script I use; it currently uses hard-coded paths, etc,

[issue6210] Exception Chaining missing method for suppressing context

2010-12-27 Thread Matthew Barnett
Changes by Matthew Barnett : -- nosy: +mrabarnett ___ Python tracker <http://bugs.python.org/issue6210> ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue2636] Regexp 2.7 (modifications to current re 2.2.2)

2010-12-27 Thread Matthew Barnett
Matthew Barnett added the comment: issue2636-20101228.zip is a new version of the regex module. Sorry for the delay, the fix took me a bit longer than I expected. :-) -- Added file: http://bugs.python.org/file20176/issue2636-20101228.zip ___ Python

[issue6210] Exception Chaining missing method for suppressing context

2010-12-27 Thread Matthew Barnett
Matthew Barnett added the comment: Regarding syntax, I'm undecided between: raise with new_exception and: raise new_exception with caught_exception I think that the second form is clearer: try: ... exception SomeException as ex: raise SomeOtherExce

[issue2636] Regexp 2.7 (modifications to current re 2.2.2)

2010-12-28 Thread Matthew Barnett
Matthew Barnett added the comment: issue2636-20101228a.zip is a new version of the regex module. It now compiles the pattern quickly. -- Added file: http://bugs.python.org/file20182/issue2636-20101228a.zip ___ Python tracker <h

[issue2636] Regexp 2.7 (modifications to current re 2.2.2)

2010-12-28 Thread Matthew Barnett
Matthew Barnett added the comment: issue2636-20101229.zip is a new version of the regex module. It now compiles the pattern quickly. -- Added file: http://bugs.python.org/file20185/issue2636-20101229.zip ___ Python tracker <http://bugs.python.

[issue2636] Regexp 2.7 (modifications to current re 2.2.2)

2010-12-29 Thread Matthew Barnett
Matthew Barnett added the comment: issue2636-20101230.zip is a new version of the regex module. I've delayed the building of the tables for fast searching until their first use, which, hopefully, will mean that fewer will be actually built. -- Added file: http://bugs.pytho

[issue2636] Regexp 2.7 (modifications to current re 2.2.2)

2010-12-30 Thread Matthew Barnett
Matthew Barnett added the comment: The project is now at: https://code.google.com/p/mrab-regex/ Unfortunately it doesn't have the revision history. I don't know why not. -- ___ Python tracker <http://bugs.python.

[issue2636] Regexp 2.7 (modifications to current re 2.2.2)

2010-12-30 Thread Matthew Barnett
Matthew Barnett added the comment: msg124904: It would, of course, be slower on first use, but I'm surprised that it's (that much) slower afterwards. msg124905, msg124906: I have those matching now. msg124931: The sources are in TortoiseBzr, but I couldn't upload, so

[issue2636] Regexp 2.7 (modifications to current re 2.2.2)

2010-12-30 Thread Matthew Barnett
Matthew Barnett added the comment: Even after much uninstalling and reinstalling (and reboots) I never got TortoiseSVN to work properly, so I switched to TortoiseHg. The sources are now at: https://code.google.com/p/mrab-regex-hg

[issue2636] Regexp 2.7 (modifications to current re 2.2.2)

2010-12-31 Thread Matthew Barnett
Matthew Barnett added the comment: Why not? :-) -- ___ Python tracker <http://bugs.python.org/issue2636> ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue2636] Regexp 2.7 (modifications to current re 2.2.2)

2010-12-31 Thread Matthew Barnett
Matthew Barnett added the comment: Just to check, does this still work with your changes of msg124959? regex.search(r'\d{4}(\s*\w)?\W*((?!\d)\w){2}', "XX") For me it fails to match! -- ___ Python tracker <http://bu

[issue2636] Regexp 2.7 (modifications to current re 2.2.2)

2011-01-03 Thread Matthew Barnett
Matthew Barnett added the comment: I've just done a bug fix. The issue is at: https://code.google.com/p/mrab-regex-hg/ BTW, Jacques, I trust that your regression tests don't test how long a regex takes to fail to match, because a bug could cause such a non-match to occur to

[issue2636] Regexp 2.7 (modifications to current re 2.2.2)

2011-01-16 Thread Matthew Barnett
Matthew Barnett added the comment: That line crept in somehow. As it's been there since the 2010-12-24 release and you're the first one to have a problem with it (and you've already fixed it), it looks like a new upload isn't urgently needed (I don't have any

[issue2636] Regexp 2.7 (modifications to current re 2.2.2)

2011-01-25 Thread Matthew Barnett
Matthew Barnett added the comment: I've reduced the size of some internal tables. -- ___ Python tracker <http://bugs.python.org/issue2636> ___ ___ Pytho

[issue9207] multiprocessing occasionally spits out exception during shutdown (_handle_workers)

2011-02-04 Thread Matthew Walker
Matthew Walker added the comment: It looks to me as if this issue has already been pretty much sorted out already. Maybe all it lacks is to be officially closed, but just in case I just wanted to add that I too saw this bug (stock python 2.7, Ubuntu 10.04 64 bit). My example code was

[issue9207] multiprocessing occasionally spits out exception during shutdown (_handle_workers)

2011-02-04 Thread Matthew Walker
Matthew Walker added the comment: Oh, and the stack trace was identical to Greg's: $ ./test.py I am process number 10378 : i = 0 [...] I am process number 10390 : i = 9 [0, 1, 4, 9, 16, 25, 36, 49, 64, 81] Exception in thread Thread-1 (most likely raised during interpreter shu

[issue11198] re sub subn backreferrence too few replacements

2011-02-11 Thread Matthew Barnett
Matthew Barnett added the comment: Argument 4 of re.subn(...) is 'count', the maximum number of replacements to perform, but you're passing in the MULTILINE flag, which happens to have the integer value 8, hence you're limiting the maximum number

[issue3026] mmap broken with large files on 64bit system

2008-06-01 Thread Matthew Mueller
New submission from Matthew Mueller <[EMAIL PROTECTED]>: mmap on large files on 64 bit platforms in python >=2.5 returns some sort of garbage. In 2.4 it would just throw an exception. Now I get something like this (script runs md5.md5 on mmap object, and then runs os.system m

[issue3026] mmap broken with large files on 64bit system

2008-06-01 Thread Matthew Mueller
Matthew Mueller <[EMAIL PROTECTED]> added the comment: Actually, I just realized that this might be a problem with md5 module instead. Either way, something is busted. ___ Python tracker <[EMAIL PROTECTED]> <http://bugs.pytho

[issue3262] re.split doesn't split with zero-width regex

2008-07-02 Thread Matthew Barnett
New submission from Matthew Barnett <[EMAIL PROTECTED]>: re.split doesn't split a string when the regex matches a zero characters. For example: re.split(r'\b', 'a b') returns ['a b'] instead of ['', 'a', &#

[issue3262] re.split doesn't split with zero-width regex

2008-07-02 Thread Matthew Barnett
Matthew Barnett <[EMAIL PROTECTED]> added the comment: The attached patch appears to work. -- keywords: +patch Added file: http://bugs.python.org/file10794/split_zero_width.diff ___ Python tracker <[EMAIL PROTECTED]> <http://bugs.pytho

[issue3262] re.split doesn't split with zero-width regex

2008-07-02 Thread Matthew Barnett
Matthew Barnett <[EMAIL PROTECTED]> added the comment: I've found that this issue has been discussed before: #988761. ___ Python tracker <[EMAIL PROTECTED]> <http://bugs.

[issue3262] re.split doesn't split with zero-width regex

2008-07-02 Thread Matthew Barnett
Matthew Barnett <[EMAIL PROTECTED]> added the comment: New patch version after studying #988761 and doing more testing. Added file: http://bugs.python.org/file10797/split_zero_width_2.diff ___ Python tracker <[EMAIL PROTECTED]> <http://

[issue3262] re.split doesn't split with zero-width regex

2008-07-02 Thread Matthew Barnett
Changes by Matthew Barnett <[EMAIL PROTECTED]>: Removed file: http://bugs.python.org/file10794/split_zero_width.diff ___ Python tracker <[EMAIL PROTECTED]> <http://bugs.pytho

[issue3262] re.split doesn't split with zero-width regex

2008-07-08 Thread Matthew Barnett
Matthew Barnett <[EMAIL PROTECTED]> added the comment: There appear to be 2 opinions on this issue: 1. It's a bug, a corner case that got missed. 2. It's always been like this, so it's probably a design decision, although no-one can't point to where or when the decisi

[issue3511] Incorrect charset range handling with ignore case flag?

2008-08-06 Thread Matthew Barnett
New submission from Matthew Barnett <[EMAIL PROTECTED]>: While working on the regex code in sre_compile.py I came across the following code in the handling of charset ranges in _optimize_charset: for i in range(fixup(av[0]), fixup(av[1])+1): charmap[i] = 1 The function

[issue3654] Duplicated test name in regex test script

2008-08-23 Thread Matthew Barnett
New submission from Matthew Barnett <[EMAIL PROTECTED]>: The regex test script test_re.py has 2 tests called 'test_ignore_case'. -- components: Tests messages: 71813 nosy: mrabarnett severity: normal status: open title: Duplicated test name in regex test script vers

[issue516762] have a way to search backwards for re

2008-09-08 Thread Matthew Barnett
Matthew Barnett <[EMAIL PROTECTED]> added the comment: Does this request still stand? I'm working on the re module at the moment. -- nosy: +mrabarnett ___ Python tracker <[EMAIL PROTECTED]> <http://bugs.py

[issue3825] Major reworking of Python 2.5.2 re module

2008-09-09 Thread Matthew Barnett
New submission from Matthew Barnett <[EMAIL PROTECTED]>: This is a major reworking of the re module in Python 2.5.2. Added atomic groups. Added possessive quantifiers. Lookbehinds can now be variable length. Typically x2 faster. More changes to follow. -- components: R

[issue3825] Major reworking of Python 2.5.2 re module

2008-09-09 Thread Matthew Barnett
Changes by Matthew Barnett <[EMAIL PROTECTED]>: Removed file: http://bugs.python.org/file11447/regex_2.5.2.diff ___ Python tracker <[EMAIL PROTECTED]> <http://bugs.pytho

[issue3825] Major reworking of Python 2.5.2 re module

2008-09-09 Thread Matthew Barnett
Matthew Barnett <[EMAIL PROTECTED]> added the comment: Corrected the diff file. I worked from Python 2.5.2 because that's what I'm currently using. I'll work from the trunk in future. Added file: http://bugs.python.org/file11451/regex_2.5.2.diff _

[issue3825] Major reworking of Python 2.5.2 re module

2008-09-10 Thread Matthew Barnett
Matthew Barnett <[EMAIL PROTECTED]> added the comment: This is different work from a different author than #2636. I've submitted what I've done so far in case my computer gets hit by a bus. :-) I still have more work to do on it, so I'm not concerned that it might not ge

[issue3825] Major reworking of Python 2.5.2 re module

2008-09-13 Thread Matthew Barnett
Changes by Matthew Barnett <[EMAIL PROTECTED]>: Removed file: http://bugs.python.org/file11451/regex_2.5.2.diff ___ Python tracker <[EMAIL PROTECTED]> <http://bugs.pytho

[issue3825] Major reworking of Python 2.5.2 re module

2008-09-13 Thread Matthew Barnett
Matthew Barnett <[EMAIL PROTECTED]> added the comment: Corrected the diff file, again. :-( The atomic groups and possessive quantifiers are as described at http://www.regular-expressions.info. Added file: http://bugs.python.org/file11484/regex_2.5.

[issue3825] Major reworking of Python 2.5.2 re module

2008-09-15 Thread Matthew Barnett
Matthew Barnett <[EMAIL PROTECTED]> added the comment: I know what you mean about the dependencies! My current problem is that now I'm working with the current trunk, which means using Visual C++ Express 2008 instead of 2005. When debugging it's behaving like the debug inf

[issue3825] Major reworking of Python 2.5.2 re module

2008-09-15 Thread Matthew Barnett
Matthew Barnett <[EMAIL PROTECTED]> added the comment: Used Visual C++ Express 2005 and the PC\VS8.0 directory. Same problem. ___ Python tracker <[EMAIL PROTECTED]> <http://bugs.pytho

[issue3825] Major reworking of Python 2.5.2 re module

2008-09-15 Thread Matthew Barnett
Matthew Barnett <[EMAIL PROTECTED]> added the comment: _sre.c is over 6000, but it does contain macros. I didn't have this problem when based on Python 2.5.2 in Express 2005. ___ Python tracker <[EMAIL PROTECTED]> <http://bugs.

[issue3825] Major reworking of Python 2.5.2 re module

2008-09-20 Thread Matthew Barnett
Matthew Barnett <[EMAIL PROTECTED]> added the comment: This patch is now based on Python 2.6rc2. I've reduced the number of macros and used functions instead, provided that it didn't cost much in terms of speed. In many cases it should be faster than the current release, and at

[issue3825] Major reworking of Python 2.5.2 re module

2008-09-20 Thread Matthew Barnett
Changes by Matthew Barnett <[EMAIL PROTECTED]>: Removed file: http://bugs.python.org/file11530/regex_2.6rc2.diff ___ Python tracker <[EMAIL PROTECTED]> <http://bugs.pytho

[issue3825] Major reworking of Python 2.5.2 re module

2008-09-20 Thread Matthew Barnett
Matthew Barnett <[EMAIL PROTECTED]> added the comment: Bugfix. Added file: http://bugs.python.org/file11532/regex_2.6rc2.diff ___ Python tracker <[EMAIL PROTECTED]> <http://bugs.pytho

[issue3262] re.split doesn't split with zero-width regex

2008-09-21 Thread Matthew Barnett
Matthew Barnett <[EMAIL PROTECTED]> added the comment: I wonder whether it could be put into Python 3 where certain breaks in backwards compatibility are to be expected. ___ Python tracker <[EMAIL PROTECTED]> <http://bugs.pytho

[issue3825] Major reworking of Python 2.5.2 re module

2008-09-21 Thread Matthew Barnett
Matthew Barnett <[EMAIL PROTECTED]> added the comment: Fixed the matching of word boundaries when searching and matching in substrings. Added file: http://bugs.python.org/file11543/regex_2.6rc2+1.diff ___ Python tracker <[EMAIL PROTECTE

[issue3825] Major reworking of Python 2.5.2 re module

2008-09-21 Thread Matthew Barnett
Matthew Barnett <[EMAIL PROTECTED]> added the comment: regex_2.6rc2+2.diff is a bugfix for capture groups in look-behinds. Added file: http://bugs.python.org/file11552/regex_2.6rc2+2.diff ___ Python tracker <[EMAIL PROTECTED]> <http://

[issue3825] Major reworking of Python 2.5.2 re module

2008-09-21 Thread Matthew Barnett
Changes by Matthew Barnett <[EMAIL PROTECTED]>: Removed file: http://bugs.python.org/file11552/regex_2.6rc2+2.diff ___ Python tracker <[EMAIL PROTECTED]> <http://bugs.pytho

<    1   2   3   4   5   6   7   8   9   >