[issue12983] byte string literals with invalid hex escape codes raise ValueError instead of SyntaxError

2013-02-10 Thread Benjamin Peterson

Benjamin Peterson added the comment:

LGTM

--

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue12983
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue12983] byte string literals with invalid hex escape codes raise ValueError instead of SyntaxError

2013-02-10 Thread Roundup Robot

Roundup Robot added the comment:

New changeset 305210a08fc9 by Serhiy Storchaka in branch '3.2':
Issue #12983: Bytes literals with invalid \x escape now raise a SyntaxError
http://hg.python.org/cpython/rev/305210a08fc9

New changeset d5b731446a91 by Serhiy Storchaka in branch '3.3':
Issue #12983: Bytes literals with invalid \x escape now raise a SyntaxError
http://hg.python.org/cpython/rev/d5b731446a91

New changeset fe410292cba6 by Serhiy Storchaka in branch 'default':
Issue #12983: Bytes literals with invalid \x escape now raise a SyntaxError
http://hg.python.org/cpython/rev/fe410292cba6

--
nosy: +python-dev

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue12983
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue12983] byte string literals with invalid hex escape codes raise ValueError instead of SyntaxError

2013-02-10 Thread Serhiy Storchaka

Changes by Serhiy Storchaka storch...@gmail.com:


--
resolution:  - fixed
stage: patch review - committed/rejected
status: open - closed

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue12983
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue12983] byte string literals with invalid hex escape codes raise ValueError instead of SyntaxError

2013-02-09 Thread Serhiy Storchaka

Changes by Serhiy Storchaka storch...@gmail.com:


--
nosy: +benjamin.peterson

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue12983
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue12983] byte string literals with invalid hex escape codes raise ValueError instead of SyntaxError

2013-02-05 Thread Serhiy Storchaka

Serhiy Storchaka added the comment:

Ping.

--

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue12983
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue12983] byte string literals with invalid hex escape codes raise ValueError instead of SyntaxError

2013-01-31 Thread Serhiy Storchaka

Changes by Serhiy Storchaka storch...@gmail.com:


--
assignee:  - serhiy.storchaka

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue12983
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue12983] byte string literals with invalid hex escape codes raise ValueError instead of SyntaxError

2013-01-15 Thread Serhiy Storchaka

Serhiy Storchaka added the comment:

Here is a patch which include position number in the invalid bytes exception, 
wrap it into SyntaxError, and adds tests for bytes and strings.

--
keywords: +patch
nosy: +serhiy.storchaka
stage: test needed - patch review
versions: +Python 3.4
Added file: http://bugs.python.org/file28745/parse_strlit_error.patch

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue12983
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue12983] byte string literals with invalid hex escape codes raise ValueError instead of SyntaxError

2011-09-15 Thread Evgeny Kapun

Changes by Evgeny Kapun abacabadabac...@gmail.com:


--
nosy: +abacabadabacaba

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue12983
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue12983] byte string literals with invalid hex escape codes raise ValueError instead of SyntaxError

2011-09-14 Thread Ned Deily

New submission from Ned Deily n...@acm.org:

In behavior carried over from Python 2 string literals, Python 3 byte string 
literals raise a less helpful ValueError exception when an invalid hex escape 
code is given:

 x = b'\x0'
ValueError: invalid \x escape

A string literal raises a SyntaxError and a full traceback including line 
number:

 x = '\x0'
  File stdin, line 1
SyntaxError: (unicode error) 'unicodeescape' codec can't decode
 bytes in position 0-2: end of string in escape sequence

--
components: Interpreter Core
messages: 144059
nosy: ned.deily
priority: normal
severity: normal
status: open
title: byte string literals with invalid hex escape codes raise ValueError 
instead of SyntaxError
type: behavior
versions: Python 3.2, Python 3.3

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue12983
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue12983] byte string literals with invalid hex escape codes raise ValueError instead of SyntaxError

2011-09-14 Thread Ezio Melotti

Changes by Ezio Melotti ezio.melo...@gmail.com:


--
nosy: +ezio.melotti
stage:  - test needed

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue12983
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com