[Python-checkins] r73430 - in python/branches/py3k: Misc/NEWS Modules/_io/stringio.c
benjamin.peterson
python-checkins at python.org
Sun Jun 14 20:32:19 CEST 2009
Author: benjamin.peterson
Date: Sun Jun 14 20:32:19 2009
New Revision: 73430
Log:
just throw a normal AttributeError for no buffer attribute
Modified:
python/branches/py3k/Misc/NEWS
python/branches/py3k/Modules/_io/stringio.c
Modified: python/branches/py3k/Misc/NEWS
==============================================================================
--- python/branches/py3k/Misc/NEWS (original)
+++ python/branches/py3k/Misc/NEWS Sun Jun 14 20:32:19 2009
@@ -15,6 +15,9 @@
Library
-------
+- Accessing io.StringIO.buffer now raises an AttributeError instead of
+ io.UnsupportedOperation.
+
- Issue #6271: mmap tried to close invalid file handle (-1) when annonymous.
(On Unix)
Modified: python/branches/py3k/Modules/_io/stringio.c
==============================================================================
--- python/branches/py3k/Modules/_io/stringio.c (original)
+++ python/branches/py3k/Modules/_io/stringio.c Sun Jun 14 20:32:19 2009
@@ -646,14 +646,6 @@
}
static PyObject *
-stringio_buffer(stringio *self, void *context)
-{
- PyErr_SetString(IO_STATE->unsupported_operation,
- "buffer attribute is unsupported on type StringIO");
- return NULL;
-}
-
-static PyObject *
stringio_closed(stringio *self, void *context)
{
CHECK_INITIALIZED(self);
@@ -703,7 +695,6 @@
Hopefully, a better solution, than adding these pseudo-attributes,
will be found.
*/
- {"buffer", (getter)stringio_buffer, NULL, NULL},
{"line_buffering", (getter)stringio_line_buffering, NULL, NULL},
{NULL}
};
More information about the Python-checkins
mailing list