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
Antoine Pitrou
796564c27b
Issue #18112 : PEP 442 implementation (safe object finalization).
13 years ago
Victor Stinner
9a282975ef
Issue #9566 : _io: Use Py_SAFE_DOWNCAST for fix a compiler warning on Windows x64
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
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
7898043868
Issue #15989 : Fix several occurrences of integer overflow
when result of PyLong_AsLong() narrowed to int without checks.
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
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
Ezio Melotti
16d2b47837
#15796 : Fix \n in readline docstring. Patch by Serhiy Storchaka.
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
Gregory P. Smith
5135992164
Fixes issue #12268 : File readline, readlines and read() or readall() methods
no longer lose data when an underlying read system call is interrupted.
IOError is no longer raised due to a read system call returning EINTR
from within these methods.
14 years ago
Victor Stinner
f86a5e8a93
Close #11022 : TextIOWrapper doesn't call locale.setlocale() anymore
open() and io.TextIOWrapper are now calling locale.getpreferredencoding(False)
instead of locale.getpreferredencoding() in text mode if the encoding is not
specified. Don't change temporary the locale encoding using locale.setlocale(),
use the current locale encoding instead of the user preferred encoding.
Explain also in open() documentation that locale.getpreferredencoding(False) is
called if the encoding is not specified.
14 years ago
Ross Lagerwall
0f9eec19ee
Don't Py_DECREF NULL variable in io.IncrementalNewlineDecoder.
Found with Clang's Static Analyzer.
14 years ago
Brett Cannon
efb00c0cc1
Issue #14153 Create _Py_device_encoding() to prevent _io from having to import
the os module.
14 years ago
Éric Araujo
fab976624d
Fix typo in “seperat{or,ion}”
14 years ago
Éric Araujo
7f4b3be2cc
Fix typo “seperator”
14 years ago
Victor Stinner
f8facacf30
Fix compiler warnings
15 years ago
Victor Stinner
9e30aa52fd
Fix misuse of PyUnicode_GET_SIZE() => PyUnicode_GET_LENGTH()
And PyUnicode_GetSize() => PyUnicode_GetLength()
15 years ago
Antoine Pitrou
e532456965
Issue #13393 : In TextIOWrapper.read(n), try to read `n` characters as
once rather than limit ourselves to the default chunk size.
15 years ago
Antoine Pitrou
5c398e8395
Restore performance of special casings for utf-16 and utf-32 in TextIOWrapper
15 years ago
Antoine Pitrou
c28e2e53ba
In text I/O, optimize scanning for new lines with 1-byte unicode chars
15 years ago
Antoine Pitrou
c1b0bfdb04
Fix memory leak in io.StringIO
15 years ago
Martin v. Löwis
767046aab1
Replace {Get,Set,Has}AttrString with *AttrId.
15 years ago
Martin v. Löwis
bd928fef42
Rename _Py_identifier to _Py_IDENTIFIER.
15 years ago
Martin v. Löwis
afe55bba33
Add API for static strings, primarily good for identifiers.
Thanks to Konrad Schöbel and Jasper Schulz for helping with the mass-editing.
15 years ago
Martin v. Löwis
c47adb04b3
Change PyUnicode_KIND to 1,2,4. Drop _KIND_SIZE and _CHARACTER_SIZE.
15 years ago
Victor Stinner
f7b8cb605d
_io.textio: fix character type, use Py_UCS4 instead of Py_UNICODE
15 years ago
Martin v. Löwis
d63a3b8beb
Implement PEP 393.
15 years ago
Antoine Pitrou
e96ec68101
Issue #12591 : Allow io.TextIOWrapper to work with raw IO objects (without
a read1() method), and add an undocumented *write_through* parameter to
mandate unbuffered writes.
15 years ago
Antoine Pitrou
cb4ae815b5
Raise ValueError when attempting to set the _CHUNK_SIZE attribute of a TextIOWrapper to a huge value, not TypeError.
15 years ago
Victor Stinner
fd8211372d
Fast path for IncrementalNewlineDecoder.decode() in io.TextIOWrapper.read(-1)
Copy/paste code from textiowrapper_read_chunk().
15 years ago
Antoine Pitrou
211b81dd09
Issue #11114 : Fix catastrophic performance of tell() on text files (up
to 1000x faster in some cases). It is still one to two order of magnitudes
slower than binary tell().
15 years ago
Antoine Pitrou
a4815caa7c
Issue #10872 : The repr() of TextIOWrapper objects now includes the mode
if available.
(at Georg's request)
15 years ago
Antoine Pitrou
243757eb79
Issue #10180 : Pickling file objects is now explicitly forbidden, since
unpickling them produced nonsensical results.
16 years ago
Antoine Pitrou
e033e06db0
Issue #10093 : ResourceWarnings are now issued when files and sockets are
deallocated without explicit closing. These warnings are silenced by
default, except in pydebug mode.
16 years ago
Antoine Pitrou
0d739d7047
Issue #9293 : I/O streams now raise `io.UnsupportedOperation` when an
unsupported operation is attempted (for example, writing to a file open
only for reading).
16 years ago
Victor Stinner
f6c578328c
Issue #6697 : Check that _PyUnicode_AsString() result is not NULL in textio.c
The bug may occurs if locale.getpreferredencoding() returns an encoding with a
surrogate (very unlikely!).
16 years ago
Antoine Pitrou
faf9007d86
Merged revisions 80722 via svnmerge from
svn+ssh://pythondev@svn.python.org/python/branches/py3k
................
r80722 | antoine.pitrou | 2010-05-03 18:48:20 +0200 (lun., 03 mai 2010) | 11 lines
Merged revisions 80720 via svnmerge from
svn+ssh://pythondev@svn.python.org/python/trunk
........
r80720 | antoine.pitrou | 2010-05-03 18:25:33 +0200 (lun., 03 mai 2010) | 5 lines
Issue #7865 : The close() method of :mod:`io` objects should not swallow
exceptions raised by the implicit flush(). Also ensure that calling
close() several times is supported. Patch by Pascal Chambon.
........
................
16 years ago
Antoine Pitrou
6be8876623
Merged revisions 80720 via svnmerge from
svn+ssh://pythondev@svn.python.org/python/trunk
........
r80720 | antoine.pitrou | 2010-05-03 18:25:33 +0200 (lun., 03 mai 2010) | 5 lines
Issue #7865 : The close() method of :mod:`io` objects should not swallow
exceptions raised by the implicit flush(). Also ensure that calling
close() several times is supported. Patch by Pascal Chambon.
........
16 years ago
Antoine Pitrou
f7fd8e4c94
Issue #7865 : The close() method of :mod:`io` objects should not swallow
exceptions raised by the implicit flush(). Also ensure that calling
close() several times is supported. Patch by Pascal Chambon.
16 years ago