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 2015年02月10日 03:34 by martin.panter, last changed 2022年04月11日 14:58 by admin. This issue is now closed.
| Files | ||||
|---|---|---|---|---|
| File name | Uploaded | Description | Edit | |
| socketserver-exit.patch | martin.panter, 2015年02月10日 03:34 | review | ||
| socketserver-exit.v2.patch | martin.panter, 2015年02月15日 05:22 | review | ||
| socketserver-exit.v3.patch | martin.panter, 2015年03月28日 04:59 | review | ||
| socketserver-exit.v4.patch | martin.panter, 2015年03月28日 05:04 | review | ||
| socketserver-exit.v5.patch | martin.panter, 2016年02月12日 23:06 | review | ||
| socketserver-exit.v6.patch | martin.panter, 2016年02月19日 04:24 | review | ||
| Messages (7) | |||
|---|---|---|---|
| msg235662 - (view) | Author: Martin Panter (martin.panter) * (Python committer) | Date: 2015年02月10日 03:34 | |
I propose changing the socket servers to not suppress exceptions that are meant to exit the interpreter. This is most applicable to single threaded servers, but my patch does the same thing for multithreading servers. It no longer catches exceptions that are not derived from the Exception class, such as KeyboardInterrupt and SystemExit. The shutdown_request() method is still called in all cases though. I also added a test for the forking server’s handle_error() method. |
|||
| msg236022 - (view) | Author: Martin Panter (martin.panter) * (Python committer) | Date: 2015年02月15日 05:22 | |
Looking at this again, I think I should make the forking server’s handle_error() method only be called for Exception subclasses as well. So I am posting a new patch that also does this. |
|||
| msg239454 - (view) | Author: Martin Panter (martin.panter) * (Python committer) | Date: 2015年03月28日 04:59 | |
Patch v3: * Changed the structure of exception handling for the forking server so that there is only one os._exit(status) call site * Rewrote tests to log results to a temporary file. This avoids sending a string of code to a Python subprocess. I use threading.Event and os.waitpid() to synchronize. * Tests now call the handle_request() public API, and create a trivial TCP connection to trigger a request. * Added doc string explaining simple_subprocess() Let me know what you think. |
|||
| msg239455 - (view) | Author: Martin Panter (martin.panter) * (Python committer) | Date: 2015年03月28日 05:04 | |
Oops I forgot to refresh the patch. Patch v4 also closes the server in the tests. |
|||
| msg260209 - (view) | Author: Martin Panter (martin.panter) * (Python committer) | Date: 2016年02月12日 23:06 | |
Here is an updated version for 3.6. I also wrote an entry for What’s New. It seems my change could help people trying to make a single-threaded server quit the server loop (Issue 13749). |
|||
| msg260503 - (view) | Author: Martin Panter (martin.panter) * (Python committer) | Date: 2016年02月19日 04:24 | |
Thanks for the reivew Berker. I have merged the patch with recent changes and updated according to your comments. |
|||
| msg260605 - (view) | Author: Roundup Robot (python-dev) (Python triager) | Date: 2016年02月21日 11:01 | |
New changeset d500d1a9615f by Martin Panter in branch 'default': Issue #23430: Stop socketserver from catching SystemExit etc from handlers https://hg.python.org/cpython/rev/d500d1a9615f |
|||
| History | |||
|---|---|---|---|
| Date | User | Action | Args |
| 2022年04月11日 14:58:12 | admin | set | github: 67618 |
| 2016年02月22日 09:07:41 | martin.panter | set | status: open -> closed resolution: fixed stage: commit review -> resolved |
| 2016年02月21日 11:25:51 | martin.panter | link | issue25139 superseder |
| 2016年02月21日 11:01:43 | python-dev | set | nosy:
+ python-dev messages: + msg260605 |
| 2016年02月19日 12:46:07 | berker.peksag | set | stage: patch review -> commit review |
| 2016年02月19日 04:24:04 | martin.panter | set | files:
+ socketserver-exit.v6.patch messages: + msg260503 |
| 2016年02月12日 23:06:30 | martin.panter | set | files:
+ socketserver-exit.v5.patch messages: + msg260209 versions: + Python 3.6, - Python 3.5 |
| 2015年03月28日 05:04:26 | martin.panter | set | files:
+ socketserver-exit.v4.patch messages: + msg239455 |
| 2015年03月28日 04:59:49 | martin.panter | set | files:
+ socketserver-exit.v3.patch messages: + msg239454 |
| 2015年02月28日 17:39:29 | serhiy.storchaka | set | nosy:
+ pitrou |
| 2015年02月15日 05:22:12 | martin.panter | set | files:
+ socketserver-exit.v2.patch messages: + msg236022 |
| 2015年02月14日 23:09:07 | berker.peksag | set | nosy:
+ berker.peksag stage: patch review |
| 2015年02月10日 03:34:08 | martin.panter | create | |