This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author ncoghlan
Recipients Mark.Shannon, benjamin.peterson, eitan.adler, flherne, georg.brandl, lukasz.langa, methane, minrk, ncoghlan, ned.deily, rhettinger, serhiy.storchaka, vstinner
Date 2018-05-25.12:15:37
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1527250537.76.0.682650639539.issue32911@psf.upfronthosting.co.za>
In-reply-to
Content
Ouch, I'd completely missed the fact that this would affect the parsing of bare strings to a simple AST (I was focused on functions and classes, as in Mark's original example).

So even though I'm the author of https://bugs.python.org/issue11549#msg193656 (where I note that we consider it reasonable for AST manipulation code to require updates when going between major Python versions), I'm reluctantly voting "B", since there's a difference between "some AST manipulation code will need to change to account for new node types and arrangements" and "all code calling ast.parse with the default mode and processing the top level node will need to change to account for docstrings now being omitted from the module body, with no readily available quick fix to get the old behaviour back".

(Note that in voting for option B, I'm really only objecting to the change when it comes to Module AST nodes - rather than full reversion, I'd also be OK with a change that duplicated the new docstring attribute as body[0] for modules, while continuing to eliminate the redundancy for functions and classes - this would be a more selective variant of Mark's "Option 1" proposal from back in February).
History
Date User Action Args
2018-05-25 12:15:37ncoghlansetrecipients: + ncoghlan, georg.brandl, rhettinger, vstinner, benjamin.peterson, ned.deily, methane, lukasz.langa, Mark.Shannon, serhiy.storchaka, eitan.adler, minrk, flherne
2018-05-25 12:15:37ncoghlansetmessageid: <1527250537.76.0.682650639539.issue32911@psf.upfronthosting.co.za>
2018-05-25 12:15:37ncoghlanlinkissue32911 messages
2018-05-25 12:15:37ncoghlancreate