gh-100305: Deemphasize that ast.literal_eval is safe in eval documentation#100326
Merged
gpshead merged 6 commits intopython:mainfrom Apr 12, 2026
Merged
gh-100305: Deemphasize that ast.literal_eval is safe in eval documentation#100326gpshead merged 6 commits intopython:mainfrom
ast.literal_eval is safe in eval documentation#100326gpshead merged 6 commits intopython:mainfrom
Conversation
slateny
reviewed
Dec 20, 2022
Doc/library/functions.rst
Outdated
|
|
||
| See :func:`ast.literal_eval` for a function that can safely evaluate strings | ||
| with expressions containing only literals. | ||
| .. versionchanged:: 3.11 |
Contributor
There was a problem hiding this comment.
I'm not so sure about saying 'version changed', as it seems to imply that only 3.11 has the change, but 3.10 also has it as it was backported (see PR). I'd say it's okay to just keep the original format and adjust the wording.
ast.literal_eval is still referred to as safe by the documentation for evalast.literal_eval is safe in eval documentation
merwok
reviewed
Nov 17, 2025
|
This PR is stale because it has been open for 30 days with no activity. |
Co-authored-by: Éric <merwok@netwok.org>
gpshead
approved these changes
Apr 12, 2026
|
Thanks @ramvikrams for the PR, and @gpshead for merging it 🌮🎉.. I'm working now to backport this PR to: 3.13, 3.14. |
miss-islington
pushed a commit
to miss-islington/cpython
that referenced
this pull request
Apr 12, 2026
…` documentation (pythonGH-100326) (cherry picked from commit b3b0cef0c2aacdc616fa48674552ab1e34553835) Co-authored-by: Ram Vikram Singh <ramvikrams243@gmail.com> Co-authored-by: Éric <merwok@netwok.org>
|
GH-148420 is a backport of this pull request to the 3.14 branch. |
miss-islington
pushed a commit
to miss-islington/cpython
that referenced
this pull request
Apr 12, 2026
…` documentation (pythonGH-100326) (cherry picked from commit b3b0cef0c2aacdc616fa48674552ab1e34553835) Co-authored-by: Ram Vikram Singh <ramvikrams243@gmail.com> Co-authored-by: Éric <merwok@netwok.org>
|
GH-148421 is a backport of this pull request to the 3.13 branch. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
gh-100305: Changed the doc referencing to
literal_evalin eval as it was misleading asliteral_evalwas said safe