summaryrefslogtreecommitdiffstats
path: root/Modules/_io
Commit message (Collapse)AuthorAgeFilesLines
* bpo-35436: Add missing PyErr_NoMemory() calls and other minor bug fixes. ↵Serhiy Storchaka2018-12-071-2/+4
| | | | | | | | | (GH-11015) (GH-11020) (GH-11026) (cherry picked from commit 4c49da0cb7434c676d70b9ccf38aca82ac0d64a9) (cherry picked from commit 602d307ac5e8a2da38a193dca3bdfef5994dfe67) Co-authored-by: Zackery Spytz <zspytz@gmail.com>
* [3.6] bpo-33029: Fix signatures of getter and setter functions. (GH-10746) ↵Serhiy Storchaka2018-11-271-1/+1
| | | | | | (GH-10749) Fix also return type for few other functions (clear, releasebuffer). (cherry picked from commit d4f9cf5545d6d8844e0726552ef2e366f5cc3abd)
* bpo-35062: Fix parsing _io.IncrementalNewlineDecoder's *translate* argument. ↵Miss Islington (bot)2018-10-311-1/+1
| | | | | | | | | (GH-10217) _io.IncrementalNewlineDecoder's initializer possibly assigns out-of-range value to the bitwise struct field. (cherry picked from commit b08746bfdf64e55ce33516f2065fa2aa4f51be95) Co-authored-by: Xiang Zhang <angwerzx@126.com>
* [3.6] bpo-24658: Fix read/write greater than 2 GiB on macOS (GH-1705) (GH-9937)Stéphane Wirtel2018-10-171-5/+3
| | | | | On macOS, fix reading from and writing into a file with a size larger than 2 GiB. (cherry picked from commit 74a8b6ea7e0a8508b13a1c75ec9b91febd8b5557)
* bpo-30237: Output error when ReadConsole is canceled by CancelSynchronousIo. ↵Steve Dower2018-07-291-1/+5
| | | | | (GH-7911) Co-authored-by: ValeriyaSinevich <valeriya.sinevich@phystech.edu>
* bpo-34068: _io__IOBase_close_impl could call _PyObject_SetAttrId with an ↵Serhiy Storchaka2018-07-171-4/+7
| | | | | | | exception set (GH-8282). (GH-8312) (cherry picked from commit 28f07364f066792ceee93231dbb80ae8ad98b2bb) Co-authored-by: Zackery Spytz <zspytz@gmail.com>
* bpo-25862: Fix several bugs in the _io module. (GH-8026)Miss Islington (bot)2018-06-302-8/+17
| | | | | | | | | | | | | | They can be exposed when some C API calls fail due to lack of memory. * Failed Py_BuildValue() could cause an assertion error in the following TextIOWrapper.tell(). * input_chunk could be decrefed twice in TextIOWrapper.seek() after failed Py_BuildValue(). * initvalue could leak in StringIO.__getstate__() after failed PyDict_Copy(). (cherry picked from commit fdb5a50ef34f7951c3b01eb77b1359725a9ad670) Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
* [3.6] bpo-25862: Fix assertion failures in io.TextIOWrapper.tell(). ↵Zackery Spytz2018-06-291-0/+5
| | | | | | | (GH-3918). (GH-8012) (cherry picked from commit 23db935bcf258657682e66464bf8512def8af830) Co-authored-by: Zackery Spytz <zspytz@gmail.com>
* bpo-31966: Fixed WindowsConsoleIO.write() for writing empty data. (GH-5754)Miss Islington (bot)2018-02-241-0/+3
| | | | | (cherry picked from commit 42c35d9c0c8175332f50fbe034a001fe52f057b9) Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
* [3.6] bpo-32228: Reset raw_pos after unwinding the raw stream (GH-4858) (#5389)Antoine Pitrou2018-01-281-4/+10
| | | | | Ensure that ``truncate()`` preserves the file position (as reported by ``tell()``) after writes longer than the buffer size.. (cherry picked from commit 059f58ce938d9c3f0286412a4efb1b9131339421)
* bpo-32186: Release the GIL during lseek and fstat (GH-4652) (#4661)Miss Islington (bot)2017-12-011-1/+5
| | | | | | | In _io_FileIO_readall_impl(), lseek() and _Py_fstat_noraise() were called without releasing the GIL. This can cause all threads to hang for unlimited time when calling FileIO.read() and the NFS server is not accessible. (cherry picked from commit 6a89481680b921e7b317c29877bdda9a6031e5ad)
* [3.6] bpo-25359: Add missed "goto error" after setting an exception. ↵Miss Islington (bot)2017-09-241-0/+1
| | | | | (GH-3712) (#3714) (cherry picked from commit d6238a76c655e0feb13478505220dc9049f1682f)
* bpo-31095: fix potential crash during GC (GH-3195)INADA Naoki2017-09-041-0/+2
| | | (cherry picked from commit a6296d34a478b4f697ea9db798146195075d496c)
* [3.6] bpo-31243: Fixed PyArg_ParseTuple failure checks. (GH-3171) (#3233)Oren Milman2017-08-291-5/+13
| | | (cherry picked from commit ba7d7365215d791025d1efd25393c91404f2cfc8)
* [3.6] bpo-31271: Fix an assertion failure in io.TextIOWrapper.write. ↵Oren Milman2017-08-261-0/+7
| | | | | (GH-3201) (#3209) (cherry picked from commit a5b4ea15b61e3f3985f4f0748a18f8b888a63532)
* [3.6] bpo-28261: Prevent raising SystemError where PyArg_ParseTuple is used ↵Oren Milman2017-08-261-0/+16
| | | | to parse non-args. (#3210)
* _winconsoleio: Fix memory leak (#2485)Victor Stinner2017-06-291-3/+3
| | | | Fix memory leak when _winconsoleio tries to open a non-console file: free the name buffer.
* [3.6] bpo-13617: Reject embedded null characters in wchar* strings. ↵Serhiy Storchaka2017-06-281-2/+1
| | | | | | | | | | (GH-2302) (#2462) Based on patch by Victor Stinner. Add private C API function _PyUnicode_AsUnicode() which is similar to PyUnicode_AsUnicode(), but checks for null characters.. (cherry picked from commit f7eae0adfcd4c50034281b2c69f461b43b68db84)
* [3.6] bpo-30708: Check for null characters in PyUnicode_AsWideCharString(). ↵Serhiy Storchaka2017-06-271-9/+2
| | | | | | | (GH-2285) (#2443) Raise a ValueError if the second argument is NULL and the wchar_t\* string contains null characters.. (cherry picked from commit e613e6add5f07ff6aad5802924596b631b707d2a)
* bpo-30601: Fix a refleak in WindowsConsoleIO (#2003) (#2008)Victor Stinner2017-06-081-3/+2
| | | | | | Fix a reference leak in _io._WindowsConsoleIO: PyUnicode_FSDecoder() always initialize decodedname when it succeed and it doesn't clear input decodedname object. (cherry picked from commit 29adc13bd797d9c9e7fcb893a7c49ce7f7ad388c)
* bpo-30544: _io._WindowsConsoleIO.write raises the wrong error when ↵Steve Dower2017-06-021-1/+1
| | | | | | | WriteConsoleW fails (#1912) (#1925) * bpo-30544: _io._WindowsConsoleIO.write raises the wrong error when WriteConsoleW fails * bpo-30544: _io._WindowsConsoleIO.write raises the wrong error when WriteConsoleW fails
* bpo-30061: Check if PyObject_Size()/PySequence_Size()/PyMapping_Size() ↵Serhiy Storchaka2017-04-191-4/+9
| | | | | | | (#1096) (#1180) raised an error. (cherry picked from commit bf623ae8843dc30b28c574bec8d29fc14be59d86)
* bpo-30068: add missing iter(self) in _io._IOBase.readlines when hint is ↵Xiang Zhang2017-04-151-8/+17
| | | | present (#1130) (#1150)
* bpo-25455: Fixed crashes in repr of recursive buffered file-like objects. ↵Serhiy Storchaka2017-03-193-8/+45
| | | | | (#514) (#722) (cherry picked from commit a5af6e1af77ee0f9294c5776478a9c24d9fbab94)
* Adds precheck for console filename to fix Windows 7.Steve Dower2017-02-051-1/+13
|
* Issue #28164: Correctly handle special console filenames (patch by Eryk Sun)Steve Dower2017-02-041-20/+47
|
* Issue #29409: Implement PEP 529 for io.FileIO (Patch by Eryk Sun)Steve Dower2017-02-041-17/+14
|
* Merge doc fixes from 3.5Martin Panter2017-01-141-1/+1
|\
| * Fix grammar, typos and markup in documentation and code commentsMartin Panter2017-01-141-1/+1
| | | | | | | | | | | | * Indent versionchanged at method level, not class level * Mark up ``--help`` to avoid generating an en dash * Use forward slash in Unix command line with a dollar sign ($) prompt
* | Issue #28768: Fix implicit declaration of function _setmode. Patch by ↵Steve Dower2016-12-281-0/+3
| | | | | | | | Masayuki Yamamoto
* | Merge from 3.5.Serhiy Storchaka2016-12-071-1/+1
|\ \ | |/
| * Change order of io.UnsupportedOperation base classes.Serhiy Storchaka2016-12-071-1/+1
| | | | | | | | This makes tests passing after changes by issue #5322.
* | Replaced outdated macros _PyUnicode_AsString and _PyUnicode_AsStringAndSizeSerhiy Storchaka2016-11-202-3/+3
| | | | | | | | with PyUnicode_AsUTF8 and PyUnicode_AsUTF8AndSize.
* | Issue #28701: Replace PyUnicode_CompareWithASCIIString with ↵Serhiy Storchaka2016-11-162-4/+4
|\ \ | |/ | | | | | | | | _PyUnicode_EqualToASCIIString. The latter function is more readable, faster and doesn't raise exceptions.
| * Issue #28701: Replace PyUnicode_CompareWithASCIIString with ↵Serhiy Storchaka2016-11-161-1/+1
| | | | | | | | | | | | _PyUnicode_EqualToASCIIString. The latter function is more readable, faster and doesn't raise exceptions.
* | Issue #28387: Fixed possible crash in _io.TextIOWrapper deallocator whenSerhiy Storchaka2016-11-031-12/+5
|\ \ | |/ | | | | | | the garbage collector is invoked in other thread. Based on patch by Sebastian Cufre.
| * Issue #28387: Fixed possible crash in _io.TextIOWrapper deallocator whenSerhiy Storchaka2016-11-031-12/+5
| | | | | | | | | | the garbage collector is invoked in other thread. Based on patch by Sebastian Cufre.
* | Issue #28162: Fixes Ctrl+Z handling in console readall()Steve Dower2016-10-081-20/+29
| |
* | Issue #28217: Adds _testconsole module to test console input. Fixes some ↵Steve Dower2016-10-032-12/+45
| | | | | | | | issues found by the tests.
* | Issue #28277: remove linefeed character from iomodule.h. Patch by Michael FeltChristian Heimes2016-09-261-1/+1
| |
* | merge 3.5 (#28184)Benjamin Peterson2016-09-201-6/+6
|\ \ | |/
| * Issue #27895: Spelling fixes (Contributed by Ville Skyttä).Martin Panter2016-09-071-1/+1
| |
* | Issue #28161: Opening CON for write access failsSteve Dower2016-09-171-14/+31
| | | | | | | | | | | | Issue #28162: WindowsConsoleIO readall() fails if first line starts with Ctrl+Z Issue #28163: WindowsConsoleIO fileno() passes wrong flags to _open_osfhandle Issue #28164: _PyIO_get_console_type fails for various paths
* | Issue #27810: Regenerate Argument Clinic.Serhiy Storchaka2016-09-112-8/+8
| |
* | Issue #1602: Windows console doesn't input or print Unicode (PEP 528)Steve Dower2016-08-314-3/+1458
| | | | | | | | Closes #17602: Adds a readline implementation for the Windows console
* | Issue #23524: Finish removing _PyVerify_fd from sourcesSteve Dower2016-09-081-26/+13
| |
* | more PY_LONG_LONG to long longBenjamin Peterson2016-09-082-9/+9
| |
* | require a long long data type (closes #27961)Benjamin Peterson2016-09-061-1/+1
| |
* | Issue #27895: Spelling fixes (Contributed by Ville Skyttä).Raymond Hettinger2016-08-301-1/+1
| |
* | Issue #27574: Decreased an overhead of parsing keyword arguments in functionsSerhiy Storchaka2016-08-146-26/+36
| | | | | | | | implemented with using Argument Clinic.