This issue tracker has been migrated to GitHub ,
and is currently read-only.
For more information,
see the GitHub FAQs in the Python's Developer Guide.
Created on 2007年12月02日 07:08 by aegis, last changed 2022年04月11日 14:56 by admin. This issue is now closed.
| Files | ||||
|---|---|---|---|---|
| File name | Uploaded | Description | Edit | |
| GeneratorExit-BaseException.patch | aegis, 2007年12月02日 07:08 | |||
| GeneratorExit-BaseException-2.patch | aegis, 2007年12月02日 20:07 | |||
| Messages (11) | |||
|---|---|---|---|
| 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) * (Python committer) | 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) * (Python committer) | 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) * (Python committer) | 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) * (Python committer) | Date: 2007年12月03日 19:05 | |
looks good to me. Crys, can you do the honors? |
|||
| msg58139 - (view) | Author: Guido van Rossum (gvanrossum) * (Python committer) | Date: 2007年12月03日 19:06 | |
Oops, some tests fail. ctypes and hotshot at least. |
|||
| msg58143 - (view) | Author: Guido van Rossum (gvanrossum) * (Python committer) | 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) * (Python committer) | 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! |
|||
| History | |||
|---|---|---|---|
| Date | User | Action | Args |
| 2022年04月11日 14:56:28 | admin | set | github: 45878 |
| 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 | |