Serhiy Storchaka
ec67d187ee
Issue #13461 : Fix a crash in the TextIOWrapper.tell method on 64-bit platforms.
Patch by Yogesh Chaudhari.
13 years ago
Antoine Pitrou
932ff83682
Issue #18608 : Avoid keeping a strong reference to the locale module inside the _io module.
13 years ago
Christian Heimes
72f455e96c
Fix use of uninitialized scalar variable, see 3f994367a979
CID 1058763
13 years ago
Antoine Pitrou
796564c27b
Issue #18112 : PEP 442 implementation (safe object finalization).
13 years ago
Victor Stinner
ace47d7efd
Issue #18408 : PyEval_EvalFrameEx() and PyEval_CallObjectWithKeywords() now fail
with an assertion error if they are called with an exception set
(PyErr_Occurred()).
If these functions are called with an exception set, the exception may be
cleared and so the caller looses its exception.
Add also assertions to PyEval_CallObjectWithKeywords() and call_function() to
check if the function succeed with no exception set, or the function failed
with an exception set.
13 years ago
Victor Stinner
85c761d3d3
Issue #18408 : Fix fileio_read() on _PyBytes_Resize() failure
bytes is NULL on _PyBytes_Resize() failure
13 years ago
Richard Oudkerk
9ad51ec81b
Issue #18344 : Fix potential ref-leaks in _bufferedreader_read_all().
13 years ago
Victor Stinner
14b9b11098
If MS_WIN64 is defined, MS_WINDOWS is also defined: #ifdef can be simplified.
13 years ago
Victor Stinner
9a282975ef
Issue #9566 : _io: Use Py_SAFE_DOWNCAST for fix a compiler warning on Windows x64
13 years ago
Christian Heimes
91e8b8180d
Check for correct macro, code uses S_ISDIR().
13 years ago
Andrew Kuchling
c7b6c50f29
Describe 'surrogateescape' in the documentation.
Also, improve some docstring descriptions of the 'errors' parameter.
Closes #14015 .
13 years ago
Serhiy Storchaka
37a79a12d1
Issue #18025 : Fixed a segfault in io.BufferedIOBase.readinto() when raw
stream's read() returns more bytes than requested.
13 years ago
Victor Stinner
3e269397e3
FileIO.readall(): remove trailing space from an exception message
13 years ago
Richard Oudkerk
af7260e81a
Issue #15758 : Fix FileIO.readall() so it no longer has O(n**2) complexity.
13 years ago
Terry Jan Reedy
0158af38b7
Issue #17047 : remove doubled words found in 2.7 to 3.4 Modules/*,
as reported by Serhiy Storchaka and Matthew Barnett.
13 years ago
Terry Jan Reedy
ce9cc49104
Issue #17047 : remove doubled words found in 2.7 to 3.4 Modules/*,
as reported by Serhiy Storchaka and Matthew Barnett.
13 years ago
R David Murray
5b2cf5e651
#17275 : Fix class name in init errors in C bufferedio classes.
This fixes an apparent copy-and-paste error.
Original patch by Manuel Jacob.
13 years ago
R David Murray
67bfe80758
#17275 : Fix class name in init errors in C bufferedio classes.
This fixes an apparent copy-and-paste error.
Patch by Manuel Jacob.
13 years ago
Serhiy Storchaka
354d50ee37
Issue #17106 : Fix a segmentation fault in io.TextIOWrapper when an underlying
stream or a decoder produces data of an unexpected type (i.e. when
io.TextIOWrapper initialized with text stream or use bytes-to-bytes codec).
13 years ago
Serhiy Storchaka
94dc6736bd
Issue #17106 : Fix a segmentation fault in io.TextIOWrapper when an underlying
stream or a decoder produces data of an unexpected type (i.e. when
io.TextIOWrapper initialized with text stream or use bytes-to-bytes codec).
13 years ago
Gregory P. Smith
b9817b01ed
Additional fix for Issue #12268 : The io module file object writelines() methods no longer abort early when one of its write system calls is interrupted (EINTR).
13 years ago
Gregory P. Smith
a998ad0135
Additional fix for Issue #12268 : The io module file object writelines() methods
no longer abort early when one of its write system calls is interrupted (EINTR).
13 years ago
Serhiy Storchaka
74f49ab28b
Issue #15989 : Fix several occurrences of integer overflow
when result of PyInt_AsLong() or PyLong_AsLong() narrowed
to int without checks.
This is a backport of changesets 13e2e44db99d and 525407d89277.
13 years ago
Serhiy Storchaka
441d30fac7
Issue #15989 : Fix several occurrences of integer overflow
when result of PyLong_AsLong() narrowed to int without checks.
This is a backport of changesets 13e2e44db99d and 525407d89277.
13 years ago
Serhiy Storchaka
7898043868
Issue #15989 : Fix several occurrences of integer overflow
when result of PyLong_AsLong() narrowed to int without checks.
13 years ago
Victor Stinner
c44057dfbd
Issue #16367 : Fix FileIO.readall() on Windows for files larger than 2 GB
13 years ago
Victor Stinner
23a32ba0e5
Issue #16367 : Fix FileIO.readall() on Windows for files larger than 2 GB
13 years ago
Benjamin Peterson
a2d6d7121e
call close on the underlying stream even if flush raises ( #16597 )
13 years ago
Benjamin Peterson
68623614f0
call close on the underlying stream even if flush raises ( closes #16597 )
Patch by Serhiy Storchaka.
13 years ago
Andrew Svetlov
4bb142b1b7
Issue #16714 : use 'raise' exceptions, don't 'throw'.
Patch by Serhiy Storchaka.
13 years ago
Andrew Svetlov
737fb89dd1
Issue #16714 : use 'raise' exceptions, don't 'throw'.
Patch by Serhiy Storchaka.
13 years ago
Victor Stinner
292c835548
Issue #15478 : Raising an OSError doesn't decode or encode the filename anymore
Pass the original filename argument to OSError constructor, instead of trying
to encode it to or decode it from the filesystem encoding. This change avoids
an additionnal UnicodeDecodeError on Windows if the filename cannot be decoded
from the filesystem encoding (ANSI code page).
14 years ago
Christian Heimes
743e0cd6b5
Issue #16166 : Add PY_LITTLE_ENDIAN and PY_BIG_ENDIAN macros and unified
endianess detection and handling.
14 years ago
Gregory P. Smith
99716166b1
Fixes Issue #12268 for the io module - File readline, readlines and
read or readall methods no longer lose data when an underlying read
system call is interrupted within an io module object. IOError is no
longer raised due to a read system call returning EINTR from within
these methods.
This is a backport of changeset 781b95159954 from 3.2.
The earlier 2.7 changeset 67dc99a989cd already fixed this for the
builtin python 2.x file object.
14 years ago
Jesus Cea
dc469454ec
Closes #15488 : Closed files keep their buffer alive
14 years ago
Ezio Melotti
16d2b47837
#15796 : Fix \n in readline docstring. Patch by Serhiy Storchaka.
14 years ago
Ezio Melotti
ba372a59d1
#15796 : Fix \n in readline docstring.
14 years ago
Christian Heimes
8f734ebe94
Fixed reference leak in error branch of _bufferedreader_read_all(). The variable data can contain a bytes object but it wasn't cleaned up when PyList_New() failed. CID 715364
14 years ago
Christian Heimes
f47d79fec1
Fixed reference leak in error branch of _bufferedreader_read_all(). The variable data can contain a bytes object but it wasn't cleaned up when PyList_New() failed. CID 715364
14 years ago
Christian Heimes
19606411d3
Fixed out-of-bounce write to rawmode buffer. The fixed size buffer wasn't enlarged for the new 'x' flag. The buffer may contain the 5 flags xrwa+ and the \0 byte
14 years ago
Christian Heimes
89ff3c7f20
Fixed out-of-bounce write to rawmode buffer. The fixed size buffer wasn't enlarged for the new 'x' flag. The buffer may contain the 5 flags xrwa+ and the \0 byte
14 years ago
Stefan Krah
96efdd422c
Issue #15868 : Fix refleak in bytesio.c (Coverity #715365 ).
14 years ago
Antoine Pitrou
c5eec0e387
Issue #15841 : The readable(), writable() and seekable() methods of io.BytesIO
and io.StringIO objects now raise ValueError when the object has been closed.
Patch by Alessandro Moura.
14 years ago
Antoine Pitrou
1d857453b7
Issue #15841 : The readable(), writable() and seekable() methods of BytesIO
and StringIO objects now raise ValueError when the object has been closed.
Patch by Alessandro Moura.
14 years ago
Antoine Pitrou
6f430e4963
Issue #15604 : Update uses of PyObject_IsTrue() to check for and handle errors correctly.
Patch by Serhiy Storchaka.
14 years ago
Antoine Pitrou
c5bef75c77
Issue #15604 : Update uses of PyObject_IsTrue() to check for and handle errors correctly.
Patch by Serhiy Storchaka.
14 years ago
Victor Stinner
401e17d0f0
open() / TextIOWrapper doc: make it explicit than newline='\n' doesn't
translate newlines on output.
14 years ago
Antoine Pitrou
76370f4977
Make TextIOWrapper's documentation clearer by copying the newline argument's description from open().
14 years ago
Antoine Pitrou
0c1c0d42dc
Make TextIOWrapper's documentation clearer by copying the newline argument's description from open().
14 years ago
Antoine Pitrou
8f328d0c1d
Issue #15489 : Add a __sizeof__ implementation for BytesIO objects.
Patch by Serhiy Storchaka.
14 years ago