On Tue, Jun 10, 2008 at 8:26 AM, Giampaolo Rodola' firstname.lastname@example.org wrote:
On 10 Giu, 07:01, "Josiah Carlson" josiah.carl...@gmail.com wrote:
On Mon, Jun 9, 2008 at 7:19 PM, Benjamin Peterson
On Mon, Jun 9, 2008 at 8:42 PM, Josiah Carlson josiah.carl...@gmail.com wrote:
Would it be ok if I committed the changes? Neal, do you want to commit the changes if I post an updated patch with a blurb for the NEWS file?
You are the asyncore maintainer, correct? I believe it's pretty much up to you, then. :)
Indeed, but I didn't want to step on anyone's toes.
It's committed in revision 64062 for anyone who cares.
I've started to test the new code by using the pyftpdlib test suite. On Windows all tests passed but on Linux I get some "EBADF Bad file descriptor" errors occurring when using poll() instead of select(). I'll try to look into them today and open a report if necessary. In the meanwhile I noticed some minor bugs in asyncore.py. Take a look at the patch below:
--- Lib/asyncore.py (revisione 64069) +++ Lib/asyncore.py (copia locale) @@ -228,7 +228,7 @@ # passed be connected. try: self.addr = sock.getpeername()
except socket.error, err: if err == ENOTCONN: # To handle the case where we got an unconnected # socket.
@@ -424,7 +424,7 @@ #check for errors err = self.socket.getsockopt(socket.SOL_SOCKET, socket.SO_ERROR) if err != 0:
raise socket.error(err, strerror(err))
raise socket.error(err, _strerror(err)) self.handle_connect_event() self.handle_write()
I have fixed the testcase (it was failing due to the new semantics of the filewrapper automatically duping the file handle), as well as the two NameErrors that Giampaolo pointed out. See revision 64080.