[issue39579] Attribute node in a decorator has wrong end_col_offset

2020-07-01 Thread Francis Herne


Francis Herne  added the comment:

Sorry, on further inspection it was the other AST range change 
https://bugs.python.org/issue39474 , not this one.

--

___
Python tracker 

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



[issue39579] Attribute node in a decorator has wrong end_col_offset

2020-07-01 Thread Francis Herne


Francis Herne  added the comment:

Note: this change causes a regression in kdev-python because our code was based 
on (and worked around) the long-standing previous behaviour; it produces broken 
results given the 'fixed' offset.

I shall have to write a patch with a version-check before our next stable 
release.

While the new behaviour is more logical, I'm not convinced that deliberate API 
breakage in a stable release - for something that's not a recent regression - 
was a good idea.

--
nosy: +flherne

___
Python tracker 

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



[issue39579] Attribute node in a decorator has wrong end_col_offset

2020-02-07 Thread Guido van Rossum


Change by Guido van Rossum :


--
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



[issue39579] Attribute node in a decorator has wrong end_col_offset

2020-02-07 Thread miss-islington


miss-islington  added the comment:


New changeset 8b9cebce09cb6919fdb97d8e608288a503681d13 by Lysandros Nikolaou in 
branch '3.8':
[3.8] bpo-39579: Fix Attribute end_col_offset to point at the current node 
(GH-18405) (GH-18408)
https://github.com/python/cpython/commit/8b9cebce09cb6919fdb97d8e608288a503681d13


--
nosy: +miss-islington

___
Python tracker 

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



[issue39579] Attribute node in a decorator has wrong end_col_offset

2020-02-07 Thread Lysandros Nikolaou


Change by Lysandros Nikolaou :


--
pull_requests: +17783
pull_request: https://github.com/python/cpython/pull/18408

___
Python tracker 

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



[issue39579] Attribute node in a decorator has wrong end_col_offset

2020-02-07 Thread Guido van Rossum


Guido van Rossum  added the comment:


New changeset d2e1098641f98594702ef29049c3c4a3f394786f by Lysandros Nikolaou in 
branch 'master':
bpo-39579: Fix Attribute end_col_offset to point at the current node (GH-18405)
https://github.com/python/cpython/commit/d2e1098641f98594702ef29049c3c4a3f394786f


--

___
Python tracker 

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



[issue39579] Attribute node in a decorator has wrong end_col_offset

2020-02-07 Thread Lysandros Nikolaou


Change by Lysandros Nikolaou :


--
keywords: +patch
pull_requests: +17781
stage:  -> patch review
pull_request: https://github.com/python/cpython/pull/18405

___
Python tracker 

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



[issue39579] Attribute node in a decorator has wrong end_col_offset

2020-02-07 Thread Lysandros Nikolaou


New submission from Lysandros Nikolaou :

There is a problem with the end_col_offset of nested Attribute nodes in 
decorators. For example, parsing

@a.b.c
def f(): pass

produces the following AST tree (part):

decorator_list=[
Attribute(
value=Attribute(
value=Name(
id="a",
ctx=Load(),
lineno=1,
col_offset=1,
end_lineno=1,
end_col_offset=2,
),
attr="b",
ctx=Load(),
lineno=1,
col_offset=1,
end_lineno=1,
*end_col_offset=6*,
),
attr="c",
ctx=Load(),
lineno=1,
col_offset=1,
end_lineno=1,
end_col_offset=6,
)
],

Note that the Attribute node with attr="b" has end_col_offset=6, while it 
should actually be 4.

--
components: Interpreter Core
messages: 361595
nosy: gvanrossum, lys.nikolaou, pablogsal
priority: normal
severity: normal
status: open
title: Attribute node in a decorator has wrong end_col_offset
versions: Python 3.8, Python 3.9

___
Python tracker 

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