[issue16009] Json error messages could provide more information about the error

2013-01-03 Thread Ezio Melotti

Changes by Ezio Melotti :


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

___
Python tracker 

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



[issue16009] Json error messages could provide more information about the error

2013-01-03 Thread Ezio Melotti

Changes by Ezio Melotti :


--
assignee:  -> ezio.melotti
resolution: fixed -> 
stage: committed/rejected -> patch review
status: closed -> open

___
Python tracker 

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



[issue16009] Json error messages could provide more information about the error

2013-01-02 Thread Ezio Melotti

Ezio Melotti added the comment:

Fixed, thanks for the patch!

--
assignee: ezio.melotti -> 
resolution:  -> fixed
stage: patch review -> committed/rejected
status: open -> closed

___
Python tracker 

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



[issue16009] Json error messages could provide more information about the error

2013-01-02 Thread Roundup Robot

Roundup Robot added the comment:

New changeset 17b4bf9e9f43 by Ezio Melotti in branch 'default':
#16009: JSON error messages now provide more information.  Patch by Serhiy 
Storchaka.
http://hg.python.org/cpython/rev/17b4bf9e9f43

--
nosy: +python-dev

___
Python tracker 

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



[issue16009] Json error messages could provide more information about the error

2012-11-26 Thread Ezio Melotti

Changes by Ezio Melotti :


--
assignee:  -> ezio.melotti

___
Python tracker 

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



[issue16009] Json error messages could provide more information about the error

2012-11-09 Thread Serhiy Storchaka

Serhiy Storchaka added the comment:

Patch updated.  Added new test cases as Ezio want..

--
Added file: http://bugs.python.org/file27936/json_errmsg_5.patch

___
Python tracker 

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



[issue16009] Json error messages could provide more information about the error

2012-11-01 Thread Serhiy Storchaka

Serhiy Storchaka added the comment:

Patch updated. Fixed a debug artifact and a deprecation warning.

--
Added file: http://bugs.python.org/file27833/json_errmsg_4.patch

___
Python tracker 

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



[issue16009] Json error messages could provide more information about the error

2012-11-01 Thread Serhiy Storchaka

Changes by Serhiy Storchaka :


Removed file: http://bugs.python.org/file27433/json_errmsg_3.patch

___
Python tracker 

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



[issue16009] Json error messages could provide more information about the error

2012-11-01 Thread Serhiy Storchaka

Changes by Serhiy Storchaka :


Removed file: http://bugs.python.org/file27425/json_errmsg_2.patch

___
Python tracker 

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



[issue16009] Json error messages could provide more information about the error

2012-11-01 Thread Serhiy Storchaka

Changes by Serhiy Storchaka :


Removed file: http://bugs.python.org/file27424/json_errmsg.patch

___
Python tracker 

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



[issue16009] Json error messages could provide more information about the error

2012-10-07 Thread Andrew Svetlov

Changes by Andrew Svetlov :


--
nosy: +asvetlov

___
Python tracker 

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



[issue16009] Json error messages could provide more information about the error

2012-10-05 Thread Serhiy Storchaka

Serhiy Storchaka added the comment:

Patch updated. Tests added. One discrepancy between Python an C versions fixed.

In fact, we can get rid of StopIteration and directly raise ValueError. I don't 
know what are the functions of StopIteration here, so preserve it. Perhaps the 
author could explain the details.

--
keywords: +needs review
nosy: +bob.ippolito
stage: test needed -> patch review
Added file: http://bugs.python.org/file27433/json_errmsg_3.patch

___
Python tracker 

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



[issue16009] Json error messages could provide more information about the error

2012-10-04 Thread Ezio Melotti

Changes by Ezio Melotti :


--
stage: needs patch -> test needed

___
Python tracker 

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



[issue16009] Json error messages could provide more information about the error

2012-10-04 Thread Serhiy Storchaka

Serhiy Storchaka added the comment:

Patch updated. Conformed other error messages. Now expected exceptions raised 
for all of the following strings:

''
'['
'[42'
'[42,'
'{'
'{"'
'{"spam'
'{"spam"'
'{"spam":'
'{"spam":42'
'{"spam":42,'

--
Added file: http://bugs.python.org/file27425/json_errmsg_2.patch

___
Python tracker 

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



[issue16009] Json error messages could provide more information about the error

2012-10-04 Thread Serhiy Storchaka

Changes by Serhiy Storchaka :


Added file: http://bugs.python.org/file27424/json_errmsg.patch

___
Python tracker 

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



[issue16009] Json error messages could provide more information about the error

2012-10-04 Thread Serhiy Storchaka

Changes by Serhiy Storchaka :


Removed file: http://bugs.python.org/file27420/json_errmsg.patch

___
Python tracker 

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



[issue16009] Json error messages could provide more information about the error

2012-10-04 Thread Serhiy Storchaka

Serhiy Storchaka added the comment:

Here is a patch that makes error message more informative. I also changed 
message "Expecting object" to "Expecting value" as more conformed to JSON 
terminology.

--
nosy: +storchaka
Added file: http://bugs.python.org/file27420/json_errmsg.patch

___
Python tracker 

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



[issue16009] Json error messages could provide more information about the error

2012-10-04 Thread R. David Murray

R. David Murray added the comment:

So you would see a copy of the string being decoded in the error message?  That 
string might be very long, and would be of doubtful utility.  What I had in 
mind was at least printing the character position of the parse failure.  That 
may also be of limited utility, though, since in many cases the parse failure 
will happen at the end of the string.  This is a problem for all parsers, and 
the solution is often non-trivial, depending on the parser.  

Someone who wants to see this happen will need to look at the parser and see 
what information it has at the point of parse failure that might be useful and 
practical to expose.

--

___
Python tracker 

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



[issue16009] Json error messages could provide more information about the error

2012-10-04 Thread Michele Orrù

Changes by Michele Orrù :


--
keywords: +patch
Added file: http://bugs.python.org/file27415/issue16009.patch

___
Python tracker 

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



[issue16009] Json error messages could provide more information about the error

2012-10-04 Thread Michele Orrù

Michele Orrù added the comment:

> A repr of what?
Of the variable "s" in Lib/json/decoder.py#l358

--

___
Python tracker 

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



[issue16009] Json error messages could provide more information about the error

2012-10-04 Thread R. David Murray

R. David Murray added the comment:

A repr of what?

--

___
Python tracker 

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



[issue16009] Json error messages could provide more information about the error

2012-10-04 Thread Michele Orrù

Michele Orrù added the comment:

Since AFAIK json.loads runs through every simil-str object, I think that a 
repr() is fine here. What do you think?

--
nosy: +maker

___
Python tracker 

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



[issue16009] Json error messages could provide more information about the error

2012-09-30 Thread Ezio Melotti

Changes by Ezio Melotti :


--
nosy: +ezio.melotti

___
Python tracker 

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



[issue16009] Json error messages could provide more information about the error

2012-09-24 Thread Éric Araujo

Changes by Éric Araujo :


--
nosy: +eric.araujo

___
Python tracker 

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



[issue16009] Json error messages could provide more information about the error

2012-09-23 Thread R. David Murray

R. David Murray added the comment:

The errors are being handled correctly, but it would indeed be nice for them to 
provide more information about the specific error.  That's an enhancement, 
though.

--
nosy: +r.david.murray
stage:  -> needs patch
title: Json not handling errors correctly -> Json error messages could provide 
more information about the error
type:  -> enhancement
versions: +Python 3.4 -Python 2.7, Python 3.2

___
Python tracker 

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