<feed xmlns='http://www.w3.org/2005/Atom'>
<title>delta/cpython-git.git/Python/_warnings.c, branch v3.7.13</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.7] bpo-39831: Fix a reference leak in PyErr_WarnEx(). (GH-18750). (GH-18765)</title>
<updated>2020-03-08T16:07:58+00:00</updated>
<author>
<name>Serhiy Storchaka</name>
<email>storchaka@gmail.com</email>
</author>
<published>2020-03-08T16:07:58+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/cpython-git.git/commit/?id=89fabe51af27a16ae71733334ad94921e3980e28'/>
<id>89fabe51af27a16ae71733334ad94921e3980e28</id>
<content type='text'>
(cherry picked from commit 2d2f85517f8216146a2f888d1ad4d765b3be2339)
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
(cherry picked from commit 2d2f85517f8216146a2f888d1ad4d765b3be2339)
</pre>
</div>
</content>
</entry>
<entry>
<title>[3.7] bpo-39831: Fix a reference leak in PyErr_WarnEx(). (GH-18750). (GH-18760)</title>
<updated>2020-03-03T01:13:24+00:00</updated>
<author>
<name>Pablo Galindo</name>
<email>Pablogsal@gmail.com</email>
</author>
<published>2020-03-03T01:13:24+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/cpython-git.git/commit/?id=499c926fbeafa7e4c15d925fea27fe8a65cc3b25'/>
<id>499c926fbeafa7e4c15d925fea27fe8a65cc3b25</id>
<content type='text'>
(cherry picked from commit 2d2f85517f8216146a2f888d1ad4d765b3be2339)

Co-authored-by: Serhiy Storchaka &lt;storchaka@gmail.com&gt;</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
(cherry picked from commit 2d2f85517f8216146a2f888d1ad4d765b3be2339)

Co-authored-by: Serhiy Storchaka &lt;storchaka@gmail.com&gt;</pre>
</div>
</content>
</entry>
<entry>
<title>Fix typo in _warnings.warn_explicit() docstring (GH-16625)</title>
<updated>2019-10-08T09:25:56+00:00</updated>
<author>
<name>Miss Islington (bot)</name>
<email>31488909+miss-islington@users.noreply.github.com</email>
</author>
<published>2019-10-08T09:25:56+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/cpython-git.git/commit/?id=13bc1523a7423e643d070b147596373578e2ed7e'/>
<id>13bc1523a7423e643d070b147596373578e2ed7e</id>
<content type='text'>
(cherry picked from commit 5dfbb4d50333e7a91fc0cd8c03a2f2f2cf56dbd9)

Co-authored-by: Hansraj Das &lt;raj.das.136@gmail.com&gt;</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
(cherry picked from commit 5dfbb4d50333e7a91fc0cd8c03a2f2f2cf56dbd9)

Co-authored-by: Hansraj Das &lt;raj.das.136@gmail.com&gt;</pre>
</div>
</content>
</entry>
<entry>
<title>bpo-35454: Fix miscellaneous minor issues in error handling. (GH-11077)</title>
<updated>2018-12-11T07:05:13+00:00</updated>
<author>
<name>Miss Islington (bot)</name>
<email>31488909+miss-islington@users.noreply.github.com</email>
</author>
<published>2018-12-11T07:05:13+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/cpython-git.git/commit/?id=62674f3a36ec55f86a5f20ee028a37fbd549bd6c'/>
<id>62674f3a36ec55f86a5f20ee028a37fbd549bd6c</id>
<content type='text'>
* bpo-35454: Fix miscellaneous minor issues in error handling.

* Fix a null pointer dereference.
(cherry picked from commit 8905fcc85a6fc3ac394bc89b0bbf40897e9497a6)

Co-authored-by: Serhiy Storchaka &lt;storchaka@gmail.com&gt;</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
* bpo-35454: Fix miscellaneous minor issues in error handling.

* Fix a null pointer dereference.
(cherry picked from commit 8905fcc85a6fc3ac394bc89b0bbf40897e9497a6)

Co-authored-by: Serhiy Storchaka &lt;storchaka@gmail.com&gt;</pre>
</div>
</content>
</entry>
<entry>
<title>bpo-33509: Fix _warnings for module_globals=None (GH-6833)</title>
<updated>2018-05-15T20:56:28+00:00</updated>
<author>
<name>Miss Islington (bot)</name>
<email>31488909+miss-islington@users.noreply.github.com</email>
</author>
<published>2018-05-15T20:56:28+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/cpython-git.git/commit/?id=820219f7867f2bbfe0ac4d4f0d1ea1fdef7795a9'/>
<id>820219f7867f2bbfe0ac4d4f0d1ea1fdef7795a9</id>
<content type='text'>
Don't crash on warnings.warn_explicit() if module_globals is not a dict.
(cherry picked from commit b056562860c227bad2e0ba7cd3130e115c007768)

Co-authored-by: Victor Stinner &lt;vstinner@redhat.com&gt;</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Don't crash on warnings.warn_explicit() if module_globals is not a dict.
(cherry picked from commit b056562860c227bad2e0ba7cd3130e115c007768)

Co-authored-by: Victor Stinner &lt;vstinner@redhat.com&gt;</pre>
</div>
</content>
</entry>
<entry>
<title>bpo-32591: fix abort in _PyErr_WarnUnawaitedCoroutine during shutdown (#5337)</title>
<updated>2018-01-26T19:28:31+00:00</updated>
<author>
<name>Nathaniel J. Smith</name>
<email>njs@pobox.com</email>
</author>
<published>2018-01-26T19:28:31+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/cpython-git.git/commit/?id=dba976b8a28d6e5daa66ef31a6a7c694a9193f6a'/>
<id>dba976b8a28d6e5daa66ef31a6a7c694a9193f6a</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.</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.</pre>
</div>
</content>
</entry>
<entry>
<title> bpo-32571: Avoid raising unneeded AttributeError and silencing it in C code (GH-5222)</title>
<updated>2018-01-25T08:49:40+00:00</updated>
<author>
<name>Serhiy Storchaka</name>
<email>storchaka@gmail.com</email>
</author>
<published>2018-01-25T08:49:40+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/cpython-git.git/commit/?id=f320be77ffb73e3b9e7fc98c37b8df3975d84b40'/>
<id>f320be77ffb73e3b9e7fc98c37b8df3975d84b40</id>
<content type='text'>
Add two new private APIs: _PyObject_LookupAttr() and _PyObject_LookupAttrId()</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Add two new private APIs: _PyObject_LookupAttr() and _PyObject_LookupAttrId()</pre>
</div>
</content>
</entry>
<entry>
<title>bpo-32591: Fix PyExc_WarnFormat call (follow-up commit) (#5263)</title>
<updated>2018-01-22T01:47:04+00:00</updated>
<author>
<name>Yury Selivanov</name>
<email>yury@magic.io</email>
</author>
<published>2018-01-22T01:47:04+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/cpython-git.git/commit/?id=3510334361d6d39aad89e4e0d9bccd0695668583'/>
<id>3510334361d6d39aad89e4e0d9bccd0695668583</id>
<content type='text'>
The previous version was correct in terms of behaviour, but
checking the return value of PyErr_WarnFormat allows to
avoid calling PyErr_Occurred and silences the coverity alarm.</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
The previous version was correct in terms of behaviour, but
checking the return value of PyErr_WarnFormat allows to
avoid calling PyErr_Occurred and silences the coverity alarm.</pre>
</div>
</content>
</entry>
<entry>
<title>bpo-32591: Add native coroutine origin tracking (#5250)</title>
<updated>2018-01-21T14:44:07+00:00</updated>
<author>
<name>Nathaniel J. Smith</name>
<email>njs@pobox.com</email>
</author>
<published>2018-01-21T14:44:07+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/cpython-git.git/commit/?id=fc2f407829d9817ddacccae6944dd0879cfaca24'/>
<id>fc2f407829d9817ddacccae6944dd0879cfaca24</id>
<content type='text'>
* Add coro.cr_origin and sys.set_coroutine_origin_tracking_depth
* Use coroutine origin information in the unawaited coroutine warning
* Stop using set_coroutine_wrapper in asyncio debug mode
* In BaseEventLoop.set_debug, enable debugging in the correct thread</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
* Add coro.cr_origin and sys.set_coroutine_origin_tracking_depth
* Use coroutine origin information in the unawaited coroutine warning
* Stop using set_coroutine_wrapper in asyncio debug mode
* In BaseEventLoop.set_debug, enable debugging in the correct thread</pre>
</div>
</content>
</entry>
<entry>
<title>bpo-31975 (PEP 565): Show DeprecationWarning in __main__ (GH-4458)</title>
<updated>2018-01-08T02:45:02+00:00</updated>
<author>
<name>Nick Coghlan</name>
<email>ncoghlan@gmail.com</email>
</author>
<published>2018-01-08T02:45:02+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/cpython-git.git/commit/?id=9b99747386b690007027c3be2a5d7cfe3d3634f5'/>
<id>9b99747386b690007027c3be2a5d7cfe3d3634f5</id>
<content type='text'>
- primary change is to add a new default filter entry for
  'default::DeprecationWarning:__main__'
- secondary change is an internal one to cope with plain
  strings in the warning module's internal filter list
  (this avoids the need to create a compiled regex object
  early on during interpreter startup)
- assorted documentation updates, including many more
  examples of configuring the warnings settings
- additional tests to ensure that both the pure Python and
  the C accelerated warnings modules have the expected
  default configuration</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
- primary change is to add a new default filter entry for
  'default::DeprecationWarning:__main__'
- secondary change is an internal one to cope with plain
  strings in the warning module's internal filter list
  (this avoids the need to create a compiled regex object
  early on during interpreter startup)
- assorted documentation updates, including many more
  examples of configuring the warnings settings
- additional tests to ensure that both the pure Python and
  the C accelerated warnings modules have the expected
  default configuration</pre>
</div>
</content>
</entry>
</feed>
