title: Error when importing WSGIHandler with django
body: <p>Without any code changing, my django app started throwing an exception while loading the WSGI script. I'm using django 1.3 with python 2.7, and the top-level <code>.wsgi</code> is essentially unmodified from the default:</p>
  
  <pre><code>import os
  import sys
  
  from django.core.handlers.wsgi import WSGIHandler
  
  os.environ['DJANGO_SETTINGS_MODULE'] = 'api.settings'
  application = WSGIHandler()
  </code></pre>
  
  <p>It started producing these errors on <em>any</em> request, as reported by Apache:</p>
  
  <pre><code>mod_wsgi (pid=3283): Target WSGI script '/home/beder/webapps/api/api.wsgi' cannot be loaded as Python module.
  mod_wsgi (pid=3283): Exception occurred processing WSGI script '/home/beder/webapps/api/api.wsgi'.
  Traceback (most recent call last):
    File "/home/beder/webapps/api/api.wsgi", line 4, in &lt;module&gt;
      from django.core.handlers.wsgi import WSGIHandler
    File "/home/beder/webapps/api/lib/python2.7/django/core/handlers/wsgi.py", line 10, in &lt;module&gt;
      from django import http
    File "/home/beder/webapps/api/lib/python2.7/django/http/__init__.py", line 122, in &lt;module&gt;
      from django.utils.http import cookie_date
    File "/home/beder/webapps/api/lib/python2.7/django/utils/http.py", line 7, in &lt;module&gt;
      from email.Utils import formatdate
    File "/usr/local/lib/python2.7/email/__init__.py", line 79, in __getattr__
      __import__(self.__name__)
    File "/usr/local/lib/python2.7/email/utils.py", line 27, in &lt;module&gt;
      import random
    File "/usr/local/lib/python2.7/random.py", line 47, in &lt;module&gt;
      from os import urandom as _urandom
  ImportError: cannot import name urandom
  </code></pre>
  
  <p>I restarted the server, and it now works normally (no errors). I'm at a loss for what to do - I want to make sure this doesn't happen again, but it's not happening now, and I have no idea why that import error appeared.</p>