[issue30187] Regex becomes invalid in python 3.6

2017-04-27 Thread Chris Seto

New submission from Chris Seto:

Expected behavior:
~ ❯❯❯ pyenv shell 3.5.2
~ ❯❯❯ python --version
Python 3.5.2
~ ❯❯❯ python
Python 3.5.2 (default, Oct 24 2016, 00:12:20)
[GCC 4.2.1 Compatible Apple LLVM 8.0.0 (clang-800.0.38)] on darwin
Type "help", "copyright", "credits" or "license" for more information.
>>> import re
>>> re.compile('[^\B]')
re.compile('[^\\B]')
>>> re.compile(r'[^\B]')
re.compile('[^\\B]')

Actual:
~ ❯❯❯ pyenv shell 3.6.0
~ ❯❯❯ python --version
Python 3.6.0
~ ❯❯❯ python
Python 3.6.0 (default, Apr 26 2017, 17:24:07)
[GCC 4.2.1 Compatible Apple LLVM 8.1.0 (clang-802.0.38)] on darwin
Type "help", "copyright", "credits" or "license" for more information.
>>> import re
>>> re.compile('[^\B]')
Traceback (most recent call last):
  File "", line 1, in 
  File "/Users/chrisseto/.pyenv/versions/3.6.0/lib/python3.6/re.py", line 233, 
in compile
return _compile(pattern, flags)
  File "/Users/chrisseto/.pyenv/versions/3.6.0/lib/python3.6/re.py", line 301, 
in _compile
p = sre_compile.compile(pattern, flags)
  File "/Users/chrisseto/.pyenv/versions/3.6.0/lib/python3.6/sre_compile.py", 
line 562, in compile
p = sre_parse.parse(p, flags)
  File "/Users/chrisseto/.pyenv/versions/3.6.0/lib/python3.6/sre_parse.py", 
line 856, in parse
p = _parse_sub(source, pattern, flags & SRE_FLAG_VERBOSE, False)
  File "/Users/chrisseto/.pyenv/versions/3.6.0/lib/python3.6/sre_parse.py", 
line 415, in _parse_sub
itemsappend(_parse(source, state, verbose))
  File "/Users/chrisseto/.pyenv/versions/3.6.0/lib/python3.6/sre_parse.py", 
line 526, in _parse
code1 = _class_escape(source, this)
  File "/Users/chrisseto/.pyenv/versions/3.6.0/lib/python3.6/sre_parse.py", 
line 336, in _class_escape
raise source.error('bad escape %s' % escape, len(escape))
sre_constants.error: bad escape \B at position 2

>>> re.compile(r'[^\B]')
Traceback (most recent call last):
  File "", line 1, in 
  File "/Users/chrisseto/.pyenv/versions/3.6.0/lib/python3.6/re.py", line 233, 
in compile
return _compile(pattern, flags)
  File "/Users/chrisseto/.pyenv/versions/3.6.0/lib/python3.6/re.py", line 301, 
in _compile
p = sre_compile.compile(pattern, flags)
  File "/Users/chrisseto/.pyenv/versions/3.6.0/lib/python3.6/sre_compile.py", 
line 562, in compile
p = sre_parse.parse(p, flags)
  File "/Users/chrisseto/.pyenv/versions/3.6.0/lib/python3.6/sre_parse.py", 
line 856, in parse
p = _parse_sub(source, pattern, flags & SRE_FLAG_VERBOSE, False)
  File "/Users/chrisseto/.pyenv/versions/3.6.0/lib/python3.6/sre_parse.py", 
line 415, in _parse_sub
itemsappend(_parse(source, state, verbose))
  File "/Users/chrisseto/.pyenv/versions/3.6.0/lib/python3.6/sre_parse.py", 
line 526, in _parse
code1 = _class_escape(source, this)
  File "/Users/chrisseto/.pyenv/versions/3.6.0/lib/python3.6/sre_parse.py", 
line 336, in _class_escape
raise source.error('bad escape %s' % escape, len(escape))
sre_constants.error: bad escape \B at position 2

--
components: Regular Expressions
messages: 292445
nosy: Chris Seto2, ezio.melotti, mrabarnett
priority: normal
severity: normal
status: open
title: Regex becomes invalid in python 3.6
type: behavior
versions: Python 3.6

___
Python tracker 
<http://bugs.python.org/issue30187>
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue30187] Regex becomes invalid in python 3.6

2017-04-27 Thread Chris Seto

Chris Seto added the comment:

Thank you for pointing that out to me!

--

___
Python tracker 
<http://bugs.python.org/issue30187>
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue25394] CoroWrapper breaks gen.throw

2015-10-13 Thread Chris Seto

New submission from Chris Seto:

When asyncio.coroutines._DEBUG is set to True all coroutines are wrapped in a 
CoroWrapper.
The definition of CoroWrapper.throw only excepts a single argument, exc.
It should accept an exception info tuple as returned from sys.exc_info just as 
normal generators do.

--
components: asyncio
files: example.py
messages: 252942
nosy: Chris Seto, gvanrossum, haypo, yselivanov
priority: normal
severity: normal
status: open
title: CoroWrapper breaks gen.throw
type: crash
versions: Python 3.5, Python 3.6
Added file: http://bugs.python.org/file40769/example.py

___
Python tracker 
<http://bugs.python.org/issue25394>
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue25394] CoroWrapper breaks gen.throw

2015-10-13 Thread Chris Seto

Changes by Chris Seto :


--
keywords: +patch
Added file: http://bugs.python.org/file40770/corowrapper.diff

___
Python tracker 
<http://bugs.python.org/issue25394>
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue25642] Setting maxsize breaks asyncio.JoinableQueue/Queue

2015-11-16 Thread Chris Seto

New submission from Chris Seto:

When maxsize is set on a JoinableQueue/Queue and the queue is full (maxsize <= 
len(queue)) _put is called rather than __put_internal.
__put_internal increments _unfinished_tasks but _put does not.
Whenever using maxsize in a Queue calling task_done will almost always cause a 
ValueError('task_done() called too many times').

--
components: asyncio
files: test.py
messages: 254773
nosy: Chris Seto, gvanrossum, haypo, yselivanov
priority: normal
severity: normal
status: open
title: Setting maxsize breaks asyncio.JoinableQueue/Queue
type: crash
versions: Python 3.4, Python 3.5
Added file: http://bugs.python.org/file41057/test.py

___
Python tracker 
<http://bugs.python.org/issue25642>
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue25642] Setting maxsize breaks asyncio.JoinableQueue/Queue

2015-11-16 Thread Chris Seto

Chris Seto added the comment:

Looks to be fixed in python 3.6

--
resolution:  -> fixed

___
Python tracker 
<http://bugs.python.org/issue25642>
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com