Changes by Serhiy Storchaka storch...@gmail.com:
--
resolution: - fixed
stage: patch review - resolved
status: open - closed
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue19361
___
Roundup Robot added the comment:
New changeset 07af9847dbec by Serhiy Storchaka in branch 'default':
Issue #19361: JSON decoder now raises JSONDecodeError instead of ValueError.
https://hg.python.org/cpython/rev/07af9847dbec
--
nosy: +python-dev
___
Changes by Arfrever Frehtes Taifersar Arahesis arfrever@gmail.com:
--
nosy: +Arfrever
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue19361
___
Serhiy Storchaka added the comment:
Updated patch provides JSONDecodeError without end* attributes and with changed
message for Extra data.
--
Added file: http://bugs.python.org/file37328/json_JSONDecodeError_2.patch
___
Python tracker
Serhiy Storchaka added the comment:
While we here may be change error messages?
The only error which contains end position is Extra data. And it doesn't look
clean to me why end position should be mentioned at all (it is always len(data)
here). I suggest to drop it, this will make error
Serhiy Storchaka added the comment:
Here is a patch which adopts JSONDecodeError from simplejson.
Unlike to simplejson it is located in the json.decoder module (json uses
different way to pass an error from scanner to decoder).
--
assignee: - serhiy.storchaka
keywords: +needs review
Changes by Serhiy Storchaka storch...@gmail.com:
--
keywords: +patch
Added file: http://bugs.python.org/file36810/json_JSONDecodeError.patch
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue19361
Raymond Hettinger added the comment:
Adding it to the stdlib is only matter of time.
I think we can go forward with it right now.
--
nosy: +bob.ippolito
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue19361
Bob Ippolito added the comment:
simplejson v3.5.1 is probably a good target, let me know if there's anything
that you'd like me to merge back in from stdlib to make maintenance easier. I
haven't been tracking stdlib except when I've been added to issues.
--
Changes by Chris Rebert pyb...@rebertia.com:
--
nosy: +cvrebert
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue19361
___
___
Python-bugs-list
New submission from Utkarsh Upadhyay:
The JSON parser currently throws exceptions which contain information about
where the error happened but this information is encoded in a string and not
available to the programmer. This leads to issues like this:
Changes by Ezio Melotti ezio.melo...@gmail.com:
--
components: +Library (Lib)
nosy: +ezio.melotti, pitrou, rhettinger
versions: +Python 3.4
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue19361
Serhiy Storchaka added the comment:
Simplejson already have JSONDecodeError.
class JSONDecodeError(ValueError):
Subclass of ValueError with the following additional properties:
msg: The unformatted error message
doc: The JSON document being parsed
pos: The start index of doc
Utkarsh Upadhyay added the comment:
Excellent!
Is there an issue for merging Simplejson into stdlib?
If so, can this issue be linked to that issue?
--
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue19361
14 matches
Mail list logo