[IronPython] socket, _socket, and socket.py

Zachary Gramana zgramana at pottsconsultinggroup.com
Tue May 17 23:33:59 CEST 2011


I've been working on adapting Mercurial to run on IronPython 2.7, and 
ran into http://ironpython.codeplex.com/workitem/26852 which has stopped 
me from getting `hg clone` working over SSL.

I noticed that for the ssl module, the IPY team mirrored the CPython 
pattern of placing the platform-specific code in the _ssl compiled 
module, and then wrapped the platform-independent around it in ssl.py 
(almost entirely shared with CPython 2.7).

The socket module, however, does not.  I admit I have a limited 
understanding of the code, but at first blush, it appears that adopting 
the _socket.cs/socket.py isn't out-of-the-question. Is there a story 
behind this, or am I missing something obvious to everyone else?

The immediate benefit would be getting a free implementation of 
_socketobject, _dummy, and dup(); it also improves DRY conformance, and 
would help to limit behavioral differences with respect to other 



P.S. Any advice on tackling issue #26852 is very warmly appreciated.

More information about the Ironpython-users mailing list