title: Are urllib2 and httplib thread safe?
body: <p>I'm looking for information on thread safety of <code>urllib2</code> and <code>httplib</code>.
  The official documentation (<a href="http://docs.python.org/library/urllib2.html" rel="nofollow noreferrer">http://docs.python.org/library/urllib2.html</a> and <a href="http://docs.python.org/library/httplib.html" rel="nofollow noreferrer">http://docs.python.org/library/httplib.html</a>) lacks any information on this subject; the word <em>thread</em> is not even mentioned there...</p>
  
  <p>UPDATE</p>
  
  <p>Ok, they are not thread-safe out of the box.
  What's required to make them thread-safe or is there a scenario in which they can be thread-safe?
  I'm asking because it's seems that</p>
  
  <ul>
  <li>using separate <a href="http://docs.python.org/library/urllib2.html#urllib2.OpenerDirector" rel="nofollow noreferrer"><code>OpenerDirector</code></a> in each thread</li>
  <li>not sharing HTTP connection among
  threads</li>
  </ul>
  
  <p>would suffice to safely use these libs in threads. Similar usage scenario was proposed in question <a href="https://stackoverflow.com/questions/3118684/">urllib2 and cookielib thread safety</a></p>