[Patches] [ python-Patches-449637 ] Remove NT special case in asycnore

noreply@sourceforge.net noreply@sourceforge.net
Fri, 10 Aug 2001 10:50:16 -0700


Patches item #449637, was opened at 2001-08-09 15:10
You can respond by visiting: 
http://sourceforge.net/tracker/?func=detail&atid=305470&aid=449637&group_id=5470

Category: library
Group: None
Status: Open
Resolution: Accepted
Priority: 5
Submitted By: Jeremy Hylton (jhylton)
Assigned to: Jeremy Hylton (jhylton)
Summary: Remove NT special case in asycnore

Initial Comment:
asyncore uses socket error codes like EWOULDBLOCK and
EALREADY.  On Unix, it gets the values from errno.  On
NT, it has hard-coded constants.  The constants match
the values I see in errno on Win2k.  Therefore, I
assume that errno should be used on both platforms. 
I'm not sure if older versions of Windows are different
in this repsect.


----------------------------------------------------------------------

>Comment By: Guido van Rossum (gvanrossum)
Date: 2001-08-10 10:50

Message:
Logged In: YES 
user_id=6380

I'm not opposed to coordinating with Sam -- but I thought
that he had lost interest?

----------------------------------------------------------------------

Comment By: Tim Peters (tim_one)
Date: 2001-08-10 10:45

Message:
Logged In: YES 
user_id=31435

Are we opposed to coordinating changes with Sam?  We got a 
fresh version from him just 6 months ago, and the more we 
fiddle on our own the harder it will be to do that the next 
time.  This code may not have been maximally elegant, but 
it's essentially a foreign library (unless we've decided to 
fork our own), and it simply wasn't broken.

----------------------------------------------------------------------

Comment By: Guido van Rossum (gvanrossum)
Date: 2001-08-10 07:07

Message:
Logged In: YES 
user_id=6380

I'm with Jeremy.  The errno module on Windows exports values
for the names used in asyncore match the values that
asyncore hardcodes. Moreover, errnomodule.c #includes
<winsock.h>, which defines the values for these errors. The
exception made in asyncore looks like it predates the patch
(rev 2.5 by MAL) that exported the correct Windows errno
values.

Jeremy, go ahead and check it in.


----------------------------------------------------------------------

Comment By: Tim Peters (tim_one)
Date: 2001-08-09 22:29

Message:
Logged In: YES 
user_id=31435

Back to Jeremy.  Winsock doesn't use errno, and these 
specific hard-coded values are documented by MS as the (a 
very few of many more possible) return codes from the 
Winsock-appropriate WSAGetLastError() API call.  I have no 
idea whether errnomodule.c translates them correctly in all 
cases, despite that it appeared to for you on your Win2K 
box.

Why are you mucking with this?  If you really care, ask Sam 
Rushing why he did it this way -- I can't bless any change 
here.

----------------------------------------------------------------------

You can respond by visiting: 
http://sourceforge.net/tracker/?func=detail&atid=305470&aid=449637&group_id=5470