<feed xmlns='http://www.w3.org/2005/Atom'>
<title>python.git/Lib/test/test_generators.py, branch v3.7.2</title>
<subtitle>Python interpreter</subtitle>
<id>http://dangofactory.net/cgit/cgit.cgi/Server/python.git/atom/Lib/test/test_generators.py?h=v3.7.2</id>
<link rel='self' href='http://dangofactory.net/cgit/cgit.cgi/Server/python.git/atom/Lib/test/test_generators.py?h=v3.7.2'/>
<link rel='alternate' type='text/html' href='http://dangofactory.net/cgit/cgit.cgi/Server/python.git/'/>
<updated>2018-05-16T08:35:06Z</updated>
<entry>
<title>bpo-32384: Skip test when _testcapi isn't available (GH-4940)</title>
<updated>2018-05-16T08:35:06Z</updated>
<author>
<name>Miss Islington (bot)</name>
<email>31488909+miss-islington@users.noreply.github.com</email>
</author>
<published>2018-05-16T08:35:06Z</published>
<link rel='alternate' type='text/html' href='http://dangofactory.net/cgit/cgit.cgi/Server/python.git/commit/?id=4af6110f77e141779492995fd168d4f027fcf3cf'/>
<id>urn:sha1:4af6110f77e141779492995fd168d4f027fcf3cf</id>
<content type='text'>
(cherry picked from commit 4cc3eb48e1e8289df5153db1c701cae263a1ef86)

Co-authored-by: Isaiah Peng &lt;isaiah@users.noreply.github.com&gt;</content>
</entry>
<entry>
<title>[3.7] bpo-32746: Fix multiple typos (GH-5144) (GH-5520)</title>
<updated>2018-02-04T01:41:43Z</updated>
<author>
<name>Miss Islington (bot)</name>
<email>31488909+miss-islington@users.noreply.github.com</email>
</author>
<published>2018-02-04T01:41:43Z</published>
<link rel='alternate' type='text/html' href='http://dangofactory.net/cgit/cgit.cgi/Server/python.git/commit/?id=e86db34dd3b43dc9c9beb21a82cd2c3b7c4c05df'/>
<id>urn:sha1:e86db34dd3b43dc9c9beb21a82cd2c3b7c4c05df</id>
<content type='text'>
Fix typos found by codespell in docs, docstrings, and comments.
(cherry picked from commit c3d9508ff22ece9a96892b628dd5813e2fb0cd80)

Co-authored-by: Leo Arias &lt;leo.arias@canonical.com&gt;</content>
</entry>
<entry>
<title>bpo-32670: Enforce PEP 479. (#5327)</title>
<updated>2018-01-26T20:24:24Z</updated>
<author>
<name>Yury Selivanov</name>
<email>yury@magic.io</email>
</author>
<published>2018-01-26T20:24:24Z</published>
<link rel='alternate' type='text/html' href='http://dangofactory.net/cgit/cgit.cgi/Server/python.git/commit/?id=43c47fe09640c579462978ec16f81295f5857cde'/>
<id>urn:sha1:43c47fe09640c579462978ec16f81295f5857cde</id>
<content type='text'>
</content>
</entry>
<entry>
<title>bpo-32297: Few misspellings found in Python source code comments. (#4803)</title>
<updated>2017-12-14T11:04:53Z</updated>
<author>
<name>Mike</name>
<email>mehanig@gmail.com</email>
</author>
<published>2017-12-14T11:04:53Z</published>
<link rel='alternate' type='text/html' href='http://dangofactory.net/cgit/cgit.cgi/Server/python.git/commit/?id=53f7a7c2814fbfd8a29200926601a32fa48bacb3'/>
<id>urn:sha1:53f7a7c2814fbfd8a29200926601a32fa48bacb3</id>
<content type='text'>
* Fix multiple typos in code comments

* Add spacing in comments (test_logging.py, test_math.py)

* Fix spaces at the beginning of comments in test_logging.py
</content>
</entry>
<entry>
<title>bpo-10544: Deprecate "yield" in comprehensions and generator expressions. (GH-4579)</title>
<updated>2017-12-01T04:54:17Z</updated>
<author>
<name>Serhiy Storchaka</name>
<email>storchaka@gmail.com</email>
</author>
<published>2017-12-01T04:54:17Z</published>
<link rel='alternate' type='text/html' href='http://dangofactory.net/cgit/cgit.cgi/Server/python.git/commit/?id=73a7e9b10b2ec9636e3c6396cf7b3695f8ed1856'/>
<id>urn:sha1:73a7e9b10b2ec9636e3c6396cf7b3695f8ed1856</id>
<content type='text'>
The current behaviour of yield expressions inside comprehensions  and
generator expressions is essentially an accident of implementation - it
arises implicitly from the way the compiler handles yield expressions inside
nested functions and generators.

Since the current behaviour wasn't deliberately designed, and is inherently
confusing, we're deprecating it, with no current plans to reintroduce it.
Instead, our advice will be to use a named nested generator definition
for cases where this behaviour is desired.
</content>
</entry>
<entry>
<title>bpo-30039: Don't run signal handlers while resuming a yield from stack (#1081)</title>
<updated>2017-05-17T20:33:23Z</updated>
<author>
<name>Nathaniel J. Smith</name>
<email>njs@pobox.com</email>
</author>
<published>2017-05-17T20:33:23Z</published>
<link rel='alternate' type='text/html' href='http://dangofactory.net/cgit/cgit.cgi/Server/python.git/commit/?id=ab4413a7e9bda95b6fcd517073e2a51dafaa1624'/>
<id>urn:sha1:ab4413a7e9bda95b6fcd517073e2a51dafaa1624</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.</content>
</entry>
<entry>
<title>bpo-29919: Remove unused imports found by pyflakes (#137)</title>
<updated>2017-03-27T14:05:26Z</updated>
<author>
<name>Victor Stinner</name>
<email>victor.stinner@gmail.com</email>
</author>
<published>2017-03-27T14:05:26Z</published>
<link rel='alternate' type='text/html' href='http://dangofactory.net/cgit/cgit.cgi/Server/python.git/commit/?id=d6debb24e06152a827769b0cac24c47deccdeac1'/>
<id>urn:sha1:d6debb24e06152a827769b0cac24c47deccdeac1</id>
<content type='text'>
Make also minor PEP8 coding style fixes on modified imports.</content>
</entry>
<entry>
<title>Issue #23996: Added _PyGen_SetStopIterationValue for safe raising</title>
<updated>2016-11-06T16:47:03Z</updated>
<author>
<name>Serhiy Storchaka</name>
<email>storchaka@gmail.com</email>
</author>
<published>2016-11-06T16:47:03Z</published>
<link rel='alternate' type='text/html' href='http://dangofactory.net/cgit/cgit.cgi/Server/python.git/commit/?id=60e49aa7560ca70bc5de461abc68eb72d8739e17'/>
<id>urn:sha1:60e49aa7560ca70bc5de461abc68eb72d8739e17</id>
<content type='text'>
StopIteration with value. More safely handle non-normalized exceptions
in -_PyGen_FetchStopIterationValue.
</content>
</entry>
<entry>
<title>Issue #23996: Added _PyGen_SetStopIterationValue for safe raising</title>
<updated>2016-11-06T16:44:42Z</updated>
<author>
<name>Serhiy Storchaka</name>
<email>storchaka@gmail.com</email>
</author>
<published>2016-11-06T16:44:42Z</published>
<link rel='alternate' type='text/html' href='http://dangofactory.net/cgit/cgit.cgi/Server/python.git/commit/?id=24411f8a8daace4ebf8abd41091b681160b4fb89'/>
<id>urn:sha1:24411f8a8daace4ebf8abd41091b681160b4fb89</id>
<content type='text'>
StopIteration with value. More safely handle non-normalized exceptions
in -_PyGen_FetchStopIterationValue.
</content>
</entry>
<entry>
<title>Backed out changeset af29d89083b3 (closes #25548) (closes #27498)</title>
<updated>2016-07-14T04:13:29Z</updated>
<author>
<name>Benjamin Peterson</name>
<email>benjamin@python.org</email>
</author>
<published>2016-07-14T04:13:29Z</published>
<link rel='alternate' type='text/html' href='http://dangofactory.net/cgit/cgit.cgi/Server/python.git/commit/?id=ab078e9ed1a5d1b693d6ee843f1a34e8993e9dee'/>
<id>urn:sha1:ab078e9ed1a5d1b693d6ee843f1a34e8993e9dee</id>
<content type='text'>
</content>
</entry>
</feed>
