mirror of
https://github.com/python/cpython.git
synced 2025-10-02 13:22:19 +00:00
Warn that compile() can crash when compiling to an AST object (GH-6043) (GH-6045)
(cherry picked from commit f7a6ff6fca
)
Co-authored-by: Brett Cannon <brettcannon@users.noreply.github.com>
This commit is contained in:
parent
f2fffd41b4
commit
fc5e0956fe
1 changed files with 6 additions and 0 deletions
|
@ -274,6 +274,12 @@ are always available. They are listed here in alphabetical order.
|
|||
character. This is to facilitate detection of incomplete and complete
|
||||
statements in the :mod:`code` module.
|
||||
|
||||
.. warning::
|
||||
|
||||
It is possible to crash the Python interpreter with a
|
||||
sufficiently large/complex string when compiling to an AST
|
||||
object due to stack depth limitations in Python's AST compiler.
|
||||
|
||||
.. versionchanged:: 3.2
|
||||
Allowed use of Windows and Mac newlines. Also input in ``'exec'`` mode
|
||||
does not have to end in a newline anymore. Added the *optimize* parameter.
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue