Skip to content

gh-152132: Test Py_CompileString() in test_capi.test_run#153470

Merged
vstinner merged 2 commits into
python:mainfrom
vstinner:test_run
Jul 10, 2026
Merged

gh-152132: Test Py_CompileString() in test_capi.test_run#153470
vstinner merged 2 commits into
python:mainfrom
vstinner:test_run

Conversation

@vstinner

@vstinner vstinner commented Jul 10, 2026

Copy link
Copy Markdown
Member

PyRun functions now raises ValueError if the start argument is invalid.

  • Add Modules/_testlimitedcapi/run.c.
  • Rename _Py_CompileStringObjectWithModule() to _Py_CompileStringObject().

PyRun functions now raises ValueError if the start argument is
invalid.

* Add Modules/_testlimitedcapi/run.c.
* Rename _Py_CompileStringObjectWithModule() to
  _Py_CompileStringObject().
@vstinner vstinner requested a review from a team as a code owner July 10, 2026 01:04
@vstinner vstinner merged commit d83d267 into python:main Jul 10, 2026
51 checks passed
@vstinner vstinner deleted the test_run branch July 10, 2026 01:36
@miss-islington-app

Copy link
Copy Markdown

Thanks @vstinner for the PR 🌮🎉.. I'm working now to backport this PR to: 3.13, 3.14, 3.15.
🐍🍒⛏🤖 I'm not a witch! I'm not a witch!

@miss-islington-app

Copy link
Copy Markdown

Sorry, @vstinner, I could not cleanly backport this to 3.14 due to a conflict.
Please backport using cherry_picker on command line.

cherry_picker d83d26724b8c3be5f535e56ded88593cc6803b86 3.14

@bedevere-app

bedevere-app Bot commented Jul 10, 2026

Copy link
Copy Markdown

GH-153472 is a backport of this pull request to the 3.15 branch.

@miss-islington-app

Copy link
Copy Markdown

Sorry, @vstinner, I could not cleanly backport this to 3.13 due to a conflict.
Please backport using cherry_picker on command line.

cherry_picker d83d26724b8c3be5f535e56ded88593cc6803b86 3.13

@bedevere-app bedevere-app Bot removed the needs backport to 3.15 pre-release feature fixes, bugs and security fixes label Jul 10, 2026
@bedevere-app

bedevere-app Bot commented Jul 10, 2026

Copy link
Copy Markdown

GH-153473 is a backport of this pull request to the 3.14 branch.

@bedevere-app bedevere-app Bot removed the needs backport to 3.14 bugs and security fixes label Jul 10, 2026
@vstinner vstinner removed the needs backport to 3.13 bugs and security fixes label Jul 10, 2026
vstinner added a commit that referenced this pull request Jul 10, 2026
…53470) (#153472)

gh-152132: Test Py_CompileString() in test_capi.test_run (GH-153470)

PyRun functions now raises ValueError if the start argument is
invalid.

* Add Modules/_testlimitedcapi/run.c.
* Rename _Py_CompileStringObjectWithModule() to
  _Py_CompileStringObject().
(cherry picked from commit d83d267)

Co-authored-by: Victor Stinner <vstinner@python.org>
vstinner added a commit that referenced this pull request Jul 10, 2026
) (#153473)

gh-152132: Test Py_CompileString() in test_capi.test_run (#153470)

PyRun functions now raises ValueError if the start argument is
invalid.

Add Modules/_testlimitedcapi/run.c.

(cherry picked from commit d83d267)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant