Skip to content

gh-100305: Deemphasize that ast.literal_eval is safe in eval documentation#100326

Merged
gpshead merged 6 commits intopython:mainfrom
ramvikrams:t12
Apr 12, 2026
Merged

gh-100305: Deemphasize that ast.literal_eval is safe in eval documentation#100326
gpshead merged 6 commits intopython:mainfrom
ramvikrams:t12

Conversation

@ramvikrams
Copy link
Copy Markdown
Contributor

gh-100305: Changed the doc referencing to literal_eval in eval as it was misleading as literal_eval was said safe


See :func:`ast.literal_eval` for a function that can safely evaluate strings
with expressions containing only literals.
.. versionchanged:: 3.11
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Copy link
Copy Markdown
Contributor Author

@ramvikrams ramvikrams Dec 20, 2022

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

done

@slateny slateny requested a review from gpshead December 20, 2022 08:07
@slateny slateny changed the title gh-100305: ast.literal_eval is still referred to as safe by the documentation for eval gh-100305: Deemphasize that ast.literal_eval is safe in eval documentation Dec 20, 2022
@github-actions
Copy link
Copy Markdown

This PR is stale because it has been open for 30 days with no activity.

@github-actions github-actions bot added the stale Stale PR or inactive for long period of time. label Apr 12, 2026
Co-authored-by: Éric <merwok@netwok.org>
@gpshead gpshead enabled auto-merge (squash) April 12, 2026 03:00
@gpshead gpshead added needs backport to 3.13 bugs and security fixes needs backport to 3.14 bugs and security fixes labels Apr 12, 2026
@gpshead gpshead moved this from Todo to Done in Docs PRs Apr 12, 2026
@gpshead gpshead merged commit b3b0cef into python:main Apr 12, 2026
34 checks passed
@miss-islington-app
Copy link
Copy Markdown

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>
@bedevere-app
Copy link
Copy Markdown

bedevere-app bot commented Apr 12, 2026

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>
@bedevere-app bedevere-app bot removed the needs backport to 3.14 bugs and security fixes label Apr 12, 2026
@bedevere-app
Copy link
Copy Markdown

bedevere-app bot commented Apr 12, 2026

GH-148421 is a backport of this pull request to the 3.13 branch.

@bedevere-app bedevere-app bot removed the needs backport to 3.13 bugs and security fixes label Apr 12, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

docs Documentation in the Doc dir skip news stale Stale PR or inactive for long period of time.

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

6 participants