<feed xmlns='http://www.w3.org/2005/Atom'>
<title>delta/cpython-git.git/Python/_warnings.c, branch v3.6.7</title>
<subtitle>github.com: python/cpython.git
</subtitle>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/cpython-git.git/'/>
<entry>
<title>[3.6] bpo-32591: fix abort in _PyErr_WarnUnawaitedCoroutine during shutdown (GH-5337) (#6536)</title>
<updated>2018-05-31T10:20:46+00:00</updated>
<author>
<name>T. Wouters</name>
<email>thomas@python.org</email>
</author>
<published>2018-05-31T10:20:46+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/cpython-git.git/commit/?id=500a419a7a68c32650717b213f0f5ab0461bb16b'/>
<id>500a419a7a68c32650717b213f0f5ab0461bb16b</id>
<content type='text'>
When an unawaited coroutine is collected very late in shutdown --
like, during the final GC at the end of PyImport_Cleanup -- then it
was triggering an interpreter abort, because we'd try to look up the
"warnings" module and not only was it missing (we were prepared for
that), but the entire module system was missing (which we were not
prepared for).

I've tried to fix this at the source, by making the utility function
get_warnings_attr robust against this in general. Note that it already
has the convention that it can return NULL without setting an error,
which is how it signals that the attribute it was asked to fetch is
missing, and that all callers already check for NULL returns.

There's a similar check for being late in shutdown at the top of
warn_explicit, which might be unnecessary after this fix, but I'm not
sure so I'm going to leave it..
(cherry picked from commit dba976b8a28d6e5daa66ef31a6a7c694a9193f6a)

Co-authored-by: Nathaniel J. Smith &lt;njs@pobox.com&gt;</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
When an unawaited coroutine is collected very late in shutdown --
like, during the final GC at the end of PyImport_Cleanup -- then it
was triggering an interpreter abort, because we'd try to look up the
"warnings" module and not only was it missing (we were prepared for
that), but the entire module system was missing (which we were not
prepared for).

I've tried to fix this at the source, by making the utility function
get_warnings_attr robust against this in general. Note that it already
has the convention that it can return NULL without setting an error,
which is how it signals that the attribute it was asked to fetch is
missing, and that all callers already check for NULL returns.

There's a similar check for being late in shutdown at the top of
warn_explicit, which might be unnecessary after this fix, but I'm not
sure so I'm going to leave it..
(cherry picked from commit dba976b8a28d6e5daa66ef31a6a7c694a9193f6a)

Co-authored-by: Nathaniel J. Smith &lt;njs@pobox.com&gt;</pre>
</div>
</content>
</entry>
<entry>
<title>[3.6] bpo-31285: Remove splitlines identifier from Python/_warnings.c (GH-3803) (#3829)</title>
<updated>2017-09-29T19:26:45+00:00</updated>
<author>
<name>Miss Islington (bot)</name>
<email>31488909+miss-islington@users.noreply.github.com</email>
</author>
<published>2017-09-29T19:26:45+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/cpython-git.git/commit/?id=66c2b9f13ef2197a5212fd58372173124df76467'/>
<id>66c2b9f13ef2197a5212fd58372173124df76467</id>
<content type='text'>
(forgot to remove it in GH-3219)
(cherry picked from commit 8b4ff53c440dfcde40fbeb02c5e666c85190528f)</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
(forgot to remove it in GH-3219)
(cherry picked from commit 8b4ff53c440dfcde40fbeb02c5e666c85190528f)</pre>
</div>
</content>
</entry>
<entry>
<title>[3.6] bpo-31285: Fix an assertion failure and a SystemError in warnings.warn_explicit. (GH-3219) (#3775)</title>
<updated>2017-09-27T04:38:03+00:00</updated>
<author>
<name>Serhiy Storchaka</name>
<email>storchaka@gmail.com</email>
</author>
<published>2017-09-27T04:38:03+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/cpython-git.git/commit/?id=90fe25a051bd8cf64d52be533c9b60cad9bdd7fb'/>
<id>90fe25a051bd8cf64d52be533c9b60cad9bdd7fb</id>
<content type='text'>
(cherry picked from commit 91fb0afe181986b48abfc6092dcca912b39de51d)</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
(cherry picked from commit 91fb0afe181986b48abfc6092dcca912b39de51d)</pre>
</div>
</content>
</entry>
<entry>
<title>[3.6] bpo-31566: Fix an assertion failure in _warnings.warn() in case of a bad __name__ global. (GH-3717) (#3730)</title>
<updated>2017-09-24T20:14:41+00:00</updated>
<author>
<name>Miss Islington (bot)</name>
<email>31488909+miss-islington@users.noreply.github.com</email>
</author>
<published>2017-09-24T20:14:41+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/cpython-git.git/commit/?id=415cc1fa57710614ed3384d0cafc58ccf7adee8c'/>
<id>415cc1fa57710614ed3384d0cafc58ccf7adee8c</id>
<content type='text'>
(cherry picked from commit 5d3e80021ab33360191eb0fbff34e0246c913884)</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
(cherry picked from commit 5d3e80021ab33360191eb0fbff34e0246c913884)</pre>
</div>
</content>
</entry>
<entry>
<title>[3.6] bpo-31416: Fix assertion failures in case of a bad warnings.filters or warnings.defaultaction. (GH-3496) (#3509)</title>
<updated>2017-09-12T06:48:27+00:00</updated>
<author>
<name>Serhiy Storchaka</name>
<email>storchaka@gmail.com</email>
</author>
<published>2017-09-12T06:48:27+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/cpython-git.git/commit/?id=9adc87b0f82e5169c5f44739f89212a86013d1c4'/>
<id>9adc87b0f82e5169c5f44739f89212a86013d1c4</id>
<content type='text'>
Patch by Oren Milman..
(cherry picked from commit 9d984fd2b097c8c29479d1c3eb740995fe1ccb0d)</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Patch by Oren Milman..
(cherry picked from commit 9d984fd2b097c8c29479d1c3eb740995fe1ccb0d)</pre>
</div>
</content>
</entry>
<entry>
<title>[3.6] bpo-31411: Prevent raising a SystemError in case warnings.onceregistry is not a dictionary. (GH-3485). (#3494)</title>
<updated>2017-09-11T07:01:47+00:00</updated>
<author>
<name>Serhiy Storchaka</name>
<email>storchaka@gmail.com</email>
</author>
<published>2017-09-11T07:01:47+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/cpython-git.git/commit/?id=7972ed2111ea2f01e8712eef91bcf2260e05ad8b'/>
<id>7972ed2111ea2f01e8712eef91bcf2260e05ad8b</id>
<content type='text'>
(cherry picked from commit 252033d50effa08046ac34fcc406bc99796ab88b)</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
(cherry picked from commit 252033d50effa08046ac34fcc406bc99796ab88b)</pre>
</div>
</content>
</entry>
<entry>
<title>Issue #28701: Replace PyUnicode_CompareWithASCIIString with _PyUnicode_EqualToASCIIString.</title>
<updated>2016-11-16T08:19:20+00:00</updated>
<author>
<name>Serhiy Storchaka</name>
<email>storchaka@gmail.com</email>
</author>
<published>2016-11-16T08:19:20+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/cpython-git.git/commit/?id=3b73ea127892d0e1f9d8f12f88e4f9c0ba0b89b1'/>
<id>3b73ea127892d0e1f9d8f12f88e4f9c0ba0b89b1</id>
<content type='text'>
The latter function is more readable, faster and doesn't raise exceptions.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
The latter function is more readable, faster and doesn't raise exceptions.
</pre>
</div>
</content>
</entry>
<entry>
<title>Issue #28701: Replace PyUnicode_CompareWithASCIIString with _PyUnicode_EqualToASCIIString.</title>
<updated>2016-11-16T08:17:58+00:00</updated>
<author>
<name>Serhiy Storchaka</name>
<email>storchaka@gmail.com</email>
</author>
<published>2016-11-16T08:17:58+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/cpython-git.git/commit/?id=f4934ea77da38516731a75fbf9458b248d26dd81'/>
<id>f4934ea77da38516731a75fbf9458b248d26dd81</id>
<content type='text'>
The latter function is more readable, faster and doesn't raise exceptions.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
The latter function is more readable, faster and doesn't raise exceptions.
</pre>
</div>
</content>
</entry>
<entry>
<title>Issue #26200: Added Py_SETREF and replaced Py_XSETREF with Py_SETREF</title>
<updated>2016-04-10T15:12:01+00:00</updated>
<author>
<name>Serhiy Storchaka</name>
<email>storchaka@gmail.com</email>
</author>
<published>2016-04-10T15:12:01+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/cpython-git.git/commit/?id=f01e408c1688a207eba18444da8c151c872fba59'/>
<id>f01e408c1688a207eba18444da8c151c872fba59</id>
<content type='text'>
in places where Py_DECREF was used.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
in places where Py_DECREF was used.
</pre>
</div>
</content>
</entry>
<entry>
<title>Issue #26200: Added Py_SETREF and replaced Py_XSETREF with Py_SETREF</title>
<updated>2016-04-10T15:05:40+00:00</updated>
<author>
<name>Serhiy Storchaka</name>
<email>storchaka@gmail.com</email>
</author>
<published>2016-04-10T15:05:40+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/cpython-git.git/commit/?id=57a01d3a0ee20ee9eea69b658c6bac0f39541625'/>
<id>57a01d3a0ee20ee9eea69b658c6bac0f39541625</id>
<content type='text'>
in places where Py_DECREF was used.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
in places where Py_DECREF was used.
</pre>
</div>
</content>
</entry>
</feed>
