<feed xmlns='http://www.w3.org/2005/Atom'>
<title>delta/cpython-git.git/Parser, branch faster-bytes-iter</title>
<subtitle>github.com: python/cpython.git
</subtitle>
<link rel='alternate' type='text/html' href='http://91.123.203.49/cgit/delta/cpython-git.git/'/>
<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://91.123.203.49/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://91.123.203.49/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>
<entry>
<title>Fix trivial typo in the PEG string parser (GH-21508)</title>
<updated>2020-07-16T16:10:23+00:00</updated>
<author>
<name>Eric V. Smith</name>
<email>ericvsmith@users.noreply.github.com</email>
</author>
<published>2020-07-16T16:10:23+00:00</published>
<link rel='alternate' type='text/html' href='http://91.123.203.49/cgit/delta/cpython-git.git/commit/?id=0275e0452a773976827c2b9bd1e598ee08e2d7f5'/>
<id>0275e0452a773976827c2b9bd1e598ee08e2d7f5</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
<entry>
<title>Fix possibly-unitialized warning in string_parser.c. (GH-21503)</title>
<updated>2020-07-16T13:07:29+00:00</updated>
<author>
<name>Benjamin Peterson</name>
<email>benjamin@python.org</email>
</author>
<published>2020-07-16T13:07:29+00:00</published>
<link rel='alternate' type='text/html' href='http://91.123.203.49/cgit/delta/cpython-git.git/commit/?id=2ad7e9c011b7606c5c7307176df07419a0e60134'/>
<id>2ad7e9c011b7606c5c7307176df07419a0e60134</id>
<content type='text'>
GCC says
```
../cpython/Parser/string_parser.c: In function ‘fstring_find_expr’:
../cpython/Parser/string_parser.c:404:93: warning: ‘cols’ may be used uninitialized in this function [-Wmaybe-uninitialized]
  404 |     p2-&gt;starting_col_offset = p-&gt;tok-&gt;first_lineno == p-&gt;tok-&gt;lineno ? t-&gt;col_offset + cols : cols;
      |                               ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~
../cpython/Parser/string_parser.c:384:16: note: ‘cols’ was declared here
  384 |     int lines, cols;
      |                ^~~~
../cpython/Parser/string_parser.c:403:45: warning: ‘lines’ may be used uninitialized in this function [-Wmaybe-uninitialized]
  403 |     p2-&gt;starting_lineno = t-&gt;lineno + lines - 1;
      |                           ~~~~~~~~~~~~~~~~~~^~~
../cpython/Parser/string_parser.c:384:9: note: ‘lines’ was declared here
  384 |     int lines, cols;
      |         ^~~~~
```

and, indeed, if `PyBytes_AsString` somehow fails, lines &amp; cols will not be initialized.</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
GCC says
```
../cpython/Parser/string_parser.c: In function ‘fstring_find_expr’:
../cpython/Parser/string_parser.c:404:93: warning: ‘cols’ may be used uninitialized in this function [-Wmaybe-uninitialized]
  404 |     p2-&gt;starting_col_offset = p-&gt;tok-&gt;first_lineno == p-&gt;tok-&gt;lineno ? t-&gt;col_offset + cols : cols;
      |                               ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~
../cpython/Parser/string_parser.c:384:16: note: ‘cols’ was declared here
  384 |     int lines, cols;
      |                ^~~~
../cpython/Parser/string_parser.c:403:45: warning: ‘lines’ may be used uninitialized in this function [-Wmaybe-uninitialized]
  403 |     p2-&gt;starting_lineno = t-&gt;lineno + lines - 1;
      |                           ~~~~~~~~~~~~~~~~~~^~~
../cpython/Parser/string_parser.c:384:9: note: ‘lines’ was declared here
  384 |     int lines, cols;
      |         ^~~~~
```

and, indeed, if `PyBytes_AsString` somehow fails, lines &amp; cols will not be initialized.</pre>
</div>
</content>
</entry>
<entry>
<title>bpo-41215: Make assertion in the new parser more strict (GH-21364)</title>
<updated>2020-07-06T22:42:21+00:00</updated>
<author>
<name>Lysandros Nikolaou</name>
<email>lisandrosnik@gmail.com</email>
</author>
<published>2020-07-06T22:42:21+00:00</published>
<link rel='alternate' type='text/html' href='http://91.123.203.49/cgit/delta/cpython-git.git/commit/?id=782f44b8fb07ec33cee148b2b6b4cf53024fe0cd'/>
<id>782f44b8fb07ec33cee148b2b6b4cf53024fe0cd</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
<entry>
<title>bpo-41215: Don't use NULL by default in the PEG parser keyword list (GH-21355)</title>
<updated>2020-07-06T19:31:16+00:00</updated>
<author>
<name>Pablo Galindo</name>
<email>Pablogsal@gmail.com</email>
</author>
<published>2020-07-06T19:31:16+00:00</published>
<link rel='alternate' type='text/html' href='http://91.123.203.49/cgit/delta/cpython-git.git/commit/?id=1ac0cbca369f16f9191833dd54536482fb141a98'/>
<id>1ac0cbca369f16f9191833dd54536482fb141a98</id>
<content type='text'>
Automerge-Triggered-By: @lysnikolaou</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Automerge-Triggered-By: @lysnikolaou</pre>
</div>
</content>
</entry>
<entry>
<title>bpo-41204: Fix compiler warning in ast_type_init() (GH-21307)</title>
<updated>2020-07-04T21:18:15+00:00</updated>
<author>
<name>Victor Stinner</name>
<email>vstinner@python.org</email>
</author>
<published>2020-07-04T21:18:15+00:00</published>
<link rel='alternate' type='text/html' href='http://91.123.203.49/cgit/delta/cpython-git.git/commit/?id=1f76453173267887ed05bb3783e862cb22365ae8'/>
<id>1f76453173267887ed05bb3783e862cb22365ae8</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
<entry>
<title>bpo-41194: Convert _ast extension to PEP 489 (GH-21293)</title>
<updated>2020-07-03T18:01:46+00:00</updated>
<author>
<name>Victor Stinner</name>
<email>vstinner@python.org</email>
</author>
<published>2020-07-03T18:01:46+00:00</published>
<link rel='alternate' type='text/html' href='http://91.123.203.49/cgit/delta/cpython-git.git/commit/?id=b1cc6ba73a51d5cc3aeb113b5e7378fb50a0e20a'/>
<id>b1cc6ba73a51d5cc3aeb113b5e7378fb50a0e20a</id>
<content type='text'>
Convert the _ast extension module to PEP 489 "Multiphase
initialization". Replace the global _ast state with a module state.</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Convert the _ast extension module to PEP 489 "Multiphase
initialization". Replace the global _ast state with a module state.</pre>
</div>
</content>
</entry>
<entry>
<title>bpo-41194: The _ast module cannot be loaded more than once (GH-21290)</title>
<updated>2020-07-03T12:15:53+00:00</updated>
<author>
<name>Victor Stinner</name>
<email>vstinner@python.org</email>
</author>
<published>2020-07-03T12:15:53+00:00</published>
<link rel='alternate' type='text/html' href='http://91.123.203.49/cgit/delta/cpython-git.git/commit/?id=91e1bc18bd467a13bceb62e16fbc435b33381c82'/>
<id>91e1bc18bd467a13bceb62e16fbc435b33381c82</id>
<content type='text'>
Fix a crash in the _ast module: it can no longer be loaded more than
once. It now uses a global state rather than a module state.

* Move _ast module state: use a global state instead.
* Set _astmodule.m_size to -1, so the extension cannot be loaded more
  than once.</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Fix a crash in the _ast module: it can no longer be loaded more than
once. It now uses a global state rather than a module state.

* Move _ast module state: use a global state instead.
* Set _astmodule.m_size to -1, so the extension cannot be loaded more
  than once.</pre>
</div>
</content>
</entry>
<entry>
<title>bpo-41194: Pass module state in Python-ast.c (GH-21284)</title>
<updated>2020-07-03T09:35:37+00:00</updated>
<author>
<name>Victor Stinner</name>
<email>vstinner@python.org</email>
</author>
<published>2020-07-03T09:35:37+00:00</published>
<link rel='alternate' type='text/html' href='http://91.123.203.49/cgit/delta/cpython-git.git/commit/?id=74419f0c64959bb8392fcf3659058410423038e1'/>
<id>74419f0c64959bb8392fcf3659058410423038e1</id>
<content type='text'>
Rework asdl_c.py to pass the module state to functions in
Python-ast.c, instead of using astmodulestate_global.

Handle also PyState_AddModule() failure in init_types().</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Rework asdl_c.py to pass the module state to functions in
Python-ast.c, instead of using astmodulestate_global.

Handle also PyState_AddModule() failure in init_types().</pre>
</div>
</content>
</entry>
</feed>
