<feed xmlns='http://www.w3.org/2005/Atom'>
<title>delta/cpython.git/Lib/test/test_ast.py, branch master</title>
<subtitle>
</subtitle>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/cpython.git/'/>
<entry>
<title>Issue #28008: Implement PEP 530 -- asynchronous comprehensions.</title>
<updated>2016-09-09T17:36:01+00:00</updated>
<author>
<name>Yury Selivanov</name>
<email>yury@magic.io</email>
</author>
<published>2016-09-09T17:36:01+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/cpython.git/commit/?id=b26bd4a4bf3de9dbedbbbd1209fea77cd7af7689'/>
<id>b26bd4a4bf3de9dbedbbbd1209fea77cd7af7689</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
<entry>
<title>Issue #27352: Fixed an error message in a test.</title>
<updated>2016-06-27T20:40:43+00:00</updated>
<author>
<name>Serhiy Storchaka</name>
<email>storchaka@gmail.com</email>
</author>
<published>2016-06-27T20:40:43+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/cpython.git/commit/?id=7529665d1adf1ad2ce671326d87c5dd00538ac9a'/>
<id>7529665d1adf1ad2ce671326d87c5dd00538ac9a</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
<entry>
<title>Issue #13436: Add a test to make sure that ast.ImportFrom(level=None) works</title>
<updated>2016-04-29T16:50:02+00:00</updated>
<author>
<name>Berker Peksag</name>
<email>berker.peksag@gmail.com</email>
</author>
<published>2016-04-29T16:50:02+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/cpython.git/commit/?id=0d46dac796c2362b5504eca80e9b6c4524826866'/>
<id>0d46dac796c2362b5504eca80e9b6c4524826866</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
<entry>
<title>compiler: don't emit SyntaxWarning on const stmt</title>
<updated>2016-02-08T21:45:06+00:00</updated>
<author>
<name>Victor Stinner</name>
<email>victor.stinner@gmail.com</email>
</author>
<published>2016-02-08T21:45:06+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/cpython.git/commit/?id=5ceba03e1af31e79d9dc3492bf109538f804f12b'/>
<id>5ceba03e1af31e79d9dc3492bf109538f804f12b</id>
<content type='text'>
Issue #26204: the compiler doesn't emit SyntaxWarning warnings anymore when
constant statements are ignored.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Issue #26204: the compiler doesn't emit SyntaxWarning warnings anymore when
constant statements are ignored.
</pre>
</div>
</content>
</entry>
<entry>
<title>compiler now ignores constant statements</title>
<updated>2016-02-08T17:17:58+00:00</updated>
<author>
<name>Victor Stinner</name>
<email>victor.stinner@gmail.com</email>
</author>
<published>2016-02-08T17:17:58+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/cpython.git/commit/?id=6887064d43421164e67d68d401562206cf5756c7'/>
<id>6887064d43421164e67d68d401562206cf5756c7</id>
<content type='text'>
The compile ignores constant statements and emit a SyntaxWarning warning.

Don't emit the warning for string statement because triple quoted string is a
common syntax for multiline comments.

Don't emit the warning on ellipis neither: 'def f(): ...' is a legit syntax for
abstract functions.

Changes:

* test_ast: ignore SyntaxWarning when compiling test statements. Modify
  test_load_const() to use assignment expressions rather than constant
  expression.
* test_code: add more kinds of constant statements, ignore SyntaxWarning when
  testing that the compiler removes constant statements.
* test_grammar: ignore SyntaxWarning on the statement "1"
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
The compile ignores constant statements and emit a SyntaxWarning warning.

Don't emit the warning for string statement because triple quoted string is a
common syntax for multiline comments.

Don't emit the warning on ellipis neither: 'def f(): ...' is a legit syntax for
abstract functions.

Changes:

* test_ast: ignore SyntaxWarning when compiling test statements. Modify
  test_load_const() to use assignment expressions rather than constant
  expression.
* test_code: add more kinds of constant statements, ignore SyntaxWarning when
  testing that the compiler removes constant statements.
* test_grammar: ignore SyntaxWarning on the statement "1"
</pre>
</div>
</content>
</entry>
<entry>
<title>Simplify main() of test_ast</title>
<updated>2016-02-08T16:15:21+00:00</updated>
<author>
<name>Victor Stinner</name>
<email>victor.stinner@gmail.com</email>
</author>
<published>2016-02-08T16:15:21+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/cpython.git/commit/?id=76b91c2dd1380f5a703badca363a670ec3575f4a'/>
<id>76b91c2dd1380f5a703badca363a670ec3575f4a</id>
<content type='text'>
* Use ast.parse() to get the AST for a statement
* Use str%args syntax for format a line

Issue #26204.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
* Use ast.parse() to get the AST for a statement
* Use str%args syntax for format a line

Issue #26204.
</pre>
</div>
</content>
</entry>
<entry>
<title>Issue #26146: enhance ast.Constant error message</title>
<updated>2016-01-26T23:39:12+00:00</updated>
<author>
<name>Victor Stinner</name>
<email>victor.stinner@gmail.com</email>
</author>
<published>2016-01-26T23:39:12+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/cpython.git/commit/?id=74b4e9d264d388b9d8cb6f7e5da22608a8244647'/>
<id>74b4e9d264d388b9d8cb6f7e5da22608a8244647</id>
<content type='text'>
Mention the name of the invalid type in error message of AST validation for
constants.

Suggestion made by Joseph Jevnik on a review.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Mention the name of the invalid type in error message of AST validation for
constants.

Suggestion made by Joseph Jevnik on a review.
</pre>
</div>
</content>
</entry>
<entry>
<title>Add ast.Constant</title>
<updated>2016-01-25T23:40:57+00:00</updated>
<author>
<name>Victor Stinner</name>
<email>victor.stinner@gmail.com</email>
</author>
<published>2016-01-25T23:40:57+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/cpython.git/commit/?id=05b0626e91b9f17c0f0be156917a0d087d5724ae'/>
<id>05b0626e91b9f17c0f0be156917a0d087d5724ae</id>
<content type='text'>
Issue #26146: Add a new kind of AST node: ast.Constant. It can be used by
external AST optimizers, but the compiler does not emit directly such node.

An optimizer can replace the following AST nodes with ast.Constant:

* ast.NameConstant: None, False, True
* ast.Num: int, float, complex
* ast.Str: str
* ast.Bytes: bytes
* ast.Tuple if items are constants too: tuple
* frozenset

Update code to accept ast.Constant instead of ast.Num and/or ast.Str:

* compiler
* docstrings
* ast.literal_eval()
* Tools/parser/unparse.py
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Issue #26146: Add a new kind of AST node: ast.Constant. It can be used by
external AST optimizers, but the compiler does not emit directly such node.

An optimizer can replace the following AST nodes with ast.Constant:

* ast.NameConstant: None, False, True
* ast.Num: int, float, complex
* ast.Str: str
* ast.Bytes: bytes
* ast.Tuple if items are constants too: tuple
* frozenset

Update code to accept ast.Constant instead of ast.Num and/or ast.Str:

* compiler
* docstrings
* ast.literal_eval()
* Tools/parser/unparse.py
</pre>
</div>
</content>
</entry>
<entry>
<title>make opening brace of container literals and comprehensions correspond to the line number and col offset of the AST node (closes #25131)</title>
<updated>2015-09-26T05:44:43+00:00</updated>
<author>
<name>Benjamin Peterson</name>
<email>benjamin@python.org</email>
</author>
<published>2015-09-26T05:44:43+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/cpython.git/commit/?id=4675ccff8f46e04dba8ba1b9cb21030b0ac15c83'/>
<id>4675ccff8f46e04dba8ba1b9cb21030b0ac15c83</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
<entry>
<title>Issue #24975: Fix AST compilation for PEP 448 syntax.</title>
<updated>2015-09-01T20:10:49+00:00</updated>
<author>
<name>Yury Selivanov</name>
<email>yselivanov@sprymix.com</email>
</author>
<published>2015-09-01T20:10:49+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/cpython.git/commit/?id=966460faa97264ff595fc320034b4e7a403c7d83'/>
<id>966460faa97264ff595fc320034b4e7a403c7d83</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
</feed>
