[issue28512] PyErr_SyntaxLocationEx() and PyErr_SyntaxLocationObject() always set the offset attribute to None

2017-03-31 Thread Donald Stufft

Changes by Donald Stufft :


--
pull_requests: +1082

___
Python tracker 

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



[issue28512] PyErr_SyntaxLocationEx() and PyErr_SyntaxLocationObject() always set the offset attribute to None

2016-12-21 Thread Serhiy Storchaka

Changes by Serhiy Storchaka :


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



[issue28512] PyErr_SyntaxLocationEx() and PyErr_SyntaxLocationObject() always set the offset attribute to None

2016-12-12 Thread Serhiy Storchaka

Serhiy Storchaka added the comment:

Ah, it was a remnants of backporting to 3.5. Commented-out lines are used in 
3.6. The line above these lines was used in 3.5. Test is passed with both 
variants. I commented out the 3.6 variant, but forgot to remove it (or remove 
old 3.5 variant and keep 3.6 variant). Do you think I should remove commented 
out lines, or left the code as is?

--

___
Python tracker 

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



[issue28512] PyErr_SyntaxLocationEx() and PyErr_SyntaxLocationObject() always set the offset attribute to None

2016-12-12 Thread Berker Peksag

Berker Peksag added the comment:

Hi Serhiy, there are two commented-out lines in 
https://hg.python.org/cpython/rev/ea1c49ea8136#l3.10 (only in 3.5)


+#with self.assertRaises(AssertionError):
+#support.check_syntax_error(self, "x=1")

--
nosy: +berker.peksag

___
Python tracker 

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



[issue28512] PyErr_SyntaxLocationEx() and PyErr_SyntaxLocationObject() always set the offset attribute to None

2016-12-11 Thread Roundup Robot

Roundup Robot added the comment:

New changeset ea1c49ea8136 by Serhiy Storchaka in branch '3.5':
Issue #28512: Fixed setting the offset attribute of SyntaxError by
https://hg.python.org/cpython/rev/ea1c49ea8136

New changeset df59faf7fa59 by Serhiy Storchaka in branch '3.6':
Issue #28512: Fixed setting the offset attribute of SyntaxError by
https://hg.python.org/cpython/rev/df59faf7fa59

New changeset 72aaef2d144b by Serhiy Storchaka in branch 'default':
Issue #28512: Fixed setting the offset attribute of SyntaxError by
https://hg.python.org/cpython/rev/72aaef2d144b

--
nosy: +python-dev

___
Python tracker 

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



[issue28512] PyErr_SyntaxLocationEx() and PyErr_SyntaxLocationObject() always set the offset attribute to None

2016-12-11 Thread Serhiy Storchaka

Serhiy Storchaka added the comment:

Good catch Martin! Opened issue28936 for that quirky test.

--

___
Python tracker 

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



[issue28512] PyErr_SyntaxLocationEx() and PyErr_SyntaxLocationObject() always set the offset attribute to None

2016-12-11 Thread Martin Panter

Martin Panter added the comment:

Looks good apart from one quirky test case, see Reitveld

--

___
Python tracker 

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



[issue28512] PyErr_SyntaxLocationEx() and PyErr_SyntaxLocationObject() always set the offset attribute to None

2016-12-11 Thread Serhiy Storchaka

Changes by Serhiy Storchaka :


--
nosy: +martin.panter

___
Python tracker 

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



[issue28512] PyErr_SyntaxLocationEx() and PyErr_SyntaxLocationObject() always set the offset attribute to None

2016-11-20 Thread Serhiy Storchaka

Serhiy Storchaka added the comment:

Here is a patch that makes PyErr_SyntaxLocationObject() setting correct offset.

--
keywords: +patch
stage:  -> patch review
Added file: 
http://bugs.python.org/file45574/PyErr_SyntaxLocationObject-offset.patch

___
Python tracker 

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



[issue28512] PyErr_SyntaxLocationEx() and PyErr_SyntaxLocationObject() always set the offset attribute to None

2016-10-22 Thread Serhiy Storchaka

New submission from Serhiy Storchaka:

The purpose of PyErr_SyntaxLocationEx() function (added in 00e4ce31d404) was 
setting the offset attribute of raised syntax error to specified value. But 
this never worked as expected. The offset attribute is set to integer value in 
Python/errors.c:1067, but then replaced with None in Python/errors.c:1083.

--
components: Interpreter Core
messages: 279224
nosy: benjamin.peterson, serhiy.storchaka
priority: normal
severity: normal
status: open
title: PyErr_SyntaxLocationEx() and PyErr_SyntaxLocationObject() always set the 
offset attribute to None
type: behavior
versions: Python 3.5, Python 3.6, Python 3.7

___
Python tracker 

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