[issue39331] 2to3 mishandles indented imports

2020-01-17 Thread Cheryl Sabella
Cheryl Sabella added the comment: Thank you for the report. This is a duplicate of #38681. -- nosy: +cheryl.sabella resolution: -> duplicate stage: -> resolved status: open -> closed superseder: -> 2to3 Conversion Result using BlankLine() can be Syntactically Incorrect __

[issue39331] 2to3 mishandles indented imports

2020-01-14 Thread Guy Galun
New submission from Guy Galun : When encountering an import that should be removed in Python 3 (e.g. "from itertools import izip"), 2to3 changes it a blank line, which may cause a runtime error if that import was indented: error: module importing failed: expected an indented block (ptypes.py,