<feed xmlns='http://www.w3.org/2005/Atom'>
<title>delta/cpython-git.git/Parser, branch datetime_backport_test</title>
<subtitle>github.com: python/cpython.git
</subtitle>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/cpython-git.git/'/>
<entry>
<title>bpo-41746: Cast to typed seqs in CHECK macros to avoid type erasure (GH-22864)</title>
<updated>2020-10-21T19:53:14+00:00</updated>
<author>
<name>Lysandros Nikolaou</name>
<email>lisandrosnik@gmail.com</email>
</author>
<published>2020-10-21T19:53:14+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/cpython-git.git/commit/?id=2e5ca9e3f68b33abb7d2c66d22ffc18dec40641a'/>
<id>2e5ca9e3f68b33abb7d2c66d22ffc18dec40641a</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
<entry>
<title>bpo-42000: Cleanup the AST related C-code (GH-22641)</title>
<updated>2020-10-10T17:14:59+00:00</updated>
<author>
<name>Batuhan Taskaya</name>
<email>batuhanosmantaskaya@gmail.com</email>
</author>
<published>2020-10-10T17:14:59+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/cpython-git.git/commit/?id=02a1603f918b9862e164e4fd050c505b16bc9f57'/>
<id>02a1603f918b9862e164e4fd050c505b16bc9f57</id>
<content type='text'>
- Use the proper asdl sequence when creating empty arguments
- Remove reduntant casts (thanks to new typed asdl_sequences)
- Remove MarshalPrototypeVisitor and some utilities from asdl generator
- Fix the header of `Python/ast.c` (kept from pgen times)

Automerge-Triggered-By: @pablogsal</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
- Use the proper asdl sequence when creating empty arguments
- Remove reduntant casts (thanks to new typed asdl_sequences)
- Remove MarshalPrototypeVisitor and some utilities from asdl generator
- Fix the header of `Python/ast.c` (kept from pgen times)

Automerge-Triggered-By: @pablogsal</pre>
</div>
</content>
</entry>
<entry>
<title>bpo-41979: Accept star-unpacking on with-item targets (GH-22611)</title>
<updated>2020-10-09T09:56:48+00:00</updated>
<author>
<name>Batuhan Taskaya</name>
<email>batuhanosmantaskaya@gmail.com</email>
</author>
<published>2020-10-09T09:56:48+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/cpython-git.git/commit/?id=48f305fd122080a9181cbda33bdb42ea36a0136f'/>
<id>48f305fd122080a9181cbda33bdb42ea36a0136f</id>
<content type='text'>
Co-authored-by: Pablo Galindo &lt;Pablogsal@gmail.com&gt;</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Co-authored-by: Pablo Galindo &lt;Pablogsal@gmail.com&gt;</pre>
</div>
</content>
</entry>
<entry>
<title>bpo-41746: Add type information to asdl_seq objects (GH-22223)</title>
<updated>2020-09-16T18:42:00+00:00</updated>
<author>
<name>Pablo Galindo</name>
<email>Pablogsal@gmail.com</email>
</author>
<published>2020-09-16T18:42:00+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/cpython-git.git/commit/?id=a5634c406767ef694df49b624adf9cfa6c0d9064'/>
<id>a5634c406767ef694df49b624adf9cfa6c0d9064</id>
<content type='text'>
* Add new capability to the PEG parser to type variable assignments. For instance:
```
       | a[asdl_stmt_seq*]=';'.small_stmt+ [';'] NEWLINE { a }
```

* Add new sequence types from the asdl definition (automatically generated)
* Make `asdl_seq` type a generic aliasing pointer type.
* Create a new `asdl_generic_seq` for the generic case using `void*`.
* The old `asdl_seq_GET`/`ast_seq_SET` macros now are typed.
* New `asdl_seq_GET_UNTYPED`/`ast_seq_SET_UNTYPED` macros for dealing with generic sequences.
* Changes all possible `asdl_seq` types to use specific versions everywhere.</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
* Add new capability to the PEG parser to type variable assignments. For instance:
```
       | a[asdl_stmt_seq*]=';'.small_stmt+ [';'] NEWLINE { a }
```

* Add new sequence types from the asdl definition (automatically generated)
* Make `asdl_seq` type a generic aliasing pointer type.
* Create a new `asdl_generic_seq` for the generic case using `void*`.
* The old `asdl_seq_GET`/`ast_seq_SET` macros now are typed.
* New `asdl_seq_GET_UNTYPED`/`ast_seq_SET_UNTYPED` macros for dealing with generic sequences.
* Changes all possible `asdl_seq` types to use specific versions everywhere.</pre>
</div>
</content>
</entry>
<entry>
<title>bpo-41631: _ast module uses again a global state (#21961)</title>
<updated>2020-09-15T16:03:34+00:00</updated>
<author>
<name>Victor Stinner</name>
<email>vstinner@python.org</email>
</author>
<published>2020-09-15T16:03:34+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/cpython-git.git/commit/?id=e5fbe0cbd4be99ced5f000ad382208ad2a561c90'/>
<id>e5fbe0cbd4be99ced5f000ad382208ad2a561c90</id>
<content type='text'>
Partially revert commit ac46eb4ad6662cf6d771b20d8963658b2186c48c:
"bpo-38113: Update the Python-ast.c generator to PEP384 (gh-15957)".

Using a module state per module instance is causing subtle practical
problems.

For example, the Mercurial project replaces the __import__() function
to implement lazy import, whereas Python expected that "import _ast"
always return a fully initialized _ast module.

Add _PyAST_Fini() to clear the state at exit.

The _ast module has no state (set _astmodule.m_size to 0). Remove
astmodule_traverse(), astmodule_clear() and astmodule_free()
functions.</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Partially revert commit ac46eb4ad6662cf6d771b20d8963658b2186c48c:
"bpo-38113: Update the Python-ast.c generator to PEP384 (gh-15957)".

Using a module state per module instance is causing subtle practical
problems.

For example, the Mercurial project replaces the __import__() function
to implement lazy import, whereas Python expected that "import _ast"
always return a fully initialized _ast module.

Add _PyAST_Fini() to clear the state at exit.

The _ast module has no state (set _astmodule.m_size to 0). Remove
astmodule_traverse(), astmodule_clear() and astmodule_free()
functions.</pre>
</div>
</content>
</entry>
<entry>
<title>bpo-41697: Correctly handle KeywordOrStarred when parsing arguments in the parser (GH-22077)</title>
<updated>2020-09-03T14:29:32+00:00</updated>
<author>
<name>Pablo Galindo</name>
<email>Pablogsal@gmail.com</email>
</author>
<published>2020-09-03T14:29:32+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/cpython-git.git/commit/?id=315a61f7a9418d904e0eea14b1f054fac3a90e9f'/>
<id>315a61f7a9418d904e0eea14b1f054fac3a90e9f</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
<entry>
<title>bpo-41690: Use a loop to collect args in the parser instead of recursion (GH-22053)</title>
<updated>2020-09-02T16:44:19+00:00</updated>
<author>
<name>Pablo Galindo</name>
<email>Pablogsal@gmail.com</email>
</author>
<published>2020-09-02T16:44:19+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/cpython-git.git/commit/?id=4a97b1517a6b5ff22e2984b677a680b07ff0ce11'/>
<id>4a97b1517a6b5ff22e2984b677a680b07ff0ce11</id>
<content type='text'>
This program can segfault the parser by stack overflow:

```
import ast

code = "f(" + ",".join(['a' for _ in range(100000)]) + ")"
print("Ready!")
ast.parse(code)
```

the reason is that the rule for arguments has a simple recursion when collecting args:

args[expr_ty]:
    [...]
    | a=named_expression b=[',' c=args { c }] {
        [...] }
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
This program can segfault the parser by stack overflow:

```
import ast

code = "f(" + ",".join(['a' for _ in range(100000)]) + ")"
print("Ready!")
ast.parse(code)
```

the reason is that the rule for arguments has a simple recursion when collecting args:

args[expr_ty]:
    [...]
    | a=named_expression b=[',' c=args { c }] {
        [...] }
</pre>
</div>
</content>
</entry>
<entry>
<title>bpo-38156: Fix compiler warning in PyOS_StdioReadline() (GH-21721)</title>
<updated>2020-08-04T00:38:16+00:00</updated>
<author>
<name>Victor Stinner</name>
<email>vstinner@python.org</email>
</author>
<published>2020-08-04T00:38:16+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/cpython-git.git/commit/?id=bde48fd8110cc5f128d5db44810d17811e328a24'/>
<id>bde48fd8110cc5f128d5db44810d17811e328a24</id>
<content type='text'>
incr cannot be larger than INT_MAX: downcast to int explicitly.</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
incr cannot be larger than INT_MAX: downcast to int explicitly.</pre>
</div>
</content>
</entry>
<entry>
<title>closes bpo-38156: Always handle interrupts in PyOS_StdioReadline. (GH-21569)</title>
<updated>2020-07-29T00:57:12+00:00</updated>
<author>
<name>Benjamin Peterson</name>
<email>benjamin@python.org</email>
</author>
<published>2020-07-29T00:57:12+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/cpython-git.git/commit/?id=a74eea238f5baba15797e2e8b570d153bc8690a7'/>
<id>a74eea238f5baba15797e2e8b570d153bc8690a7</id>
<content type='text'>
This consolidates the handling of my_fgets return values, so that interrupts are always handled, even if they come after EOF.

 I believe PyOS_StdioReadline is still buggy in that I/O errors will not result in a proper Python exception being set. However, that is a separate issue.</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
This consolidates the handling of my_fgets return values, so that interrupts are always handled, even if they come after EOF.

 I believe PyOS_StdioReadline is still buggy in that I/O errors will not result in a proper Python exception being set. However, that is a separate issue.</pre>
</div>
</content>
</entry>
<entry>
<title>Validate the AST produced by the parser in debug mode (GH-21643)</title>
<updated>2020-07-27T22:46:59+00:00</updated>
<author>
<name>Pablo Galindo</name>
<email>Pablogsal@gmail.com</email>
</author>
<published>2020-07-27T22:46:59+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/cpython-git.git/commit/?id=1332226b32da44087a55e1d71990ee6899dfd28a'/>
<id>1332226b32da44087a55e1d71990ee6899dfd28a</id>
<content type='text'>
This will improve the debug experience if something fails in the produced AST. Previously, errors in the produced AST can be felt much later like in the garbage collector or the compiler, making debugging them much more difficult.</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
This will improve the debug experience if something fails in the produced AST. Previously, errors in the produced AST can be felt much later like in the garbage collector or the compiler, making debugging them much more difficult.</pre>
</div>
</content>
</entry>
</feed>
