[issue8498] Cannot use backlog = 0 for sockets

2011-05-10 Thread Antoine Pitrou
Antoine Pitrou added the comment: Committed, thanks for the patch and review! -- resolution: -> fixed stage: -> committed/rejected status: open -> closed versions: +Python 3.3 -Python 2.6, Python 3.1 ___ Python tracker

[issue8498] Cannot use backlog = 0 for sockets

2011-05-10 Thread Roundup Robot
Roundup Robot added the comment: New changeset 48743ad2d2ef by Antoine Pitrou in branch '2.7': Issue #8498: In socket.accept(), allow to specify 0 as a backlog value in http://hg.python.org/cpython/rev/48743ad2d2ef New changeset 713006ecee0c by Antoine Pitrou in branch '3.2': Issue #8498: In so

[issue8498] Cannot use backlog = 0 for sockets

2011-05-09 Thread Charles-François Natali
Charles-François Natali added the comment: The patch looks fine to me: you just need to find someone interested in reviewing and committing it (didn't find anyone listed as expert for the socket module). -- ___ Python tracker

[issue8498] Cannot use backlog = 0 for sockets

2011-05-09 Thread Daniel Evers
Daniel Evers added the comment: Thanks, I removed the old patches and changed the unit test according to your suggestion. I kept the "usually 5" remark, because I'm not sure how reality really looks like. But feel free to suggest a patch ;) -- Added file: http://bugs.python.org/file21

[issue8498] Cannot use backlog = 0 for sockets

2011-05-09 Thread Daniel Evers
Changes by Daniel Evers : Removed file: http://bugs.python.org/file21879/backlog0_complete.patch ___ Python tracker ___ ___ Python-bugs-list ma

[issue8498] Cannot use backlog = 0 for sockets

2011-05-09 Thread Daniel Evers
Changes by Daniel Evers : Removed file: http://bugs.python.org/file21852/client.py ___ Python tracker ___ ___ Python-bugs-list mailing list Uns

[issue8498] Cannot use backlog = 0 for sockets

2011-05-09 Thread Daniel Evers
Changes by Daniel Evers : Removed file: http://bugs.python.org/file21851/server.py ___ Python tracker ___ ___ Python-bugs-list mailing list Uns

[issue8498] Cannot use backlog = 0 for sockets

2011-05-09 Thread Daniel Evers
Changes by Daniel Evers : Removed file: http://bugs.python.org/file17067/socket_listen.patch ___ Python tracker ___ ___ Python-bugs-list mailin

[issue8498] Cannot use backlog = 0 for sockets

2011-05-09 Thread Daniel Evers
Changes by Daniel Evers : Removed file: http://bugs.python.org/file17066/backlog0_incl_doc.diff ___ Python tracker ___ ___ Python-bugs-list mai

[issue8498] Cannot use backlog = 0 for sockets

2011-05-09 Thread Daniel Evers
Changes by Daniel Evers : Removed file: http://bugs.python.org/file17065/backlog0.diff ___ Python tracker ___ ___ Python-bugs-list mailing list

[issue8498] Cannot use backlog = 0 for sockets

2011-05-05 Thread Charles-François Natali
Charles-François Natali added the comment: > Thanks for the tip. I added the unit test and uploaded my final patch > (which includes all changes). A couple comments (note that I'm not entitled to accept or commit a patch, so feel free to ignore them if I'm just being a pain): - "the maximum va

[issue8498] Cannot use backlog = 0 for sockets

2011-05-04 Thread Daniel Evers
Daniel Evers added the comment: Thanks for the tip. I added the unit test and uploaded my final patch (which includes all changes). Is it ok to remove the files I uploaded previously? -- Added file: http://bugs.python.org/file21879/backlog0_complete.patch _

[issue8498] Cannot use backlog = 0 for sockets

2011-05-03 Thread Charles-François Natali
Charles-François Natali added the comment: > To revive this issue, I tried to write a unit test to verify the behaviour. > Onfurtunately, the test doesn't work and I don't understand why. I hope, > someone here is more enlightend than me... The semantic of listen's backlog argument has always b

[issue8498] Cannot use backlog = 0 for sockets

2011-05-02 Thread Daniel Evers
Daniel Evers added the comment: (client.py) -- Added file: http://bugs.python.org/file21852/client.py ___ Python tracker ___ ___ Pytho

[issue8498] Cannot use backlog = 0 for sockets

2011-05-02 Thread Daniel Evers
Daniel Evers added the comment: To revive this issue, I tried to write a unit test to verify the behaviour. Onfurtunately, the test doesn't work and I don't understand why. I hope, someone here is more enlightend than me... (files: server.py, client.py) -- Added file: http://bugs.pyth

[issue8498] Cannot use backlog = 0 for sockets

2010-04-24 Thread Jean-Paul Calderone
Jean-Paul Calderone added the comment: It'd be nice to have a unit test that passes a small enough value to listen() to trigger the check. Since there's no way to reliably determine what the system backlog really is, there's probably no reason to actually try to determine that the "right" va

[issue8498] Cannot use backlog = 0 for sockets

2010-04-24 Thread Daniel Evers
Daniel Evers added the comment: A second patch for the documentation of socket.listen(). -- Added file: http://bugs.python.org/file17067/socket_listen.patch ___ Python tracker __

[issue8498] Cannot use backlog = 0 for sockets

2010-04-24 Thread Daniel Evers
Daniel Evers added the comment: Ah right ;) Sorry, attached the path incl. the doc string. -- Added file: http://bugs.python.org/file17066/backlog0_incl_doc.diff ___ Python tracker _

[issue8498] Cannot use backlog = 0 for sockets

2010-04-24 Thread Charles-Francois Natali
Charles-Francois Natali added the comment: It looks like you forgot to update the function's documentation ;-) -- ___ Python tracker ___ _

[issue8498] Cannot use backlog = 0 for sockets

2010-04-24 Thread Daniel Evers
Daniel Evers added the comment: I attached a patch: The backlog is set to at least 0 instead of 1. I also added a comment that a backlog < 0 can lead to problems and doesn't make sense anyway (so if there are systems that may crash with backlog < 0 this will be avoided). -- keywords:

[issue8498] Cannot use backlog = 0 for sockets

2010-04-22 Thread Antoine Pitrou
Changes by Antoine Pitrou : -- priority: -> low versions: +Python 2.7, Python 3.1, Python 3.2 ___ Python tracker ___ ___ Python-bugs-l

[issue8498] Cannot use backlog = 0 for sockets

2010-04-22 Thread Antoine Pitrou
Antoine Pitrou added the comment: The request to allow 0 looks reasonable to me. Now if someone wants to propose a patch (+ tests if there's any way of testing for this). -- nosy: +pitrou ___ Python tracker __

[issue8498] Cannot use backlog = 0 for sockets

2010-04-22 Thread Daniel Evers
Daniel Evers added the comment: Thanks for your help. I'll close the listen socket. Nevertheless I'd like to understand the check in sock_listen. The commit message is not very helpful, I agree, that's why I wrote this issue. 0 is a valid value, and I'd suggest two ways to handle this situati

[issue8498] Cannot use backlog = 0 for sockets

2010-04-22 Thread Tarek Ziadé
Changes by Tarek Ziadé : -- assignee: tarek -> components: +Library (Lib) -Distutils ___ Python tracker ___ ___ Python-bugs-list maili

[issue8498] Cannot use backlog = 0 for sockets

2010-04-22 Thread Jean-Paul Calderone
Jean-Paul Calderone added the comment: > Furthermore, python's socket documentation makes it clear: Why does CPython go out of its way to make it impossible to pass 0 to the platform listen() API? The part of the specification you quoted makes it very clear that 0 is a valid value for this a

[issue8498] Cannot use backlog = 0 for sockets

2010-04-22 Thread Charles-Francois Natali
Charles-Francois Natali added the comment: That's a non-portable user of listen()'s backlog, see http://www.opengroup.org/onlinepubs/009695399/functions/listen.html: A backlog argument of 0 may allow the socket to accept connections, in which case the length of the listen queue may be set to a

[issue8498] Cannot use backlog = 0 for sockets

2010-04-22 Thread Antoine Pitrou
Changes by Antoine Pitrou : -- nosy: +exarkun ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python

[issue8498] Cannot use backlog = 0 for sockets

2010-04-22 Thread Daniel Evers
New submission from Daniel Evers : I'm trying to rewrite a server application in python that accepts exactly 1 connection. I have a previous version written in C that can call listen() on a socket with a backlog of 0 connections, but this is not possible in python. In Modules/socketmodule.c (f