[issue3231] re.compile fails with some bytes patterns

2008-07-22 Thread Antoine Pitrou

Antoine Pitrou [EMAIL PROTECTED] added the comment:

I think the fix is trivial enough. Committed in r65185.

--
resolution:  - fixed
status: open - closed

___
Python tracker [EMAIL PROTECTED]
http://bugs.python.org/issue3231
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue3231] re.compile fails with some bytes patterns

2008-07-17 Thread Barry A. Warsaw

Changes by Barry A. Warsaw [EMAIL PROTECTED]:


--
priority: deferred blocker - release blocker

___
Python tracker [EMAIL PROTECTED]
http://bugs.python.org/issue3231
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue3231] re.compile fails with some bytes patterns

2008-07-15 Thread Guido van Rossum

Guido van Rossum [EMAIL PROTECTED] added the comment:

Can we make sure this is fixed for beta 3? (Beta 2 would be great too,
but it's getting late.)

--
nosy: +gvanrossum
priority:  - deferred blocker

___
Python tracker [EMAIL PROTECTED]
http://bugs.python.org/issue3231
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue3231] re.compile fails with some bytes patterns

2008-07-15 Thread Benjamin Peterson

Benjamin Peterson [EMAIL PROTECTED] added the comment:

Antoine's patch (with a 3 character fix) looks just fine to me. Guido,
I'm assigning this to you because svn annotate tells me, you made this
change.

--
assignee:  - gvanrossum
nosy: +benjamin.peterson

___
Python tracker [EMAIL PROTECTED]
http://bugs.python.org/issue3231
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue3231] re.compile fails with some bytes patterns

2008-06-28 Thread Antoine Pitrou

New submission from Antoine Pitrou [EMAIL PROTECTED]:

Some patterns can be compiled in str form but not in bytes form. This
was overlooked because the test suite wasn't correctly adapted for py3k:

 re.compile('[\\1]')
_sre.SRE_Pattern object at 0xb7be1410
 re.compile('\\09')
_sre.SRE_Pattern object at 0xb7c4f2f0
 re.compile('\\n')
_sre.SRE_Pattern object at 0xb7be1f50

but:

 re.compile(b'[\\1]')
Traceback (most recent call last):
  File stdin, line 1, in module
  File /home/antoine/py3k/reunicode/Lib/re.py, line 188, in compile
return _compile(pattern, flags)
  File /home/antoine/py3k/reunicode/Lib/re.py, line 240, in _compile
p = sre_compile.compile(pattern, flags)
  File /home/antoine/py3k/reunicode/Lib/sre_compile.py, line 497, in
compile
p = sre_parse.parse(p, flags)
  File /home/antoine/py3k/reunicode/Lib/sre_parse.py, line 685, in parse
p = _parse_sub(source, pattern, 0)
  File /home/antoine/py3k/reunicode/Lib/sre_parse.py, line 320, in
_parse_sub
itemsappend(_parse(source, state))
  File /home/antoine/py3k/reunicode/Lib/sre_parse.py, line 409, in _parse
this = sourceget()
  File /home/antoine/py3k/reunicode/Lib/sre_parse.py, line 215, in get
self.__next()
  File /home/antoine/py3k/reunicode/Lib/sre_parse.py, line 204, in __next
char = char + c
TypeError: Can't convert 'int' object to str implicitly
 re.compile(b'\\09')
Traceback (most recent call last):
  File stdin, line 1, in module
  File /home/antoine/py3k/reunicode/Lib/re.py, line 188, in compile
return _compile(pattern, flags)
  File /home/antoine/py3k/reunicode/Lib/re.py, line 240, in _compile
p = sre_compile.compile(pattern, flags)
  File /home/antoine/py3k/reunicode/Lib/sre_compile.py, line 497, in
compile
p = sre_parse.parse(p, flags)
  File /home/antoine/py3k/reunicode/Lib/sre_parse.py, line 678, in parse
source = Tokenizer(str)
  File /home/antoine/py3k/reunicode/Lib/sre_parse.py, line 187, in
__init__
self.__next()
  File /home/antoine/py3k/reunicode/Lib/sre_parse.py, line 204, in __next
char = char + c
TypeError: Can't convert 'int' object to str implicitly
 re.compile(b'\\n')
Traceback (most recent call last):
  File stdin, line 1, in module
  File /home/antoine/py3k/reunicode/Lib/re.py, line 188, in compile
return _compile(pattern, flags)
  File /home/antoine/py3k/reunicode/Lib/re.py, line 240, in _compile
p = sre_compile.compile(pattern, flags)
  File /home/antoine/py3k/reunicode/Lib/sre_compile.py, line 497, in
compile
p = sre_parse.parse(p, flags)
  File /home/antoine/py3k/reunicode/Lib/sre_parse.py, line 678, in parse
source = Tokenizer(str)
  File /home/antoine/py3k/reunicode/Lib/sre_parse.py, line 187, in
__init__
self.__next()
  File /home/antoine/py3k/reunicode/Lib/sre_parse.py, line 204, in __next
char = char + c
TypeError: Can't convert 'int' object to str implicitly

--
components: Regular Expressions
messages: 68925
nosy: pitrou
severity: normal
status: open
title: re.compile fails with some bytes patterns
type: behavior
versions: Python 3.0

___
Python tracker [EMAIL PROTECTED]
http://bugs.python.org/issue3231
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue3231] re.compile fails with some bytes patterns

2008-06-28 Thread Antoine Pitrou

Antoine Pitrou [EMAIL PROTECTED] added the comment:

Here is a patch fixing both the bug and the test suite.

--
keywords: +patch
Added file: http://bugs.python.org/file10765/rebytes.patch

___
Python tracker [EMAIL PROTECTED]
http://bugs.python.org/issue3231
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com