title: PyTest plugin using xmlrpclib fails with IOError: "unsupported XML-RPC protocol" on Mac OS X
body: <p>When running py.test using a plugin that loads xmlrpclib the test run fails with:</p>
  
  <blockquote>
    <p>INTERNALERROR> Traceback (most recent call last):<br>
    INTERNALERROR> File "/Library/Python/2.7/site-packages/pytest-2.2.4-py2.7.egg/_pytest/main.py", line 70, in wrap_session<br>
    INTERNALERROR> config.pluginmanager.do_configure(config)<br>
    INTERNALERROR>   File "/Library/Python/2.7/site-packages/pytest-2.2.4-py2.7.egg/_pytest/core.py", line 267, in do_configure<br>
    INTERNALERROR> config.hook.pytest_configure(config=self._config)<br>
    INTERNALERROR> File "/Library/Python/2.7/site-packages/pytest-2.2.4-py2.7.egg/_pytest/core.py",line 421, in <strong>call</strong><br>
    INTERNALERROR> return self._docall(methods, kwargs)<br>
    INTERNALERROR> File "/Library/Python/2.7/site-packages/pytest-2.2.4-py2.7.egg/_pytest/core.py",line 432, in _docall 
    INTERNALERROR> res = mc.execute()<br>
    INTERNALERROR> File "/Library/Python/2.7/site-packages/pytest-2.2.4-py2.7.egg/_pytest/core.py",line 350, in execute<br>
    INTERNALERROR> res = method(**kwargs)<br>
    INTERNALERROR> File "/Library/Python/2.7/site-packages/pytest_marker_bugzilla-0.01-py2.7.egg/pytest_marker_bugzilla.py",line 94, in pytest_configure<br>
    INTERNALERROR> bz = bugzilla.Bugzilla(url=url)<br>
    INTERNALERROR>   File "build/bdist.macosx-10.7-intel/egg/bugzilla/<strong>init</strong>.py", line 75, in <strong>init</strong><br>
    INTERNALERROR>     c = getBugzillaClassForURL(kwargs['url'])<br>
    INTERNALERROR>   File "build/bdist.macosx-10.7-intel/egg/bugzilla/<strong>init</strong>.py", line 26, in getBugzillaClassForURL<br>
    INTERNALERROR>     s = xmlrpclib.ServerProxy(url)<br>
    INTERNALERROR>   File "build/bdist.macosx-10.7-intel/egg/xmlrpclib.py", line 1215, in <strong>init</strong><br>
    INTERNALERROR>   raise IOError, "unsupported XML-RPC protocol"<br>
    INTERNALERROR> > > IOError: unsupported XML-RPC protocol  </p>
  </blockquote>
  
  <p>I have verified that xmlrpclib will work with a simple test program, this program removes py.test from the picture.</p>
  
  <pre><code>#!/usr/bin/env python
  
  import xmlrpclib
  import bugzilla
  import sys
  for i in sys.path:
      print i
  
  url = 'https://bugzilla.redhat.com/xmlrpc.cgi'
  u = ' '
  p = ' '
  
  try:
      proxy = xmlrpclib.ServerProxy(url)
  except(), e:
      print e
  b = bugzilla.Bugzilla(url=url)
  b.login(u,p)
  bug = b.getbugsimple('12345')
  print bug
  </code></pre>
  
  <p>The program above when executed returns as expected.  I am at a loss for what is going on here.  I have even added print sys.path to both py.test and the test program above and found that the paths are identical with the exception of the execute directory, /Users/esammons for the test.py and /usr/local/bin for py.test.</p>
  
  <p>To further rule out issues I copied /usr/local/bin/py.test and /usr/local/bin/py.test-2.7 to my project root, same error occurred.</p>
  
  <p>Thanks!</p>