Re: [Python-Dev] Backward incompatible change about docstring AST

2018-03-07 Thread Mark Shannon
On 27/02/18 13:37, INADA Naoki wrote: Hi, all. There is design discussion which is deferred blocker of 3.7. https://bugs.python.org/issue32911 ## Background An year ago, I moved docstring in AST from statements list to field of module, class and functions. https://bugs.python.org/issue29463

Re: [Python-Dev] Backward incompatible change about docstring AST

2018-02-28 Thread Serhiy Storchaka
28.02.18 12:49, Armin Rigo пише: On 27 February 2018 at 15:32, Serhiy Storchaka wrote: 1. CPython and PyPy set different position for multiline strings. PyPy sets the position of the start of string, but CPython sets the position of the end of the string. A program that

Re: [Python-Dev] Backward incompatible change about docstring AST

2018-02-28 Thread Armin Rigo
Hi, On 27 February 2018 at 15:32, Serhiy Storchaka wrote: > 1. CPython and PyPy set different position for multiline strings. PyPy sets > the position of the start of string, but CPython sets the position of the > end of the string. A program that utilizes the docstring

Re: [Python-Dev] Backward incompatible change about docstring AST

2018-02-27 Thread Brett Cannon
On Tue, 27 Feb 2018 at 05:38 INADA Naoki wrote: > Hi, all. > > There is design discussion which is deferred blocker of 3.7. > https://bugs.python.org/issue32911 > > ## Background > > An year ago, I moved docstring in AST from statements list to field of > module, class

Re: [Python-Dev] Backward incompatible change about docstring AST

2018-02-27 Thread Serhiy Storchaka
28.02.18 00:31, Terry Reedy пише: 2. Usually the position of the docstring is used for determining the absolute position of some fragments in the docstring (for example doctests). But since the literal string can contain \n and escaped newlines, and this information is lost in AST, the

Re: [Python-Dev] Backward incompatible change about docstring AST

2018-02-27 Thread Terry Reedy
On 2/27/2018 9:32 AM, Serhiy Storchaka wrote: 27.02.18 15:37, INADA Naoki пише: Of course, this change was backward incompatible. Tools reading/writing docstring via AST will be broken by this change. For example, it broke PyFlakes, and PyFlakes solved it already.

Re: [Python-Dev] Backward incompatible change about docstring AST

2018-02-27 Thread Serhiy Storchaka
27.02.18 15:37, INADA Naoki пише: Of course, this change was backward incompatible. Tools reading/writing docstring via AST will be broken by this change. For example, it broke PyFlakes, and PyFlakes solved it already. https://github.com/PyCQA/pyflakes/pull/273 Other examples: coveragepy:

[Python-Dev] Backward incompatible change about docstring AST

2018-02-27 Thread INADA Naoki
Hi, all. There is design discussion which is deferred blocker of 3.7. https://bugs.python.org/issue32911 ## Background An year ago, I moved docstring in AST from statements list to field of module, class and functions. https://bugs.python.org/issue29463 Without this change, AST-level constant