[issue13436] compile() doesn't work on ImportFrom with level=None

2016-04-29 Thread Roundup Robot

Roundup Robot added the comment:

New changeset 59638baee25e by Berker Peksag in branch 'default':
Issue #13436: Add a test to make sure that ast.ImportFrom(level=None) works
https://hg.python.org/cpython/rev/59638baee25e

--
nosy: +python-dev

___
Python tracker 

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



[issue13436] compile() doesn't work on ImportFrom with level=None

2016-04-29 Thread Berker Peksag

Changes by Berker Peksag :


--
resolution:  -> out of date
stage:  -> 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



[issue13436] compile() doesn't work on ImportFrom with level=None

2016-04-29 Thread Berker Peksag

Berker Peksag added the comment:

level=None is now allowed: 
https://hg.python.org/cpython/file/default/Python/Python-ast.c#l5224 (see line 
5224 to 5232) I converted the example in msg147972 to a Python script. 
test_bad_integer is still useful as it uses the required 'lineno' field. I will 
also commit issue13436.py as a test case.

--
nosy: +berker.peksag
Added file: http://bugs.python.org/file42653/issue13436.py

___
Python tracker 

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



[issue13436] compile() doesn't work on ImportFrom with level=None

2013-10-08 Thread Georg Brandl

Changes by Georg Brandl ge...@python.org:


--
Removed message: http://bugs.python.org/msg148146

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



[issue13436] compile() doesn't work on ImportFrom with level=None

2013-10-08 Thread Georg Brandl

Changes by Georg Brandl ge...@python.org:


--
components:  -Documentation
nosy:  -docs@python, python-dev

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



[issue13436] compile() doesn't work on ImportFrom with level=None

2011-11-25 Thread Terry J. Reedy

Terry J. Reedy tjre...@udel.edu added the comment:

Does this apply to 2.7 as well?

I believe msg148146 is due to a commit message typo.

--
nosy: +haypo, terry.reedy
versions: +Python 3.2, Python 3.3 -Python 3.1

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue13436
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue13436] compile() doesn't work on ImportFrom with level=None

2011-11-22 Thread Roundup Robot

Roundup Robot devn...@psf.upfronthosting.co.za added the comment:

New changeset ffcdfc534942 by Amaury Forgeot d'Arc in branch '3.2':
Issue #13436: Fix a bogus error message when an AST object was passed
http://hg.python.org/cpython/rev/ffcdfc534942

New changeset 470f7d7c57ce by Amaury Forgeot d'Arc in branch '3.2':
Issue #13436: commit regenerated Python-ast.c
http://hg.python.org/cpython/rev/470f7d7c57ce

--
nosy: +python-dev

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue13436
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue13436] compile() doesn't work on ImportFrom with level=None

2011-11-22 Thread Amaury Forgeot d'Arc

Amaury Forgeot d'Arc amaur...@gmail.com added the comment:

I fixed the bogus error message, but level=None is still not allowed, whereas 
the docs promise that optional values can be None.

--

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue13436
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue13436] compile() doesn't work on ImportFrom with level=None

2011-11-22 Thread Roundup Robot

Roundup Robot devn...@psf.upfronthosting.co.za added the comment:

New changeset 2e5506d9a079 by Victor Stinner in branch '3.2':
Issue #13436: Fix unsetenv() test on Windows
http://hg.python.org/cpython/rev/2e5506d9a079

New changeset 029ad97883ef by Victor Stinner in branch 'default':
(Merge 3.2) Issue #13436: Fix unsetenv() test on Windows
http://hg.python.org/cpython/rev/029ad97883ef

New changeset e66ef9fa55de by Victor Stinner in branch '2.7':
Issue #13436: Fix unsetenv() test on Windows
http://hg.python.org/cpython/rev/e66ef9fa55de

--

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue13436
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue13436] compile() doesn't work on ImportFrom with level=None

2011-11-20 Thread Amaury Forgeot d'Arc

Amaury Forgeot d'Arc amaur...@gmail.com added the comment:

Here is a patch for the bad error message (PyBytes_AS_BYTES after 
PyObject_Repr, bah)

--
keywords: +patch
nosy: +amaury.forgeotdarc
Added file: http://bugs.python.org/file23739/issue13436.patch

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue13436
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue13436] compile() doesn't work on ImportFrom with level=None

2011-11-20 Thread Amaury Forgeot d'Arc

Changes by Amaury Forgeot d'Arc amaur...@gmail.com:


--
nosy: +benjamin.peterson

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue13436
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue13436] compile() doesn't work on ImportFrom with level=None

2011-11-20 Thread Benjamin Peterson

Benjamin Peterson benja...@python.org added the comment:

LGTM.

--

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue13436
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue13436] compile() doesn't work on ImportFrom with level=None

2011-11-20 Thread Benjamin Peterson

Changes by Benjamin Peterson benja...@python.org:


--
assignee: docs@python - 

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue13436
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue13436] compile() doesn't work on ImportFrom with level=None

2011-11-19 Thread Janosch Gräf

New submission from Janosch Gräf janosch.gr...@gmx.net:

The documentation for ast says that arguments that are marked with a '?' in the 
abstract grammar are optional and can therefore be None.
When I try to compile a Module node which contains an ImportFrom node with 
attribute level=None compile() throws an exception:

Module(body=[ImportFrom(module='time', names=[alias(name='sleep', asname=None), 
alias(name='time', asname=None)], level=None, lineno=0, col_offset=0)])

Traceback (most recent call last):
  File g0.py, line 423, in module
p.main()
  File g0.py, line 65, in main
self.reproduce(g1.pyc)
  File g0.py, line 85, in reproduce
co = self.generate_bytecode(st, genome)
  File g0.py, line 243, in generate_bytecode
co = compile(st, id, exec)
ValueError: invalid integer value: 

So, I tried to set level=0:
Module(body=[ImportFrom(module='time', names=[alias(name='sleep', asname=None), 
alias(name='time', asname=None)], level=0, lineno=0, col_offset=0)])

and everything worked fine.

BTW: The unprintable bytes in the error message are:
ef bf bd ef bf bd ef bf bd ef bf bd ef bf bd ef bf bd ef bf bd ef bf bd

--
assignee: docs@python
components: Documentation, Interpreter Core
messages: 147972
nosy: Janosch.Gräf, docs@python
priority: normal
severity: normal
status: open
title: compile() doesn't work on ImportFrom with level=None
type: behavior
versions: Python 3.1

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue13436
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com