Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit 58ce131

Browse filesBrowse files
authored
gh-123446: Fix empty function names in TypeErrors in _csv module (#123462)
1 parent 303f92a commit 58ce131
Copy full SHA for 58ce131

File tree

1 file changed

+3
-3
lines changed
Filter options

1 file changed

+3
-3
lines changed

‎Modules/_csv.c

Copy file name to clipboardExpand all lines: Modules/_csv.c
+3-3Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1072,7 +1072,7 @@ csv_reader(PyObject *module, PyObject *args, PyObject *keyword_args)
10721072
return NULL;
10731073
}
10741074

1075-
if (!PyArg_UnpackTuple(args, "_csv.reader", 1, 2, &iterator, &dialect)) {
1075+
if (!PyArg_UnpackTuple(args, "reader", 1, 2, &iterator, &dialect)) {
10761076
Py_DECREF(self);
10771077
return NULL;
10781078
}
@@ -1519,7 +1519,7 @@ csv_writer(PyObject *module, PyObject *args, PyObject *keyword_args)
15191519

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

1522-
if (!PyArg_UnpackTuple(args, "_csv.writer", 1, 2, &output_file, &dialect)) {
1522+
if (!PyArg_UnpackTuple(args, "writer", 1, 2, &output_file, &dialect)) {
15231523
Py_DECREF(self);
15241524
return NULL;
15251525
}
@@ -1571,7 +1571,7 @@ csv_register_dialect(PyObject *module, PyObject *args, PyObject *kwargs)
15711571
_csvstate *module_state = get_csv_state(module);
15721572
PyObject *dialect;
15731573

1574-
if (!PyArg_UnpackTuple(args, "_csv.register_dialect", 1, 2, &name_obj, &dialect_obj))
1574+
if (!PyArg_UnpackTuple(args, "register_dialect", 1, 2, &name_obj, &dialect_obj))
15751575
return NULL;
15761576
if (!PyUnicode_Check(name_obj)) {
15771577
PyErr_SetString(PyExc_TypeError,

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.