<feed xmlns='http://www.w3.org/2005/Atom'>
<title>delta/cpython-git.git/Lib/_pyio.py, branch 3.7</title>
<subtitle>github.com: python/cpython.git
</subtitle>
<link rel='alternate' type='text/html' href='http://91.123.203.49/cgit/delta/cpython-git.git/'/>
<entry>
<title>[3.7] closes bpo-27805: Ignore ESPIPE in initializing seek of append-mode files. (GH-17137)</title>
<updated>2019-11-12T23:34:43+00:00</updated>
<author>
<name>Benjamin Peterson</name>
<email>benjamin@python.org</email>
</author>
<published>2019-11-12T23:34:43+00:00</published>
<link rel='alternate' type='text/html' href='http://91.123.203.49/cgit/delta/cpython-git.git/commit/?id=b8b3e4377ec38c7d64570afabbd0923a51f0666c'/>
<id>b8b3e4377ec38c7d64570afabbd0923a51f0666c</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>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
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)</pre>
</div>
</content>
</entry>
<entry>
<title>bpo-37054, _pyio: Fix BytesIO and TextIOWrapper __del__() (GH-13601)</title>
<updated>2019-05-28T00:05:49+00:00</updated>
<author>
<name>Miss Islington (bot)</name>
<email>31488909+miss-islington@users.noreply.github.com</email>
</author>
<published>2019-05-28T00:05:49+00:00</published>
<link rel='alternate' type='text/html' href='http://91.123.203.49/cgit/delta/cpython-git.git/commit/?id=0f352d44e7c14c1c93e3999402c85512b9d5a6ca'/>
<id>0f352d44e7c14c1c93e3999402c85512b9d5a6ca</id>
<content type='text'>
Fix destructor _pyio.BytesIO and _pyio.TextIOWrapper: initialize
their _buffer attribute as soon as possible (in the class body),
because it's used by __del__() which calls close().
(cherry picked from commit a3568417c49f36860393075b21c93996a5f6799b)

Co-authored-by: Victor Stinner &lt;vstinner@redhat.com&gt;</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Fix destructor _pyio.BytesIO and _pyio.TextIOWrapper: initialize
their _buffer attribute as soon as possible (in the class body),
because it's used by __del__() which calls close().
(cherry picked from commit a3568417c49f36860393075b21c93996a5f6799b)

Co-authored-by: Victor Stinner &lt;vstinner@redhat.com&gt;</pre>
</div>
</content>
</entry>
<entry>
<title>bpo-36523: Add docstring to io.IOBase.writelines (GH-12683)</title>
<updated>2019-04-22T12:08:24+00:00</updated>
<author>
<name>Marcin Niemira</name>
<email>marcin.niemira@gmail.com</email>
</author>
<published>2019-04-22T12:08:24+00:00</published>
<link rel='alternate' type='text/html' href='http://91.123.203.49/cgit/delta/cpython-git.git/commit/?id=1100ae8f3fb1d5a8f6f5638919196bd8fab66de9'/>
<id>1100ae8f3fb1d5a8f6f5638919196bd8fab66de9</id>
<content type='text'>
(cherry picked from commit ab86521a9d9999731e39bd9056420bb7774fd144)</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
(cherry picked from commit ab86521a9d9999731e39bd9056420bb7774fd144)</pre>
</div>
</content>
</entry>
<entry>
<title>closes bpo-35848: Move all documentation regarding the readinto out of IOBase. (GH-11893)</title>
<updated>2019-04-09T04:57:31+00:00</updated>
<author>
<name>Miss Islington (bot)</name>
<email>31488909+miss-islington@users.noreply.github.com</email>
</author>
<published>2019-04-09T04:57:31+00:00</published>
<link rel='alternate' type='text/html' href='http://91.123.203.49/cgit/delta/cpython-git.git/commit/?id=0a16bb15afec28f355bc28203b6b10610293f026'/>
<id>0a16bb15afec28f355bc28203b6b10610293f026</id>
<content type='text'>
Move all documentation regarding the readinto method into either io.RawIOBase or io.BufferedIOBase.

Corresponding changes to documentation in the _pyio.py module.
(cherry picked from commit 7b97ab35b28b761ab1253df427ee674b1a90f465)

Co-authored-by: Steve Palmer &lt;steve@srpalmer.me.uk&gt;</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Move all documentation regarding the readinto method into either io.RawIOBase or io.BufferedIOBase.

Corresponding changes to documentation in the _pyio.py module.
(cherry picked from commit 7b97ab35b28b761ab1253df427ee674b1a90f465)

Co-authored-by: Steve Palmer &lt;steve@srpalmer.me.uk&gt;</pre>
</div>
</content>
</entry>
<entry>
<title>bpo-25862: Fix assertion failures in io.TextIOWrapper.tell(). (GH-3918)</title>
<updated>2018-06-29T10:34:34+00:00</updated>
<author>
<name>Miss Islington (bot)</name>
<email>31488909+miss-islington@users.noreply.github.com</email>
</author>
<published>2018-06-29T10:34:34+00:00</published>
<link rel='alternate' type='text/html' href='http://91.123.203.49/cgit/delta/cpython-git.git/commit/?id=eabebbb54c2604fd8d08e8019ea1be634aed8c2f'/>
<id>eabebbb54c2604fd8d08e8019ea1be634aed8c2f</id>
<content type='text'>
(cherry picked from commit 23db935bcf258657682e66464bf8512def8af830)

Co-authored-by: Zackery Spytz &lt;zspytz@gmail.com&gt;</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
(cherry picked from commit 23db935bcf258657682e66464bf8512def8af830)

Co-authored-by: Zackery Spytz &lt;zspytz@gmail.com&gt;</pre>
</div>
</content>
</entry>
<entry>
<title>bpo-15216: io: TextIOWrapper.reconfigure() accepts encoding, errors and newline (GH-2343)</title>
<updated>2017-12-21T00:59:53+00:00</updated>
<author>
<name>INADA Naoki</name>
<email>methane@users.noreply.github.com</email>
</author>
<published>2017-12-21T00:59:53+00:00</published>
<link rel='alternate' type='text/html' href='http://91.123.203.49/cgit/delta/cpython-git.git/commit/?id=507434fd504f3ebc1da72aa77544edc0d73f136e'/>
<id>507434fd504f3ebc1da72aa77544edc0d73f136e</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
<entry>
<title>bpo-17852: Revert incorrect fix based on misunderstanding of _Py_PyAtExit() semantics (#4826)</title>
<updated>2017-12-13T00:39:26+00:00</updated>
<author>
<name>Antoine Pitrou</name>
<email>pitrou@free.fr</email>
</author>
<published>2017-12-13T00:39:26+00:00</published>
<link rel='alternate' type='text/html' href='http://91.123.203.49/cgit/delta/cpython-git.git/commit/?id=317def9fdb29893df1ab380d396fcdd2eafe0588'/>
<id>317def9fdb29893df1ab380d396fcdd2eafe0588</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
<entry>
<title>bpo-31976: Fix race condition when flushing a file is slow. (#4331)</title>
<updated>2017-11-10T21:03:40+00:00</updated>
<author>
<name>benfogle</name>
<email>benfogle@gmail.com</email>
</author>
<published>2017-11-10T21:03:40+00:00</published>
<link rel='alternate' type='text/html' href='http://91.123.203.49/cgit/delta/cpython-git.git/commit/?id=9703f092abc0259926d88c7855afeae4a78afc7d'/>
<id>9703f092abc0259926d88c7855afeae4a78afc7d</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
<entry>
<title>bpo-17852: Maintain a list of BufferedWriter objects.  Flush them on exit. (#3372)</title>
<updated>2017-09-22T17:17:30+00:00</updated>
<author>
<name>Neil Schemenauer</name>
<email>nas-github@arctrix.com</email>
</author>
<published>2017-09-22T17:17:30+00:00</published>
<link rel='alternate' type='text/html' href='http://91.123.203.49/cgit/delta/cpython-git.git/commit/?id=0a1ff24acfc15d8c7f2dc41000a6f3d9a31e7480'/>
<id>0a1ff24acfc15d8c7f2dc41000a6f3d9a31e7480</id>
<content type='text'>
* 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-&gt;ok
and buf-&gt;finalizing before actually doing the flush.  Also,
increase the refcnt to ensure the object does not disappear.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
* 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-&gt;ok
and buf-&gt;finalizing before actually doing the flush.  Also,
increase the refcnt to ensure the object does not disappear.
</pre>
</div>
</content>
</entry>
<entry>
<title>bpo-31370: Remove support for threads-less builds (#3385)</title>
<updated>2017-09-07T16:56:24+00:00</updated>
<author>
<name>Antoine Pitrou</name>
<email>pitrou@free.fr</email>
</author>
<published>2017-09-07T16:56:24+00:00</published>
<link rel='alternate' type='text/html' href='http://91.123.203.49/cgit/delta/cpython-git.git/commit/?id=a6a4dc816d68df04a7d592e0b6af8c7ecc4d4344'/>
<id>a6a4dc816d68df04a7d592e0b6af8c7ecc4d4344</id>
<content type='text'>
* Remove Setup.config
* Always define WITH_THREAD for compatibility.

</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
* Remove Setup.config
* Always define WITH_THREAD for compatibility.

</pre>
</div>
</content>
</entry>
</feed>
