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 mystor
Recipients mystor, r.david.murray
Date 2015-11-20.16:20:39
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <>
This should fix the problem. It appears as though the indentation was being stripped from the program text differently depending on how the error was produced. In the case of a syntax error from the parser, the indentation was maintained until it was printed (in print_error_text, correctly handling the offset value). In contrast, errors from the AST were created with PyErr_ProgramText*, which would also strip the indentation (without mutating any offset value). 

This patch causes the second code path to not strip whitespace. This shouldn't cause I problem (I think), as it seems to only be used to instantiate SyntaxErrors.
Date User Action Args
2015-11-20 16:20:39mystorsetrecipients: + mystor, r.david.murray
2015-11-20 16:20:39mystorsetmessageid: <>
2015-11-20 16:20:39mystorlinkissue25677 messages
2015-11-20 16:20:39mystorcreate