<feed xmlns='http://www.w3.org/2005/Atom'>
<title>python.git/Lib/test/test_io.py, branch 3.8</title>
<subtitle>Unnamed repository; edit this file 'description' to name the repository.</subtitle>
<id>http://dangofactory.net/cgit/cgit.cgi/Server/python.git/atom/Lib/test/test_io.py?h=3.8</id>
<link rel='self' href='http://dangofactory.net/cgit/cgit.cgi/Server/python.git/atom/Lib/test/test_io.py?h=3.8'/>
<link rel='alternate' type='text/html' href='http://dangofactory.net/cgit/cgit.cgi/Server/python.git/'/>
<updated>2021-02-22T01:38:17Z</updated>
<entry>
<title>bpo-43260: io: Prevent large data remains in textio buffer. (GH-24592)</title>
<updated>2021-02-22T01:38:17Z</updated>
<author>
<name>Inada Naoki</name>
<email>songofacandy@gmail.com</email>
</author>
<published>2021-02-22T01:38:17Z</published>
<link rel='alternate' type='text/html' href='http://dangofactory.net/cgit/cgit.cgi/Server/python.git/commit/?id=6e2f144f53982d7103d4cfc2d9361fc445a1817e'/>
<id>urn:sha1:6e2f144f53982d7103d4cfc2d9361fc445a1817e</id>
<content type='text'>
When very large data remains in TextIOWrapper, flush() may fail forever.

So prevent that data larger than chunk_size is remained in TextIOWrapper internal
buffer.

Co-Authored-By: Eryk Sun.
(cherry picked from commit 01806d5beba3d208bb56adba6829097d803bf54f)</content>
</entry>
<entry>
<title>bpo-41401: Fix test_fspath_support in test_io. (GH-21640) (GH-22133) (GH-22135)</title>
<updated>2020-09-07T15:27:03Z</updated>
<author>
<name>Victor Stinner</name>
<email>vstinner@python.org</email>
</author>
<published>2020-09-07T15:27:03Z</published>
<link rel='alternate' type='text/html' href='http://dangofactory.net/cgit/cgit.cgi/Server/python.git/commit/?id=84105cbaa395923e3584a87d67ccce72c8420bb4'/>
<id>urn:sha1:84105cbaa395923e3584a87d67ccce72c8420bb4</id>
<content type='text'>
The error is exposed on non-UTF-8 locales.

(cherry picked from commit 67987acd5dc9776f55f4e139e2b3d9e7a6434d9f)

Co-authored-by: Serhiy Storchaka &lt;storchaka@gmail.com&gt;
(cherry picked from commit c73ee5acc96b4bbd6885156883b224b8cc3e470c)</content>
</entry>
<entry>
<title>closes bpo-39510: Fix use-after-free in BufferedReader.readinto() (GH-18295)</title>
<updated>2020-02-04T21:41:55Z</updated>
<author>
<name>Miss Islington (bot)</name>
<email>31488909+miss-islington@users.noreply.github.com</email>
</author>
<published>2020-02-04T21:41:55Z</published>
<link rel='alternate' type='text/html' href='http://dangofactory.net/cgit/cgit.cgi/Server/python.git/commit/?id=30e769382dfb67a68fe8e6bfe8509addb4aa9514'/>
<id>urn:sha1:30e769382dfb67a68fe8e6bfe8509addb4aa9514</id>
<content type='text'>
When called on a closed object, readinto() segfaults on account
of a write to a freed buffer:

    ==220553== Process terminating with default action of signal 11 (SIGSEGV): dumping core
    ==220553==  Access not within mapped region at address 0x2A
    ==220553==    at 0x48408A0: memmove (vg_replace_strmem.c:1272)
    ==220553==    by 0x58DB0C: _buffered_readinto_generic (bufferedio.c:972)
    ==220553==    by 0x58DCBA: _io__Buffered_readinto_impl (bufferedio.c:1053)
    ==220553==    by 0x58DCBA: _io__Buffered_readinto (bufferedio.c.h:253)

Reproducer:

    reader = open ("/dev/zero", "rb")
    _void  = reader.read (42)
    reader.close ()
    reader.readinto (bytearray (42)) GH-GH-GH- BANG!

The problem exists since 2012 when commit dc469454ec added code
to free the read buffer on close().

Signed-off-by: Philipp Gesang &lt;philipp.gesang@intra2net.com&gt;
(cherry picked from commit cb1c0746f277052e45a60d6c436a765e34722821)

Co-authored-by: Philipp Gesang &lt;phg@phi-gamma.net&gt;</content>
</entry>
<entry>
<title>[3.8] closes bpo-27805: Ignore ESPIPE in initializing seek of append-mode files. (GH-17136)</title>
<updated>2019-11-12T23:54:19Z</updated>
<author>
<name>Benjamin Peterson</name>
<email>benjamin@python.org</email>
</author>
<published>2019-11-12T23:54:19Z</published>
<link rel='alternate' type='text/html' href='http://dangofactory.net/cgit/cgit.cgi/Server/python.git/commit/?id=9788f97bf69230ec6b38a483c90e88828eba9a1b'/>
<id>urn:sha1:9788f97bf69230ec6b38a483c90e88828eba9a1b</id>
<content type='text'>
This change, which follows the behavior of C stdio's fdopen and Python 2's file object, allows pipes to be opened in append mode..
(cherry picked from commit 74fa9f723f700a342e582b5ad4b51a2c4801cd1c)</content>
</entry>
<entry>
<title>bpo-37261: Document sys.unraisablehook corner cases (GH-14059)</title>
<updated>2019-06-14T16:59:54Z</updated>
<author>
<name>Miss Islington (bot)</name>
<email>31488909+miss-islington@users.noreply.github.com</email>
</author>
<published>2019-06-14T16:59:54Z</published>
<link rel='alternate' type='text/html' href='http://dangofactory.net/cgit/cgit.cgi/Server/python.git/commit/?id=3b976d19c8c09e83eec63a5b62daf4d55bfd6aeb'/>
<id>urn:sha1:3b976d19c8c09e83eec63a5b62daf4d55bfd6aeb</id>
<content type='text'>
Document reference cycle and resurrected objects issues in
sys.unraisablehook() and threading.excepthook() documentation.

Fix test.support.catch_unraisable_exception(): __exit__() no longer
ignores unraisable exceptions.

Fix test_io test_writer_close_error_on_close(): use a second
catch_unraisable_exception() to catch the BufferedWriter unraisable
exception.
(cherry picked from commit 212646cae6b7c4ddc8d98c8b9b6d39a5f259e864)

Co-authored-by: Victor Stinner &lt;vstinner@redhat.com&gt;</content>
</entry>
<entry>
<title>bpo-37223: test_io: silence destructor errors (GH-14031)</title>
<updated>2019-06-12T22:23:49Z</updated>
<author>
<name>Victor Stinner</name>
<email>vstinner@redhat.com</email>
</author>
<published>2019-06-12T22:23:49Z</published>
<link rel='alternate' type='text/html' href='http://dangofactory.net/cgit/cgit.cgi/Server/python.git/commit/?id=c15a682603a47f5aef5025f6a2e3babb699273d6'/>
<id>urn:sha1:c15a682603a47f5aef5025f6a2e3babb699273d6</id>
<content type='text'>
* bpo-18748: Fix _pyio.IOBase destructor (closed case) (GH-13952)

_pyio.IOBase destructor now does nothing if getting the closed
attribute fails to better mimick _io.IOBase finalizer.

(cherry picked from commit 4f6f7c5a611905fb6b81671547f268c226bc646a)

* bpo-37223: test_io: silence destructor errors (GH-13954)

Implement also MockNonBlockWriterIO.seek() method.

(cherry picked from commit b589cef9c4dada2fb84ce0fae5040ecf16d9d5ef)

* bpo-37223, test_io: silence last 'Exception ignored in:' (GH-14029)

Use catch_unraisable_exception() to ignore 'Exception ignored in:'
error when the internal BufferedWriter of the BufferedRWPair is
destroyed. The C implementation doesn't give access to the
internal BufferedWriter, so just ignore the warning instead.

(cherry picked from commit 913fa1c8245d1cde6edb4254f4fb965cc91786ef)</content>
</entry>
<entry>
<title>bpo-36829: Document test.support.catch_unraisable_exception() (GH-13554)</title>
<updated>2019-05-24T22:09:38Z</updated>
<author>
<name>Victor Stinner</name>
<email>vstinner@redhat.com</email>
</author>
<published>2019-05-24T22:09:38Z</published>
<link rel='alternate' type='text/html' href='http://dangofactory.net/cgit/cgit.cgi/Server/python.git/commit/?id=6dbbe748e101a173b4cff8aada41e9313e287e0f'/>
<id>urn:sha1:6dbbe748e101a173b4cff8aada41e9313e287e0f</id>
<content type='text'>
catch_unraisable_exception() now also removes its 'unraisable'
attribute at the context manager exit.</content>
</entry>
<entry>
<title>bpo-36842: Implement PEP 578 (GH-12613)</title>
<updated>2019-05-23T15:45:22Z</updated>
<author>
<name>Steve Dower</name>
<email>steve.dower@microsoft.com</email>
</author>
<published>2019-05-23T15:45:22Z</published>
<link rel='alternate' type='text/html' href='http://dangofactory.net/cgit/cgit.cgi/Server/python.git/commit/?id=b82e17e626f7b1cd98aada0b1ebb65cb9f8fb184'/>
<id>urn:sha1:b82e17e626f7b1cd98aada0b1ebb65cb9f8fb184</id>
<content type='text'>
Adds sys.audit, sys.addaudithook, io.open_code, and associated C APIs.</content>
</entry>
<entry>
<title>bpo-18748: _pyio.IOBase emits unraisable exception (GH-13512)</title>
<updated>2019-05-23T01:45:09Z</updated>
<author>
<name>Victor Stinner</name>
<email>vstinner@redhat.com</email>
</author>
<published>2019-05-23T01:45:09Z</published>
<link rel='alternate' type='text/html' href='http://dangofactory.net/cgit/cgit.cgi/Server/python.git/commit/?id=bc2aa816620c5e02ad8e94d8514b7e8f3f551ca1'/>
<id>urn:sha1:bc2aa816620c5e02ad8e94d8514b7e8f3f551ca1</id>
<content type='text'>
In development (-X dev) mode and in a debug build, IOBase finalizer
of the _pyio module now logs the exception if the close() method
fails. The exception is ignored silently by default in release build.

test_io: test_error_through_destructor() now uses
support.catch_unraisable_exception() rather than capturing stderr.</content>
</entry>
<entry>
<title>bpo-36929: Modify io/re tests to allow for missing mod name (#13392)</title>
<updated>2019-05-21T17:09:21Z</updated>
<author>
<name>Max Bernstein</name>
<email>tekknolagi@users.noreply.github.com</email>
</author>
<published>2019-05-21T17:09:21Z</published>
<link rel='alternate' type='text/html' href='http://dangofactory.net/cgit/cgit.cgi/Server/python.git/commit/?id=ccb7ca728e09b307f9e9fd36ec40353137e68a3b'/>
<id>urn:sha1:ccb7ca728e09b307f9e9fd36ec40353137e68a3b</id>
<content type='text'>
* bpo-36929: Modify io/re tests to allow for missing mod name

For a vanishingly small number of internal types, CPython sets the
tp_name slot to mod_name.type_name, either in the PyTypeObject or the
PyType_Spec. There are a few minor places where this surfaces:

* Custom repr functions for those types (some of which ignore the
  tp_name in favor of using a string literal, such as _io.TextIOWrapper)
* Pickling error messages

The test suite only tests the former. This commit modifies the test
suite to allow Python implementations to omit the module prefix.

https://bugs.python.org/issue36929

</content>
</entry>
</feed>
