[issue24975] Python 3.5 can't compile AST involving PEP 448 unpacking

2015-09-04 Thread Terry J. Reedy

Terry J. Reedy added the comment:

Upon writing a proof-of-concept file for #24981, I discovered an stdlib file 
that gave the same error.

C:/programs/Python35/Lib\distutils/_msvccompiler.py
ValueError: None disallowed in expression list

I presume the applied fix will apply to this also.

--
nosy: +terry.reedy

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue24975] Python 3.5 can't compile AST involving PEP 448 unpacking

2015-09-02 Thread Roundup Robot

Roundup Robot added the comment:

New changeset e9df8543d7bc by Yury Selivanov in branch '3.5':
Issue #24975: Fix AST compilation for PEP 448 syntax.
https://hg.python.org/cpython/rev/e9df8543d7bc

New changeset ea79be5b201e by Yury Selivanov in branch '3.5':
Merge 3.5 heads (issue #24975)
https://hg.python.org/cpython/rev/ea79be5b201e

New changeset 1dcd7f257ed8 by Yury Selivanov in branch 'default':
Merge 3.5 (issue #24975)
https://hg.python.org/cpython/rev/1dcd7f257ed8

--
nosy: +python-dev

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue24975] Python 3.5 can't compile AST involving PEP 448 unpacking

2015-09-02 Thread Larry Hastings

Larry Hastings added the comment:

Merged.  Please forward-merge to 3.5.1 and 3.6, thanks!

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue24975] Python 3.5 can't compile AST involving PEP 448 unpacking

2015-09-02 Thread Yury Selivanov

Yury Selivanov added the comment:

Thanks Nick and Larry for code reviews and merge!

--
resolution:  -> fixed
stage: patch review -> resolved
status: open -> closed

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue24975] Python 3.5 can't compile AST involving PEP 448 unpacking

2015-09-01 Thread Brett Cannon

Brett Cannon added the comment:

Do we not have a test that compiles the entire stdlib using the ast module? We 
used to have one for the old compiler package. If don't have such a test we 
should probably add it even if it requires a -u option.

--
nosy: +brett.cannon

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue24975] Python 3.5 can't compile AST involving PEP 448 unpacking

2015-09-01 Thread Brett Cannon

Brett Cannon added the comment:

Created issue #24981 to track the test case idea.

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue24975] Python 3.5 can't compile AST involving PEP 448 unpacking

2015-09-01 Thread Yury Selivanov

Yury Selivanov added the comment:

Larry,

I created a PR for you: 
https://bitbucket.org/larry/cpython350/pull-requests/10/issue-24975-fix-ast-compilation-for-pep/diff

Brett,

Should we do that in a separate issue targeting 3.6 only?

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue24975] Python 3.5 can't compile AST involving PEP 448 unpacking

2015-08-31 Thread Yury Selivanov

Yury Selivanov added the comment:

Good find, David. Thanks!

Please review the attached patch.

--
keywords: +patch
nosy: +benjamin.peterson, larry, ncoghlan, serhiy.storchaka, yselivanov
priority: normal -> release blocker
stage:  -> patch review
versions: +Python 3.6
Added file: http://bugs.python.org/file40311/issue24975.patch

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue24975] Python 3.5 can't compile AST involving PEP 448 unpacking

2015-08-31 Thread David Beazley

New submission from David Beazley:

The compile() function is not able to compile an AST created from code that 
uses some of the new unpacking generalizations in PEP 448.  Example:

code = ''' 
a = { 'x':1, 'y':2 }
b = { **a, 'z': 3 }
'''

# Works
ccode = compile(code, '', 'exec')

# Crashes
import ast
tree = ast.parse(code)
ccode = compile(tree, '', 'exec')

# --

Error Traceback:

Traceback (most recent call last):
  File "bug.py", line 11, in 
ccode = compile(tree, '', 'exec')
ValueError: None disallowed in expression list

Note:  This bug makes it impossible to try generalized unpacking examples 
interactively in IPython.

--
components: Library (Lib)
messages: 249442
nosy: dabeaz
priority: normal
severity: normal
status: open
title: Python 3.5 can't compile AST involving PEP 448 unpacking
type: crash
versions: Python 3.5

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue24975] Python 3.5 can't compile AST involving PEP 448 unpacking

2015-08-31 Thread Nick Coghlan

Nick Coghlan added the comment:

Patch looks good to me. I was initially going to query the changes to the 
break/continue AST tests, but then realised they were needed to avoid a compile 
error for break/continue outside a loop now that we ensure the resulting AST 
can be used to generate code.

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue24975] Python 3.5 can't compile AST involving PEP 448 unpacking

2015-08-31 Thread Larry Hastings

Larry Hastings added the comment:

Good catch!  Please file a pull request via bitbucket.

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com