summaryrefslogtreecommitdiffstats
path: root/Modules/_io
diff options
context:
space:
mode:
authorLarry Hastings <larry@hastings.org>2015-05-04 13:59:46 (GMT)
committerLarry Hastings <larry@hastings.org>2015-05-04 13:59:46 (GMT)
commitdbfdc380df615fe7e85107ff3954b8fff3ce7741 (patch)
tree25dd738cb50b260d6822ab76f39697c69e9a44c4 /Modules/_io
parentcb985563739f00dcccb03189c95deba604155777 (diff)
downloadcpython-dbfdc380df615fe7e85107ff3954b8fff3ce7741.zip
cpython-dbfdc380df615fe7e85107ff3954b8fff3ce7741.tar.gz
cpython-dbfdc380df615fe7e85107ff3954b8fff3ce7741.tar.bz2
Issue #24001: Argument Clinic converters now use accept={type}
instead of types={'type'} to specify the types the converter accepts.
Diffstat (limited to 'Modules/_io')
-rw-r--r--Modules/_io/_iomodule.c8
-rw-r--r--Modules/_io/bufferedio.c16
-rw-r--r--Modules/_io/bytesio.c4
-rw-r--r--Modules/_io/fileio.c4
-rw-r--r--Modules/_io/textio.c8
5 files changed, 20 insertions, 20 deletions
diff --git a/Modules/_io/_iomodule.c b/Modules/_io/_iomodule.c
index ea727f2..528bcd4 100644
--- a/Modules/_io/_iomodule.c
+++ b/Modules/_io/_iomodule.c
@@ -100,9 +100,9 @@ _io.open
file: object
mode: str = "r"
buffering: int = -1
- encoding: str(nullable=True) = NULL
- errors: str(nullable=True) = NULL
- newline: str(nullable=True) = NULL
+ encoding: str(accept={str, NoneType}) = NULL
+ errors: str(accept={str, NoneType}) = NULL
+ newline: str(accept={str, NoneType}) = NULL
closefd: int(c_default="1") = True
opener: object = None
@@ -230,7 +230,7 @@ static PyObject *
_io_open_impl(PyModuleDef *module, PyObject *file, const char *mode,
int buffering, const char *encoding, const char *errors,
const char *newline, int closefd, PyObject *opener)
-/*[clinic end generated code: output=7615d0d746eb14d2 input=0541ce15691a82f2]*/
+/*[clinic end generated code: output=7615d0d746eb14d2 input=f4e1ca75223987bc]*/
{
unsigned i;
diff --git a/Modules/_io/bufferedio.c b/Modules/_io/bufferedio.c
index 916353b..2c90648 100644
--- a/Modules/_io/bufferedio.c
+++ b/Modules/_io/bufferedio.c
@@ -101,26 +101,26 @@ _bufferediobase_readinto_generic(PyObject *self, Py_buffer *buffer, char readint
/*[clinic input]
_io._BufferedIOBase.readinto
- buffer: Py_buffer(types={'rwbuffer'})
+ buffer: Py_buffer(accept={rwbuffer})
/
[clinic start generated code]*/
static PyObject *
_io__BufferedIOBase_readinto_impl(PyObject *self, Py_buffer *buffer)
-/*[clinic end generated code: output=8c8cda6684af8038 input=f8242a06c21763a0]*/
+/*[clinic end generated code: output=8c8cda6684af8038 input=00a6b9a38f29830a]*/
{
return _bufferediobase_readinto_generic(self, buffer, 0);
}
/*[clinic input]
_io._BufferedIOBase.readinto1
- buffer: Py_buffer(types={'rwbuffer'})
+ buffer: Py_buffer(accept={rwbuffer})
/
[clinic start generated code]*/
static PyObject *
_io__BufferedIOBase_readinto1_impl(PyObject *self, Py_buffer *buffer)
-/*[clinic end generated code: output=358623e4fd2b69d3 input=2003e706c730bd21]*/
+/*[clinic end generated code: output=358623e4fd2b69d3 input=ebad75b4aadfb9be]*/
{
return _bufferediobase_readinto_generic(self, buffer, 1);
}
@@ -1065,26 +1065,26 @@ end:
/*[clinic input]
_io._Buffered.readinto
- buffer: Py_buffer(types={'rwbuffer'})
+ buffer: Py_buffer(accept={rwbuffer})
/
[clinic start generated code]*/
static PyObject *
_io__Buffered_readinto_impl(buffered *self, Py_buffer *buffer)
-/*[clinic end generated code: output=bcb376580b1d8170 input=962b7496eac38b3a]*/
+/*[clinic end generated code: output=bcb376580b1d8170 input=ed6b98b7a20a3008]*/
{
return _buffered_readinto_generic(self, buffer, 0);
}
/*[clinic input]
_io._Buffered.readinto1
- buffer: Py_buffer(types={'rwbuffer'})
+ buffer: Py_buffer(accept={rwbuffer})
/
[clinic start generated code]*/
static PyObject *
_io__Buffered_readinto1_impl(buffered *self, Py_buffer *buffer)
-/*[clinic end generated code: output=6e5c6ac5868205d6 input=834614d93f0adeb5]*/
+/*[clinic end generated code: output=6e5c6ac5868205d6 input=4455c5d55fdf1687]*/
{
return _buffered_readinto_generic(self, buffer, 1);
}
diff --git a/Modules/_io/bytesio.c b/Modules/_io/bytesio.c
index 42dfe24..d46430d 100644
--- a/Modules/_io/bytesio.c
+++ b/Modules/_io/bytesio.c
@@ -541,7 +541,7 @@ _io_BytesIO_readlines_impl(bytesio *self, PyObject *arg)
/*[clinic input]
_io.BytesIO.readinto
- buffer: Py_buffer(types={'rwbuffer'})
+ buffer: Py_buffer(accept={rwbuffer})
/
Read up to len(buffer) bytes into buffer.
@@ -552,7 +552,7 @@ is set not to block as has no data to read.
static PyObject *
_io_BytesIO_readinto_impl(bytesio *self, Py_buffer *buffer)
-/*[clinic end generated code: output=a5d407217dcf0639 input=d289da851c7c4159]*/
+/*[clinic end generated code: output=a5d407217dcf0639 input=71581f32635c3a31]*/
{
Py_ssize_t len, n;
diff --git a/Modules/_io/fileio.c b/Modules/_io/fileio.c
index 0894ca4..12e37bb 100644
--- a/Modules/_io/fileio.c
+++ b/Modules/_io/fileio.c
@@ -603,7 +603,7 @@ _io_FileIO_seekable_impl(fileio *self)
/*[clinic input]
_io.FileIO.readinto
- buffer: Py_buffer(types={'rwbuffer'})
+ buffer: Py_buffer(accept={rwbuffer})
/
Same as RawIOBase.readinto().
@@ -611,7 +611,7 @@ Same as RawIOBase.readinto().
static PyObject *
_io_FileIO_readinto_impl(fileio *self, Py_buffer *buffer)
-/*[clinic end generated code: output=b01a5a22c8415cb4 input=5edd8327498d468c]*/
+/*[clinic end generated code: output=b01a5a22c8415cb4 input=4721d7b68b154eaf]*/
{
Py_ssize_t n;
int err;
diff --git a/Modules/_io/textio.c b/Modules/_io/textio.c
index f61b281..c45f70d 100644
--- a/Modules/_io/textio.c
+++ b/Modules/_io/textio.c
@@ -789,9 +789,9 @@ static encodefuncentry encodefuncs[] = {
/*[clinic input]
_io.TextIOWrapper.__init__
buffer: object
- encoding: str(nullable=True) = NULL
- errors: str(nullable=True) = NULL
- newline: str(nullable=True) = NULL
+ encoding: str(accept={str, NoneType}) = NULL
+ errors: str(accept={str, NoneType}) = NULL
+ newline: str(accept={str, NoneType}) = NULL
line_buffering: int(c_default="0") = False
write_through: int(c_default="0") = False
@@ -830,7 +830,7 @@ _io_TextIOWrapper___init___impl(textio *self, PyObject *buffer,
const char *encoding, const char *errors,
const char *newline, int line_buffering,
int write_through)
-/*[clinic end generated code: output=56a83402ce2a8381 input=1f20decb8d54a4ec]*/
+/*[clinic end generated code: output=56a83402ce2a8381 input=3126cb3101a2c99b]*/
{
PyObject *raw, *codec_info = NULL;
_PyIO_State *state = NULL;