Ticket #18376 (closed defect: fixed)
Remedy socket 35 errors on all Python builds
Description
OSX's poll is broken. Apple knows this, and removes the HAVE_POLL option as can be seen in the first line of the pyconfig patch here:
http://www.opensource.apple.com/darwinsource/10.5.6/python-30.1.2/fix/pyconfig.ed
This patch should be applied to all Python builds that MacPorts supports, as it fixes a nasty bug that is being mis-reported all over the place on OSX. Here's one such example of a traceback caused by it:
File "../uploader.py", line 94, in <module> resp, data = http.request(post_uri, 'POST', body=content, headers=headers) File "build/bdist.macosx-10.5-i386/egg/httplib2/__init__.py", line 1050, in request File "build/bdist.macosx-10.5-i386/egg/httplib2/__init__.py", line 854, in _request File "build/bdist.macosx-10.5-i386/egg/httplib2/__init__.py", line 823, in _conn_request File "/opt/local/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/httplib.py", line 874, in request self._send_request(method, url, body, headers) File "/opt/local/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/httplib.py", line 914, in _send_request self.send(body) File "/opt/local/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/httplib.py", line 719, in send self.sock.sendall(str) File "<string>", line 1, in sendall socket.error: [Errno 35] Resource temporarily unavailable
And another report caused by the same problem: http://www.cherrypy.org/ticket/598
Applying the same regexp that Apple does, fixes the problem in my tests.
Credit for finding this bug and its solution should be attributed to Phil Jenvey, I merely bugged him until he found the problem for me. :)
Change History
Note: See
TracTickets for help on using
tickets.

