[issue23254] Document how to close the TCPServer listening socket

2015-07-28 Thread Roundup Robot

Roundup Robot added the comment:

New changeset 8afd995802a6 by Robert Collins in branch '2.7':
Issue #23254: Document how to close the TCPServer listening socket.
https://hg.python.org/cpython/rev/8afd995802a6

New changeset 1123de53195e by Robert Collins in branch '3.4':
Issue #23254: Document how to close the TCPServer listening socket.
https://hg.python.org/cpython/rev/1123de53195e

New changeset 5ee8a4efc06f by Robert Collins in branch '3.5':
Issue #23254: Document how to close the TCPServer listening socket.
https://hg.python.org/cpython/rev/5ee8a4efc06f

New changeset 256d5c7146cb by Robert Collins in branch 'default':
Issue #23254: Document how to close the TCPServer listening socket.
https://hg.python.org/cpython/rev/256d5c7146cb

--
nosy: +python-dev

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



[issue23254] Document how to close the TCPServer listening socket

2015-07-28 Thread Robert Collins

Robert Collins added the comment:

Applied to 2.7/3.4/3.5/3.6. Thanks!

--
nosy: +rbcollins
resolution:  - fixed
stage: commit review - resolved
status: open - closed

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




[issue23254] Document how to close the TCPServer listening socket

2015-02-27 Thread R. David Murray

R. David Murray added the comment:

In general documentation changes go in all maintained versions (ie: right now 
that would be 2.7, 3.4, and default/3.5).  The only exception, really, would be 
if the change didn't apply to one or more of the versions because of code 
differences.  (Note: I haven't reviewed the patch itself yet ;)

--
nosy: +r.david.murray
versions: +Python 2.7

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



[issue23254] Document how to close the TCPServer listening socket

2015-02-27 Thread Martin Panter

Martin Panter added the comment:

Posting server_close.v2.patch, which tests fileno(), and uses a single space 
between the new sentences. Also added a bit to the how-to at the top (using 
doubly-spaced sentences to match the rest of the paragraph).

--
Added file: http://bugs.python.org/file38271/server_close.v2.patch

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



[issue23254] Document how to close the TCPServer listening socket

2015-02-27 Thread Demian Brecht

Demian Brecht added the comment:

LGTM. I'm not sure whether or not it's eligible for 3.4 though as it's a 
documentation and not a functional fix.

--
stage: patch review - commit review

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



[issue23254] Document how to close the TCPServer listening socket

2015-02-25 Thread Demian Brecht

Demian Brecht added the comment:

Left a couple small nitpicks in Rietveld. Otherwise LGTM.

--
nosy: +demian.brecht

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



[issue23254] Document how to close the TCPServer listening socket

2015-02-02 Thread STINNER Victor

Changes by STINNER Victor victor.stin...@gmail.com:


--
nosy: +haypo

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



[issue23254] Document how to close the TCPServer listening socket

2015-02-01 Thread Berker Peksag

Changes by Berker Peksag berker.pek...@gmail.com:


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

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



[issue23254] Document how to close the TCPServer listening socket

2015-01-31 Thread Martin Panter

Martin Panter added the comment:

Here is a simple patch to add server_close() to the documentation, and a simple 
test to ensure it closes the socket.

--
keywords: +patch
versions: +Python 3.4, Python 3.5
Added file: http://bugs.python.org/file37940/server_close.patch

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



[issue23254] Document how to close the TCPServer listening socket

2015-01-16 Thread Martin Panter

New submission from Martin Panter:

Running the example from the Asynchronous Mixins section of the “socketserver” 
documentation generates a ResourceWarning:

$ ./python -btWall ThreadedTCPServer.py
Server loop running in thread: Thread-1
Received: Thread-2: Hello World 1
Received: Thread-3: Hello World 2
Received: Thread-4: Hello World 3
sys:1: ResourceWarning: unclosed socket.socket fd=3, 
family=AddressFamily.AF_INET, type=SocketKind.SOCK_STREAM, proto=0, 
laddr=('127.0.0.1', 43804)

There is a server_close() method mentioned in the doc string of the BaseServer 
class, so I assume it is meant to be part of the API. But there is no mention 
of it in the reference documentation.

I think server.server_close() should be documented, and called after 
server.shutdown() in the example. A further enhancement might be to turn 
BaseServer into a context manager, but I would be happy with using the existing 
server_close() method.

--
assignee: docs@python
components: Documentation
messages: 234161
nosy: docs@python, vadmium
priority: normal
severity: normal
status: open
title: Document how to close the TCPServer listening socket
type: enhancement

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