summaryrefslogtreecommitdiff
path: root/Modules/_io/textio.c
Commit message (Collapse)AuthorAgeFilesLines
...
* | | merge 3.3 (#16597)Benjamin Peterson2012-12-201-4/+20
|\ \ \ | |/ /
| * | call close on the underlying stream even if flush raises (closes #16597)Benjamin Peterson2012-12-201-4/+20
| | | | | | | | | | | | Patch by Serhiy Storchaka.
* | | Issue #16166: Add PY_LITTLE_ENDIAN and PY_BIG_ENDIAN macros and unifiedChristian Heimes2012-10-171-12/+6
|/ / | | | | | | endianess detection and handling.
* | #15796: merge with 3.2.Ezio Melotti2012-09-181-1/+1
|\ \ | |/
| * #15796: Fix \n in readline docstring. Patch by Serhiy Storchaka.Ezio Melotti2012-09-181-1/+1
| |
* | Issue #15604: Update uses of PyObject_IsTrue() to check for and handle ↵Antoine Pitrou2012-08-151-1/+4
|\ \ | |/ | | | | | | | | errors correctly. Patch by Serhiy Storchaka.
| * Issue #15604: Update uses of PyObject_IsTrue() to check for and handle ↵Antoine Pitrou2012-08-151-1/+4
| | | | | | | | | | | | errors correctly. Patch by Serhiy Storchaka.
* | (Merge 3.2) open() / TextIOWrapper doc: make it explicit than newline='\n'Victor Stinner2012-08-041-3/+3
|\ \ | |/ | | | | doesn't translate newlines on output.
| * open() / TextIOWrapper doc: make it explicit than newline='\n' doesn'tVictor Stinner2012-08-041-3/+3
| | | | | | | | translate newlines on output.
* | Make TextIOWrapper's documentation clearer by copying the newline argument's ↵Antoine Pitrou2012-08-041-9/+16
|\ \ | |/ | | | | description from open().
| * Make TextIOWrapper's documentation clearer by copying the newline argument's ↵Antoine Pitrou2012-08-041-9/+16
| | | | | | | | description from open().
* | Fixes issue #12268: File readline, readlines and read() or readall() methodsGregory P. Smith2012-06-241-2/+14
|\ \ | |/ | | | | | | | | 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-231-2/+14
| | | | | | | | | | | | 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.
* | Close #11022: TextIOWrapper doesn't call locale.setlocale() anymoreVictor Stinner2012-06-051-2/+2
| | | | | | | | | | | | | | | | | | | | 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.
* | Don't Py_DECREF NULL variable in io.IncrementalNewlineDecoder.Ross Lagerwall2012-04-071-1/+1
| | | | | | | | Found with Clang's Static Analyzer.
* | Issue #14153 Create _Py_device_encoding() to prevent _io from having to importBrett Cannon2012-02-291-4/+7
| | | | | | | | the os module.
* | Merge 3.2Éric Araujo2012-02-261-1/+1
|\ \ | |/
| * Fix typo in “seperat{or,ion}”Éric Araujo2012-02-261-1/+1
| |
* | Fix compiler warningsVictor Stinner2011-11-221-1/+1
| |
* | Fix misuse of PyUnicode_GET_SIZE() => PyUnicode_GET_LENGTH()Victor Stinner2011-11-211-2/+2
| | | | | | | | And PyUnicode_GetSize() => PyUnicode_GetLength()
* | Issue #13393: In TextIOWrapper.read(n), try to read `n` characters asAntoine Pitrou2011-11-191-5/+9
| | | | | | | | once rather than limit ourselves to the default chunk size.
* | Restore performance of special casings for utf-16 and utf-32 in TextIOWrapperAntoine Pitrou2011-11-131-18/+12
| |
* | In text I/O, optimize scanning for new lines with 1-byte unicode charsAntoine Pitrou2011-11-131-12/+20
| |
* | Fix memory leak in io.StringIOAntoine Pitrou2011-11-121-0/+1
| |
* | Replace {Get,Set,Has}AttrString with *AttrId.Martin v. Löwis2011-10-141-6/+10
| |
* | Rename _Py_identifier to _Py_IDENTIFIER.Martin v. Löwis2011-10-141-17/+17
| |
* | Add API for static strings, primarily good for identifiers.Martin v. Löwis2011-10-091-43/+60
| | | | | | | | Thanks to Konrad Schöbel and Jasper Schulz for helping with the mass-editing.
* | Change PyUnicode_KIND to 1,2,4. Drop _KIND_SIZE and _CHARACTER_SIZE.Martin v. Löwis2011-10-071-24/+20
| |
* | _io.textio: fix character type, use Py_UCS4 instead of Py_UNICODEVictor Stinner2011-09-291-3/+3
| |
* | Implement PEP 393.Martin v. Löwis2011-09-281-182/+170
| |
* | Issue #12591: Allow io.TextIOWrapper to work with raw IO objects (withoutAntoine Pitrou2011-07-231-6/+14
|\ \ | |/ | | | | | | a read1() method), and add a *write_through* parameter to mandate unbuffered writes.
| * Issue #12591: Allow io.TextIOWrapper to work with raw IO objects (withoutAntoine Pitrou2011-07-231-6/+14
| | | | | | | | | | a read1() method), and add an undocumented *write_through* parameter to mandate unbuffered writes.
* | Raise ValueError when attempting to set the _CHUNK_SIZE attribute of a ↵Antoine Pitrou2011-07-131-1/+1
|\ \ | |/ | | | | TextIOWrapper to a huge value, not TypeError.
| * Raise ValueError when attempting to set the _CHUNK_SIZE attribute of a ↵Antoine Pitrou2011-07-131-1/+1
| | | | | | | | TextIOWrapper to a huge value, not TypeError.
* | Fast path for IncrementalNewlineDecoder.decode() in io.TextIOWrapper.read(-1)Victor Stinner2011-05-251-2/+7
| | | | | | | | Copy/paste code from textiowrapper_read_chunk().
* | Issue #11114: Fix catastrophic performance of tell() on text files (upAntoine Pitrou2011-02-251-39/+96
|/ | | | | to 1000x faster in some cases). It is still one to two order of magnitudes slower than binary tell().
* Issue #10872: The repr() of TextIOWrapper objects now includes the modeAntoine Pitrou2011-01-091-7/+34
| | | | | | if available. (at Georg's request)
* Issue #10180: Pickling file objects is now explicitly forbidden, sinceAntoine Pitrou2010-11-051-0/+9
| | | | unpickling them produced nonsensical results.
* Issue #10093: ResourceWarnings are now issued when files and sockets areAntoine Pitrou2010-10-291-0/+9
| | | | | deallocated without explicit closing. These warnings are silenced by default, except in pydebug mode.
* Issue #9293: I/O streams now raise `io.UnsupportedOperation` when anAntoine Pitrou2010-09-051-17/+9
| | | | | unsupported operation is attempted (for example, writing to a file open only for reading).
* Issue #6697: Check that _PyUnicode_AsString() result is not NULL in textio.cVictor Stinner2010-05-191-2/+7
| | | | | The bug may occurs if locale.getpreferredencoding() returns an encoding with a surrogate (very unlikely!).
* Merged revisions 80720 via svnmerge fromAntoine Pitrou2010-05-031-7/+21
| | | | | | | | | | | | 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. ........
* Merged revisions 77890 via svnmerge fromAntoine Pitrou2010-01-311-9/+1
| | | | | | | | | | | | | svn+ssh://pythondev@svn.python.org/python/trunk ........ r77890 | antoine.pitrou | 2010-01-31 23:26:04 +0100 (dim., 31 janv. 2010) | 7 lines - Issue #6939: Fix file I/O objects in the `io` module to keep the original file position when calling `truncate()`. It would previously change the file position to the given argument, which goes against the tradition of ftruncate() and other truncation APIs. Patch by Pascal Chambon. ........
* Merged revisions 76805 via svnmerge fromBenjamin Peterson2009-12-131-1/+1
| | | | | | | | | | | | | | | 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 75007 via svnmerge fromAntoine Pitrou2009-09-211-3/+3
| | | | | | | | | | | | | | svn+ssh://pythondev@svn.python.org/python/trunk ........ r75007 | antoine.pitrou | 2009-09-21 23:17:48 +0200 (lun., 21 sept. 2009) | 7 lines Issue #6236, #6348: Fix various failures in the io module under AIX and other platforms, when using a non-gcc compiler. Patch by egreen. In addition, I made explicit the signedness of all bitfields in the IO library. ........
* Merged revisions 74581 via svnmerge fromAmaury Forgeot d'Arc2009-08-291-4/+9
| | | | | | | | | | | svn+ssh://pythondev@svn.python.org/python/trunk ........ r74581 | amaury.forgeotdarc | 2009-08-29 20:14:40 +0200 (sam., 29 août 2009) | 3 lines #6750: TextIOWrapped could duplicate output when several threads write to it. this affect text files opened with io.open(), and the print() function of py3k ........
* move to a naming scheme with all lowercase and underscoresBenjamin Peterson2009-06-121-172/+169
|
* stop throwing out all errors when PyObject_GetAttr failsBenjamin Peterson2009-06-061-6/+19
|
* give the C implementation of TextIOWrapper the errors property #6217Benjamin Peterson2009-06-061-0/+21
|
* Issue #5761: Add the name of the underlying file to the repr() of various IO ↵Antoine Pitrou2009-05-231-2/+19
| | | | objects.