Skip to content

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

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

gh-100305: Deemphasize that ast.literal_eval is safe in eval documentation#100326
gpshead merged 6 commits into
python: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

Comment threadDoc/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

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.

@ramvikramsramvikramsDec 20, 2022

Copy link
Copy Markdown
ContributorAuthor

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 gpsheadDecember 20, 2022 08:07
@slatenyslateny changed the title gh-100305: ast.literal_eval is still referred to as safe by the documentation for evalgh-100305: Deemphasize that ast.literal_eval is safe in eval documentationDec 20, 2022
Comment threadDoc/library/functions.rst Outdated
@github-actions

Copy link
Copy Markdown

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

@github-actionsgithub-actionsBot 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
@gpsheadgpshead added needs backport to 3.13 bugs and security fixes needs backport to 3.14 bugs and security fixes labels Apr 12, 2026
@gpsheadgpshead moved this from Todo to Done in Docs PRsApr 12, 2026
@gpshead
gpshead merged commit b3b0cef into python:mainApr 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 b3b0cef)
Co-authored-by: Ram Vikram Singh <ramvikrams243@gmail.com>
Co-authored-by: Éric <merwok@netwok.org>
@bedevere-app

Copy link
Copy Markdown

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 b3b0cef)
Co-authored-by: Ram Vikram Singh <ramvikrams243@gmail.com>
Co-authored-by: Éric <merwok@netwok.org>
@bedevere-appbedevere-appBot removed the needs backport to 3.14 bugs and security fixes label Apr 12, 2026
@bedevere-app

Copy link
Copy Markdown

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

@bedevere-appbedevere-appBot removed the needs backport to 3.13 bugs and security fixes label Apr 12, 2026
StanFromIreland pushed a commit that referenced this pull request Apr 15, 2026
…l` documentation (GH-100326) (#148421)
(cherry picked from commit b3b0cef)
Co-authored-by: Ram Vikram Singh <ramvikrams243@gmail.com>
Co-authored-by: Éric <merwok@netwok.org>
StanFromIreland pushed a commit that referenced this pull request Apr 15, 2026
…l` documentation (GH-100326) (#148420)
(cherry picked from commit b3b0cef)
Co-authored-by: Ram Vikram Singh <ramvikrams243@gmail.com>
Co-authored-by: Éric <merwok@netwok.org>
ljfp pushed a commit to ljfp/cpython that referenced this pull request Apr 25, 2026
…` documentation (python#100326)
Co-authored-by: Éric <merwok@netwok.org>
Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Labels

docsDocumentation in the Doc dirskip newsstaleStale PR or inactive for long period of time.

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

6 participants

@ramvikrams@gpshead@merwok@slateny@bedevere-bot@nazeerali4325-commits