summaryrefslogtreecommitdiffstats
path: root/Modules/_io/_iomodule.h
Commit message (Collapse)AuthorAgeFilesLines
* bpo-11410: Standardize and use symbol visibility attributes across POSIX and ↵Vinay Sajip2019-10-151-1/+3
| | | | Windows. (GH-16347)
* bpo-31572: Get rid of PyObject_HasAttr() and _PyObject_HasAttrId() in the ↵Serhiy Storchaka2018-01-161-0/+1
| | | | _io module. (#3726)
* bpo-17852: Revert incorrect fix based on misunderstanding of _Py_PyAtExit() ↵Antoine Pitrou2017-12-131-2/+0
| | | | semantics (#4826)
* bpo-17852: Maintain a list of BufferedWriter objects. Flush them on exit. ↵Neil Schemenauer2017-09-221-0/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | (#3372) * Maintain a list of BufferedWriter objects. Flush them on exit. In Python 3, the buffer and the underlying file object are separate and so the order in which objects are finalized matters. This is unlike Python 2 where the file and buffer were a single object and finalization was done for both at the same time. In Python 3, if the file is finalized and closed before the buffer then the data in the buffer is lost. This change adds a doubly linked list of open file buffers. An atexit hook ensures they are flushed before proceeding with interpreter shutdown. This is addition does not remove the need to properly close files as there are other reasons why buffered data could get lost during finalization. Initial patch by Armin Rigo. * Use weakref.WeakSet instead of WeakKeyDictionary. * Simplify buffered double-linked list types. * In _flush_all_writers(), suppress errors from flush(). * Remove NEWS entry, use blurb. * Take more care when flushing file buffers from atexit. The previous implementation was not careful enough to avoid causing issues in multi-threaded cases. Check for buf->ok and buf->finalizing before actually doing the flush. Also, increase the refcnt to ensure the object does not disappear.
* Revert "bpo-17852: Maintain a list of BufferedWriter objects. Flush them on ↵Neil Schemenauer2017-09-051-2/+0
| | | | | exit. (#1908)" (#3337) This reverts commit e38d12ed34870c140016bef1e0ff10c8c3d3f213.
* bpo-17852: Maintain a list of BufferedWriter objects. Flush them on exit. ↵Neil Schemenauer2017-09-051-0/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | (#1908) * Maintain a list of BufferedWriter objects. Flush them on exit. In Python 3, the buffer and the underlying file object are separate and so the order in which objects are finalized matters. This is unlike Python 2 where the file and buffer were a single object and finalization was done for both at the same time. In Python 3, if the file is finalized and closed before the buffer then the data in the buffer is lost. This change adds a doubly linked list of open file buffers. An atexit hook ensures they are flushed before proceeding with interpreter shutdown. This is addition does not remove the need to properly close files as there are other reasons why buffered data could get lost during finalization. Initial patch by Armin Rigo. * Use weakref.WeakSet instead of WeakKeyDictionary. * Simplify buffered double-linked list types. * In _flush_all_writers(), suppress errors from flush(). * Remove NEWS entry, use blurb.
* bpo-30022: Get rid of using EnvironmentError and IOError (except test… (#1051)Serhiy Storchaka2017-04-161-1/+1
|
* bpo-29852: Argument Clinic Py_ssize_t converter now supports None (#716)Serhiy Storchaka2017-03-301-2/+0
| | | if pass `accept={int, NoneType}`.
* bpo-29878: Add global instances of int for 0 and 1. (#852)Serhiy Storchaka2017-03-301-1/+0
|
* Issue #28217: Adds _testconsole module to test console input. Fixes some ↵Steve Dower2016-10-031-1/+2
| | | | issues found by the tests.
* Issue #28277: remove linefeed character from iomodule.h. Patch by Michael FeltChristian Heimes2016-09-261-1/+1
|
* Issue #1602: Windows console doesn't input or print Unicode (PEP 528)Steve Dower2016-08-311-0/+10
| | | | Closes #17602: Adds a readline implementation for the Windows console
* more PY_LONG_LONG to long longBenjamin Peterson2016-09-081-7/+7
|
* require a long long data type (closes #27961)Benjamin Peterson2016-09-061-1/+1
|
* Issue #25923: Added more const qualifiers to signatures of static and ↵Serhiy Storchaka2015-12-251-1/+1
| | | | private functions.
* Issue #22413: Merge StringIO doc from 3.4 into 3.5Martin Panter2015-10-101-1/+6
|\
| * Issue #22413: Document newline effect on StringIO initializer and getvalueMartin Panter2015-10-101-1/+6
| | | | | | | | Also add to comment in the C code.
* | Issue #22883: Got rid of outdated references to PyInt and PyString in comments.Serhiy Storchaka2015-02-171-1/+1
|/
* Issue #20037: Avoid crashes when doing text I/O late at interpreter shutdown.Antoine Pitrou2013-12-211-1/+2
|
* Issue #18608: Avoid keeping a strong reference to the locale module inside ↵Antoine Pitrou2013-08-011-0/+2
| | | | the _io module.
* If MS_WIN64 is defined, MS_WINDOWS is also defined: #ifdef can be simplified.Victor Stinner2013-06-241-1/+1
|
* Fixes issue #12268: File readline, readlines and read() or readall() methodsGregory P. Smith2012-06-241-0/+5
|\ | | | | | | | | | | 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.
| * Fixes issue #12268: File readline, readlines and read() or readall() methodsGregory P. Smith2012-06-241-0/+5
| | | | | | | | | | | | 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.
| * Issue #14437: Fix building the _io module under Cygwin.Antoine Pitrou2012-03-311-1/+1
| |
* | Issue #14153 Create _Py_device_encoding() to prevent _io from having to importBrett Cannon2012-02-291-3/+2
| | | | | | | | the os module.
* | PEP 3151 / issue #12555: reworking the OS and IO exception hierarchy.Antoine Pitrou2011-10-121-9/+0
| |
* | Implement PEP 393.Martin v. Löwis2011-09-281-1/+1
| |
* | Issue #12175: BufferedReader.read(-1) now calls raw.readall() if available.Victor Stinner2011-05-251-0/+1
|/
* Issue #5506: BytesIO objects now have a getbuffer() method exporting aAntoine Pitrou2010-09-061-0/+2
| | | | | view of their contents without duplicating them. The view is both readable and writable.
* Merged revisions 76805 via svnmerge fromBenjamin Peterson2009-12-131-0/+3
| | | | | | | | | | | | | | | svn+ssh://pythondev@svn.python.org/python/trunk ........ r76805 | benjamin.peterson | 2009-12-13 13:19:07 -0600 (Sun, 13 Dec 2009) | 7 lines accept None as the same as having passed no argument in file types #7349 This is for consistency with imitation file objects like StringIO and BytesIO. This commit also adds a few tests, where they were lacking for concerned methods. ........
* Merged revisions 76502 via svnmerge fromMark Dickinson2009-11-241-1/+17
| | | | | | | | | | | svn+ssh://pythondev@svn.python.org/python/trunk ........ r76502 | mark.dickinson | 2009-11-24 20:51:48 +0000 (Tue, 24 Nov 2009) | 3 lines Issue #7228: Fix format mismatch when printing something of type off_t. (Should silence some compiler warnings.) ........
* Merged revisions 75939 via svnmerge fromMark Dickinson2009-10-291-22/+7
| | | | | | | | | | | | svn+ssh://pythondev@svn.python.org/python/trunk ........ r75939 | mark.dickinson | 2009-10-29 09:46:04 +0000 (Thu, 29 Oct 2009) | 5 lines Roll back ill-considered attempts to fix printf specifier mismatch for off_t. The sensible solution seems to be to implement %lld for PyString_FromFormat(V) and PyErr_Format. See issue #7228. ........
* Merged revisions 75909 via svnmerge fromMark Dickinson2009-10-281-1/+1
| | | | | | | | | | svn+ssh://pythondev@svn.python.org/python/trunk ........ r75909 | mark.dickinson | 2009-10-28 07:47:32 +0000 (Wed, 28 Oct 2009) | 1 line Fix format specifier for MSVC ........
* Merged revisions 75905 via svnmerge fromMark Dickinson2009-10-281-2/+2
| | | | | | | | | | svn+ssh://pythondev@svn.python.org/python/trunk ........ r75905 | mark.dickinson | 2009-10-28 07:23:49 +0000 (Wed, 28 Oct 2009) | 1 line Replace long long with PY_LONG_LONG ........
* Merged revisions 75879 via svnmerge fromMark Dickinson2009-10-271-1/+12
| | | | | | | | | | | svn+ssh://pythondev@svn.python.org/python/trunk ........ r75879 | mark.dickinson | 2009-10-27 21:48:20 +0000 (Tue, 27 Oct 2009) | 3 lines Silence gcc warnings when trying to print an off_t using "lld", on platforms where off_t has type long (e.g., 64-bit Linux). ........
* Merged revisions 75728 via svnmerge fromMark Dickinson2009-10-261-6/+10
| | | | | | | | | | | svn+ssh://pythondev@svn.python.org/python/trunk ........ r75728 | mark.dickinson | 2009-10-26 19:59:23 +0000 (Mon, 26 Oct 2009) | 3 lines Use correct conversion specifier and length modifier when printing an integer of type off_t. Also, don't assume that long long is available. ........
* move to a naming scheme with all lowercase and underscoresBenjamin Peterson2009-06-121-4/+4
|
* Issue #5006: Better handling of unicode byte-order marks (BOM) in the io ↵Antoine Pitrou2009-05-141-0/+2
| | | | | | | | library. This means, for example, that opening an UTF-16 text file in append mode doesn't add a BOM at the end of the file if the file isn't empty.
* Issue 5682: Move _io module into its own subdirectory.Alexandre Vassalotti2009-04-041-0/+150
Reviewed by: Antoine Pitrou