<feed xmlns='http://www.w3.org/2005/Atom'>
<title>delta/cpython-git.git/Python/Python-ast.c, branch v3.9.6</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>[3.9] bpo-11105: Do not crash when compiling recursive ASTs (GH-20594) (GH-26522)</title>
<updated>2021-06-03T21:22:34+00:00</updated>
<author>
<name>Batuhan Taskaya</name>
<email>batuhan@python.org</email>
</author>
<published>2021-06-03T21:22:34+00:00</published>
<link rel='alternate' type='text/html' href='http://91.123.203.49/cgit/delta/cpython-git.git/commit/?id=de58b319af3a72440a74e807cf8a1194ed0c6d8c'/>
<id>de58b319af3a72440a74e807cf8a1194ed0c6d8c</id>
<content type='text'>
When compiling an AST object with a direct / indirect reference
cycles, on the conversion phase because of exceeding amount of
calls, a segfault was raised. This patch adds recursion guards to
places for preventing user inputs to not to crash AST but instead
raise a RecursionError..
(cherry picked from commit f3491242e41933aa9529add7102edb68b80a25e9)

Co-authored-by: Batuhan Taskaya &lt;batuhan@python.org&gt;</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
When compiling an AST object with a direct / indirect reference
cycles, on the conversion phase because of exceeding amount of
calls, a segfault was raised. This patch adds recursion guards to
places for preventing user inputs to not to crash AST but instead
raise a RecursionError..
(cherry picked from commit f3491242e41933aa9529add7102edb68b80a25e9)

Co-authored-by: Batuhan Taskaya &lt;batuhan@python.org&gt;</pre>
</div>
</content>
</entry>
<entry>
<title>[3.9] bpo-41631: _ast module uses again a global state (GH-21961) (GH-22258)</title>
<updated>2020-09-15T18:32:56+00:00</updated>
<author>
<name>Pablo Galindo</name>
<email>Pablogsal@gmail.com</email>
</author>
<published>2020-09-15T18:32:56+00:00</published>
<link rel='alternate' type='text/html' href='http://91.123.203.49/cgit/delta/cpython-git.git/commit/?id=55e0836849c14fb474e1ba7f37851e07660eea3c'/>
<id>55e0836849c14fb474e1ba7f37851e07660eea3c</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..
(cherry picked from commit e5fbe0cbd4be99ced5f000ad382208ad2a561c90)

Co-authored-by: Victor Stinner &lt;vstinner@python.org&gt;</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..
(cherry picked from commit e5fbe0cbd4be99ced5f000ad382208ad2a561c90)

Co-authored-by: Victor Stinner &lt;vstinner@python.org&gt;</pre>
</div>
</content>
</entry>
<entry>
<title>[3.9] bpo-41194: Convert _ast extension to PEP 489 (GH-21807)</title>
<updated>2020-08-10T13:55:54+00:00</updated>
<author>
<name>Victor Stinner</name>
<email>vstinner@python.org</email>
</author>
<published>2020-08-10T13:55:54+00:00</published>
<link rel='alternate' type='text/html' href='http://91.123.203.49/cgit/delta/cpython-git.git/commit/?id=d2bea2636d5f0c2b196966315790af8e79c7bf82'/>
<id>d2bea2636d5f0c2b196966315790af8e79c7bf82</id>
<content type='text'>
* bpo-41194: Convert _ast extension to PEP 489 (GH-21293)

Convert the _ast extension module to PEP 489 "Multiphase
initialization". Replace the global _ast state with a module state.

(cherry picked from commit b1cc6ba73a51d5cc3aeb113b5e7378fb50a0e20a)

* bpo-41204: Fix compiler warning in ast_type_init() (GH-21307)

(cherry picked from commit 1f76453173267887ed05bb3783e862cb22365ae8)</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
* bpo-41194: Convert _ast extension to PEP 489 (GH-21293)

Convert the _ast extension module to PEP 489 "Multiphase
initialization". Replace the global _ast state with a module state.

(cherry picked from commit b1cc6ba73a51d5cc3aeb113b5e7378fb50a0e20a)

* bpo-41204: Fix compiler warning in ast_type_init() (GH-21307)

(cherry picked from commit 1f76453173267887ed05bb3783e862cb22365ae8)</pre>
</div>
</content>
</entry>
<entry>
<title>[3.9] bpo-41194: The _ast module cannot be loaded more than once (GH-21290) (GH-21292)</title>
<updated>2020-07-03T14:57:19+00:00</updated>
<author>
<name>Victor Stinner</name>
<email>vstinner@python.org</email>
</author>
<published>2020-07-03T14:57:19+00:00</published>
<link rel='alternate' type='text/html' href='http://91.123.203.49/cgit/delta/cpython-git.git/commit/?id=f8599279b6ac8c44538b608fd08c13ccf674f497'/>
<id>f8599279b6ac8c44538b608fd08c13ccf674f497</id>
<content type='text'>
* bpo-41194: Pass module state in Python-ast.c (GH-21284)

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().

(cherry picked from commit 74419f0c64959bb8392fcf3659058410423038e1)

* bpo-41194: The _ast module cannot be loaded more than once (GH-21290)

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.

(cherry picked from commit 91e1bc18bd467a13bceb62e16fbc435b33381c82)</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
* bpo-41194: Pass module state in Python-ast.c (GH-21284)

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().

(cherry picked from commit 74419f0c64959bb8392fcf3659058410423038e1)

* bpo-41194: The _ast module cannot be loaded more than once (GH-21290)

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.

(cherry picked from commit 91e1bc18bd467a13bceb62e16fbc435b33381c82)</pre>
</div>
</content>
</entry>
<entry>
<title>bpo-40217:  Ensure Py_VISIT(Py_TYPE(self)) is always called for PyType_FromSpec types (reverts GH-19414) (GH-20264)</title>
<updated>2020-05-28T15:12:23+00:00</updated>
<author>
<name>Miss Islington (bot)</name>
<email>31488909+miss-islington@users.noreply.github.com</email>
</author>
<published>2020-05-28T15:12:23+00:00</published>
<link rel='alternate' type='text/html' href='http://91.123.203.49/cgit/delta/cpython-git.git/commit/?id=bcbe5c59dde5fcb9ad21991c2afd91837b14bbd5'/>
<id>bcbe5c59dde5fcb9ad21991c2afd91837b14bbd5</id>
<content type='text'>
Heap types now always visit the type in tp_traverse. See added docs for details.

This reverts commit 0169d3003be3d072751dd14a5c84748ab63a249f.

Automerge-Triggered-By: @encukou
(cherry picked from commit 1cf15af9a6f28750f37b08c028ada31d38e818dd)

Co-authored-by: Pablo Galindo &lt;Pablogsal@gmail.com&gt;</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Heap types now always visit the type in tp_traverse. See added docs for details.

This reverts commit 0169d3003be3d072751dd14a5c84748ab63a249f.

Automerge-Triggered-By: @encukou
(cherry picked from commit 1cf15af9a6f28750f37b08c028ada31d38e818dd)

Co-authored-by: Pablo Galindo &lt;Pablogsal@gmail.com&gt;</pre>
</div>
</content>
</entry>
<entry>
<title>bpo-36290: Fix keytword collision handling in AST node constructors (GH-12382)</title>
<updated>2020-05-24T21:32:32+00:00</updated>
<author>
<name>Miss Islington (bot)</name>
<email>31488909+miss-islington@users.noreply.github.com</email>
</author>
<published>2020-05-24T21:32:32+00:00</published>
<link rel='alternate' type='text/html' href='http://91.123.203.49/cgit/delta/cpython-git.git/commit/?id=1a4e9e6f35dad26b37639198f1444591d04399e0'/>
<id>1a4e9e6f35dad26b37639198f1444591d04399e0</id>
<content type='text'>
(cherry picked from commit c73914a562580ae72048876cb42ed8e76e2c83f9)

Co-authored-by: Rémi Lapeyre &lt;remi.lapeyre@lenstra.fr&gt;</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
(cherry picked from commit c73914a562580ae72048876cb42ed8e76e2c83f9)

Co-authored-by: Rémi Lapeyre &lt;remi.lapeyre@lenstra.fr&gt;</pre>
</div>
</content>
</entry>
<entry>
<title>bpo-40528: Improve and clear several aspects of the ASDL definition code for the AST (GH-19952)</title>
<updated>2020-05-06T14:29:32+00:00</updated>
<author>
<name>Batuhan Taskaya</name>
<email>batuhanosmantaskaya@gmail.com</email>
</author>
<published>2020-05-06T14:29:32+00:00</published>
<link rel='alternate' type='text/html' href='http://91.123.203.49/cgit/delta/cpython-git.git/commit/?id=091951a67c832db83c60f4eb22f1fb474b70e635'/>
<id>091951a67c832db83c60f4eb22f1fb474b70e635</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
<entry>
<title>bpo-40268: Remove unused structmember.h includes (GH-19530)</title>
<updated>2020-04-15T00:35:41+00:00</updated>
<author>
<name>Victor Stinner</name>
<email>vstinner@python.org</email>
</author>
<published>2020-04-15T00:35:41+00:00</published>
<link rel='alternate' type='text/html' href='http://91.123.203.49/cgit/delta/cpython-git.git/commit/?id=4a21e57fe55076c77b0ee454e1994ca544d09dc0'/>
<id>4a21e57fe55076c77b0ee454e1994ca544d09dc0</id>
<content type='text'>
If only offsetof() is needed: include stddef.h instead.

When structmember.h is used, add a comment explaining that
PyMemberDef is used.</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
If only offsetof() is needed: include stddef.h instead.

When structmember.h is used, add a comment explaining that
PyMemberDef is used.</pre>
</div>
</content>
</entry>
<entry>
<title>bpo-40141: Add line and column information to ast.keyword nodes (GH-19283)</title>
<updated>2020-04-01T23:47:39+00:00</updated>
<author>
<name>Pablo Galindo</name>
<email>Pablogsal@gmail.com</email>
</author>
<published>2020-04-01T23:47:39+00:00</published>
<link rel='alternate' type='text/html' href='http://91.123.203.49/cgit/delta/cpython-git.git/commit/?id=168660b547d5f683c5d3c60447cfa8c6d620efc3'/>
<id>168660b547d5f683c5d3c60447cfa8c6d620efc3</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
<entry>
<title>bpo-39999: Improve compatibility of the ast module. (GH-19056)</title>
<updated>2020-03-22T18:33:34+00:00</updated>
<author>
<name>Serhiy Storchaka</name>
<email>storchaka@gmail.com</email>
</author>
<published>2020-03-22T18:33:34+00:00</published>
<link rel='alternate' type='text/html' href='http://91.123.203.49/cgit/delta/cpython-git.git/commit/?id=bace59d8b8e38f5c779ff6296ebdc0527f6db14a'/>
<id>bace59d8b8e38f5c779ff6296ebdc0527f6db14a</id>
<content type='text'>
* Re-add removed classes Suite, slice, Param, AugLoad and AugStore.
* Add docstrings for dummy classes.
* Add docstrings for attribute aliases.
* Set __module__ to "ast" instead of "_ast".
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
* Re-add removed classes Suite, slice, Param, AugLoad and AugStore.
* Add docstrings for dummy classes.
* Add docstrings for attribute aliases.
* Set __module__ to "ast" instead of "_ast".
</pre>
</div>
</content>
</entry>
</feed>
