Skip to content

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

Open
thejesh23 wants to merge 2 commits into
python:mainfrom
thejesh23:errmsg-funcnames
Open

thejesh23 wants to merge 2 commits into
python:mainfrom
thejesh23:errmsg-funcnames

Conversation

@thejesh23

@thejesh23 thejesh23 commented Nov 2, 2026 •

Copy link
Copy Markdown

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

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