Skip to content

Commit

Permalink
[3.12] pythongh-123446: Fix empty function names in TypeErrors in `…
Browse files Browse the repository at this point in the history
…_csv` module (pythonGH-123462)

(cherry picked from commit 58ce131)

Co-authored-by: sobolevn <mail@sobolevn.me>
  • Loading branch information
sobolevn committed Aug 29, 2024
1 parent 0181aa2 commit 87052e5
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions Modules/_csv.c
Original file line number Diff line number Diff line change
Expand Up @@ -1032,7 +1032,7 @@ csv_reader(PyObject *module, PyObject *args, PyObject *keyword_args)
return NULL;
}

if (!PyArg_UnpackTuple(args, "", 1, 2, &iterator, &dialect)) {
if (!PyArg_UnpackTuple(args, "reader", 1, 2, &iterator, &dialect)) {
Py_DECREF(self);
return NULL;
}
Expand Down Expand Up @@ -1481,7 +1481,7 @@ csv_writer(PyObject *module, PyObject *args, PyObject *keyword_args)

self->error_obj = Py_NewRef(module_state->error_obj);

if (!PyArg_UnpackTuple(args, "", 1, 2, &output_file, &dialect)) {
if (!PyArg_UnpackTuple(args, "writer", 1, 2, &output_file, &dialect)) {
Py_DECREF(self);
return NULL;
}
Expand Down Expand Up @@ -1533,7 +1533,7 @@ csv_register_dialect(PyObject *module, PyObject *args, PyObject *kwargs)
_csvstate *module_state = get_csv_state(module);
PyObject *dialect;

if (!PyArg_UnpackTuple(args, "", 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,
Expand Down

0 comments on commit 87052e5

Please sign in to comment.