Skip to content

gh-161179: Fix function names in os.{spawnve,preadv}() and tkinter.wm_attributes() error messages - #161180

Merged
StanFromIreland merged 2 commits into
python:mainfrom
thejesh23:errmsg-funcnames
Nov 2, 2026
Merged

StanFromIreland merged 2 commits into
python:mainfrom
thejesh23:errmsg-funcnames

Conversation

@thejesh23

@thejesh23 thejesh23 commented Nov 2, 2026 •

Copy link
Copy Markdown
Contributor

Three error messages named the wrong function:

  • os.spawnve() said spawnv() when the first element of argv is empty.
  • os.preadv() said preadv2() when buffers is not a sequence (os.pwritev() already says pwritev()).
  • tkinter wm_attributes() said wm_attribute() when options are given both positionally and as keywords.

The argument_unavailable_error("preadv2", "flags") call in os.preadv() is left alone, since it names the underlying syscall on purpose.

Tests check each corrected message with assertRaisesRegex. The spawnve test only runs where os.spawnv() is the native C function (Windows), the same skip test_spawnv_arg_conversion_errors uses.

AI disclosure: prepared with the help of Claude Code; I reviewed the change and the test results.

… wm_attributes()

os.spawnve() said "spawnv()" when the first element of argv is empty,
os.preadv() said "preadv2()" when buffers is not a sequence, and
tkinter's wm_attributes() said "wm_attribute()" when options are given
both positionally and as keywords.  Add tests checking the messages.
@python-cla-bot

python-cla-bot Bot commented Nov 2, 2026 •

Copy link
Copy Markdown

All commit authors signed the Contributor License Agreement.

CLA signed

@StanFromIreland StanFromIreland changed the title gh-161179: Fix function names in error messages of os.spawnve(), os.preadv() and tkinter wm_attributes() gh-161179: Fix function names in os.{spawnve,preadv}() and tkinter.wm_attributes() error messages Nov 2, 2026
@StanFromIreland
StanFromIreland enabled auto-merge (squash) November 2, 2026 20:45
@StanFromIreland StanFromIreland added needs backport to 3.14 bugs and security fixes needs backport to 3.15 bugs and security fixes labels Nov 2, 2026
@StanFromIreland
StanFromIreland merged commit 4fb0070 into python:main Nov 2, 2026
124 of 126 checks passed
@github-project-automation github-project-automation Bot moved this from Todo to Done in Docs PRs Nov 2, 2026
@miss-islington-app

Copy link
Copy Markdown

Thanks @thejesh23 for the PR, and @StanFromIreland for merging it 🌮🎉.. I'm working now to backport this PR to: 3.14, 3.15.
🐍🍒⛏🤖

@bedevere-app

bedevere-app Bot commented Nov 2, 2026

Copy link
Copy Markdown

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

@bedevere-app bedevere-app Bot removed the needs backport to 3.15 bugs and security fixes label Nov 2, 2026
@bedevere-app

bedevere-app Bot commented Nov 2, 2026

Copy link
Copy Markdown

GH-161211 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 Nov 2, 2026
StanFromIreland pushed a commit that referenced this pull request Nov 2, 2026
…tkinter.wm_attributes()` error messages (GH-161180) (#161210)

(cherry picked from commit 4fb0070)

Co-authored-by: Thejesh <35212698+thejesh23@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

2 participants