title: Gevent exceptions in Django when patching Python modules
body: <p>I have installed the <code>gevent</code> and <code>greenlet</code> libraries and in the <code>__init__.py</code> file of my Djano application I dumped in these two lines:</p>
  
  <pre><code>from gevent import monkey
  monkey.patch_all()
  </code></pre>
  
  <p>Now it's very often I see errors in my Django console that read:</p>
  
  <pre><code>Exception KeyError: KeyError(27066240,) in &lt;module 'threading' from 'C:\Program_Files\Python27\Lib\threading.pyc'&gt; ignored
  </code></pre>
  
  <p>When I remove those two lines, my application works just fine. Here's a list of the packages I'm using on my Windows machine.</p>
  
  <pre><code>django-erroneous - 0.1.0       - active
  Django          - 1.3.1        - active
  gevent          - 0.13.6       - active
  greenlet        - 0.3.3        - active
  lxml            - 2.3.3        - active
  PIL             - 1.1.7        - active
  pip             - 1.0.2        - active
  setuptools      - 0.6c11       - active
  South           - 0.7.3        - active
  virtualenv      - 1.6.1        - active
  yolk            - 0.4.1        - active
  </code></pre>
  
  <p>Are there some compatibility issues with Django and Gevent? Am I doing something wrong here.</p>
  
  <p>FYI, I'm using the pre-built Windows binaries from the unofficial Python repository and this is a development environment.</p>