Issue1537
Created on 2007-12-02 07:08 by aegis, last changed 2007-12-03 20:10 by aegis.
|
msg58079 - (view) |
Author: Chad Austin (aegis) |
Date: 2007-12-02 07:08 |
|
Per discussion at http://mail.python.org/pipermail/python-dev/2007-
December/075498.html, this patch changes GeneratorExit's base class
from Exception to BaseException.
I updated the tests and documentation, but I may have missed any other
discussion of GeneratorExit in the documentation. Happy to update the
patch if there is any feedback.
|
|
msg58083 - (view) |
Author: Christian Heimes (christian.heimes) |
Date: 2007-12-02 12:06 |
|
Can you also add a comment to ./Doc/reference/expressions.rst and update
Misc/NEWS please? The rest of the patch is looking good.
|
|
msg58085 - (view) |
Author: Antoine Pitrou (pitrou) |
Date: 2007-12-02 13:10 |
|
I'm not sure this change is necessary. Why don't you catch StandardError
instead of Exception? StandardError catches all Exception subtypes
except GeneratorExit, StopIteration and the various Warnings.
|
|
msg58086 - (view) |
Author: Christian Heimes (christian.heimes) |
Date: 2007-12-02 13:28 |
|
You make a good point. Can you take it to the mailing list, please?
|
|
msg58096 - (view) |
Author: Chad Austin (aegis) |
Date: 2007-12-02 20:02 |
|
The mailing list discussion continues... in the meantime, I will
update the patch with your suggestions.
Can you describe to me what should change in Doc/reference/
expressions.rst? It makes sense to remove the section in the example
that says you should never catch GeneratorExit. Should I mention
anything about why?
|
|
msg58097 - (view) |
Author: Chad Austin (aegis) |
Date: 2007-12-02 20:07 |
|
New patch...
|
|
msg58138 - (view) |
Author: Guido van Rossum (gvanrossum) |
Date: 2007-12-03 19:05 |
|
looks good to me. Crys, can you do the honors?
|
|
msg58139 - (view) |
Author: Guido van Rossum (gvanrossum) |
Date: 2007-12-03 19:06 |
|
Oops, some tests fail. ctypes and hotshot at least.
|
|
msg58143 - (view) |
Author: Guido van Rossum (gvanrossum) |
Date: 2007-12-03 19:19 |
|
I take it back, that was a build error. After cleaning out the build
directory the hotshot and ctypes tests pass.
|
|
msg58151 - (view) |
Author: Christian Heimes (christian.heimes) |
Date: 2007-12-03 20:03 |
|
Applied in r59300 to the trunk. (This time for real. At first I
committed it together with some junk to py3k branch. :/)
|
|
msg58152 - (view) |
Author: Chad Austin (aegis) |
Date: 2007-12-03 20:10 |
|
Fantastic, thank you!
|
|
| Date |
User |
Action |
Args |
| 2007-12-03 20:10:31 | aegis | set | messages:
+ msg58152 |
| 2007-12-03 20:03:23 | christian.heimes | set | status: open -> closed resolution: accepted -> fixed messages:
+ msg58151 |
| 2007-12-03 19:19:46 | gvanrossum | set | messages:
+ msg58143 |
| 2007-12-03 19:06:20 | gvanrossum | set | messages:
+ msg58139 |
| 2007-12-03 19:05:15 | gvanrossum | set | nosy:
+ gvanrossum resolution: accepted messages:
+ msg58138 |
| 2007-12-02 20:07:35 | aegis | set | files:
+ GeneratorExit-BaseException-2.patch messages:
+ msg58097 |
| 2007-12-02 20:02:54 | aegis | set | messages:
+ msg58096 |
| 2007-12-02 13:28:53 | christian.heimes | set | messages:
+ msg58086 |
| 2007-12-02 13:10:14 | pitrou | set | nosy:
+ pitrou messages:
+ msg58085 |
| 2007-12-02 12:06:59 | christian.heimes | set | priority: normal assignee: christian.heimes messages:
+ msg58083 keywords:
+ patch nosy:
+ christian.heimes |
| 2007-12-02 07:08:02 | aegis | create | |
|