[issue23430] socketserver.BaseServer.handle_error() should not catch exiting exceptions

2016-02-22 Thread Martin Panter

Changes by Martin Panter :


--
resolution:  -> fixed
stage: commit review -> resolved
status: open -> closed

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue23430] socketserver.BaseServer.handle_error() should not catch exiting exceptions

2016-02-21 Thread Roundup Robot

Roundup Robot added the comment:

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

--
nosy: +python-dev

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue23430] socketserver.BaseServer.handle_error() should not catch exiting exceptions

2016-02-19 Thread Berker Peksag

Changes by Berker Peksag :


--
stage: patch review -> commit review

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue23430] socketserver.BaseServer.handle_error() should not catch exiting exceptions

2016-02-18 Thread Martin Panter

Martin Panter added the comment:

Thanks for the reivew Berker. I have merged the patch with recent changes and 
updated according to your comments.

--
Added file: http://bugs.python.org/file41967/socketserver-exit.v6.patch

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue23430] socketserver.BaseServer.handle_error() should not catch exiting exceptions

2016-02-12 Thread Martin Panter

Martin Panter added the comment:

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).

--
versions: +Python 3.6 -Python 3.5
Added file: http://bugs.python.org/file41911/socketserver-exit.v5.patch

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue23430] socketserver.BaseServer.handle_error() should not catch exiting exceptions

2015-03-27 Thread Martin Panter

Martin Panter added the comment:

Oops I forgot to refresh the patch. Patch v4 also closes the server in the 
tests.

--
Added file: http://bugs.python.org/file38718/socketserver-exit.v4.patch

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue23430] socketserver.BaseServer.handle_error() should not catch exiting exceptions

2015-03-27 Thread Martin Panter

Martin Panter added the comment:

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.

--
Added file: http://bugs.python.org/file38717/socketserver-exit.v3.patch

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue23430] socketserver.BaseServer.handle_error() should not catch exiting exceptions

2015-02-28 Thread Serhiy Storchaka

Changes by Serhiy Storchaka :


--
nosy: +pitrou

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue23430] socketserver.BaseServer.handle_error() should not catch exiting exceptions

2015-02-14 Thread Martin Panter

Martin Panter added the comment:

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.

--
Added file: http://bugs.python.org/file38144/socketserver-exit.v2.patch

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue23430] socketserver.BaseServer.handle_error() should not catch exiting exceptions

2015-02-14 Thread Berker Peksag

Changes by Berker Peksag :


--
nosy: +berker.peksag
stage:  -> patch review

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue23430] socketserver.BaseServer.handle_error() should not catch exiting exceptions

2015-02-09 Thread Martin Panter

New submission from Martin Panter:

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.

--
components: Library (Lib)
files: socketserver-exit.patch
keywords: patch
messages: 235662
nosy: vadmium
priority: normal
severity: normal
status: open
title: socketserver.BaseServer.handle_error() should not catch exiting 
exceptions
type: enhancement
versions: Python 3.5
Added file: http://bugs.python.org/file38074/socketserver-exit.patch

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com