From 45e57be76cae99e53aea70ce57cd5c3d275dee93 Mon Sep 17 00:00:00 2001 From: ramvikrams Date: Sun, 18 Dec 2022 03:30:03 +0530 Subject: [PATCH 1/5] changed the doc for literal_eval in eval --- Doc/library/functions.rst | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/Doc/library/functions.rst b/Doc/library/functions.rst index 2110990d188973..9a21502dda667e 100644 --- a/Doc/library/functions.rst +++ b/Doc/library/functions.rst @@ -554,8 +554,10 @@ are always available. They are listed here in alphabetical order. If the given source is a string, then leading and trailing spaces and tabs are stripped. - See :func:`ast.literal_eval` for a function that can safely evaluate strings - with expressions containing only literals. + .. versionchanged:: 3.11 + :func:`ast.literal_eval` is no longer marked as safe for evaluating strings + with expressions containing only literals. For further information, please + check the documentation for :func:`ast.literal_eval` .. audit-event:: exec code_object eval From c05387bcc10ae8e405a8217f5c149091f0ec32d3 Mon Sep 17 00:00:00 2001 From: ramvikrams Date: Sun, 18 Dec 2022 03:36:31 +0530 Subject: [PATCH 2/5] Update functions.rst --- Doc/library/functions.rst | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/Doc/library/functions.rst b/Doc/library/functions.rst index 9a21502dda667e..fa343baf321aac 100644 --- a/Doc/library/functions.rst +++ b/Doc/library/functions.rst @@ -554,9 +554,9 @@ are always available. They are listed here in alphabetical order. If the given source is a string, then leading and trailing spaces and tabs are stripped. - .. versionchanged:: 3.11 - :func:`ast.literal_eval` is no longer marked as safe for evaluating strings - with expressions containing only literals. For further information, please + .. versionchanged:: 3.11 + :func:`ast.literal_eval` is no longer marked as safe for evaluating strings + with expressions containing only literals. For further information, please check the documentation for :func:`ast.literal_eval` .. audit-event:: exec code_object eval From da1f41689e795c030a865225df61cde27e87e3cc Mon Sep 17 00:00:00 2001 From: ramvikrams Date: Sun, 18 Dec 2022 11:20:58 +0530 Subject: [PATCH 3/5] Update functions.rst --- Doc/library/functions.rst | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/Doc/library/functions.rst b/Doc/library/functions.rst index fa343baf321aac..062c7e00b30125 100644 --- a/Doc/library/functions.rst +++ b/Doc/library/functions.rst @@ -555,9 +555,8 @@ are always available. They are listed here in alphabetical order. are stripped. .. versionchanged:: 3.11 - :func:`ast.literal_eval` is no longer marked as safe for evaluating strings - with expressions containing only literals. For further information, please - check the documentation for :func:`ast.literal_eval` + See :func:`ast.literal_eval` for a function that can "safely" evaluate strings + with expressions containing only literals. .. audit-event:: exec code_object eval From d05eacce1ce287d6037c372e627b8ca006f617df Mon Sep 17 00:00:00 2001 From: ram vikram singh Date: Tue, 20 Dec 2022 13:31:16 +0530 Subject: [PATCH 4/5] Update functions.rst --- Doc/library/functions.rst | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/Doc/library/functions.rst b/Doc/library/functions.rst index 062c7e00b30125..c1d4d26736009f 100644 --- a/Doc/library/functions.rst +++ b/Doc/library/functions.rst @@ -554,9 +554,8 @@ are always available. They are listed here in alphabetical order. If the given source is a string, then leading and trailing spaces and tabs are stripped. - .. versionchanged:: 3.11 - See :func:`ast.literal_eval` for a function that can "safely" evaluate strings - with expressions containing only literals. + See :func:`ast.literal_eval` for a function that can "safely" evaluate strings + with expressions containing only literals. .. audit-event:: exec code_object eval From e388fd46394ea743bc08e0697b363e240530891e Mon Sep 17 00:00:00 2001 From: "Gregory P. Smith" <68491+gpshead@users.noreply.github.com> Date: Sat, 11 Apr 2026 20:00:24 -0700 Subject: [PATCH 5/5] don't scare quotes safely, just say to MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-authored-by: Éric --- Doc/library/functions.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Doc/library/functions.rst b/Doc/library/functions.rst index c1d4d26736009f..35fc5188ffcca6 100644 --- a/Doc/library/functions.rst +++ b/Doc/library/functions.rst @@ -554,7 +554,7 @@ are always available. They are listed here in alphabetical order. If the given source is a string, then leading and trailing spaces and tabs are stripped. - See :func:`ast.literal_eval` for a function that can "safely" evaluate strings + See :func:`ast.literal_eval` for a function to evaluate strings with expressions containing only literals. .. audit-event:: exec code_object eval