Skip to content

Commit 1374dbb

Browse files
authored
restore *data* parameter of binascii.b2a_base64 to positional-only (#1352)
1 parent 2e62469 commit 1374dbb

File tree

2 files changed

+5
-4
lines changed

2 files changed

+5
-4
lines changed

Modules/binascii.c

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -515,6 +515,7 @@ binascii_a2b_base64_impl(PyObject *module, Py_buffer *data)
515515
binascii.b2a_base64
516516
517517
data: Py_buffer
518+
/
518519
*
519520
newline: bool(accept={int}) = True
520521
@@ -523,7 +524,7 @@ Base64-code line of data.
523524

524525
static PyObject *
525526
binascii_b2a_base64_impl(PyObject *module, Py_buffer *data, int newline)
526-
/*[clinic end generated code: output=4ad62c8e8485d3b3 input=144fd7267a34d51c]*/
527+
/*[clinic end generated code: output=4ad62c8e8485d3b3 input=6083dac5777fa45d]*/
527528
{
528529
unsigned char *ascii_data;
529530
const unsigned char *bin_data;

Modules/clinic/binascii.c.h

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -97,7 +97,7 @@ binascii_a2b_base64(PyObject *module, PyObject *arg)
9797
}
9898

9999
PyDoc_STRVAR(binascii_b2a_base64__doc__,
100-
"b2a_base64($module, /, data, *, newline=True)\n"
100+
"b2a_base64($module, data, /, *, newline=True)\n"
101101
"--\n"
102102
"\n"
103103
"Base64-code line of data.");
@@ -112,7 +112,7 @@ static PyObject *
112112
binascii_b2a_base64(PyObject *module, PyObject **args, Py_ssize_t nargs, PyObject *kwnames)
113113
{
114114
PyObject *return_value = NULL;
115-
static const char * const _keywords[] = {"data", "newline", NULL};
115+
static const char * const _keywords[] = {"", "newline", NULL};
116116
static _PyArg_Parser _parser = {"y*|$i:b2a_base64", _keywords, 0};
117117
Py_buffer data = {NULL, NULL};
118118
int newline = 1;
@@ -558,4 +558,4 @@ binascii_b2a_qp(PyObject *module, PyObject **args, Py_ssize_t nargs, PyObject *k
558558

559559
return return_value;
560560
}
561-
/*[clinic end generated code: output=4a418f883ccc79fe input=a9049054013a1b77]*/
561+
/*[clinic end generated code: output=35821bce7e0e4714 input=a9049054013a1b77]*/

0 commit comments

Comments
 (0)