Serhiy Storchaka
e2bd2a7186
Issue #21715 : Extracted shared complicated code in the _io module to new
...
_PyErr_ChainExceptions() function.
2014-10-08 22:31:52 +03:00
Benjamin Peterson
c44eb73473
merge 3.3 ( #22517 )
2014-09-29 22:48:51 -04:00
Benjamin Peterson
bbd0a323ae
clear BufferedRWPair weakrefs on deallocation ( closes #22517 )
2014-09-29 22:46:57 -04:00
Berker Peksag
b87630c273
Issue #21860 : Correct docstrings of FileIO.seek() and FileIO.truncate() methods.
...
Patch by Terry Chia.
2014-09-24 12:43:29 +03:00
Benjamin Peterson
e865128605
properly decref the return value of close()
2014-07-04 17:00:25 -07:00
Victor Stinner
e10920f0d1
Issue #21090 : io.FileIO.readall() does not ignore I/O errors anymore. Before,
...
it ignored I/O errors if at least the first C call read() succeed.
2014-07-02 22:59:31 +02:00
Serhiy Storchaka
76d3f14e01
PyErr_NormalizeException doesn't like being called with an exception set
...
(issues #21677 , #21310 ).
2014-06-11 07:18:53 +03:00
Serhiy Storchaka
f10063e3c3
Issue #21310 : Fixed possible resource leak in failed open().
2014-06-09 13:32:34 +03:00
Serhiy Storchaka
8a8f7f9830
Issue #21677 : Fixed chaining nonnormalized exceptions in io close() methods.
2014-06-09 09:13:04 +03:00
Antoine Pitrou
c644e7c39f
Issue #21396 : Fix TextIOWrapper(..., write_through=True) to not force a flush() on the underlying binary stream.
...
Patch by akira.
2014-05-09 00:24:50 +02:00
Andrew Kuchling
764662020b
#15840 : make docs consistent by saying operations on closed files raise ValueError.
...
Patch by Caelyn McAulay.
Neither Caelyn nor I could find any cases in 2.7 or 3.4/5 where an
operation on a closed stream raised IOError; generally the C
implementations have a macro to check for the stream being closed, and
these macros all raised ValueError. If we find any, a new bug should
be opened.
2014-04-15 21:11:36 -04:00
Georg Brandl
2fc8f773e1
Issue #20404 : reject non-text encodings early in TextIOWrapper.
2014-03-02 09:18:31 +01:00
Serhiy Storchaka
5bdfc51950
Issue #17671 : Fixed a crash when use non-initialized io.BufferedRWPair.
...
Based on patch by Stephen Tu.
2014-02-12 10:55:07 +02:00
Serhiy Storchaka
61e2493b83
Issue #17671 : Fixed a crash when use non-initialized io.BufferedRWPair.
...
Based on patch by Stephen Tu.
2014-02-12 10:52:35 +02:00
Nick Coghlan
a9b15241c6
Close #20404 : blacklist non-text encodings in io.TextIOWrapper
...
- io.TextIOWrapper (and hence the open() builtin) now use the
internal codec marking system added for issue #19619
- also tweaked the C code to only look up the encoding once,
rather than multiple times
- the existing output type checks remain in place to deal with
unmarked third party codecs.
2014-02-04 22:11:18 +10:00
Antoine Pitrou
712cb734bd
Issue #20037 : Avoid crashes when doing text I/O late at interpreter shutdown.
2013-12-21 15:51:54 +01:00
Serhiy Storchaka
6787a3806e
Issue #15204 : Deprecated the 'U' mode in file-like objects.
2013-11-23 22:12:06 +02:00
Victor Stinner
3f36a5736b
Issue #19515 : Remove identifiers duplicated in the same file.
...
Patch written by Andrei Dorian Duma.
2013-11-12 21:39:02 +01:00
Victor Stinner
aa5bbfaa77
Issue #19437 : Fix _io._IOBase.close(), handle _PyObject_SetAttrId() failure
2013-11-08 00:29:41 +01:00
Victor Stinner
d9d0419a9f
Issue #19512 : fileio_init() reuses PyId_name identifier instead of "name"
...
literal string
2013-11-06 23:50:10 +01:00
Victor Stinner
cc024d1820
Issue #18408 : Fix iobase_readline(), handle PyByteArray_Resize() failure
2013-10-29 02:23:46 +01:00
Antoine Pitrou
4d397008cd
Issue #19356 : Avoid using a C variabled named "_self", it's a reserved word in some C compilers.
2013-10-23 19:21:55 +02:00
Antoine Pitrou
09fcb72048
Issue #19356 : Avoid using a C variabled named "_self", it's a reserved word in some C compilers.
2013-10-23 19:20:21 +02:00
Antoine Pitrou
fd4722cacf
Issue #9548 : Add a minimal "_bootlocale" module that is imported by the _io module instead of the full locale module.
2013-10-12 00:13:50 +02:00
Antoine Pitrou
e619427f7e
Issue #18876 : The FileIO.mode attribute now better reflects the actual mode under which the file was opened.
...
Patch by Erik Bray.
2013-09-04 20:52:14 +02:00
Antoine Pitrou
e93b63b74b
Issue #18876 : The FileIO.mode attribute now better reflects the actual mode under which the file was opened.
...
Patch by Erik Bray.
2013-09-04 20:46:33 +02:00
Victor Stinner
daf455554b
Issue #18571 : Implementation of the PEP 446: file descriptors and file handles
...
are now created non-inheritable; add functions os.get/set_inheritable(),
os.get/set_handle_inheritable() and socket.socket.get/set_inheritable().
2013-08-28 00:53:59 +02:00
Serhiy Storchaka
edd0de58a8
Issue #13461 : Fix a crash in the TextIOWrapper.tell method on 64-bit platforms.
...
Patch by Yogesh Chaudhari.
2013-08-20 20:07:50 +03:00
Serhiy Storchaka
ec67d187ee
Issue #13461 : Fix a crash in the TextIOWrapper.tell method on 64-bit platforms.
...
Patch by Yogesh Chaudhari.
2013-08-20 20:04:47 +03:00
Antoine Pitrou
932ff83682
Issue #18608 : Avoid keeping a strong reference to the locale module inside the _io module.
2013-08-01 21:04:50 +02:00
Christian Heimes
72f455e96c
Fix use of uninitialized scalar variable, see 3f994367a979
...
CID 1058763
2013-07-31 01:33:50 +02:00
Antoine Pitrou
796564c27b
Issue #18112 : PEP 442 implementation (safe object finalization).
2013-07-30 19:59:21 +02:00
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.
2013-07-18 01:41:08 +02:00
Victor Stinner
85c761d3d3
Issue #18408 : Fix fileio_read() on _PyBytes_Resize() failure
...
bytes is NULL on _PyBytes_Resize() failure
2013-07-16 21:36:02 +02:00
Richard Oudkerk
9ba6962a04
Issue #18344 : Fix potential ref-leaks in _bufferedreader_read_all().
2013-07-15 16:10:28 +01:00
Richard Oudkerk
9ad51ec81b
Issue #18344 : Fix potential ref-leaks in _bufferedreader_read_all().
2013-07-15 16:05:22 +01:00
Victor Stinner
14b9b11098
If MS_WIN64 is defined, MS_WINDOWS is also defined: #ifdef can be simplified.
2013-06-25 00:37:25 +02:00
Victor Stinner
9a282975ef
Issue #9566 : _io: Use Py_SAFE_DOWNCAST for fix a compiler warning on Windows x64
2013-06-24 23:01:33 +02:00
Christian Heimes
9975877f46
Check for correct macro, code uses S_ISDIR().
2013-06-23 23:52:40 +02:00
Christian Heimes
91e8b8180d
Check for correct macro, code uses S_ISDIR().
2013-06-23 23:51:44 +02:00
Andrew Kuchling
f567727abc
Merge with 3.3
2013-06-16 13:02:55 -04:00
Andrew Kuchling
c7b6c50f29
Describe 'surrogateescape' in the documentation.
...
Also, improve some docstring descriptions of the 'errors' parameter.
Closes #14015 .
2013-06-16 12:58:48 -04:00
Serhiy Storchaka
37a79a12d1
Issue #18025 : Fixed a segfault in io.BufferedIOBase.readinto() when raw
...
stream's read() returns more bytes than requested.
2013-05-28 16:24:45 +03:00
Serhiy Storchaka
281945f427
Issue #18025 : Fixed a segfault in io.BufferedIOBase.readinto() when raw
...
stream's read() returns more bytes than requested.
2013-05-28 16:27:08 +03:00
Victor Stinner
3e269397e3
FileIO.readall(): remove trailing space from an exception message
2013-05-18 00:38:43 +02:00
Richard Oudkerk
af7260e81a
Issue #15758 : Fix FileIO.readall() so it no longer has O(n**2) complexity.
2013-05-17 23:34:42 +01:00
Terry Jan Reedy
16c41d8520
Merge 3.3, issue #17047 : remove doubled words found in 2.7 to 3.4
...
Modules/*, as reported by Serhiy Storchaka and Matthew Barnett.
2013-03-11 17:46:07 -04:00
Terry Jan Reedy
09b7503bc9
Merge 3.2, Issue #17047 : remove doubled words found in 2.7 to 3.4
...
Modules/*, as reported by Serhiy Storchaka and Matthew Barnett.
2013-03-11 17:45:12 -04:00
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.
2013-03-11 17:42:46 -04:00
R David Murray
d7c59e101f
Merge #17275 : Fix class name in init errors in C bufferedio classes.
...
This fixes an apparent copy-and-paste error.
Patch by Manuel Jacob.
2013-02-23 22:21:48 -05:00