[issue25131] The AST for dict and set displays has the lineno of the first value

2015-09-25 Thread Roundup Robot

Roundup Robot added the comment:

New changeset 4f14afc959df by Benjamin Peterson in branch '3.5':
make opening brace of container literals and comprehensions correspond to the 
line number and col offset of the AST node (closes #25131)
https://hg.python.org/cpython/rev/4f14afc959df

New changeset 9d895c09c08a by Benjamin Peterson in branch 'default':
merge 3.5 (#25131)
https://hg.python.org/cpython/rev/9d895c09c08a

--
nosy: +python-dev
resolution:  -> fixed
stage: test needed -> 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



[issue25131] The AST for dict and set displays has the lineno of the first value

2015-09-23 Thread Berker Peksag

Changes by Berker Peksag :


--
keywords: +3.5regression

___
Python tracker 

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



[issue25131] The AST for dict and set displays has the lineno of the first value

2015-09-18 Thread Terry J. Reedy

Terry J. Reedy added the comment:

A fix should include a new ast test, such as
  self.assertEqual(parse("{\n1:2}").body[0].value.lineno, 1)
I verified that the equivalent assert passes on 3.4.3, fails on 3.5.0.

--
nosy: +terry.reedy
stage:  -> test needed

___
Python tracker 

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



[issue25131] The AST for dict and set displays has the lineno of the first value

2015-09-15 Thread STINNER Victor

Changes by STINNER Victor :


--
nosy: +neil.g

___
Python tracker 

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



[issue25131] The AST for dict and set displays has the lineno of the first value

2015-09-15 Thread STINNER Victor

STINNER Victor added the comment:

Using hg bisect, I found the revision a65f685ba8c0:

   
changeset:   95886:a65f685ba8c0
user:Benjamin Peterson 
date:Tue May 05 20:16:41 2015 -0400
files:   Grammar/Grammar Include/Python-ast.h Include/dictobject.h 
Include/opcode.h Lib/importlib/_bootstrap_external.py Lib/opcode.py 
Lib/test/test_ast.py Lib/test/test_extcall.py Lib/test/test_grammar.py 
Lib/test/test_parser.py Lib/test/test_syntax.py Lib/test/test_unpack_ex.py 
Misc/ACKS Misc/NEWS Modules/parsermodule.c Objects/dictobject.c 
Parser/Python.asdl Python/Python-ast.c Python/ast.c Python/ceval.c 
Python/compile.c Python/graminit.c Python/importlib_external.h 
Python/opcode_targets.h Python/symtable.c Tools/parser/unparse.py
description:
PEP 448: additional unpacking generalizations (closes #2292)

Patch by Neil Girdhar.

--
nosy: +benjamin.peterson, haypo

___
Python tracker 

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



[issue25131] The AST for dict and set displays has the lineno of the first value

2015-09-15 Thread Claudiu Popa

New submission from Claudiu Popa:

Hi,

In Python 3.5, the lineno for dict and set display ASTs is the line number of 
the first value, not the line number of the display character, as it was until 
3.5. Here's an example:


  from ast import parse
  module = parse('''{
   '1':'2',
  }
  ''')
  dict_display = module.body[0].value
  print(dict_display.lineno)

I don't seem to find anything related to this in the documentation, but I 
presume this is a side effect of the new parser changes. It would nice to have 
this fixed or at least documented.

--
components: Library (Lib)
messages: 250790
nosy: Claudiu.Popa
priority: normal
severity: normal
status: open
title: The AST for dict and set displays has the lineno of the first value
type: behavior
versions: Python 3.5, Python 3.6

___
Python tracker 

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