<feed xmlns='http://www.w3.org/2005/Atom'>
<title>python.git/Modules/_testcapimodule.c, branch v3.6.2</title>
<subtitle>Python interpreter</subtitle>
<id>http://dangofactory.net/cgit/cgit.cgi/Server/python.git/atom/Modules/_testcapimodule.c?h=v3.6.2</id>
<link rel='self' href='http://dangofactory.net/cgit/cgit.cgi/Server/python.git/atom/Modules/_testcapimodule.c?h=v3.6.2'/>
<link rel='alternate' type='text/html' href='http://dangofactory.net/cgit/cgit.cgi/Server/python.git/'/>
<updated>2017-06-09T21:06:39Z</updated>
<entry>
<title>[3.6] bpo-30039: Don't run signal handlers while resuming a yield from stack (GH-1081) (#1640)</title>
<updated>2017-06-09T21:06:39Z</updated>
<author>
<name>Yury Selivanov</name>
<email>yury@magic.io</email>
</author>
<published>2017-06-09T21:06:39Z</published>
<link rel='alternate' type='text/html' href='http://dangofactory.net/cgit/cgit.cgi/Server/python.git/commit/?id=e89f95bfd0881a9b80c3b1430d154a77bdf5a824'/>
<id>urn:sha1:e89f95bfd0881a9b80c3b1430d154a77bdf5a824</id>
<content type='text'>
If we have a chain of generators/coroutines that are 'yield from'ing
each other, then resuming the stack works like:

- call send() on the outermost generator
- this enters _PyEval_EvalFrameDefault, which re-executes the
  YIELD_FROM opcode
- which calls send() on the next generator
- which enters _PyEval_EvalFrameDefault, which re-executes the
  YIELD_FROM opcode
- ...etc.

However, every time we enter _PyEval_EvalFrameDefault, the first thing
we do is to check for pending signals, and if there are any then we
run the signal handler. And if it raises an exception, then we
immediately propagate that exception *instead* of starting to execute
bytecode. This means that e.g. a SIGINT at the wrong moment can "break
the chain" – it can be raised in the middle of our yield from chain,
with the bottom part of the stack abandoned for the garbage collector.

The fix is pretty simple: there's already a special case in
_PyEval_EvalFrameEx where it skips running signal handlers if the next
opcode is SETUP_FINALLY. (I don't see how this accomplishes anything
useful, but that's another story.) If we extend this check to also
skip running signal handlers when the next opcode is YIELD_FROM, then
that closes the hole – now the exception can only be raised at the
innermost stack frame.

This shouldn't have any performance implications, because the opcode
check happens inside the "slow path" after we've already determined
that there's a pending signal or something similar for us to process;
the vast majority of the time this isn't true and the new check
doesn't run at all..
(cherry picked from commit ab4413a7e9bda95b6fcd517073e2a51dafaa1624)</content>
</entry>
<entry>
<title>bpo-30524: Write unit tests for FASTCALL (#2022) (#2030)</title>
<updated>2017-06-09T20:28:32Z</updated>
<author>
<name>Victor Stinner</name>
<email>victor.stinner@gmail.com</email>
</author>
<published>2017-06-09T20:28:32Z</published>
<link rel='alternate' type='text/html' href='http://dangofactory.net/cgit/cgit.cgi/Server/python.git/commit/?id=b7577456c430283f8b7ec4e914b701cb943cc69b'/>
<id>urn:sha1:b7577456c430283f8b7ec4e914b701cb943cc69b</id>
<content type='text'>
Test C functions:

* _PyObject_FastCall()
* _PyObject_FastCallDict()
* _PyObject_FastCallKeywords()
(cherry picked from commit 3b5cf85edc188345668f987c824a2acb338a7816)</content>
</entry>
<entry>
<title>[3.6] bpo-30184: Add tests for invalid use of PyArg_ParseTupleAndKeywords. (GH-1316). (#1441)</title>
<updated>2017-05-04T03:50:28Z</updated>
<author>
<name>Serhiy Storchaka</name>
<email>storchaka@gmail.com</email>
</author>
<published>2017-05-04T03:50:28Z</published>
<link rel='alternate' type='text/html' href='http://dangofactory.net/cgit/cgit.cgi/Server/python.git/commit/?id=1bebd8a21948652a5f941c550dec06ea84d1d979'/>
<id>urn:sha1:1bebd8a21948652a5f941c550dec06ea84d1d979</id>
<content type='text'>
(cherry picked from commit 5f161fd86dd5bb936a1a2a13391b13b7e59ec201)</content>
</entry>
<entry>
<title>convert from long long to PyLong loselessly (#1106) (#1121)</title>
<updated>2017-04-13T21:11:48Z</updated>
<author>
<name>Benjamin Peterson</name>
<email>benjamin@python.org</email>
</author>
<published>2017-04-13T21:11:48Z</published>
<link rel='alternate' type='text/html' href='http://dangofactory.net/cgit/cgit.cgi/Server/python.git/commit/?id=04ac85394565a1cfbfae03b072ca82adc3a83d3b'/>
<id>urn:sha1:04ac85394565a1cfbfae03b072ca82adc3a83d3b</id>
<content type='text'>
</content>
</entry>
<entry>
<title>Fix a memory leak in split-table dictionaries</title>
<updated>2016-12-15T16:21:23Z</updated>
<author>
<name>Victor Stinner</name>
<email>victor.stinner@gmail.com</email>
</author>
<published>2016-12-15T16:21:23Z</published>
<link rel='alternate' type='text/html' href='http://dangofactory.net/cgit/cgit.cgi/Server/python.git/commit/?id=3d3f264849580ab1e8f3a8e8e8ba402bfe2c6523'/>
<id>urn:sha1:3d3f264849580ab1e8f3a8e8e8ba402bfe2c6523</id>
<content type='text'>
Issue #28147: Fix a memory leak in split-table dictionaries: setattr() must not
convert combined table into split table.

Patch written by INADA Naoki.
</content>
</entry>
<entry>
<title>Issue #28701: Replace PyUnicode_CompareWithASCIIString with _PyUnicode_EqualToASCIIString.</title>
<updated>2016-11-16T08:19:20Z</updated>
<author>
<name>Serhiy Storchaka</name>
<email>storchaka@gmail.com</email>
</author>
<published>2016-11-16T08:19:20Z</published>
<link rel='alternate' type='text/html' href='http://dangofactory.net/cgit/cgit.cgi/Server/python.git/commit/?id=3b73ea127892d0e1f9d8f12f88e4f9c0ba0b89b1'/>
<id>urn:sha1:3b73ea127892d0e1f9d8f12f88e4f9c0ba0b89b1</id>
<content type='text'>
The latter function is more readable, faster and doesn't raise exceptions.
</content>
</entry>
<entry>
<title>Issue #28701: Replace PyUnicode_CompareWithASCIIString with _PyUnicode_EqualToASCIIString.</title>
<updated>2016-11-16T08:17:58Z</updated>
<author>
<name>Serhiy Storchaka</name>
<email>storchaka@gmail.com</email>
</author>
<published>2016-11-16T08:17:58Z</published>
<link rel='alternate' type='text/html' href='http://dangofactory.net/cgit/cgit.cgi/Server/python.git/commit/?id=f4934ea77da38516731a75fbf9458b248d26dd81'/>
<id>urn:sha1:f4934ea77da38516731a75fbf9458b248d26dd81</id>
<content type='text'>
The latter function is more readable, faster and doesn't raise exceptions.
</content>
</entry>
<entry>
<title>Issue #28123: _PyDict_GetItem_KnownHash() now can raise an exception as</title>
<updated>2016-11-06T11:18:24Z</updated>
<author>
<name>Serhiy Storchaka</name>
<email>storchaka@gmail.com</email>
</author>
<published>2016-11-06T11:18:24Z</published>
<link rel='alternate' type='text/html' href='http://dangofactory.net/cgit/cgit.cgi/Server/python.git/commit/?id=f0b311bd739d36d62e81dacd27d098c496e8663a'/>
<id>urn:sha1:f0b311bd739d36d62e81dacd27d098c496e8663a</id>
<content type='text'>
PyDict_GetItemWithError().  Patch by Xiang Zhang.
</content>
</entry>
<entry>
<title>Merge from 3.5.</title>
<updated>2016-10-08T19:46:01Z</updated>
<author>
<name>Serhiy Storchaka</name>
<email>storchaka@gmail.com</email>
</author>
<published>2016-10-08T19:46:01Z</published>
<link rel='alternate' type='text/html' href='http://dangofactory.net/cgit/cgit.cgi/Server/python.git/commit/?id=21d9f10c9442ba646340913beba8cf73cc77c885'/>
<id>urn:sha1:21d9f10c9442ba646340913beba8cf73cc77c885</id>
<content type='text'>
</content>
</entry>
<entry>
<title>Issue #28379: Added sanity checks and tests for PyUnicode_CopyCharacters().</title>
<updated>2016-10-08T19:45:38Z</updated>
<author>
<name>Serhiy Storchaka</name>
<email>storchaka@gmail.com</email>
</author>
<published>2016-10-08T19:45:38Z</published>
<link rel='alternate' type='text/html' href='http://dangofactory.net/cgit/cgit.cgi/Server/python.git/commit/?id=9c0e1f83af433a9eebb70cd41adcff2b0d608e05'/>
<id>urn:sha1:9c0e1f83af433a9eebb70cd41adcff2b0d608e05</id>
<content type='text'>
Patch by Xiang Zhang.
</content>
</entry>
</feed>
