[issue8524] SSL sockets do not retain the parent socket's attributes

2010-09-05 Thread Éric Araujo
Éric Araujo added the comment: In case someone lands here from the 3.2 what’s new document: The method has been renamed to detach. -- nosy: +eric.araujo ___ Python tracker ___ _

[issue8524] SSL sockets do not retain the parent socket's attributes

2010-08-08 Thread Antoine Pitrou
Antoine Pitrou added the comment: sockforget.patch committed in r83869 (py3k). Thank you for the comments. -- resolution: -> fixed status: open -> closed ___ Python tracker ___

[issue8524] SSL sockets do not retain the parent socket's attributes

2010-08-04 Thread Antoine Pitrou
Antoine Pitrou added the comment: If nobody chimes in, I will opt for the socket.forget() solution. -- ___ Python tracker ___ ___ Pyth

[issue8524] SSL sockets do not retain the parent socket's attributes

2010-06-20 Thread Antoine Pitrou
Antoine Pitrou added the comment: > It might be nice to see the version that avoids the dup() and has the > duplicate code instead (interesting trade-off ;). Just for the sake of > comparison against the forget() proposal. Here it is. There's probably a bit of polishing left to do, in the (u

[issue8524] SSL sockets do not retain the parent socket's attributes

2010-06-19 Thread Jean-Paul Calderone
Jean-Paul Calderone added the comment: It might be nice to see the version that avoids the dup() and has the duplicate code instead (interesting trade-off ;). Just for the sake of comparison against the forget() proposal. -- ___ Python tracker

[issue8524] SSL sockets do not retain the parent socket's attributes

2010-06-19 Thread Antoine Pitrou
Antoine Pitrou added the comment: I have tried refactoring the ssl code in order not to inherit from socket anymore, but it turned out suboptimal because chunks of code from the socket class then have to be duplicated. Therefore, I instead propose a much simpler approach which is to add a for

[issue8524] SSL sockets do not retain the parent socket's attributes

2010-04-26 Thread Jean-Paul Calderone
Jean-Paul Calderone added the comment: getpeername() "sometimes" failing "soon" after a socket is created is a semi-well-known Windows socket... feature. For whatever that's worth. -- ___ Python tracker _

[issue8524] SSL sockets do not retain the parent socket's attributes

2010-04-26 Thread Antoine Pitrou
Antoine Pitrou added the comment: > Well, at the risk of stating the obvious, perhaps the dup() thing > should be eliminated. The justification for it seems less than clear, > and apparently it causes some problems. I've just found another problem while investigating the cause of some sporadic

[issue8524] SSL sockets do not retain the parent socket's attributes

2010-04-24 Thread Jean-Paul Calderone
Jean-Paul Calderone added the comment: Well, at the risk of stating the obvious, perhaps the dup() thing should be eliminated. The justification for it seems less than clear, and apparently it causes some problems. That might be a direction to consider in the long term, though, rather than a

[issue8524] SSL sockets do not retain the parent socket's attributes

2010-04-24 Thread Antoine Pitrou
Antoine Pitrou added the comment: I committed a fix+tests for the timeout value in r80456 (py3k) and r80457 (3.1). Apparently the socket objects' own dup() method doesn't try to retain anything else than the timeout. I'm leaving this issue as "pending" in case criticism or better options are

[issue8524] SSL sockets do not retain the parent socket's attributes

2010-04-24 Thread Antoine Pitrou
Changes by Antoine Pitrou : -- priority: normal -> high type: -> behavior ___ Python tracker ___ ___ Python-bugs-list mailing list Uns

[issue8524] SSL sockets do not retain the parent socket's attributes

2010-04-24 Thread Antoine Pitrou
Antoine Pitrou added the comment: Another consequence is that the following check in __init__: timeout = self.gettimeout() if timeout == 0.0: # non-blocking raise ValueError("do_handshake_on_connect should n

[issue8524] SSL sockets do not retain the parent socket's attributes

2010-04-24 Thread Antoine Pitrou
Antoine Pitrou added the comment: It is actually a little funnier. dup() preserves the blocking/non-blocking nature of the underlying OS socket, but not the "timeout" of the Python socket. As such, a "blocking-with-timeout" Python socket gets replaced with a truely non-blocking socket.

[issue8524] SSL sockets do not retain the parent socket's attributes

2010-04-24 Thread Antoine Pitrou
New submission from Antoine Pitrou : In 3.x, SSL sockets are created by dup()ing the original socket and then closing it. No attempt is made to conserve the socket's characteristics, such as the timeout and probably other flags. I understand that it may be too late to change the design decisio