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 jstasiak
Recipients jstasiak
Date 2016-07-12.10:29:13
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1468319353.83.0.357995670089.issue27494@psf.upfronthosting.co.za>
In-reply-to
Content
Test file (test.py):

print(set(x for x in range(2),))

Python runs it nicely:

% python2 test.py 
set([0, 1])
% python3 test.py
{0, 1}

2to3 parser (on both Python 2.7.11 and 3.5.2) chokes on it though:

% /usr/local/Cellar/python/2.7.11/Frameworks/Python.framework/Versions/2.7/bin/2to3 test.py 
RefactoringTool: Skipping optional fixer: buffer
RefactoringTool: Skipping optional fixer: idioms
RefactoringTool: Skipping optional fixer: set_literal
RefactoringTool: Skipping optional fixer: ws_comma
RefactoringTool: Can't parse test.py: ParseError: bad input: type=8, value=u')', context=('', (1, 30))
RefactoringTool: No files need to be modified.
RefactoringTool: There was 1 error:
RefactoringTool: Can't parse test.py: ParseError: bad input: type=8, value=u')', context=('', (1, 30))

% /usr/local/Cellar/python3/3.5.2/Frameworks/Python.framework/Versions/3.5/bin/2to3 test.py 
RefactoringTool: Skipping optional fixer: buffer
RefactoringTool: Skipping optional fixer: idioms
RefactoringTool: Skipping optional fixer: set_literal
RefactoringTool: Skipping optional fixer: ws_comma
RefactoringTool: Can't parse test.py: ParseError: bad input: type=8, value=')', context=('', (1, 30))
RefactoringTool: No files need to be modified.
RefactoringTool: There was 1 error:
RefactoringTool: Can't parse test.py: ParseError: bad input: type=8, value=')', context=('', (1, 30))


For reference: https://github.com/smarkets/flake8-strict/issues/9 (project using lib2to3 parser)
History
Date User Action Args
2016-07-12 10:29:13jstasiaksetrecipients: + jstasiak
2016-07-12 10:29:13jstasiaksetmessageid: <1468319353.83.0.357995670089.issue27494@psf.upfronthosting.co.za>
2016-07-12 10:29:13jstasiaklinkissue27494 messages
2016-07-12 10:29:13jstasiakcreate