[issue28691] python3.6 -Werror -c '"\c"' fails with an assertion error

2016-11-15 Thread STINNER Victor
STINNER Victor added the comment: Thanks Serhiy for your unit tests! I pushed with patch with your tests. -- resolution: -> fixed status: open -> closed ___ Python tracker ___ _

[issue28691] python3.6 -Werror -c '"\c"' fails with an assertion error

2016-11-15 Thread Roundup Robot
Roundup Robot added the comment: New changeset aa52ea2a7731 by Victor Stinner in branch '3.6': Fix warn_invalid_escape_sequence() https://hg.python.org/cpython/rev/aa52ea2a7731 -- nosy: +python-dev ___ Python tracker

[issue28691] python3.6 -Werror -c '"\c"' fails with an assertion error

2016-11-14 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: This is my fault. Proposed patch adds tests for the "error" action. -- components: +Interpreter Core nosy: +serhiy.storchaka stage: -> patch review type: -> crash Added file: http://bugs.python.org/file45484/test_eval_str_invalid_escape_error.patch

[issue28691] python3.6 -Werror -c '"\c"' fails with an assertion error

2016-11-14 Thread STINNER Victor
STINNER Victor added the comment: > By the way, an unit test is missing since the bug was not catched by the test > suite! Lib/test/test_string_literals.py contains an unit test but it changes the warnings filter, so -Werror option is ignored. -- _

[issue28691] python3.6 -Werror -c '"\c"' fails with an assertion error

2016-11-14 Thread STINNER Victor
STINNER Victor added the comment: Attached ast.patch fixes the issue: replace the DeprecationWarning with a SyntaxError. Is it the expected behaviour? Is it worth it to chain the two exceptions? -- keywords: +patch Added file: http://bugs.python.org/file45483/ast.patch ___

[issue28691] python3.6 -Werror -c '"\c"' fails with an assertion error

2016-11-14 Thread STINNER Victor
STINNER Victor added the comment: By the way, an unit test is missing since the bug was not catched by the test suite! -- ___ Python tracker ___

[issue28691] python3.6 -Werror -c '"\c"' fails with an assertion error

2016-11-14 Thread STINNER Victor
New submission from STINNER Victor: The issue #28128 (changeset 259745f9a1e4) introduced a DeprecationWarning on invalid Unicode sequence like "\c". When Python is run with -Werror, Python crashs with an assertion error: $ ./python -Werror -c '"\c"' python: Objects/abstract.c:2232: PyObject_Ca