Martin Panter
db4220ea09
Issue #25030 : Do not document seek() as if it accepts keyword arguments
Patch from Shiyao Ma.
11 years ago
Serhiy Storchaka
4e63f7a2b4
Issue #24989 : Fixed buffer overread in BytesIO.readline() if a position is
set beyond size. Based on patch by John Leitch.
11 years ago
Serhiy Storchaka
594e54c765
Issue #24989 : Fixed buffer overread in BytesIO.readline() if a position is
set beyond size. Based on patch by John Leitch.
11 years ago
Steve Dower
6baa0f9805
Fixes cast warning in bufferedio.c
11 years ago
Antoine Pitrou
45d6156154
Issue #9858 : Add missing method stubs to _io.RawIOBase. Patch by Laura Rupprecht.
11 years ago
Berker Peksag
ea6d5592f2
Issue #23796 : peak and read1 methods of BufferedReader now raise ValueError
if they called on a closed object.
Patch by John Hergenroeder.
11 years ago
Berker Peksag
d10d6ae2fa
Issue #23796 : peak and read1 methods of BufferedReader now raise ValueError
if they called on a closed object.
Patch by John Hergenroeder.
11 years ago
Serhiy Storchaka
008d88b462
Issue #24009 : Got rid of using rare "y#" format unit in TextIOWrapper.tell().
Parsed value should be bytes, not general robuffer, this is required in other
places.
11 years ago
Larry Hastings
dbfdc380df
Issue #24001 : Argument Clinic converters now use accept={type}
instead of types={'type'} to specify the types the converter accepts.
11 years ago
Serhiy Storchaka
247789cee9
Issue #24007 : Argument Clinic now writes the format of PyArg_Parse*() at the
same line as function name.
11 years ago
Serhiy Storchaka
2b0d2007a1
Issue #23908 : os functions now reject paths with embedded null character
on Windows instead of silently truncate them.
11 years ago
Serhiy Storchaka
bb72c47996
Use PyArg_ParseTuple (new API) instead of PyArg_Parse (old API) for parsing tuples.
11 years ago
Christian Heimes
82adeffc13
Fix typo in assert statement
11 years ago
Serhiy Storchaka
f24131ff31
Issue #20175 : Converted the _io module to Argument Clinic.
11 years ago
Antoine Pitrou
85e3ee749c
Issue #22982 : Improve BOM handling when seeking to multiple positions of a writable text file.
11 years ago
Antoine Pitrou
25f85d4bd5
Issue #23309 : Avoid a deadlock at shutdown if a daemon thread is aborted
while it is holding a lock to a buffered I/O object, and the main thread
tries to use the same I/O object (typically stdout or stderr). A fatal
error is emitted instead.
11 years ago
Steve Dower
a1c7e727c8
Issue #23668 : Suppresses invalid parameter handler around chsize calls.
11 years ago
Steve Dower
8fc8980c96
Issue #23524 : Replace _PyVerify_fd function with calls to _set_thread_local_invalid_parameter_handler.
11 years ago
Serhiy Storchaka
3d2279f9a8
Issue #21859 : Corrected FileIO docstrings.
11 years ago
Serhiy Storchaka
b817b77a8c
Replaced "string" with "bytes object" in docstrings of binary I/O objects.
11 years ago
Serhiy Storchaka
04d09ebd39
Issue #23785 : Fixed memory leak in TextIOWrapper.tell() in rare circumstances.
11 years ago
Serhiy Storchaka
7665be6087
Issue #21802 : The reader in BufferedRWPair now is closed even when closing
writer failed in BufferedRWPair.close().
11 years ago
Steve Dower
fe0a41aae4
Issue #23668 : Adds support for os.truncate and os.ftruncate on Windows
11 years ago
Victor Stinner
e134a7fe36
Issue #23752 : _Py_fstat() is now responsible to raise the Python exception
Add _Py_fstat_noraise() function when a Python exception is not welcome.
11 years ago
Victor Stinner
520bddf79a
Issue #23752 : When built from an existing file descriptor, io.FileIO() now only
calls fstat() once. Before fstat() was called twice, which was not necessary.
11 years ago
Victor Stinner
f329878e74
Issue #23753 : Python doesn't support anymore platforms without stat() or
fstat(), these functions are always required.
Remove HAVE_STAT and HAVE_FSTAT defines, and stop supporting DONT_HAVE_STAT and
DONT_HAVE_FSTAT.
11 years ago
Victor Stinner
66aab0c4b5
Issue #23708 : Add _Py_read() and _Py_write() functions to factorize code handle
EINTR error and special cases for Windows.
These functions now truncate the length to PY_SSIZE_T_MAX to have a portable
and reliable behaviour. For example, read() result is undefined if counter is
greater than PY_SSIZE_T_MAX on Linux.
11 years ago
Serhiy Storchaka
009b811d67
Removed unintentional trailing spaces in non-external and non-generated C files.
11 years ago
Steve Dower
8acde7dcce
Issue #23524 : Change back to using Windows errors for _Py_fstat instead of the errno shim.
11 years ago
Victor Stinner
4a7cc88472
Issue #23571 : PyObject_Call(), PyCFunction_Call() and call_function() now
raise a SystemError if a function returns a result and raises an exception.
The SystemError is chained to the previous exception.
Refactor also PyObject_Call() and PyCFunction_Call() to make them more readable.
Remove some checks which became useless (duplicate checks).
Change reviewed by Serhiy Storchaka.
11 years ago
Steve Dower
d81431f587
Issue #23524 : Replace _PyVerify_fd function with calling _set_thread_local_invalid_parameter_handler on every thread.
11 years ago
Victor Stinner
9672da7bb4
Issue #23285 : Fix handling of EINTR in fileio.c
Fix handling of EINTR: don't return None if PyErr_CheckSignals() raised an
exception.
Initialize also the length outside the loop to only initialize it once.
11 years ago
Steve Dower
f2f373f593
Issue #23152 : Implement _Py_fstat() to support files larger than 2 GB on Windows.
fstat() may fail with EOVERFLOW on files larger than 2 GB because the file size type is an signed 32-bit integer.
11 years ago
Serhiy Storchaka
a3712a9a6c
Issue #5700 : io.FileIO() called flush() after closing the file.
flush() was not called in close() if closefd=False.
11 years ago
Serhiy Storchaka
483405bcca
Issue #22883 : Got rid of outdated references to PyInt and PyString in comments.
11 years ago
Charles-François Natali
6e6c59b508
Issue #23285 : PEP 475 -- Retry system calls failing with EINTR.
11 years ago
Stefan Krah
650c1e818d
Issue #14203 : Remove obsolete support for view==NULL in bytesiobuf_getbuffer()
and array_buffer_getbuf().
11 years ago
Serhiy Storchaka
38c30e6c8e
Issue #15381 : Fixed a bug in BytesIO.write().
It was expected that string_size == PyBytes_GET_SIZE(buf) if the buffer is
shared, but truncate() and __setstate__() can set string_size without
unsharing the buffer.
11 years ago
Serhiy Storchaka
b9765eec5c
Issue #15381 : Try to fix refcount bug. Empty and 1-byte buffers are always shared.
11 years ago
Serhiy Storchaka
87d0b45485
Issue #15381 : Optimized io.BytesIO to make less allocations and copyings.
11 years ago
Serhiy Storchaka
c057c3859c
Issue #23099 : Closing io.BytesIO with exported buffer is rejected now to
prevent corrupting exported buffer.
11 years ago
Serhiy Storchaka
4fdb68491e
Issue #22896 : Avoid to use PyObject_AsCharBuffer(), PyObject_AsReadBuffer()
and PyObject_AsWriteBuffer().
11 years ago
Benjamin Peterson
10e76b67c9
allow more operations to work on detached streams ( closes #23093 )
Patch by Martin Panter.
11 years ago
Serhiy Storchaka
4954f9fcab
Issue #17401 : Output the closefd attribute as boolean.
11 years ago
Benjamin Peterson
6c14f23100
fix possible double free in TextIOWrapper.__init__ ( closes #22849 )
11 years ago
Robert Collins
933430ab69
Issue #17401 : document closefd in io.FileIO docs and add to repr
closefd was documented in the open docs but not the matching FileIO
class documented. Further, closefd, part of the core state for the
object was not shown.
In review it was noted that the open docs are a little confusing about
the interaction between closefd and paths, so tweaked them at the same
time.
11 years ago
Serhiy Storchaka
e2bd2a7186
Issue #21715 : Extracted shared complicated code in the _io module to new
_PyErr_ChainExceptions() function.
12 years ago
Benjamin Peterson
bbd0a323ae
clear BufferedRWPair weakrefs on deallocation ( closes #22517 )
12 years ago
Berker Peksag
b87630c273
Issue #21860 : Correct docstrings of FileIO.seek() and FileIO.truncate() methods.
Patch by Terry Chia.
12 years ago
Serhiy Storchaka
d8a1447c99
Issue #22215 : Now ValueError is raised instead of TypeError when str or bytes
argument contains not permitted null character or byte.
12 years ago