This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

classification
Title: Crash in ParseTupleAndKeywords when passing byte string keywords
Type: crash Stage:
Components: Interpreter Core Versions: Python 3.0
process
Status: closed Resolution: fixed
Dependencies: Superseder:
Assigned To: Nosy List: georg.brandl, scoder
Priority: normal Keywords:

Created on 2008-05-16 17:19 by scoder, last changed 2022-04-11 14:56 by admin. This issue is now closed.

Messages (2)
msg66958 - (view) Author: Stefan Behnel (scoder) * (Python committer) Date: 2008-05-16 17:19
Using 3.0a5, the following code crashes in vgetargskeywords (getargs.c:1542)

  >>> d = {b"encoding": "abc"}
  >>> str(b"abc", **d)

It should raise a TypeError instead, i.e. line 1535 should read

  if (!PyUnicode_Check(key)) {

instead of

  if (!PyString_Check(key) && !PyUnicode_Check(key)) {
msg66960 - (view) Author: Georg Brandl (georg.brandl) * (Python committer) Date: 2008-05-16 17:29
Thanks, added a test and fixed in r63379.
History
Date User Action Args
2022-04-11 14:56:34adminsetgithub: 47144
2008-05-16 17:29:10georg.brandlsetstatus: open -> closed
resolution: fixed
messages: + msg66960
nosy: + georg.brandl
2008-05-16 17:19:22scodercreate