Commit Graph

238 Commits

Author SHA1 Message Date
Benjamin Peterson 6fd113c26c add space 2014-11-12 10:23:44 -05:00
Benjamin Peterson 994c7f76a3 merge 3.4 (#22849) 2014-11-12 10:23:35 -05:00
Benjamin Peterson 6c14f23100 fix possible double free in TextIOWrapper.__init__ (closes #22849) 2014-11-12 10:19:46 -05:00
Benjamin Peterson 58ee2d31ab merge 3.4 (#22517) 2014-09-29 22:49:05 -04: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
Serhiy Storchaka d8a1447c99 Issue #22215: Now ValueError is raised instead of TypeError when str or bytes
argument contains not permitted null character or byte.
2014-09-06 20:07:17 +03:00
Victor Stinner a6b6bba5ed (Merge 3.4) Issue #22331: Skip test_interrupted_write_text() on FreeBSD older
than 8.0
2014-09-03 23:33:43 +02:00
Victor Stinner 6ab728612d Issue #22331: Skip test_interrupted_write_text() on FreeBSD older than 8.0 2014-09-03 23:32:28 +02:00
Victor Stinner 1db9e7bb19 Issue #22054: Add os.get_blocking() and os.set_blocking() functions to get and
set the blocking mode of a file descriptor (False if the O_NONBLOCK flag is
set, True otherwise). These functions are not available on Windows.
2014-07-29 22:32:47 +02:00
Serhiy Storchaka 521e5860a5 Issue #22032: __qualname__ instead of __name__ is now always used to format
fully qualified class names of Python implemented classes.
2014-07-22 15:00:37 +03:00
Benjamin Peterson a96fea03e8 add BufferedIOBase.readinto1 (closes #20578)
Patch by Nikolaus Rath.
2014-06-22 14:17:44 -07:00
Serhiy Storchaka 3a56117a60 Issue #21310: Fixed possible resource leak in failed open(). 2014-06-09 13:35:43 +03:00
Serhiy Storchaka f10063e3c3 Issue #21310: Fixed possible resource leak in failed open(). 2014-06-09 13:32:34 +03:00
Serhiy Storchaka 85e4235c0e Issue #21677: Fixed chaining nonnormalized exceptions in io close() methods. 2014-06-09 09:15:42 +03:00
Serhiy Storchaka 8a8f7f9830 Issue #21677: Fixed chaining nonnormalized exceptions in io close() methods. 2014-06-09 09:13:04 +03:00
Benjamin Peterson 4fb01ffe66 backout 0fb7789b5eeb for test breakage (#20578) 2014-06-07 23:18:12 -07:00
Benjamin Peterson 10e847bbc7 add BufferedIOBase.readinto1 (closes #20578)
Patch by Nikolaus Rath.
2014-06-07 20:06:48 -07:00
Antoine Pitrou 38ca5a7b6d Issue #21396: Fix TextIOWrapper(..., write_through=True) to not force a flush() on the underlying binary stream.
Patch by akira.
2014-05-09 00:31:32 +02: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
Antoine Pitrou b8503896ad Issue #21057: TextIOWrapper now allows the underlying binary stream's read() or read1() method to return an arbitrary bytes-like object (such as a memoryview).
Patch by Nikolaus Rath.
2014-04-29 10:14:02 +02: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
Serhiy Storchaka d667d72cb7 Temporary silence test broken by issue19255.
Remove unused variables.
2014-02-10 19:09:19 +02:00
Serhiy Storchaka f28ba369dd Issue #20532: Tests which use _testcapi now are marked as CPython only. 2014-02-07 10:10:55 +02:00
Serhiy Storchaka 5cfc79deae Issue #20532: Tests which use _testcapi now are marked as CPython only. 2014-02-07 10:06:39 +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
Zachary Ware 101d9e7250 Issue 19572: More silently skipped tests explicitly skipped. 2013-12-08 00:44:27 -06:00
Zachary Ware 9fe6d86709 Issue 19572: More silently skipped tests explicitly skipped. 2013-12-08 00:20:35 -06:00
Serhiy Storchaka 2480c2ed59 Issue #15204: Silence and check the 'U' mode deprecation warnings in tests.
Changed deprecation message in the fileinput module.
2013-11-24 23:13:26 +02:00
Antoine Pitrou 796564c27b Issue #18112: PEP 442 implementation (safe object finalization). 2013-07-30 19:59:21 +02:00
Victor Stinner 775b2dd778 test_io: check_interrupted_write() now cancels the alarm if ZeroDivisionError
exception was not raised.

Before the process was killed by SIGALRM in another random test (1 second later)
2013-07-15 19:53:13 +02: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
Antoine Pitrou 34373b2252 Issue #17835: Fix test_io when the default OS pipe buffer size is larger than one million bytes. 2013-04-24 23:33:20 +02:00
Antoine Pitrou e1a1674e1e Issue #17835: Fix test_io when the default OS pipe buffer size is larger than one million bytes. 2013-04-24 23:31:38 +02:00
Ezio Melotti e94cbd188b #17479: merge with 3.3. 2013-03-23 16:36:58 +02:00
Ezio Melotti daa42c778e #17479: test_io now works with unittest test discovery. Patch by Zachary Ware. 2013-03-23 16:30:16 +02: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
R David Murray 9f10f56d13 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:07:55 -05:00
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.
2013-02-23 21:51:05 -05:00
Serhiy Storchaka cce1b8eda8 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).
2013-02-03 17:09:17 +02:00
Serhiy Storchaka d03ce4ae3d 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).
2013-02-03 17:07:32 +02:00
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).
2013-02-03 17:03:31 +02:00
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.
2013-01-19 12:26:26 +02:00
Serhiy Storchaka 9101e23ff6 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.
2013-01-19 12:41:45 +02:00
Serhiy Storchaka 7898043868 Issue #15989: Fix several occurrences of integer overflow
when result of PyLong_AsLong() narrowed to int without checks.
2013-01-15 01:12:17 +02:00
Andrew Svetlov f7a17b48d7 Replace IOError with OSError (#16715) 2012-12-25 16:47:37 +02:00