From 58ce131037ecb34d506a613f21993cde2056f628 Mon Sep 17 00:00:00 2001 From: sobolevn Date: Thu, 29 Aug 2024 11:12:37 +0300 Subject: [PATCH] gh-123446: Fix empty function names in `TypeError`s in `_csv` module (#123462) --- Modules/_csv.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/Modules/_csv.c b/Modules/_csv.c index 3e2ddbd833a..a623ea449da 100644 --- a/Modules/_csv.c +++ b/Modules/_csv.c @@ -1072,7 +1072,7 @@ csv_reader(PyObject *module, PyObject *args, PyObject *keyword_args) return NULL; } - if (!PyArg_UnpackTuple(args, "_csv.reader", 1, 2, &iterator, &dialect)) { + if (!PyArg_UnpackTuple(args, "reader", 1, 2, &iterator, &dialect)) { Py_DECREF(self); return NULL; } @@ -1519,7 +1519,7 @@ csv_writer(PyObject *module, PyObject *args, PyObject *keyword_args) self->error_obj = Py_NewRef(module_state->error_obj); - if (!PyArg_UnpackTuple(args, "_csv.writer", 1, 2, &output_file, &dialect)) { + if (!PyArg_UnpackTuple(args, "writer", 1, 2, &output_file, &dialect)) { Py_DECREF(self); return NULL; } @@ -1571,7 +1571,7 @@ csv_register_dialect(PyObject *module, PyObject *args, PyObject *kwargs) _csvstate *module_state = get_csv_state(module); PyObject *dialect; - if (!PyArg_UnpackTuple(args, "_csv.register_dialect", 1, 2, &name_obj, &dialect_obj)) + if (!PyArg_UnpackTuple(args, "register_dialect", 1, 2, &name_obj, &dialect_obj)) return NULL; if (!PyUnicode_Check(name_obj)) { PyErr_SetString(PyExc_TypeError,