classification
Title: clinic.py: unhandled syntax error
Type: behavior Stage: resolved
Components: Demos and Tools Versions: Python 3.4
process
Status: closed Resolution: fixed
Dependencies: Superseder:
Assigned To: larry Nosy List: larry, python-dev, skrah
Priority: normal Keywords: patch

Created on 2013-10-25 15:51 by skrah, last changed 2013-10-27 09:54 by larry. This issue is now closed.

Files
File name Uploaded Description Edit
syntax-err-1.patch skrah, 2013-10-25 15:51 review
Messages (5)
msg201246 - (view) Author: Stefan Krah (skrah) * (Python committer) Date: 2013-10-25 15:51
The attached syntax error should probably be handled by clinic.py.
msg201251 - (view) Author: Larry Hastings (larry) * (Python committer) Date: 2013-10-25 16:25
You're proposing that Clinic allow => ?
msg201258 - (view) Author: Stefan Krah (skrah) * (Python committer) Date: 2013-10-25 16:59
Larry Hastings <report@bugs.python.org> wrote:
> You're proposing that Clinic allow => ?

No, but it should print an error message and exit. Currently it silently
generates garbage which does not compile.

[I've noticed that you handle many other syntax errors. Nice work.]
msg201438 - (view) Author: Roundup Robot (python-dev) Date: 2013-10-27 09:50
New changeset b496ed363c2d by Larry Hastings in branch 'default':
Issue #19390: Argument Clinic no longer accepts malformed Python and C ids.
http://hg.python.org/cpython/rev/b496ed363c2d
msg201439 - (view) Author: Larry Hastings (larry) * (Python committer) Date: 2013-10-27 09:54
Fixed.

And, yeah, Clinic actually uses ast.parse where it can.  (FWIW, most of the parser was re-written by Dmitry Jemerov during the PyCon US 2013 sprints, though I wound up re-re-writing most of what he did.)
History
Date User Action Args
2013-10-27 09:54:20larrysetstatus: open -> closed
type: behavior
messages: + msg201439

assignee: larry
resolution: fixed
stage: resolved
2013-10-27 09:50:15python-devsetnosy: + python-dev
messages: + msg201438
2013-10-25 16:59:23skrahsetmessages: + msg201258
2013-10-25 16:25:26larrysetmessages: + msg201251
2013-10-25 15:52:53skrahsetnosy: + larry
2013-10-25 15:51:51skrahcreate