[issue28964] AST literal_eval exceptions provide no information about line number

2020-12-27 Thread Steve Merritt


Steve Merritt  added the comment:

Thank you!

On Fri, Dec 25, 2020 at 11:05 AM Batuhan Taskaya 
wrote:

>
> Change by Batuhan Taskaya :
>
>
> --
> resolution:  -> fixed
> stage: patch review -> resolved
> status: open -> closed
>
> ___
> Python tracker 
> 
> ___
>

--

___
Python tracker 

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



[issue28964] AST literal_eval exceptions provide no information about line number

2020-12-25 Thread Batuhan Taskaya


Change by Batuhan Taskaya :


--
resolution:  -> fixed
stage: patch review -> resolved
status: open -> closed

___
Python tracker 

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



[issue28964] AST literal_eval exceptions provide no information about line number

2020-12-25 Thread Batuhan Taskaya


Batuhan Taskaya  added the comment:


New changeset 586f3dbe15139cafb2a6ffb82cea146906561844 by Irit Katriel in 
branch 'master':
bpo-28964: add line number of node (if available) to ast.literal_eval error 
messages (GH-23677)
https://github.com/python/cpython/commit/586f3dbe15139cafb2a6ffb82cea146906561844


--

___
Python tracker 

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



[issue28964] AST literal_eval exceptions provide no information about line number

2020-12-22 Thread Pablo Galindo Salgado


Pablo Galindo Salgado  added the comment:

This is a recurring feature request (I have heard people asking for this a 
couple of times) and is simple enough to do, so I am fine with this. Unless 
Serhiy has some concern, I would go forward :)

--

___
Python tracker 

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



[issue28964] AST literal_eval exceptions provide no information about line number

2020-12-22 Thread Batuhan Taskaya


Change by Batuhan Taskaya :


--
keywords: +patch -gsoc

___
Python tracker 

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



[issue28964] AST literal_eval exceptions provide no information about line number

2020-12-22 Thread Batuhan Taskaya


Batuhan Taskaya  added the comment:

I'm +0 on this (even though we only had 2 users wanting this, the 
implementation seems very trivial). @serhiy.storchaka, @pablogsal any opinions?

--
keywords: +gsoc -patch
nosy: +pablogsal

___
Python tracker 

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



[issue28964] AST literal_eval exceptions provide no information about line number

2020-12-07 Thread Irit Katriel


Change by Irit Katriel :


--
versions: +Python 3.10 -Python 3.7

___
Python tracker 

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



[issue28964] AST literal_eval exceptions provide no information about line number

2020-12-07 Thread Irit Katriel


Irit Katriel  added the comment:

This just came up again in issue42561 so I went ahead and created the PR.

--

___
Python tracker 

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



[issue28964] AST literal_eval exceptions provide no information about line number

2020-12-07 Thread Batuhan Taskaya


Batuhan Taskaya  added the comment:

> Usually literal_eval() is used with short one-line input. For what large 
> documents do you use it?

I kind of agree with Serhiy on this, nearly every use case I've encountered was 
simple, single-line expression. Though, by seeing Irit's patch I think the 
implementation is reasonable enough to do.

--
nosy: +BTaskaya

___
Python tracker 

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



[issue28964] AST literal_eval exceptions provide no information about line number

2020-12-07 Thread Irit Katriel


Change by Irit Katriel :


--
pull_requests: +22543
pull_request: https://github.com/python/cpython/pull/23677

___
Python tracker 

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



[issue28964] AST literal_eval exceptions provide no information about line number

2020-09-18 Thread Irit Katriel


Irit Katriel  added the comment:

Steve, are you planning to work on porting this patch to github?

Note: it would need a unit test, and also node is not guaranteed to have a 
lineno field.

--
nosy: +iritkatriel
status: pending -> open

___
Python tracker 

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



[issue28964] AST literal_eval exceptions provide no information about line number

2019-08-31 Thread Serhiy Storchaka


Change by Serhiy Storchaka :


--
status: open -> pending

___
Python tracker 

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



[issue28964] AST literal_eval exceptions provide no information about line number

2017-04-26 Thread Steve Merritt

Steve Merritt added the comment:

I'll try to get to it this weekend. A bit swamped on another project right now. 
Thanks for the interest and the reminder!

--

___
Python tracker 

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



[issue28964] AST literal_eval exceptions provide no information about line number

2017-04-26 Thread Louie Lu

Louie Lu added the comment:

Steve, will you work on this patch to GitHub?

--
nosy: +louielu

___
Python tracker 

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



[issue28964] AST literal_eval exceptions provide no information about line number

2017-03-15 Thread Mateusz Bysiek

Changes by Mateusz Bysiek :


--
nosy: +mbdevpl

___
Python tracker 

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



[issue28964] AST literal_eval exceptions provide no information about line number

2017-01-01 Thread Steve Merritt

Steve Merritt added the comment:

We're using Python dictionaries to express sizeable (read: 100-600 lines)
chunks of configuration data. We previously used JSON, but we now use
Jinja2 to template chunks of this configuration data, and JSON's inability
to handle trailing commas creates a problem here. So we've been using
ast.literal_eval, but the lack of line numbers makes debugging problems
with the configurations a painful process.

On Sun, Jan 1, 2017 at 2:41 AM Serhiy Storchaka 
wrote:

>
> Serhiy Storchaka added the comment:
>
> Usually literal_eval() is used with short one-line input. For what large
> documents do you use it?
>
> --
> nosy: +serhiy.storchaka
>
> ___
> Python tracker 
> 
> ___
>

--

___
Python tracker 

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



[issue28964] AST literal_eval exceptions provide no information about line number

2016-12-31 Thread Serhiy Storchaka

Serhiy Storchaka added the comment:

Usually literal_eval() is used with short one-line input. For what large 
documents do you use it?

--
nosy: +serhiy.storchaka

___
Python tracker 

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



[issue28964] AST literal_eval exceptions provide no information about line number

2016-12-31 Thread Berker Peksag

Berker Peksag added the comment:

Thanks for the patch, Steve!.

This looks like a reasonable request to me, but 1) we can only make this change 
in 3.7 2) we need a test case for the new message 3) you can use f-strings 
instead of str.format()

--
nosy: +berker.peksag
stage:  -> patch review
type: behavior -> enhancement
versions: +Python 3.7 -Python 2.7

___
Python tracker 

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



[issue28964] AST literal_eval exceptions provide no information about line number

2016-12-13 Thread Steve Merritt

New submission from Steve Merritt:

Without line numbers, debugging syntax errors in large documents is a tedious 
and painful process.

--
components: Library (Lib)
files: mywork.patch
keywords: patch
messages: 283142
nosy: stevemerritt
priority: normal
severity: normal
status: open
title: AST literal_eval exceptions provide no information about line number
type: behavior
versions: Python 2.7
Added file: http://bugs.python.org/file45879/mywork.patch

___
Python tracker 

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