Hai Shi
883bc63833
bpo-40275: Use new test.support helper submodules in tests (GH-21314)
2020-07-06 11:12:49 +02:00
Steve Dower
b82e17e626
bpo-36842: Implement PEP 578 (GH-12613)
...
Adds sys.audit, sys.addaudithook, io.open_code, and associated C APIs.
2019-05-23 08:45:22 -07:00
Serhiy Storchaka
a5af6e1af7
bpo-25455: Fixed crashes in repr of recursive buffered file-like objects. ( #514 )
2017-03-19 19:25:29 +02:00
Steve Dower
eacee98679
Issue #29409 : Implement PEP 529 for io.FileIO (Patch by Eryk Sun)
2017-02-04 14:38:11 -08:00
Martin Panter
9544a365bd
Issue #28016 : Skip /dev/tty seekable() test on AIX
2016-11-14 01:58:57 +00:00
Serhiy Storchaka
b064f1e94f
Issue #20557 : Use specific asserts in io tests.
2015-08-02 15:18:28 +03:00
Serhiy Storchaka
0dcd80a6c0
Issue #20557 : Use specific asserts in io tests.
2015-08-02 15:17:49 +03:00
Serhiy Storchaka
f24131ff31
Issue #20175 : Converted the _io module to Argument Clinic.
2015-04-16 11:19:43 +03:00
Serhiy Storchaka
6a69466f61
Backported tests from issue #20175 .
2015-04-16 11:54:14 +03:00
Serhiy Storchaka
71fd224af0
Issue #21859 : Added Python implementation of io.FileIO.
2015-04-10 16:16:16 +03:00
Serhiy Storchaka
4954f9fcab
Issue #17401 : Output the closefd attribute as boolean.
2014-12-02 23:39:56 +02:00
Robert Collins
933430ab69
Issue #17401 : document closefd in io.FileIO docs and add to repr
...
closefd was documented in the open docs but not the matching FileIO
class documented. Further, closefd, part of the core state for the
object was not shown.
In review it was noted that the open docs are a little confusing about
the interaction between closefd and paths, so tweaked them at the same
time.
2014-10-18 13:32:43 +13: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
Antoine Pitrou
de68722ca0
Issue #21679 : Prevent extraneous fstat() calls during open(). Patch by Bohuslav Kabrda.
2014-06-29 20:07:28 -04: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
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
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
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
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
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
Andrew Svetlov
3438fa496d
Get rig of EnvironmentError ( #16705 )
2012-12-17 23:35:18 +02:00
Antoine Pitrou
0c7081aff4
Merge for issue #15744 : add tests for the writelines() method of file objects.
2012-10-16 23:05:01 +02:00
Antoine Pitrou
131a489903
Add tests for the writelines() method of file objects.
...
Original patch by Felipe Cruz.
2012-10-16 22:57:11 +02:00
Antoine Pitrou
7d7f40c613
Issue #15247 : FileIO now raises an error when given a file descriptor pointing to a directory.
2012-07-06 18:52:58 +02:00
Antoine Pitrou
9235b254dc
Issue #15247 : FileIO now raises an error when given a file descriptor pointing to a directory.
2012-07-06 18:48:24 +02:00
Hynek Schlawack
69168354c2
#10053 : Don't close FDs when FileIO.__init__ fails
...
Loosely based on the work by Hirokazu Yamamoto.
2012-06-21 20:58:31 +02:00
Hynek Schlawack
9ed8b4e4ca
#10053 : Don't close FDs when FileIO.__init__ fails
...
Loosely based on the work by Hirokazu Yamamoto.
2012-06-21 20:20:25 +02:00
Antoine Pitrou
7ab4af0427
Issue #13848 : open() and the FileIO constructor now check for NUL characters in the file name.
...
Patch by Hynek Schlawack.
2012-01-29 18:43:36 +01:00
Antoine Pitrou
1334884ff2
Issue #13848 : open() and the FileIO constructor now check for NUL characters in the file name.
...
Patch by Hynek Schlawack.
2012-01-29 18:36:34 +01:00
Eli Bendersky
74c503b40d
use io.SEEK_* constants instead of os.SEEK_* where an IO stream is seeked, leaving the os.SEEK_* constants only for os.lseek, as documented
2012-01-03 06:26:13 +02:00
Ezio Melotti
b3aedd4862
#9424 : Replace deprecated assert* methods in the Python test suite.
2010-11-20 19:04:17 +00:00
Brian Curtin
3ddcaafbbf
Fix ResourceWarning about unclosed file
2010-10-30 23:56:45 +00:00
Antoine Pitrou
8d2b51b46a
Issue #10253 : FileIO leaks a file descriptor when trying to open a file
...
for append that isn't seekable. Patch by Brian Brazil.
2010-10-30 16:19:14 +00:00
Antoine Pitrou
0049249d63
Issue #8734 : Avoid crash in msvcrt.get_osfhandle() when an invalid file
...
descriptor is provided. Patch by Pascal Chambon.
2010-09-04 20:53:29 +00:00
Ezio Melotti
7fb4da7650
Merged revisions 79024 via svnmerge from
...
svn+ssh://pythondev@svn.python.org/python/trunk
........
r79024 | ezio.melotti | 2010-03-17 16:22:34 +0200 (Wed, 17 Mar 2010) | 1 line
Use "x in y" instead of y.find(x) != -1.
........
2010-03-18 12:29:13 +00:00
Georg Brandl
1b37e8728c
Merged revisions 78093 via svnmerge from
...
svn+ssh://pythondev@svn.python.org/python/trunk
........
r78093 | georg.brandl | 2010-02-07 18:03:15 +0100 (So, 07 Feb 2010) | 1 line
Remove unused imports in test modules.
........
2010-03-14 10:45:50 +00:00
Florent Xicluna
b14930cd93
Only the parts which are relevant for 3.x branch.
...
Merged revisions 78757-78758,78769,78815 via svnmerge from
svn+ssh://pythondev@svn.python.org/python/trunk
........
r78757 | florent.xicluna | 2010-03-07 13:14:25 +0100 (dim, 07 mar 2010) | 2 lines
Fix some py3k warnings in the standard library.
........
r78758 | florent.xicluna | 2010-03-07 13:18:33 +0100 (dim, 07 mar 2010) | 4 lines
Issue #7849 : Now the utility ``check_warnings`` verifies if the warnings are
effectively raised. A new utility ``check_py3k_warnings`` deals with py3k warnings.
........
r78769 | florent.xicluna | 2010-03-07 20:14:12 +0100 (dim, 07 mar 2010) | 2 lines
Refresh the documentation for the test.test_support module.
........
r78815 | florent.xicluna | 2010-03-09 20:57:01 +0100 (mar, 09 mar 2010) | 2 lines
#7772 : Fix test_py3kwarn. Now the test suite could pass with "-3" flag.
........
2010-03-13 15:26:44 +00:00
Antoine Pitrou
905a2ffe3e
Merged revisions 77890 via svnmerge from
...
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.
........
2010-01-31 22:47:27 +00:00
Benjamin Peterson
255058fae3
don't accept bytes in FileIO.write #7785
2010-01-27 01:47:14 +00:00
Benjamin Peterson
bf5ff76597
Merged revisions 76805 via svnmerge from
...
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.
........
2009-12-13 19:25:34 +00:00
Antoine Pitrou
6103ab1d0b
Remove AtheOS support, as per PEP 11 (which claims that all code was removed in Python 3.0).
2009-10-24 20:11:21 +00:00
Benjamin Peterson
c9c0f201fe
convert old fail* assertions to assert*
2009-06-30 23:06:06 +00:00
Antoine Pitrou
716c444edc
Issue #5761 : Add the name of the underlying file to the repr() of various IO objects.
2009-05-23 19:04:03 +00:00
Antoine Pitrou
d7b3046289
Merged revisions 72859 via svnmerge from
...
svn+ssh://pythondev@svn.python.org/python/trunk
........
r72859 | antoine.pitrou | 2009-05-23 18:32:32 +0200 (sam., 23 mai 2009) | 3 lines
Issue #3877 : skip a test_fileio subtest on all BSDs, not only FreeBSD
........
2009-05-23 16:34:50 +00:00
Kristján Valur Jónsson
a8abe86331
http://bugs.python.org/issue5544
...
Guard _fileio.c against other malicious os.close(f.fileno()) attempts.
Add tests to test_fileio.py to verify behaviour.
2009-03-24 15:27:42 +00:00
Antoine Pitrou
0ae29cf617
The error detection code in FileIO.close() could fail to reflect the `errno` value, and report it as -1 instead.
2009-03-13 22:33:17 +00:00